﻿var aa=null;function lsdAJAX(aN,j,at,k,ap,aE,aF,aG,aH){if(j==null||typeof(j)=='undefined')j=false;if(typeof(at)=='undefined')at=null;if(typeof(k)=='undefined')k=null;if(typeof(ap)=='undefined')ap=false;this.aN=aN;this.j=j;this.H=new Array();this.r=new Array();this.aJ=new Array();this.aI=null;this.M=0;this.B=this.K=this.ax=false;this.C=this.D=this.Q=this.A=this.c=null;this.at=at;this.k=k;this.ap=ap;this.responseText=this.responseXML=null;this.aE=aE;this.aF=aF;this.aG=aG;this.aH=aH;};lsdAJAX.prototype.existsParameter=function(name){return this.H.existsInArray(name);};lsdAJAX.prototype.addParameter=function(name,value){var n=this.H.getIndex(name);if(n> -1){if(this.aI==null){this.aJ.push(this.r[n]);this.aI=name;}else if(this.aI!=name){alert('LSD BasePage: Only 1 array parameter is allowed in an AJAX callback!');return;}try{if(value==null)this.aJ.push('0');else if(typeof(value)=='boolean')this.aJ.push('1'+(value?'1':'0'));else if(typeof(value)=='number')this.aJ.push('1'+value);else if(typeof(value)=='object'){try{var y=value.getFullYear();var m=value.getMonth()+1;var d=value.getDate();var h=value.getHours();var n=value.getMinutes();var s=value.getSeconds();if(m<10)m='0'+m;if(d<10)d='0'+d;if(h<10)h='0'+h;if(n<10)n='0'+n;if(s<10)s='0'+s;this.aJ.push('1'+y+m+d+h+n+s);}catch(ex){this.aJ.push('1'+unescape(encodeURIComponent(value.replace(/\</g,'##<##').replace(/\>/g,'##>##'))));}}else this.aJ.push('1'+unescape(encodeURIComponent(value.replace(/\</g,'##<##').replace(/\>/g,'##>##'))));}catch(ex){alert('LSD BasePage: Invalid parameter specified for AJAX command.');}}else{this.H.push(name);try{if(value==null)this.r.push('0');else if(typeof(value)=='boolean')this.r.push('1'+(value?'1':'0'));else if(typeof(value)=='number')this.r.push('1'+value);else if(typeof(value)=='object'){try{var y=value.getFullYear();var m=value.getMonth()+1;var d=value.getDate();var h=value.getHours();var n=value.getMinutes();var s=value.getSeconds();if(m<10)m='0'+m;if(d<10)d='0'+d;if(h<10)h='0'+h;if(n<10)n='0'+n;if(s<10)s='0'+s;this.r.push('1'+y+m+d+h+n+s);}catch(ex){this.r.push('1'+unescape(encodeURIComponent(value.replace(/\</g,'##<##').replace(/\>/g,'##>##'))));}}else this.r.push('1'+unescape(encodeURIComponent(value.replace(/\</g,'##<##').replace(/\>/g,'##>##'))));}catch(ex){alert('LSD BasePage: Invalid parameter specified for AJAX command.');}}};lsdAJAX.prototype.ah=function(self){return function(){var to=self.Q;self.abort();if(to!=null){to();to=null;}else alert('LSD BasePage: Timeout while waiting for response to complete.');};};lsdAJAX.prototype.ai=function(self){return function(){if(self.c.readyState==4){self.K=false;page.an--;window.clearTimeout(self.M);if(self.k!=null)self.k();if(self.c.status==200&& !self.ax){self.responseXML=self.c.responseXML;self.responseText=self.c.responseText;if(self.j){switch(parseInt(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_CODE','1'),10)){case 0:try{if(self.C!=null)self.C(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''),self.responseXML);}catch(ex){alert(ex.message);}break;case 1:try{if(self.D!=null)self.D(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));}catch(ex){alert(ex.message);}break;case 2:alert(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));break;case 3:try{if(self.A!=null)self.A(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));else{var s=page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');if(s==null||s.length==0)alert('LSD BasePage: Callback canceled on server.\n\nNo reason specified.');else alert('LSD BasePage: Callback canceled on server for the following reason.\n\n'+s);}}catch(ex){alert(ex.message);}break;case 4:window.location.href=page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');break;case 5:alert(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));try{if(self.D!=null)self.D(page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));}catch(ex){alert(ex.message);}break;case 6:window.top.location.href=page.getNodeValue(self.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');break;}}else{switch(parseInt(self.responseText.charAt(0),10)){case 0:try{if(self.C!=null){if(self.responseText.length>1)self.C(self.responseText.substring(1));else self.C(null);}}catch(ex){alert(ex.message);}break;case 1:try{if(self.D!=null){if(self.responseText.length>1)self.D(self.responseText.substring(1));else self.D(null);}}catch(ex){alert(ex.message);}break;case 2:if(self.responseText.length>1)alert(self.responseText.substring(1));else alert('LSD BasePage: Serverside method caused unspecified error.');break;case 3:try{if(self.A!=null){if(self.responseText.length>1)self.A(self.responseText.substring(1));else self.A(null);}else{if(self.responseText.length==1)alert('LSD BasePage: Callback canceled on server.\n\nNo reason specified.');else alert('LSD BasePage: Callback canceled on server.\n\n'+self.responseText.substring(1));}}catch(ex){alert(ex.message);}break;case 4:window.location.href=self.responseText.substring(1);break;case 5:if(self.responseText.length>1)alert(self.responseText.substring(1));else alert('LSD BasePage: Serverside method caused unspecified error.');try{if(self.D!=null){if(self.responseText.length>1)self.D(self.responseText.substring(1));else self.D(null);}}catch(ex){alert(ex.message);}break;case 6:window.top.location.href=self.responseText.substring(1);break;}}}else if(!self.ax){alert('LSD BasePage: Response error code: '+self.c.status);}self.ac();}};};lsdAJAX.prototype.abort=function(){if(this.K){this.K=false;this.ax=true;window.clearTimeout(this.M);page.an--;this.c.abort();this.ac();}};lsdAJAX.prototype.ac=function(){if(this.c!=null){try{this.c.onreadystatechange=null;}catch(ex){this.c.onreadystatechange=function(){};}}if(this.B)this.H=this.r=this.aJ=this.aI=null;this.C=this.D=this.A=this.Q=this.c=this.at=this.k=null;};lsdAJAX.prototype.send=function(ak,method,ag,ae,af,aj,G,B){if(ak==null||typeof(ak)==undefined)ak=this.aN;if(G==null||typeof(G)=='undefined'||G<=0)G=30000;if(B==null||typeof(B)=='undefined')B=true;if(method==null||typeof(method)=='undefined')method='';if(typeof(ag)=='undefined')ag=null;if(typeof(ae)=='undefined')ae=null;if(typeof(af)=='undefined')af=null;if(typeof(aj)=='undefined')aj=null;this.C=ag;this.D=ae;this.A=af;this.Q=aj;this.B=B;if(window.XMLHttpRequest){this.c=new XMLHttpRequest();if(this.c.overrideMimeType)this.c.overrideMimeType('text/xml');}else if(window.ActiveXObject){try{this.c=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{this.c=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){alert('LSD BasePage: Unable to create AJAX command object.');}}}if(this.c!=null){if(this.at!=null)this.at();this.c.open('POST',ak+'?randomizer='+escape((Math.random()*10000)+1),!this.ap);if(!this.ap)this.c.onreadystatechange=this.ai(this);P='LSD_BASEPAGE_ASYNC=1&LSD_BASEPAGE_METHOD='+escape(method)+'&LSD_BASEPAGE_ARGS='+(this.H.length+(this.aE!=null?this.aE.length:0))+'&LSD_BASEPAGE_XML='+(this.j?'1':'0');for(J=0;J<this.H.length;J++){if(this.H[J]==this.aI){if(this.aJ==null||this.aJ.length==0)P+=('&'+this.aI+'=0');else{P+=('&'+this.aI+'=1'+this.aJ.length.toString());for(aK=0;aK<this.aJ.length;aK++){P+=('&'+this.aI+'_'+aK.toString()+'='+escape(this.aJ[aK]));}}}else P+=('&'+this.H[J]+'='+escape(this.r[J]));}if(this.aE!=null){for(J=0;J<this.aE.length;J++){P+=('&'+this.aE[J]+'='+escape(this.aF[J]));}}if(this.aG!=null){for(J=0;J<this.aG.length;J++){P+=('&'+this.aG[J]+'='+escape(this.aH[J]));}}this.c.setRequestHeader('Content-type','application/x-www-form-urlencoded; charset=UTF-8');this.c.setRequestHeader('Content-length',P.length);this.c.setRequestHeader('Connection','close');if(!this.ap){this.ax=false;this.K=true;this.M=window.setTimeout(this.ah(this),G);page.an++;}this.c.send(P);if(this.ap){if(this.k!=null)this.k();this.responseXML=this.c.responseXML;this.responseText=this.c.responseText;if(this.j){switch(parseInt(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_CODE','1'),10)){case 0:try{if(this.C!=null)this.C(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''),this.responseXML);}catch(ex){alert(ex.message);}break;case 1:try{if(this.D!=null)this.D(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));}catch(ex){alert(ex.message);}break;case 2:alert(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));break;case 3:try{if(this.A!=null)this.A(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));else{var s=page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');if(s==null||s.length==0)alert('LSD BasePage: Callback canceled on server.\n\nNo reason specified.');else alert('LSD BasePage: Callback canceled on server for the following reason.\n\n'+s);}}catch(ex){alert(ex.message);}break;case 4:window.location.href=page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');break;case 5:alert(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));try{if(this.D!=null)this.D(page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT',''));}catch(ex){alert(ex.message);}break;case 6:window.top.location.href=page.getNodeValue(this.responseXML,'LSD_BASEPAGE_RESPONSE_DATA','LSD_BASEPAGE_RESPONSE_RESULT','');break;}}else{switch(parseInt(this.responseText.charAt(0),10)){case 0:try{if(this.C!=null){if(this.responseText.length>1)this.C(this.responseText.substring(1));else this.C(null);}}catch(ex){alert(ex.message);}break;case 1:try{if(this.D!=null){if(this.responseText.length>1)this.D(this.responseText.substring(1));else this.D(null);}}catch(ex){alert(ex.message);}break;case 2:if(this.responseText.length>1)alert(this.responseText.substring(1));else alert('LSD BasePage: Serverside method caused unspecified error.');break;case 3:try{if(this.A!=null){if(this.responseText.length>1)this.A(this.responseText.substring(1));else this.A(null);}else{if(this.responseText.length==1)alert('LSD BasePage: Callback canceled on server.\n\nNo reason specified.');else alert('LSD BasePage: Callback canceled on server.\n\n'+this.responseText.substring(1));}}catch(ex){alert(ex.message);}break;case 4:window.location.href=this.responseText.substring(1);break;case 5:if(this.responseText.length>1)alert(this.responseText.substring(1));else alert('LSD BasePage: Serverside method caused unspecified error.');try{if(this.D!=null){if(this.responseText.length>1)this.D(this.responseText.substring(1));else this.D(null);}}catch(ex){alert(ex.message);}break;case 6:window.top.location.href=this.responseText.substring(1);break;}this.responseText=this.responseText.substring(1);}this.ac();}}else{alert('LSD BasePage: Unable to start AJAX request.');}};function lsdPage(v,aN,az,ay,aE,aF,aG,aH){this.an=0;this.v=v;this.aN=aN;this.az=az;this.ay=ay;this.aE=aE;this.aF=aF;this.aG=aG;this.aH=aH;};lsdPage.prototype.getAJAXObject=function(j,at,k,ap){return new lsdAJAX(this.aN,j,at,k,ap,this.aE,this.aF,this.aG,this.aH);};lsdPage.prototype.hasExecutingRequests=function(){return this.an>0;};lsdPage.prototype.getBrowserType=function(){return this.az;};lsdPage.prototype.getBrowserVersion=function(){return this.ay;};lsdPage.prototype.getNodeValue=function(xml,ad,nodeName,al){var V=xml.getElementsByTagName(ad)[0].getElementsByTagName(nodeName)[0];if(V!=null){if(V.firstChild!=null)return V.firstChild.nodeValue;else if(typeof al!='undefined')return al;else return null;}else if(typeof al!='undefined')return al;else return null;};lsdPage.prototype.getNodeValue_Date=function(xml,ad,nodeName,al){var aC=typeof(al)=='object'&&al!=null?value.getFullYear()+';'+value.getMonth()+';'+value.getDate()+';'+value.getHours()+';'+value.getMinutes()+';'+value.getSeconds():'';var aB=this.getNodeValue(xml,ad,nodeName,aC);if(aB!=null&&aB.length>0){var aA=aB.split(';');return new Date(parseInt(aA[0],10),parseInt(aA[1],10)-1,parseInt(aA[2],10),parseInt(aA[3],10),parseInt(aA[4],10),parseInt(aA[5],10));}else return null;};lsdPage.prototype.getNodeValue_Int=function(xml,ad,nodeName,al){var aD=this.getNodeValue(xml,ad,nodeName,'');if(aD.length==0)return al;else return parseInt(aD,10);};lsdPage.prototype.getNodeValue_Float=function(xml,ad,nodeName,al){var aD=this.getNodeValue(xml,ad,nodeName,'');if(aD.length==0)return al;else return parseFloat(aD);};lsdPage.prototype.getNodeValue_Bool=function(xml,ad,nodeName,al){var aD=this.getNodeValue(xml,ad,nodeName,'');if(aD.length==0)return al;else return parseInt(aD,10)==1;};lsdPage.prototype.getNodeNameValuePair=function(xml,ad,nodeName){var V=xml.getElementsByTagName(ad)[0].getElementsByTagName(nodeName)[0];if(V!=null&&V.firstChild!=null){var aM='',aw='';if(typeof V.childNodes[1].textContent!='undefined'){for(var i=0;i<V.childNodes.length;i++){switch(V.childNodes[i].tagName){case 'value':aw=V.childNodes[i].textContent;break;case 'name':aM=V.childNodes[i].textContent;break;}}}else if(typeof V.childNodes[0].text!='undefined'){aM=V.childNodes[0].text;aw=V.childNodes[1].text;}else if(typeof V.childNodes[0].innerText!='undefined'){aM=V.childNodes[0].innerText;aw=V.childNodes[1].innerText;}return{name:aM,value:aw};}else return null;};lsdPage.prototype.getNodeNameValuePair_Bool=function(xml,ad,nodeName){var nv=this.getNodeNameValuePair(xml,ad,nodeName);return nv==null?null:{name:nv.name,value:parseInt(nv.value,10)==1};};lsdPage.prototype.getNodeNameValuePair_Int=function(xml,ad,nodeName){var nv=this.getNodeNameValuePair(xml,ad,nodeName);return nv==null?null:{name:nv.name,value:parseInt(nv.value,10)};};lsdPage.prototype.getNodeNameValuePair_Float=function(xml,ad,nodeName){var nv=this.getNodeNameValuePair(xml,ad,nodeName);return nv==null?null:{name:nv.name,value:parseFloat(nv.value)};};lsdPage.prototype.getNodeNameValuePair_Date=function(xml,ad,nodeName){var nv=this.getNodeNameValuePair(xml,ad,nodeName);if(nv==null)return null;else{var aA=nv.value.split(';');return{name:nv.name,value:new Date(parseInt(aA[0],10),parseInt(aA[1],10)-1,parseInt(aA[2],10),parseInt(aA[3],10),parseInt(aA[4],10),parseInt(aA[5],10))};}};lsdPage.prototype.getNodeNameValueCollection=function(xml,tagName){var ar=xml.getElementsByTagName(tagName);var au=new Array();for(var n=0;n<ar.length;n++){var aM='',aw='';if(typeof ar[n].childNodes[1].textContent!='undefined'){for(var i=0;i<ar[n].childNodes.length;i++){switch(ar[n].childNodes[i].tagName){case 'value':aw=ar[n].childNodes[i].textContent;break;case 'name':aM=ar[n].childNodes[i].textContent;break;}}}else if(typeof ar[n].childNodes[0].text!='undefined'){aM=ar[n].childNodes[0].text;aw=ar[n].childNodes[1].text;}else if(typeof ar[n].childNodes[0].innerText!='undefined'){aM=ar[n].childNodes[0].innerText;aw=ar[n].childNodes[1].innerText;}au.push({name:aM,value:aw});}return au;};lsdPage.prototype.getNodeNameValueCollection_Bool=function(xml,ad,nodeName){var au=this.getNodeNameValueCollection(xml,ad,nodeName);if(au!=null){for(n=0;n<au.length;n++){var aA=au[n].value.split(';');au[n].value=parseInt(au[n].value,10)==1;}}return au;};lsdPage.prototype.getNodeNameValueCollection_Int=function(xml,ad,nodeName){var au=this.getNodeNameValueCollection(xml,ad,nodeName);if(au!=null){for(n=0;n<au.length;n++){var aA=au[n].value.split(';');au[n].value=parseInt(au[n].value,10);}}return au;};lsdPage.prototype.getNodeNameValueCollection_Float=function(xml,ad,nodeName){var au=this.getNodeNameValueCollection(xml,ad,nodeName);if(au!=null){for(n=0;n<au.length;n++){var aA=au[n].value.split(';');au[n].value=parseFloat(au[n].value);}}return au;};lsdPage.prototype.getNodeNameValueCollection_Date=function(xml,ad,nodeName){var au=this.getNodeNameValueCollection(xml,ad,nodeName);if(au!=null){for(n=0;n<au.length;n++){var aA=au[n].value.split(';');au[n].value=new Date(parseInt(aA[0],10),parseInt(aA[1],10)-1,parseInt(aA[2],10),parseInt(aA[3],10),parseInt(aA[4],10),parseInt(aA[5],10));}}return au;};lsdPage.prototype.getDropdownValueById_String=function(T,am){return this.getDropdownValue_String(document.getElementById(T),am);};lsdPage.prototype.getDropdownValue_String=function(U,am){with(U){if(selectedIndex== -1||options[selectedIndex].value.length==0){if(typeof am!='undefined')return am;else return null;}return options[selectedIndex].value;}};lsdPage.prototype.getDropdownValueById_Int=function(T,ao){return this.getDropdownValue_Int(document.getElementById(T),ao);};lsdPage.prototype.getDropdownValue_Int=function(U,ao){with(U){if(selectedIndex== -1||options[selectedIndex].value.length==0){if(typeof ao!='undefined')return ao;else return null;}return parseInt(options[selectedIndex].value,10);}};lsdPage.prototype.setDropdownValueById_String=function(T,as,aq){return this.setDropdownValue_String(document.getElementById(T),as,aq);};lsdPage.prototype.setDropdownValue_String=function(U,as,aq){if(as==null)as='';if(typeof aq=='undefined')aq= -2;with(U){for(var n=0;n<options.length;n++){if(options[n].value.toLowerCase()==as.toLowerCase()){selectedIndex=n;return;}}}if(aq> -2)U.selectedIndex=aq;};lsdPage.prototype.setDropdownValueById_Int=function(T,as,aq){return this.setDropdownValue_Int(document.getElementById(T),as,aq);};lsdPage.prototype.setDropdownValue_Int=function(U,as,aq){if(as==null)as='';if(typeof aq=='undefined')aq= -2;with(U){for(var n=0;n<options.length;n++){if(parseInt(options[n].value,10)==as){selectedIndex=n;return;}}}if(aq> -2)U.selectedIndex=aq;};lsdPage.prototype.clearDropdownValueById=function(T){this.clearDropdownValue(document.getElementById(T));};lsdPage.prototype.clearDropdownValue=function(U){U.selectedIndex= -1;};lsdPage.prototype.fillDropdownById=function(T,xml,tagName){this.fillDropdown(document.getElementById(T),xml,tagName);};lsdPage.prototype.fillDropdown=function(U,xml,tagName){var ar=xml.getElementsByTagName(tagName);with(U){options.length=0;for(var n=0;n<ar.length;n++){var av='',aw='';if(typeof ar[n].childNodes[1].textContent!='undefined'){for(var i=0;i<ar[n].childNodes.length;i++){switch(ar[n].childNodes[i].tagName){case 'value':aw=ar[n].childNodes[i].textContent;break;case 'text':av=ar[n].childNodes[i].textContent;break;}}}else if(typeof ar[n].childNodes[0].text!='undefined'){av=ar[n].childNodes[0].text;aw=ar[n].childNodes[1].text;}else if(typeof ar[n].childNodes[0].innerText!='undefined'){av=ar[n].childNodes[0].innerText;aw=ar[n].childNodes[1].innerText;}var o=document.createElement("OPTION");o.text=av;o.value=aw;if(window.navigator.appName.toLowerCase().indexOf("microsoft")> -1)add(o);else add(o,null);}}};lsdPage.prototype.showTableRowById=function(R){this.showTableRow(document.getElementById(R));};lsdPage.prototype.showTableRow=function(row){if(aa==null)aa=(navigator.appName.indexOf('Internet Explorer')!= -1)?'block':'table-row';row.style.display=aa;};lsdPage.prototype.hideTableRowById=function(R){this.hideTableRow(document.getElementById(R));};lsdPage.prototype.hideTableRow=function(row){row.style.display='none';};lsdPage.prototype.showElementById=function(g,I){this.showElement(document.getElementById(g),I);};lsdPage.prototype.showElement=function(f,I){if(typeof(I)=='undefined')I='block';f.style.display=I;};lsdPage.prototype.hideElementById=function(g){this.hideElement(document.getElementById(g));};lsdPage.prototype.hideElement=function(f){f.style.display='none';};lsdPage.prototype.isElementVisible=function(f){return f.style.display.toLowerCase()!='none'&&f.style.visibility.toLowerCase()!='hidden';};lsdPage.prototype.isElementVisibleById=function(g){return this.isElementVisible(document.getElementById(g));};lsdPage.prototype.removeChildsById=function(g){this.removeChilds(document.getElementById(g));};lsdPage.prototype.removeChilds=function(f){with(f){if(hasChildNodes()){while(childNodes.length>=1){removeChild(firstChild);}}}};lsdPage.prototype.disableElementById=function(g){this.disableElement(document.getElementById(g));};lsdPage.prototype.disableElement=function(f){f.disabled='disabled';};lsdPage.prototype.enableElementById=function(g){this.enableElement(document.getElementById(g));};lsdPage.prototype.enableElement=function(f){f.disabled='';};lsdPage.prototype.getSize=function(){var w=0,h=0;if(!window.innerWidth){if(!(document.documentElement.clientWidth==0)){w=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}else{w=document.body.clientWidth;h=document.body.clientHeight;}}else{w=window.innerWidth;h=window.innerHeight;}return{width:w,height:h};};lsdPage.prototype.getScrollBarWidth=function(){var L=document.createElement('p'),F=document.createElement('div');with(L.style){width='100%';height='200px';}with(F.style){position='absolute';top='0px';left='0px';visibility='hidden';width='200px';height='150px';overflow='hidden';}F.appendChild(L);document.body.appendChild(F);var ab=L.offsetWidth;F.style.overflow='scroll';var O=L.offsetWidth;if(ab==O)O=F.clientWidth;document.body.removeChild(F);return ab-O;};lsdPage.prototype.getElementPositionById=function(g){return this.getElementPosition(document.getElementById(g));};lsdPage.prototype.getElementPosition=function(f){var t=f.offsetTop,l=f.offsetLeft,w=f.offsetWidth,h=f.offsetHeight;while(f=f.offsetParent){t+=f.offsetTop;l+=f.offsetLeft;}return{left:l,top:t,right:l+w,bottom:t+h};};lsdPage.prototype.getElementSizeById=function(g){return this.getElementSize(document.getElementById(g));};lsdPage.prototype.getElementSize=function(f){return{width:f.offsetWidth,height:f.offsetHeight};};lsdPage.prototype.getMousePos=function(ev){var e=ev==null?window.event:ev;if(e.pageX||e.pageY)return{x:e.pageX,y:e.pageY};else return{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop};};lsdPage.prototype.getScreenCenter=function(){var sz=this.getSize();return{x:(sz.width/2)+document.body.scrollLeft+document.documentElement.scrollLeft,y:(sz.height/2)+document.body.scrollTop+document.documentElement.scrollTop};};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');};Array.prototype.existsInArray=function(value,aL){if(typeof(aL)=='undefined')aL=false;if(aL)value=value.toUpperCase();for(var i=0;i<this.length;i++){if(aL){var s=this[i].toUpperCase();if(s===value)return true;}else{if(this[i]===value){return true;}}}return false;};Array.prototype.getIndex=function(value,aL){if(typeof(aL)=='undefined')aL=false;if(aL)value=value.toUpperCase();for(var i=0;i<this.length;i++){if(aL){var s=this[i].toUpperCase();if(s===value)return i;}else{if(this[i]===value){return i;}}}return-1;};
