function LoadList(data){this.XmlHttp=this.GetHttpObject();this.data=data;return this;}
LoadList.prototype.GetHttpObject=function(){if(window.XMLHttpRequest){try{return new XMLHttpRequest();}
catch(e){}}
else if(window.ActiveXObject){try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(e){}
try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(e){}}
return null;}
LoadList.prototype.DoCallBack=function(URL,Query,Cache){
var theData=Query;
var theform=document.forms[0];
var thePage=URL;var eName='';
if(Cache==null){
var curDate=new Date();
theData+='&time='+curDate.getTime().toString();}
if(this.XmlHttp){if(this.XmlHttp.readyState==4||this.XmlHttp.readyState==0){
var oThis=this;
this.XmlHttp.onreadystatechange=function(){oThis.ReadyStateChange();};
this.XmlHttp.open("POST",URL,true);
this.XmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
this.XmlHttp.setRequestHeader("Content-length",theData.length);
this.XmlHttp.setRequestHeader("Connection","close");
this.XmlHttp.send(theData);}}}
LoadList.prototype.DoCallSync=function(URL,theData,Cache)
{try{var curDate=new Date();var theData=Query+'&time='+curDate.getTime().toString();this.XmlHttp.open('GET',URL+'?'+theData,false);this.XmlHttp.send(null);var res=this.XmlHttp.responseXML;if(((this.XmlHttp.status==200)||(this.XmlHttp.status==0))&&res!=undefined)
{this.OnComplete(this.XmlHttp.responseText,this.XmlHttp.responseXML,this.data);return true;}
else
{return false;}}
catch(e)
{return false;}}
LoadList.prototype.AbortCallBack=function()
{if(this.XmlHttp)
this.XmlHttp.abort();}
LoadList.prototype.OnLoading=function()
{}
LoadList.prototype.OnLoaded=function()
{}
LoadList.prototype.OnInteractive=function()
{}
LoadList.prototype.OnComplete=function(responseText,responseXml)
{}
LoadList.prototype.OnAbort=function()
{}
LoadList.prototype.OnError=function(status,statusText)
{}
LoadList.prototype.ReadyStateChange=function()
{if(this.XmlHttp.readyState==1)
{this.OnLoading();}
else if(this.XmlHttp.readyState==2)
{this.OnLoaded();}
else if(this.XmlHttp.readyState==3)
{this.OnInteractive();}
else if(this.XmlHttp.readyState==4)
{if(this.XmlHttp.status==0)
this.OnAbort();else if(this.XmlHttp.status==200&&this.XmlHttp.statusText=="OK")
{this.OnComplete(this.XmlHttp.responseText,this.XmlHttp.responseXML,this.data);}
else
this.OnError(this.XmlHttp.status,this.XmlHttp.statusText,this.XmlHttp.responseText);}}
function clickSponsor(Id)
{var ClickSponsor=new LoadList();var URL="/AdvSys/AdvPanel/AddClick.aspx";var Query='id='+Id;ClickSponsor.DoCallBack(URL,Query);return true;}
String.prototype.trimLeft=function(){return this.replace(/^\s*/,"");}
String.prototype.trimRight=function(){return this.replace(/\s*$/,"");}
String.prototype.trim=function(){return this.trimRight().trimLeft();}
String.prototype.endsWith=function(s){if(this.length==0||this.length<s.length){return false;}
return(this.substr(this.length-s.length)==s);}
String.prototype.startsWith=function(s){if(this.length==0||this.length<s.length){return false;}
return(this.substr(0,s.length)==s);}
String.prototype.repCh1=function(){var reg=/\;/;return this.replace(reg,"|");}
String.prototype.repCh2=function(){return this.replace(/\|/,";");}
