﻿Type.registerNamespace("PhArt.UI.WebControls");PhArt.UI.WebControls.Communicator=function(element){PhArt.UI.WebControls.Communicator.initializeBase(this,[element]);this._communicatorId=null;this._requiresClient2ServerListener=null;this._listeners=new Array();this._lastClient2ServerCommandSource=null};PhArt.UI.WebControls.Communicator.prototype={initialize:function(){PhArt.UI.WebControls.Communicator.callBaseMethod(this,'initialize');PhArt.UI.WebControls.Communicator.__InstanceId=this._communicatorId},dispose:function(){PhArt.UI.WebControls.Communicator.callBaseMethod(this,'dispose')},registerClientListener:function(){for(var i=0;i<arguments.length;i++){var commandListener=arguments[i];if(typeof(this._listeners[commandListener])==='undefined'){this._listeners.push(commandListener);this._listeners[commandListener]=commandListener}}},fireClientListener:function(commandSource,commandType,commandArgument){for(var i=0;i<this._listeners.length;i++){try{eval(this._listeners[i])(commandSource,commandType,commandArgument)}catch(e){}}},fireClient2ServerListener:function(commandSource,commandType,commandArgument){if(this._requiresClient2ServerListener){this._lastClient2ServerCommandSource=commandSource;__doPostBack(this._communicatorId,commandSource+"|"+commandType+"|"+commandArgument)}},get_lastClient2ServerCommandSource:function(){return this._lastClient2ServerCommandSource},get_communicatorId:function(){return this._communicatorId},set_communicatorId:function(value){if(this._communicatorId!==value){this._communicatorId=value;this.raisePropertyChanged('communicatorId')}},get_requiresClient2ServerListener:function(){return this._requiresClient2ServerListener},set_requiresClient2ServerListener:function(value){if(this._requiresClient2ServerListener!==value){this._requiresClient2ServerListener=value;this.raisePropertyChanged('requiresClient2ServerListener')}}};PhArt.UI.WebControls.Communicator.getInstance=function(){return $find(PhArt.UI.WebControls.Communicator.__InstanceId)};PhArt.UI.WebControls.Communicator.__InstanceId=null;PhArt.UI.WebControls.Communicator.registerClass('PhArt.UI.WebControls.Communicator',Sys.UI.Control);if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();