var browser;var caution=false;var vers;var internalHttpObject=null;if(navigator.appName=="Netscape"){browser="NS";}else{vers=navigator.appVersion;vers=parseFloat(vers.substring(vers.lastIndexOf(".")-1,vers.length));browser="IE";}function CreateScript(Y){var L=document.createElement("script");L.type="text/javascript";L.text=Y;document.body.appendChild(L);}function ivcSaveData(L,Y,Q){if(Q==null){Q="NULL";}return ivcExecFunctionSync(GetHost()+"HttpModules/AvbGlobalFunctions.ashx","SaveData",Q,L,Y);}function ivcGetData(L,Y){if(Y==null){Y="NULL";}return ivcExecFunctionSync(GetHost()+"HttpModules/AvbGlobalFunctions.ashx","GetData",Y,L);}function createObject(Q){var l=0,N;var P=new Object();var Y;if(Q!=null){Y=document.getElementById(Q);}else{Y=document;}var L=Y.getElementsByTagName("select");for(N=0;N<L.length;N++){dbn=L[N].getAttribute("db");if(dbn==null||dbn=="false"){continue;}name=L[N].getAttribute("id");P[name]="";}L=Y.getElementsByTagName("input");for(N=0;N<L.length;N++){dbn=L[N].getAttribute("db");if(dbn==null||dbn=="false"){continue;}name=L[N].getAttribute("id");P[name]="";}L=Y.getElementsByTagName("textarea");for(N=0;N<L.length;N++){dbn=L[N].getAttribute("db");if(dbn==null||dbn=="false"){continue;}name=L[N].getAttribute("id");P[name]="";}return P;}function jsonPrep(Q,P){var L;if(Q!=null){L=document.getElementById(Q);}else{L=document;}var Y=getMembers(P);for(var N=0;N<Y.length;N++){var l=getElement(Y[N]);if(l.value!=""){P[Y[N]]=l.value;}else{delete P[Y[N]];}}return P;}function getMembers(Q){var L=new Array();var Y=0;for(var N in Q){L[Y]=N;Y++;}return L;}function showMembers(l){var L=getMembers(l);var N="";for(var Y=0;Y<L.length;Y++){var P=L[Y];var Q=l[P];N+=P+" = ";N+=Q+"<br>";}DynamicPopup(N,600,700);}function setFormType(N){var L=document.getElementsByTagName(N);for(var Y=0;Y<L.length;Y++){var Q=L[Y];if(N=="input"){if((Q.getAttribute("type")=="text")||(Q.getAttribute("type")=="password")){Q.onmouseover=function(){this.className="highlightActiveField";};Q.onmouseout=function(){this.className="highlightInactiveField";};Q.className="highlightInactiveField";}}else{Q.onmouseover=function(){this.className="highlightActiveField";};Q.onmouseout=function(){this.className="highlightInactiveField";};Q.className="highlightInactiveField";}}}function setElementError(Y,Q){var Y,L=0;if(Q==null){Q=false;}if(Q){Y.style.border="1px solid";Y.className="highlightErrorField";}else{Y.style.border="1px solid #FF5050";}}function setError(l){var N,Q=0;if(l==null){l=false;}var L=document.getElementsByTagName("input");for(var Y=0;Y<L.length;Y++){var N=L[Y];if(((N.getAttribute("type")=="text")||(N.getAttribute("type")=="password"))&&N.getAttribute("valid")=="true"&&N.value==""){if(l){N.style.border="1px solid";N.className="highlightErrorField";}else{N.style.border="1px solid #FF5050";}Q++;}}L=document.getElementsByTagName("select");for(var Y=0;Y<L.length;Y++){var N=L[Y];if(N.getAttribute("valid")=="true"&&N.selectedIndex==0){if(l){N.style.border="1px solid";N.className="highlightErrorField";}else{N.style.border="1px solid #FF5050";}Q++;}}L=document.getElementsByTagName("textarea");for(var Y=0;Y<L.length;Y++){var N=L[Y];if(N.getAttribute("valid")=="true"&&N.innerText==""){if(l){N.style.border="1px solid";N.className="highlightErrorField";}else{N.style.border="1px solid #FF5050";}Q++;}}return Q;}function setClassHighlight(N){var L=document.getElementsByTagName("div");for(var Q=0;Q<L.length;Q++){var l=L[Q];if(l.className==N){var Y=l.style.backgroundColor;l.onmouseover=function(){this.style.backgroundColor=this.getAttribute("hlcolor");};l.onmouseout=function(){this.style.backgroundColor=Y;};}}}function initHighlight(){if(!document.getElementsByTagName){return ;}setFormType("input");setFormType("textarea");setFormType("select");setClassHighlight("highlighttext");}function addLoadEvent(L){if(browser!="IE"){if(document.addEventListener){document.addEventListener("DOMContentLoaded",L,false);}return ;}var Y=window.onload;if(typeof window.onload!="function"){window.onload=L;}else{window.onload=function(){Y();L();};}}addLoadEvent(initHighlight);try{addLoadEvent(PageInit);}catch(err){}function ivcNiceEditor(){}ivcNiceEditor.prototype={activediv:null,divname:null,callback:false,init:function(Q,L,Y){callback=L;this.divname=Q;if(this.activediv!=null){return ;}if(Y==null){this.activediv=new nicEditor({fullPanel:true,onSave:function(l,P,N){this.callback(l);}}).panelInstance(Q,{hasPanel:true});}else{this.activediv=new nicEditor({iconsPath:Y,fullPanel:true,onSave:function(l,P,N){this.callback(l);}}).panelInstance(Q,{hasPanel:true});}},getContent:function(){return this.activediv.instanceById(this.divname).getContent();},setContent:function(L){return this.activediv.instanceById(this.divname).setContent(L);},removeInstance:function(){this.activediv.removeInstance(this.divname);this.activediv=null;}};function ivcAjaxClient(){}ivcAjaxClient.prototype={requestType:"POST",isAsync:true,showAnimation:true,contentType:"application/x-www-form-urlencoded",xmlhttp:false,callback:false,onSend:function(){},onload:function(){if(this.showAnimation){ivcHideWait();}},onError:function(L){alert(L);},init:function(){try{this.xmlhttp=new XMLHttpRequest();}catch(Q){var L=new Array("MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");var N=false;for(var Y=0;Y<L.length&&!N;Y++){try{this.xmlhttp=new ActiveXObject(L[Y]);N=true;}catch(Q){}}if(!N){this.onError("Unable to create XMLHttpRequest.");}}},makeRequest:function(Y,Q){if(!this.xmlhttp){this.init();}this.xmlhttp.open(this.requestType,Y,this.isAsync);this.xmlhttp.setRequestHeader("Content-Type",this.contentType);var L=this;this.xmlhttp.onreadystatechange=function(){L._readyStateChangeCallback();};this.xmlhttp.send(Q);if(this.showAnimation){ivcShowWait();}if(!this.isAsync){return this.xmlhttp.responseText;}},ivcExecAjaxMethod:function(){var L=location.pathname;if(L.charAt(L.length-1)=="/"){L+="default.aspx";}this.makeRequest(L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,0));},ivcExecFunction:function(L){this.makeRequest(L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,1));},_readyStateChangeCallback:function(){switch(this.xmlhttp.readyState){case 2:this.onSend();break;case 4:this.onload();if(this.xmlhttp.status==200){this.callback(this.xmlhttp.responseText);}else{this.onError("HTTP Error Making Request: "+"["+this.xmlhttp.status+"]"+this.xmlhttp.statusText);}break;}}};function ivcCreateWaitElement(){var L=document.getElementById("__ivc_Wait");if(!L){L=document.createElement("div");L.id="__ivc_Wait";L.style.position="absolute";L.innerHTML="<img src=\"~/img/busy.gif\"/>";L.style.visibility="hidden";document.body.insertBefore(L,document.body.firstChild);}ivcwaitElement=L;}var ivcwaitElement;var ivcscrollX,ivcscrollY=-1;function ivcMoveWaitElement(){var Q,L;if(!ivcwaitElement){CreateWaitElement();}if(typeof (window.pageYOffset)=="number"){Q=window.pageYOffset;L=window.pageXOffset;}else{if(document.body&&document.documentElement&&document.documentElement.scrollTop){Q=document.documentElement.scrollTop;L=document.body.scrollLeft;}else{if(document.body&&typeof (document.body.scrollTop)=="number"){Q=document.body.scrollTop;L=document.body.scrollLeft;}}}if(ivcscrollX!=L||ivcscrollY!=Q){ivcscrollX=L;ivcscrollY=Q;var Y=document.body.clientWidth;ivcwaitElement.style.left=(document.body.clientWidth)?(document.body.clientWidth-(ivcwaitElement.clientWidth))/2:0;ivcwaitElement.style.top=(document.body.clientHeight)?(document.body.clientHeight-(ivcwaitElement.clientHeight))/2+document.body.scrollTop:0;}}function ivcShowWait(){try{if(ivcwaitElement==null){ivcCreateWaitElement();if(ivcwaitElement==null){return ;}}if(ivcwaitElement){ivcwaitElement.style.zIndex="9000";ivcwaitElement.style.visibility="visible";ivcMoveWaitElement();}}catch(L){}}function ivcHideWait(){try{if(ivcwaitElement==null){return ;}if(ivcwaitElement){ivcwaitElement.style.visibility="hidden";}}catch(L){}}function ShowWait(){try{if(waitElement==null){return ;}if(waitElement){waitElement.style.zIndex="9000";waitElement.style.visibility="visible";MoveWaitElement();}}catch(L){}}function HideWait(){try{if(waitElement==null){return ;}if(waitElement){waitElement.style.visibility="hidden";}}catch(L){}}function getArgXml(Q,Y){var L="<d>";for(i=Y;i<Q.length;i++){if(i==Y){L+="<m>"+Q[i]+"</m>";}else{L+="<p><![CDATA["+Q[i]+"]]></p>";}}return L+="</d>";}function toJsonObj(jstr){return eval("("+jstr+")");}function sendJson(url,jobj){if(typeof (jobj)=="string"){var ret=ivcExecFunctionSync(url,"RecieveClientData",jobj);var jsonret;try{jsonret=eval("("+ret+")");}catch(e){alert(jsonret);return ;}return jsonret;}var ret=ivcExecFunctionSync(url,"RecieveClientData",JSON.stringify(jobj));return eval("("+ret+")");}function exServerMethodWS(P,Y){var L=0;var l;var N=new Array();for(i=2;i<arguments.length;i++){l=arguments[i];if(typeof (l)=="object"){N[L]=JSON.stringify(l);}else{N[L]=l;}L++;}var Q=new SOAPClientParameters();Q.add("json",JSON.stringify(N));SOAPClient.invoke(Y,"ExecuteAvbPageMethod",Q,true,P);}function exServerMethod(P,Y){var L=0;var l;var N=new Object();var Q=new Array();for(i=2;i<arguments.length;i++){l=arguments[i];if(typeof (l)=="object"){Q[L]=JSON.stringify(l);}else{Q[L]=l;}L++;}N.method="GetPage";N.parameters=JSON.stringify(Q);N.command="ExecuteAvbPageMethod";sendJsonAsync(P,Y,N);}function sendJsonAsync(Y,L,Q){if(typeof (Q)=="string"){ivcExecFunctionAsyncJ(Y,L,"RecieveClientData",Q);return ;}ivcExecFunctionAsyncJ(Y,L,"RecieveClientData",JSON.stringify(Q));return ;}function ivcExecFunctionSync(Y){try{var L=ExecutePost(Y,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,1));return L;}catch(Q){}return "error";}function ivcExecFunctionAsync(Y,L){ivcCallAjaxAsync2(Y,L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,2));}function ivcExecFunctionAsyncJ(Y,L){ivcCallAjaxAsync2(Y,L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,2),true);}function ivcExecAjaxMethodSync(){var L=location.pathname;if(L.charAt(L.length-1)=="/"){L+="default.aspx";}return ExecutePost(L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,0));}function ivcExecAjaxMethod(Y){var L=location.pathname;if(L.charAt(L.length-1)=="/"){L+="default.aspx";}ivcCallAjaxAsync(Y,L,"IvcPagePostBack=@@ivcSoapXml|"+getArgXml(arguments,1));}function ivcMainCallback2(L,Y){L(Y);ivcHideWait();}function ivcMainCallback(L,Y){L(Y);HideWait();}function ivcCallAjaxAsync2(CallBackFn,rscript,params,fid){try{ivcShowWait();if(internalHttpObject==null){internalHttpObject=GetHttpObject();}internalHttpObject.open("POST",rscript,true,"","");internalHttpObject.setRequestHeader("Content-Type","application/x-www-form-urlencoded");internalHttpObject.send(params);internalHttpObject.onreadystatechange=function(){if(internalHttpObject.readyState==4){ivcHideWait();if(fid==null){ivcMainCallback2(CallBackFn,internalHttpObject.responseText);}else{ivcMainCallback2(CallBackFn,eval("("+internalHttpObject.responseText+")"));}}};}catch(e){ivcHideWait();}}function ivcCallAjaxAsync(Q,L,l,N){try{ivcShowWait();if(internalHttpObject==null){internalHttpObject=GetHttpObject();}internalHttpObject.open("POST",L,true,"","");internalHttpObject.setRequestHeader("Content-Type","application/x-www-form-urlencoded");internalHttpObject.send(l);internalHttpObject.onreadystatechange=function(){if(internalHttpObject.readyState==4){ivcHideWait();ivcMainCallback(Q,internalHttpObject.responseText);}};}catch(Y){ivcHideWait();}}function URLEncode(u){if(u==null){return "";}var X="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()";var Y="0123456789ABCDEF";var l=u;var P="";for(var Q=0;Q<l.length;Q++){var N=l.charAt(Q);if(N==" "){P+="+";}else{if(X.indexOf(N)!=-1){P+=N;}else{var L=N.charCodeAt(0);if(L>255){alert("Unicode Character '"+N+"' cannot be encoded using standard URL encoding.\n"+"(URL encoding only supports 8-bit characters.)\n"+"A space (+) will be substituted.");P+="+";}else{P+="%";P+=Y.charAt((L>>4)&15);P+=Y.charAt(L&15);}}}}return P;}function URLDecode(P){var L="0123456789ABCDEFabcdef";var l=P;var N="";var Y=0;while(Y<l.length){var Q=l.charAt(Y);if(Q=="+"){N+=" ";Y++;}else{if(Q=="%"){if(Y<(l.length-2)&&L.indexOf(l.charAt(Y+1))!=-1&&L.indexOf(l.charAt(Y+2))!=-1){N+=unescape(l.substr(Y,3));Y+=3;}else{alert("Bad escape combination near ..."+l.substr(Y));N+="%[ERROR]";Y++;}}else{N+=Q;Y++;}}}return N;}function StringBuilder(L){this.strings=new Array("");this.append(L);}StringBuilder.prototype.append=function(L){if(L){this.strings[this.strings.length]=L;}};StringBuilder.prototype.clear=function(){this.strings.length=1;};StringBuilder.prototype.toString=function(){return this.strings.join("");};function DynamicPopup(L){var Y=window.open("","name");Y.document.write(L);Y.document.close();}function DynamicPopupW(Y,L,Q){var N=window.open("","name","height="+Q+",width="+L);N.document.write(Y);N.document.close();}function remove(Y,L){i=Y.indexOf(L);r="";if(i==-1){return Y;}r+=Y.substring(0,i)+remove(Y.substring(i+L.length),L);return r;}var MozFox=false;if(document.implementation&&document.implementation.createDocument){MozFox=true;Array.prototype.item=function(L){return this[L];};Array.prototype.expr="";XMLDocument.prototype.setProperty=function(L,Y){};XMLDocument.prototype.selectNodes=function(Y,L){var N=this.evaluate(Y,(L?L:this),this.createNSResolver(this.documentElement),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var Q=new Array(N.snapshotLength);Q.expr=Y;for(i=0;i<Q.length;i++){Q[i]=N.snapshotItem(i);}return Q;};Element.prototype.selectNodes=function(L){var Y=this.ownerDocument;if(Y.selectNodes){return Y.selectNodes(L,this);}else{throw "SarissaXPathOperationException: Method selectNodes is only supported by XML Nodes";}};XMLDocument.prototype.selectSingleNode=function(Q,Y){var L=Y?Y:null;Q="("+Q+")[1]";var N=this.selectNodes(Q,L);if(N.length>0){return N.item(0);}else{return null;}};Element.prototype.selectSingleNode=function(L){var Y=this.ownerDocument;if(Y.selectSingleNode){return Y.selectSingleNode(L,this);}else{throw "Method selectNodes is only supported by XML Elements";}};}function GetXmlString(L){var Y;if(window.ActiveXObject){Y=new ActiveXObject("Microsoft.XMLDOM");Y.loadXML(L);}else{if(document.implementation&&document.implementation.createDocument){var Q=new DOMParser();Y=Q.parseFromString(L,"text/xml");}}return Y;}function GetXmlDoc(Y){var L;if(window.ActiveXObject){L=new ActiveXObject("Microsoft.XMLDOM");L.async=false;}else{if(document.implementation&&document.implementation.createDocument){L=document.implementation.createDocument("","doc",null);}}if(typeof L!="undefined"){L.load(Y);}return L;}function isEmail(Y){var L=Y.split("@");if(L[1]==null){return false;}else{if(L[1].indexOf(".")<3){return false;}}return (Y.indexOf(".")>2)&&(Y.indexOf("@")>0);}function isF2Key(L){if((505==window.event.keyCode)){window.event.returnValue=false;return true;}else{return false;}}function isEnterKey(L){if((13==window.event.keyCode)){window.event.returnValue=false;return true;}else{return false;}}function isTabKey(Y){var L=String.fromCharCode(window.event.keyCode);if((9==window.event.keyCode)){window.event.cancelBubble=true;window.event.returnValue=false;return true;}else{return false;}}function ChangeCursor(L){document.body.style.cursor=L;}function doPostBack(L,Y){__doPostBack(L,"@@ivc|"+Y);}var today=new Date();var cexpire=new Date();cexpire.setTime(today.getTime()+1000*60*60*24*400);function setCookie(Q,l,L,u,N,P){var Y=Q+"="+escape(l)+((L)?"; expires="+L.toGMTString():"")+((u)?"; path="+u:"")+((N)?"; domain="+N:"")+((P)?"; secure":"");if(!caution||(Q+"="+escape(l)).length<=4000){document.cookie=Y;}else{if(confirm("Cookie exceeds 4KB and will be cut!")){document.cookie=Y;}}}function getCookie(L){var Q=L+"=";var Y=document.cookie.indexOf(Q);if(Y==-1){return null;}var N=document.cookie.indexOf(";",Y+Q.length);if(N==-1){N=document.cookie.length;}return unescape(document.cookie.substring(Y+Q.length,N));}function GetClipboard(){window.clipboardData.getData("Text");}function SetClipboard(L){window.clipboardData.setData("Text",L);}function alternateRowColors(L){var N="classes";var P="#bbbbbb";if(L!=null){P=L;}var G,l;var X=document.getElementsByTagName("table");var u=0;for(var Q=0;Q<X.length;Q++){if(X.item(Q).className==N){atable=X.item(Q);G=atable.getElementsByTagName("tr");for(var Y=0;Y<G.length;Y++){l=G.item(Y);if(l.nodeName=="TR"){if(u%2){l.style.backgroundColor=P;}else{}u++;}}u=0;}}}function ivcPostBack(L){__doPostBack("","@@ivc|"+L);}function setIframeSource(Q,Y){var L=document.getElementById(Q+"Style_frame");L.setAttribute("src",Y);}function OpenModalWindow(Y,L,Q){modeless=showModalDialog(Y,"","help:No;status:no;font-family:Verdana;font-size:12;dialogWidth:"+L+"px;dialogHeight:"+Q+"px");}function OpenModlessWindow(Y,L,Q){modeless=showModelessDialog(Y,"","help:No;status:no;font-family:Verdana;font-size:12;dialogWidth:"+L+"px;dialogHeight:"+Q+"px");}function OpenModalWindowIFrame(Y,L,Q,l){if(l==null){l="Alantus Modal Window";}var N="DialogIFrame.aspx?src="+escape(Y)+"&w="+L+"&h="+Q+"&title="+l;modeless=showModalDialog(N,"","help:No;status:no;font-family:Verdana;font-size:12;dialogWidth:"+L+"px;dialogHeight:"+Q+"px");}function OpenModlessWindowIFrame(Y,L,Q,l){if(l==null){l="Alantus Modless Window";}var N="DialogIFrame.aspx?src="+escape(Y)+"&w="+L+"&h="+Q+"&title="+l;modeless=showModelessDialog(N,"","help:No;status:no;font-family:Verdana;font-size:12;dialogWidth:"+L+"px;dialogHeight:"+Q+"px");}function deleteCookie(L,Q,Y){if(getCookie(L)){document.cookie=L+"="+((Q)?"; path="+Q:"")+((Y)?"; domain="+Y:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}function GetHttpObject(){if(typeof window.ActiveXObject!="undefined"){return new ActiveXObject("Microsoft.XMLHTTP");}else{return new XMLHttpRequest();}}function ExecutePost(L,Q){var Y=GetHttpObject();Y.open("POST",L,false,"","");Y.setRequestHeader("Content-Type","application/x-www-form-urlencoded");Y.send(Q);return Y.responseText;}function runRemoteScript(Y){var L=GetHttpObject();L.open("GET",Y,false,"","");L.setRequestHeader("Content-Type","text/xml");L.send(null);return L.responseText;}function AsyncResponse(L){alert(L);}function runRemoteScriptAsync(Y){var L=GetHttpObject();L.open("GET",Y,true,"","");L.setRequestHeader("Content-Type","text/xml");L.onreadystatechange=function(){if(L.readyState==4){AsyncResponse(L.responseText);}};L.send(null);}function ExecuteSoapPost(L,Q){var Y=GetHttpObject();if(Y==null){alert("null object");return ;}Y.open("POST",L,false,"","");Y.setRequestHeader("Content-Type","text/xml");Y.setRequestHeader("SOAPAction","http://tempuri.org/add");Y.send(Q);return Y.responseText;}function CallWebService(L,Q){var Y=new SOAPClientParameters();for(i=2;i<arguments.length;i+=2){Y.add(arguments[i],arguments[i+1]);}return SOAPClient.invoke(L,Q,Y,false);}function callMsWS(P,Y,L,u){var l=P+"?wsdl="+Y+"&sname="+L+"&meth="+u;var N=1,Q;for(Q=4;Q<arguments.length;Q+=2){l+="&p"+N+"="+arguments[Q];l+="&v"+N+"="+arguments[Q+1];N++;}return runRemoteScript(l);}function avbDialog(N,L,Y){var Q="help:No;status:no;font-family:Verdana;font-size:12;dialogWidth:"+L+"px;dialogHeight:"+Y+"px";showModalDialog(N,null,Q);}function avbWindow(l,L,N,Q){if(Q==null){Q="";}var Y="scrollbars=yes,resizable=yes,width="+L+",height="+N;obj=window.open(l,Q,"toolbar=no,location=no,directories=no,status=no,menubar=no,"+Y);}function showDiv(Q,L){var Y=ivcframe.document.getElementById(Q);if(L){Y.style.display="block";}else{Y.style.display="none";}}function showObject(Q,L){var Y=getObject(null,Q).style;if(Y!=null){if(L){Y.display="block";}else{Y.display="none";}}else{alert("failed");}if(browser=="NS"){showDiv(Q,L);}}function ivcReplaceStr(Q,L,Y){pos=Q.lastIndexOf(L);return Q.substr(0,pos)+Y+Q.substr(pos+L.length);}function GetParentElementByTagName(Y,L){var Y=Y;while(Y.tagName!=L){Y=Y.parentNode;}return Y;}function openWin(l,L,N,Q){if(Q==null){Q="";}var Y="scrollbars=no,resizable=no,width="+L+",height="+N;obj=window.open(l,Q,"toolbar=no,location=no,directories=no,status=no,menubar=no,"+Y);}function GetStyleObj(L){return getStyleObj(L);}function getId(Y){var L=new String(Y);L=L.replace(/_|\./g,"");L+="Style";return L;}function getStyleObj(name){var temp=new String(name);temp=temp.replace(/_|\./g,"");if(browser=="NS"){return document.layers[temp];}else{return eval(temp).style;}}function GetObject(Y,L){return getObject(Y,L);}function getElement(L){return document.getElementById(L);}function $get(L){return document.getElementById(L);}function getObject(Q,Y){var l=window;var N;if(browser=="NS"){N=document.getElementById(Y+"Style");if(null!=N){return N;}else{return document.getElementById(Y);}}else{var L=document.all[Y];if(L==null){L=document.getElementById(Y+"Style");if(null!=L){return L;}else{return document.getElementById(Y);}}else{return L;}}}function GetObjectVal(Y,L){var Q=getObject(Y,L);if(Q.type=="select-one"){if(Q.selectedIndex<0){return null;}return Q.options[Q.selectedIndex].value;}else{return Q.value;}}function WriteText(L,Y){writeText(L,Y);}function writeText(L,Y){var Q=getObject(null,L);if(Q==null){return ;}if(Q.type!=null){return ;}Q.innerHTML=Y;}function addListItem2(L,P,N,Q,Y){if(browser=="IE"){if(vers<5){L.options[L.length]=new Option(P,N,Q,Y);}else{var u=document.createElement("OPTION");u.text=P;u.value=N;L.options[L.length]=u;}}else{var l=document.createElement("option");l.text=P;l.value=N;L.add(l,null);}}function addListItem(L,l,N,Q,Y){if(typeof (L)=="string"){}addListItem2(getElement(l),N,Q);}function removeListItem(Y,L){if(browser=="IE"){document.all[Y].options[L]=null;}}function replaceListItem(Y,P,l,N,Q,L){if(browser=="IE"){document.all[Y].options[L]=new Option(P,l,N,Q);}}function getListItem(Y,L){if(browser=="IE"){return document.all[Y].options[L].value;}}function isLetter(L){return (((L>="a")&&(L<="z"))||((L>="A")&&(L<="Z")));}function isDigit(L){return ((L>="0")&&(L<="9"));}function isLetterOrDigit(L){return (isLetter(L)||isDigit(L));}function isAlphaNum(Q,L){var Y;if(L==1){Q.toLowerCase();}if(L==2){Q.toUpperCase();}for(Y=0;Y<Q.length;Y++){var N=Q.charAt(Y);if(!isLetterOrDigit(N)){return false;}}return true;}function isAlphabetic(Q,L){var Y;if(L==1){Q.toLowerCase();}if(L==2){Q.toUpperCase();}for(Y=0;Y<Q.length;Y++){var N=Q.charAt(Y);if(!isLetter(N)){return false;}}return true;}function isInteger(Y){var L;for(L=0;L<Y.length;L++){var Q=Y.charAt(L);if(!isDigit(Q)){return false;}}return true;}function mask(Y,L){LenStr=Y.length;LenMsk=L.length;if((LenStr==0)||(LenMsk==0)){return (0);}if(LenStr!=LenMsk){return (0);}TempString="";for(Count=0;Count<=Y.length;Count++){StrChar=Y.substring(Count,Count+1);MskChar=L.substring(Count,Count+1);if(MskChar=="#"){if(!isNumberChar(StrChar)){return (0);}}else{if(MskChar=="?"){if(!isAlphabeticChar(StrChar)){return (0);}}else{if(MskChar=="!"){if(!isNumOrChar(StrChar)){return (0);}}else{if(MskChar=="*"){}else{if(MskChar!=StrChar){return (0);}}}}}}return (1);}function isAlphabeticChar(L){if(L.length!=1){return (false);}L=L.toLowerCase();RefString="abcdefghijklmnopqrstuvwxyz";if(RefString.indexOf(L.toLowerCase(),0)==-1){return (false);}return (true);}function isNumberChar(L){if(L.length!=1){return (false);}RefString="1234567890";if(RefString.indexOf(L,0)==-1){return (false);}return (true);}function isNumOrChar(L){if(L.length!=1){return (false);}L=L.toLowerCase();RefString="1234567890abcdefghijklmnopqrstuvwxyz";if(RefString.indexOf(L,0)==-1){return (false);}return (true);}function getQueryExtras(){var N="";var Q=window.location.search;var Y="tabindex=";var L="tabid=";var X=Q.indexOf(Y);var u=Q.indexOf("&",X);if(u==-1){u=Q.length;}var P=Q.indexOf(L);var l=Q.indexOf("&",P);if(l==-1){l=Q.length;}if(X>-1&&P>-1){X=X+Y.length;N="&tabindex="+Q.substring(X,u);P=P+L.length;N+="&tabid="+Q.substring(P,l);}return N;}function GetRowElementText(l,L,Q){var N=document.getElementById(Q+"_row"+l);if(N==null){return "";}for(var Y=0;Y<N.childNodes.length;Y++){if(L==Y){return N.childNodes[Y].innerText;}}return "";}function GetRowElementHtml(l,L,Q){var N=document.getElementById(Q+"_row"+l);if(N==null){return "";}for(var Y=0;Y<N.childNodes.length;Y++){if(L==Y){return N.childNodes[Y].innerHTML;}}return "";}function SetRowElementText(P,L,Q,l){var N=document.getElementById(Q+"_row"+P);if(N==null){return false;}for(var Y=0;Y<N.childNodes.length;Y++){if(L==Y){N.childNodes[Y].innerText=l;return true;}}return false;}function SetRowElementHtml(P,L,N,Q){var l=document.getElementById(N+"_row"+P);if(l==null){return false;}for(var Y=0;Y<l.childNodes.length;Y++){if(L==Y){l.childNodes[Y].innerHTML=Q;return true;}}return false;}function dbValConvert(Q){var L=true;if(Q==null){return Q;}Q=escapeSingleQuotes(Q);for(var Y=0;Y<Q.length;Y++){var N=Q.charAt(Y);if(((N<"0")||(N>"9"))){L=false;break;}}if(!L){Q="'"+Q+"'";return Q;}else{return Q;}}function pageRefresh(){var Y=window.location.pathname;var L=Y.substring(Y.lastIndexOf("/")+1);location=L;}function doPageGet(L){var Q=window.location.pathname;var Y=Q.substring(Q.lastIndexOf("/")+1);location=Y+L;}function MoveGridToForm(G,g){var X=null;var L=document.getElementsByName("head");for(Q=0;Q<L.length;Q++){X=L(Q);if(X.getAttribute("name")==g){break;}}if(X==null){alert("error:  table");return ;}var l=X.getAttribute("fields");var N=l.split(",");var w=document.getElementById(g+"_row"+G);var P=w.childNodes.length;var Y=0;for(var Q=0;Q<P;Q++){if(Q==0){continue;}var e=w.childNodes[Q].innerHTML;var u=w.childNodes[Q].innerText;if(u=="activate"||u=="doEdit"){var q=e.indexOf("'");var Z=e.indexOf("'",q+1);document.getElementById(N[Y++]).value=e.substring(q+1,Z);}else{document.getElementById(N[Y++]).value=e;}}}function ButtonClick(L){document.getElementById("ivcmode").value=L;}function details(l,N,Q){var Y=window.location.pathname;var L=Y.substring(Y.lastIndexOf("/")+1);location=L+"?command=details&fkvalue="+Q+getQueryExtras();}function InsertRow(Q){if(null!=document.getElementById("ivcaspx")){return ;}else{var Y=window.location.pathname;var L=Y.substring(Y.lastIndexOf("/")+1);location=L+"?command=doInsert&table="+Q+getQueryExtras();}}function doEdit(P,Q,l,N){if(null!=document.getElementById("ivcaspx")){MoveGridToForm(P,N);}else{var Y=window.location.pathname;var L=Y.substring(Y.lastIndexOf("/")+1);location=L+"?command=doEdit&pkvalue="+l+"&table="+N+getQueryExtras();}}function escapeSingleQuotes(Q){var Y,L="";if(-1==Q.indexOf("'")){return Q;}for(Y=0;Y<Q.length;Y++){var N=Q.charAt(Y);if(N=="'"){L+="''";}else{L+=N;}}return L;}var rowVals;var currentRowNum;function dosave(u,K){if(rowVals==null){alert("rows null");}if(currentRowNum==null){alert("cur rows null");}if(rowVals==null||currentRowNum==null){return ;}var g=0;var Q=null;var X=document.getElementsByName("head");for(g=0;g<X.length;g++){Q=X(g);if(Q.getAttribute("name")==K){break;}}if(Q==null){alert("error:  table");return ;}var q=Q.attributes;var Z=Q.getAttribute("fields");var A="";var C=Z.split(",");var V=Q.getAttribute("pk").toLowerCase();var N=K+"."+Q.getAttribute("pk").toLowerCase();var w=rowVals.length;var P;var Y="",L="";var J;var l=true;var e=0;for(var g=0;g<w;g++){if(g>0){J=document.getElementById("r"+currentRowNum+"_"+g).value;}if(g==0){continue;}else{if(l){if(V==C[g-1].toLowerCase()||N==C[g-1].toLowerCase()){L=dbValConvert(rowVals[g]);}else{if(rowVals[g]!=J){Y+=C[g-1]+"="+dbValConvert(J);l=false;e++;}}}else{if(V==C[g-1].toLowerCase()||N==C[g-1].toLowerCase()){L=dbValConvert(rowVals[g]);}else{if(rowVals[g]!=J){Y+=","+C[g-1]+"="+dbValConvert(J);e++;}}}}}if(e>0||u==1){if(u==1){P="delete from "+K+" where "+V+"="+L;}else{P="update "+K+" set "+Y+" where "+V+"="+L;}var k=window.location.pathname;var G=k.substring(k.lastIndexOf("/")+1);location=G+"?command=inPlaceUpdate&updateString="+P+getQueryExtras();}}var restoreArray=null,crowNum="",ctable="";function InPlaceEdit(N,X){if(rowVals!=null){if(rowVals.length>0){return ;}rowVals.length=0;}var G=document.getElementById(X+"_row"+N);var Y=G.childNodes.length;rowVals=new Array(Y);restoreArray=new Array(Y);crowNum=N;ctable=X;for(var L=0;L<Y;L++){var u=G.childNodes[L].innerHTML;var Q=G.childNodes[L].innerText;restoreArray[L]=u;if(Q=="edit"){rowVals[L]=L;G.childNodes[L].innerHTML="<a href='javascript:InPlaceRestore()'>esc</a> <a href=\"javascript:dosave(0,'"+X+"')\">save</a> <a href=\"javascript:dosave(1,'"+X+"')\" onclick= \"return confirm('Are you sure you want to Delete?')\">del</a>";}else{if(u.indexOf("javascript:")>-1){var P=u.indexOf("'");var l=u.indexOf("'",P+1);rowVals[L]=u.substring(P+1,l);if(rowVals[L].length>100){G.childNodes[L].innerHTML="<textarea cols='30' rows='8'  id='r"+N+"_"+L+"'>"+rowVals[L]+"</textarea>";}else{G.childNodes[L].innerHTML="<input id='r"+N+"_"+L+"' type='text' value='"+rowVals[L]+"'></input>";}}else{rowVals[L]=u;if(u.length>100){G.childNodes[L].innerHTML="<textarea cols='30' rows='8'  id='r"+N+"_"+L+"'>"+u+"</textarea>";}else{G.childNodes[L].innerHTML="<input id='r"+N+"_"+L+"' type='text' value=\""+u+"\"></input>";}}}}currentRowNum=N;}function InPlaceRestore(){if(restoreArray==null){return ;}var L=restoreArray.length;var Q=document.getElementById(ctable+"_row"+crowNum);if(Q==null){alert("null");}for(var Y=0;Y<L;Y++){Q.childNodes[Y].innerHTML=restoreArray[Y];}rowVals=null;}Hashtable.prototype.hash=null;Hashtable.prototype.keys=null;Hashtable.prototype.location=null;function Hashtable(){this.hash=new Array();this.keys=new Array();this.location=0;}Hashtable.prototype.put=function(L,Y){if(Y==null){return ;}if(this.hash[L]==null){this.keys[this.keys.length]=L;}this.hash[L]=Y;};Hashtable.prototype.get=function(L){return this.hash[L];};Hashtable.prototype.remove=function(Y){for(var L=0;L<this.keys.length;L++){if(Y==this.keys[L]){this.hash[this.keys[L]]=null;this.keys.splice(L,1);return ;}}};Hashtable.prototype.size=function(){return this.keys.length;};Hashtable.prototype.populateItems=function(){};Hashtable.prototype.next=function(){if(++this.location<this.keys.length){return true;}else{return false;}};Hashtable.prototype.moveFirst=function(){try{this.location=-1;}catch(L){}};Hashtable.prototype.moveLast=function(){try{this.location=this.keys.length-1;}catch(L){}};Hashtable.prototype.getKey=function(){try{return this.keys[this.location];}catch(L){return null;}};Hashtable.prototype.getValue=function(){try{return this.hash[this.keys[this.location]];}catch(L){return null;}};Hashtable.prototype.getKeyOfValue=function(Y){for(var L=0;L<this.keys.length;L++){if(this.hash[this.keys[L]]==Y){return this.keys[L];}}return null;};Hashtable.prototype.toString=function(){try{var Q=new Array(this.keys.length);Q[Q.length]="{";for(var Y=0;Y<this.keys.length;Y++){Q[Q.length]=this.keys[Y];Q[Q.length]="=";var L=this.hash[this.keys[Y]];if(L){Q[Q.length]=L.toString();}else{Q[Q.length]="null";}if(Y!=this.keys.length-1){Q[Q.length]=", ";}}}catch(N){}finally{Q[Q.length]="}";}return Q.join("");};Hashtable.prototype.add=function(L){try{L.moveFirst();while(L.next()){var Y=L.getKey();this.hash[Y]=L.getValue();if(this.get(Y)!=null){this.keys[this.keys.length]=Y;}}}catch(Q){}finally{return this;}};var NS4=(document.layers)?1:0;var IE4=(document.all)?1:0;function animation(id){this.element=(NS4)?document[id]:document.all[id].style;this.active=0;this.timer=null;this.path=null;this.num=null;this.name=id+"Var";eval(this.name+" = this");this.animate=animate;this.step=step;this.show=show;this.hide=hide;this.left=left;this.top=top;this.moveTo=moveTo;this.slideBy=slideBy;this.slideTo=slideTo;this.circle=circle;}function pos(L,Y){this.x=Math.round(L);this.y=Math.round(Y);}function show(){this.element.visibility=(NS4)?"show":"visible";}function hide(){this.element.visibility=(NS4)?"hide":"hidden";}function left(){return parseInt(this.element.left);}function top(){return parseInt(this.element.top);}function moveTo(L,Y){this.element.left=L;this.element.top=Y;}function step(){this.moveTo(this.path[this.num].x,this.path[this.num].y);if(this.num>=this.path.length-1){clearInterval(this.timer);this.active=0;if(this.statement){eval(this.statement);}}else{this.num++;}}function animate(L){if(this.active){return ;}this.num=0;this.active=1;this.timer=setInterval(this.name+".step()",L);}function slideBy(G,X,u,L,P){var Q=this.left();var Y=this.top();var l=Q+G;var N=Y+X;this.slideTo(l,N,u,L,P);}function slideTo(u,l,Z,L,X){var N=this.left();var Y=this.top();var g=u-N;var e=l-Y;var q=g/Z;var G=e/Z;var Q=new Array();for(var P=0;P<Z;P++){N+=q;Y+=G;Q[P]=new pos(N,Y);}this.path=Q;this.statement=(X)?X:null;this.animate(L);}function circle(X,G,P,e,L,Z){var w=P-G;var u=w/e;var g=this.left();var q=this.top();var N=g-X*Math.cos(G*Math.PI/180);var Q=q+X*Math.sin(G*Math.PI/180);var Y=new Array();for(var l=0;l<e;l++){G+=u;g=N+X*Math.cos(G*Math.PI/180);q=Q-X*Math.sin(G*Math.PI/180);Y[l]=new pos(g,q);}this.path=Y;this.statement=(Z)?Z:null;this.animate(L);}function opacity(P,N,L,Y){var Q=Math.round(Y/100);var l=0;if(N>L){for(i=N;i>=L;i--){setTimeout("changeOpac("+i+",'"+P+"')",(l*Q));l++;}}else{if(N<L){for(i=N;i<=L;i++){setTimeout("changeOpac("+i+",'"+P+"')",(l*Q));l++;}}}}var ale=1;function changeOpac(Y,Q){var L=document.getElementById(Q).style;L.opacity=(Y/100);L.MozOpacity=(Y/100);L.KhtmlOpacity=(Y/100);L.filter="alpha(opacity="+Y+")";}function shiftOpacity(Y,L){if(document.getElementById(Y).style.opacity==0){opacity(Y,0,100,L);}else{opacity(Y,100,0,L);}}function blendimage(P,L,l,Y){var Q=Math.round(Y/100);var N=0;document.getElementById(P).style.backgroundImage="url("+document.getElementById(L).src+")";changeOpac(0,L);document.getElementById(L).src=l;for(i=0;i<=100;i++){setTimeout("changeOpac("+i+",'"+L+"')",(N*Q));N++;}}function currentOpac(N,L,Q){var Y=100;if(document.getElementById(N).style.opacity<100){Y=document.getElementById(N).style.opacity*100;}opacity(N,Y,L,Q);}var JSON=function(){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},s={"boolean":function(x){return String(x);},number:function(x){return isFinite(x)?String(x):"null";},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}c=b.charCodeAt();return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);});}return "\""+x+"\"";},object:function(x){if(x){var a=[],b,f,i,l,v;if(x instanceof Array){a[0]="[";l=x.length;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=",";}a[a.length]=v;b=true;}}}a[a.length]="]";}else{if(x instanceof Object){a[0]="{";for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=",";}a.push(s.string(i),":",v);b=true;}}}a[a.length]="}";}else{return ;}}return a.join("");}return "null";}};return {copyright:"(c)2005 JSON.org",license:"http://www.JSON.org/license.html",stringify:function(v){var f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){return v;}}return null;},parse:function(text){try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+text+")");}catch(e){return false;}}};}();
