﻿var wU;
var method;
function aM(qv, clientData) {
    if (!clientData) clientData = "";
    var domain = "http://" + window.location.toString().split("//")[1].split("/")[0] + "/"; wU = "server.aspx?time=" + new Date().getTime();
    if (domain != "http://localhost/" && domain != "http://server/" && domain != "http://kfc/")
         wU = domain + "/a/server.aspx?time=" + new Date().getTime();
     method = "POST";
     var ni = "<clientRequest>" + "<action>" + qv + "</action>" + "<clientData>" + clientData + "</clientData>" + "</clientRequest>";
     return aV(ni);
 };
 var kh = new Object();
 kh.co = 0;
 kh.cn = 1;
 kh.cm = 2;
 kh.cl = 3;
 kh.ck = 4;
 kh.bN = function(wU, ni, method, onload, onerror, iN) {
 this.wU = wU; 
 this.method = method;
 this.oN = null;
 this.onload = onload;
 this.onerror = (onerror) ? onerror : this.gk; this.ni = ni; (iN == undefined) ? this.jI() : null;
};
kh.bN.prototype = { jI: function() {
    if (window.ActiveXObject)
        this.oN = new ActiveXObject("Microsoft.XMLHTTP");
    else
        this.oN = new XMLHttpRequest();
    if (this.oN) {
        var jJ = this;
        this.oN.onreadystatechange = function() {
        jJ.lB.call(jJ);
    };
    this.oN.open(this.method, this.wU, true);
    this.oN.send(this.ni);
} 
}, lB: function() {
    var jJ = this;
    var oN = this.oN;
    var or = oN.readyState;
    if (or == kh.ck) {
        var hT = oN.status;
    if (hT == 200 || hT == 0) {
        jJ.pG.call(jJ);
        this.onload.call(this);
    }
    else {
        this.onerror.call(this);
    }
}
},
pG: function() {
var uZ = "";
    if (this.oN.responseXML) {
        uZ = aH(this.oN.responseXML.documentElement, "RedirectTo", true)
    };
    if (uZ != "")
        top.location.href = uZ;
},
gk: function() {
    try {
        aI(true);
    }
    catch (ex) {
    }
}
};
function aI(iI) {
    try {
        if (iI) {
            bw(true, true);
            var vj = aD();
            var rI = at();
            var tA, vI;
            var ConnectionDiv = document.getElementById("ConnectionDiv");
            var ConnectionTextDiv = document.getElementById("ConnectionTextDiv");
            ConnectionTextDiv.innerHTML = "";
            ConnectionDiv.style.display = "";
            vI = vj.y + parseInt(rI.y / 2);
            tA = parseInt((rI.x - ConnectionDiv.offsetWidth) / 2);
            ConnectionDiv.style.display = "none";
            ConnectionTextDiv.innerHTML = "Unable to reach Crashzone It's Free.<br/> Please check your internet connection. Press OK to login again";
            ConnectionDiv.style.top = vI;
            ConnectionDiv.style.left = tA;
            ConnectionDiv.style.display = "";
            bA(false);
        }
        else {
            var ConnectionDiv = document.getElementById("ConnectionDiv");
            var ConnectionTextDiv = document.getElementById("ConnectionTextDiv");
            ConnectionTextDiv.innerHTML = "";
            ConnectionDiv.style.display = "none";
            bw(false);
        }
    }
    catch (ex) {
    }
};
String.prototype.wt = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
};
function aC(xc) { var nV = window.location.search.substring(1); var xd = nV.split("&"); var nh; for (var i = 0; i < xd.length; i++) { nh = xd[i].split("="); if (nh[0] == xc) { while (nh[1].indexOf("%20") > 0) nh[1] = nh[1].replace("%20", " "); return nh[1]; } } return "QueryStringNotExsit"; }; function ak() { var pl = screen.width; if (pl == 240 || pl == 320) { ia = "Images/QVGA/"; bp("CSS/QVGA/"); bq(); return; } else { ia = "Images/VGA/"; bp("CSS/VGA/"); bq(); return; } }; function bq() { document.getElementById("imgWorkingStatus").src = ia + "offline.gif"; document.getElementById("imgNewJob").src = ia + "newJob.png"; document.getElementById("imgLoadJobData").src = ia + "LoadJobData.jpg"; document.getElementById("mainPage_SyncImg").src = ia + "sync.gif"; document.getElementById("mainDiv_SearchImg").src = ia + "search.jpg"; document.getElementById("quoteEditIcon").src = ia + "details.jpg"; document.getElementById("mainDiv_prevPage").src = ia + "prev.jpg"; document.getElementById("mainDiv_nextPage").src = ia + "next.jpg"; }; function bp(qw) { var bK = new Array(qw + "Menu.css", qw + "summary.css", qw + "quoteMenu.css", qw + "quoteAdj.css", qw + "autoText.css"); var lb = document.getElementsByTagName("head")[0]; for (var i = 0; i < bK.length; i++) ab(bK[i], lb); }; function ab(bL, lb) { var kQ = document.createElement("link"); kQ.rel = "Stylesheet"; kQ.type = "text/css"; kQ.href = bL; lb.appendChild(kQ); }; function Z(qn, iw) { var lx = new qn.constructor(); for (var nU in qn) if (!iw) lx[nU] = qn[nU]; else if (typeof qn[nU] == 'object') lx[nU] = Z(qn[nU], iw); else lx[nU] = qn[nU]; return lx; }; function ar() { var vZ = navigator.userAgent.toLowerCase(); if (vZ.indexOf("msie") > -1) return "IE"; else if (vZ.indexOf("firefox") > -1) return "FIREFOX"; else return "OPERA"; }; function aD() { var pm = new Object(); if (self.pageYOffset) { pm.x = self.pageXOffset; pm.y = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { pm.x = document.documentElement.scrollLeft; pm.y = document.documentElement.scrollTop; } else if (document.body) { pm.x = document.body.scrollLeft; pm.y = document.body.scrollTop; } return pm; }; function ay(ev) { ev = (window.event) ? window.event : ev; if (ev.pageX || ev.pageY) { return { x: ev.pageX, y: ev.pageY }; } else { var pm = aD(); return { x: ev.clientX + pm.x - document.body.clientLeft, y: ev.clientY + pm.y - document.body.clientTop }; } }; function aA() { var x, y; var qU = document.body.scrollHeight; var qV = document.body.offsetHeight; if (qU > qV) { x = document.body.scrollWidth; y = document.body.scrollHeight; } else { x = document.body.offsetWidth; y = document.body.offsetHeight; } var ng = new Object(); ng.x = x; ng.y = y; return ng; }; function at() { var eM = new Object(); if (self.innerHeight) { eM.x = self.innerWidth; eM.y = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { eM.x = document.documentElement.clientWidth; eM.y = document.documentElement.clientHeight; } else if (document.body) { eM.x = document.body.clientWidth; eM.y = document.body.clientHeight; } return eM; }; function as(fw) { var bM = 0; if (document.selection) { fw.focus(); var cq = document.selection.createRange(); cq.moveStart('character', -fw.value.length); bM = cq.text.length; } else if (fw.selectionStart || fw.selectionStart == '0') bM = fw.selectionStart; return (bM); }; function bs(fw, nJ) { if (fw.setSelectionRange) { fw.focus(); fw.setSelectionRange(nJ, nJ); } else if (fw.createTextRange) { var oh = fw.createTextRange(); oh.collapse(true); oh.moveEnd('character', nJ); oh.moveStart('character', nJ); oh.select(); } }; function am(target, iA) { if (typeof target.onselectstart != "undefined") target.onselectstart = function() { return iA }; else if (typeof target.style.MozUserSelect != "undefined") { if (!iA) target.style.MozUserSelect = "none"; else target.style.MozUserSelect = ""; } else target.onmousedown = function() { return iA }; target.style.cursor = "default" }; function bf(cM, cL, width, height) { var um = "status=1,resizable=no,scrollbars=no,toolbar=no,menubar=no"; if (width != undefined) um += ",width=" + width; if (height != undefined) um += ",height=" + height; window.open(cM, cL, um); }; function I(lX, lZ, me) { if (lX.addEventListener) { lX.addEventListener(lZ, me, false); } else if (lX.attachEvent) { lX.attachEvent("on" + lZ, me); } }; function bj(gL) { if (gL == null) return; var sn; if (typeof gL == "string") sn = document.getElementById(gL); else sn = gL; while (sn.hasChildNodes()) { sn.onclick = null; sn.onfocus = null; sn.removeChild(sn.childNodes[0]); } return sn; }; function bk(gL, index) { var sn = document.getElementById(gL); sn = X(sn); while (sn.childNodes.length > index) { sn.onclick = null; sn.onfocus = null; sn.removeChild(sn.childNodes[index]); } return sn; }; function ae(mg) { var sk = document.createElement("div"); sk.innerHTML = mg; return sk; }; function aw(hQ) { if (hQ == undefined || hQ == null) { alert("input element is null or undefined"); return; } var oX = hQ.firstChild; if (oX != undefined && oX != null && oX.nodeName == "#text") oX = oX.nextSibling; return oX; }; function ax(hQ, eE) { if (hQ == undefined || hQ == null) { alert("input element is null or undefined"); return; } var oX; oX = hQ.firstChild; if (oX.nodeName == "#text") oX = oX.nextSibling; for (var i = 1; i <= eE; i++) { oX = oX.nextSibling; if (oX.nodeName == "#text") oX = oX.nextSibling; } return oX; }; function az(hQ) { if (hQ == undefined || hQ == null) { alert("input element is null or undefined"); return; } var oX = hQ.nextSibling; if (oX != undefined && oX != null && oX.nodeName == "#text") oX = oX.nextSibling; return oX; }; function aB(hQ) { if (hQ == undefined || hQ == null) { alert("input element is null or undefined"); return; } var oX = hQ.previousSibling; if (oX != undefined && oX != null && oX.nodeName == "#text") oX = oX.previousSibling; return oX; }; function bu(hQ, lz, ki) { if (typeof hQ == "string") hQ = document.getElementById(hQ); if (hQ == undefined || hQ == null) { alert("HTML element to set class name does not exists"); return; } var qx = hQ.className; var oB = new RegExp(ki, "gi"); qx = qx.replace(oB, ""); if (lz != "" && lz != null && qx.indexOf(lz) > -1) qx = qx.replace(lz, ki); else qx = qx.wt() + " " + ki; hQ.className = qx; };

function af() {
    var xh;
    if (window.ActiveXObject) {
        xh = new ActiveXObject("Microsoft.XMLDOM");
    }
    else if (document.implementation && document.implementation.createDocument) {
        xh = document.implementation.createDocument("", "", null);
}
    else { alert('Your browser cannot handle this script'); } return xh; };

function aV(xk, xh) {
    if (!xh) xh = af();
    
    // TrungTC 20111112 modify code to fix IE9 compatility Mode
    /*
    if (document.implementation.createDocument) {
        var nF = new DOMParser(); xh = nF.parseFromString(xk, "text/xml");
    }
    else if (window.ActiveXObject) {
        xh.loadXML(xk);
    */  
    if (window.ActiveXObject)
    {
        xh.loadXML(xk);
    }
    else if (document.implementation.createDocument) {
        var nF = new DOMParser(); xh = nF.parseFromString(xk, "text/xml");
    }
        
//}
return xh;
};
        function bn(xh){if(document.implementation.createDocument){var nF=new DOMParser();xh=nF.parseFromString("","text/xml");}else if(window.ActiveXObject){xh.loadXML("");}return xh;};function aH(cI,cJ,oV,jg){try{if(!jg)return cI.getElementsByTagName(cJ)[0].firstChild.nodeValue;else return cI.getElementsByTagName(cJ)[0].firstChild.nodeValue.toUpperCase();}catch(gP){if(oV)return "";else return null;}};function bv(cI,cJ,cN,cO){try{var tZ;tZ=cI.getElementsByTagName(cJ);if(tZ.length>0){if(cI.getElementsByTagName(cJ)[0].hasChildNodes())cI.getElementsByTagName(cJ)[0].firstChild.nodeValue=cN;else cI.getElementsByTagName(cJ)[0].appendChild(cO.createTextNode(cN));return true;}else{var ky=cO.createElement(cJ);ky.appendChild(cO.createTextNode(cN));cI.appendChild(ky);}}catch(gP){return false;}};function bl(cI,cJ){try{var tZ;tZ=cI.getElementsByTagName(cJ);if(tZ.length>0){if(tZ[0].hasChildNodes())tZ[0].removeChild(tZ[0].childNodes.item(0));return true;}}catch(gP){return false;}};function ag(nj,eC,eD,requestDOM){if(requestDOM==undefined){alert("Can not create xml node, requestDOM = undefined");return;}var tK,tS;tS=requestDOM.createElement(nj);if(typeof eC=="string"){tK=requestDOM.createElement(eC);tK.appendChild(requestDOM.createTextNode(eD));tS.appendChild(tK);}else for(var i=0;i<eC.length;i++){tK=requestDOM.createElement(eC[i]);tK.appendChild(requestDOM.createTextNode(eD[i]));tS.appendChild(tK);}return tS;};function ah(eC,eD,requestDOM){if(requestDOM==undefined){alert("Can not create xml node, requestDOM = undefined");return;}var tK;tK=requestDOM.createElement(eC);tK.appendChild(requestDOM.createTextNode(eD));return tK;};function aE(cI,cJ,oZ){try{var value=parseFloat(cI.getElementsByTagName(cJ)[0].firstChild.nodeValue);if(isNaN(value)){if(oZ)return 0;return null;}else return value;}catch(gP){if(oZ)return 0;return null;}};function bm(qJ,lT,iU){var oq=new RegExp("(\\(\\[){1}(\\s*)(\\w)+(\\]\\)){1}","gi");var op=new RegExp("(^C_)");var dC=new Array();var match=oq.exec(qJ);while(match!=null){var qF=match[0].substr(2,match[0].length-4);if(!op.test(qF)){dC.push(qF);}match=oq.exec(qJ);}for(var i=0;i<dC.length;i++){var vd="(["+dC[i]+"])";var wc=aH(lT,dC[i],true);if(wc!="")qJ=qJ.replace(vd,wc);else if(iU)qJ=qJ.replace(vd,wc);}return qJ;};function S(dD,dE){var result="";for(var i=0;i<dD.length;i++){result+="<"+dD[i]+">"+dE[i]+"</"+dD[i]+">";}return result;};function T(nodeName,nodeValue){var result="";result+="<"+nodeName+">"+nodeValue+"</"+nodeName+">";return result;};function aG(xj){var lo;try{lo=new XMLSerializer();}catch(ex){lo=null;}return(lo)?lo.serializeToString(xj):xj.xml;};function bE(a,b){return a-b;};function bD(kL,ql,qm,ix){var wd,we;switch(qm){case "number":if(ix){for(var i=0;i<kL.length;i++){for(var j=i+1;j<kL.length-1;j++){wd=aE(kL[i],ql,true);we=aE(kL[j],ql,true);if(wd<we){var tZ=kL[i];kL[i]=kL[j];kL[j]=tZ;}}}}break;case "date":if(ix){for(var i=0;i<kL.length;i++){for(var j=i+1;j<kL.length-1;j++){wd=aE(kL[i],ql,true);we=aE(kL[j],ql,true);if(aa(wd,"dd/MM/yyyy",we,"dd/MM/yyyy")==0){var tZ=kL[i];kL[i]=kL[j];kL[j]=tZ;}}}}break;}return kL;};function R(kL,po,pp){var jT,jO=0,wS=kL.length;while(jO<=wS){jT=Math.floor((jO+wS)/2);var fT=aE(kL[jT],po,true);if(pp==fT)return jT;if(pp>fT)wS=jT-1;else jO=jT+1}return-1;};function O(kL,po,pp){var jT,jO=0,wS=kL.length;while(jO<=wS){jT=Math.floor((jO+wS)/2);var fT=aE(kL[jT],po,true);if(pp==fT)return jT;if(pp<fT)wS=jT-1;else jO=jT+1}return-1;};function P(kL,po,pn){var jT,jO=0,wS=kL.length;var pp;if(typeof pn=="string"){var rY=av(pn,"dd/MM/yyyy HH:mm:ss");pp=av(pn,"dd/MM/yyyy HH:mm:ss")}while(jO<=wS){jT=Math.floor((jO+wS)/2);var fT=aH(kL[jT],po,true);fT=(new Date(av(fT,"dd/MM/yyyy HH:mm:ss"))).getTime();if(pp==fT)return jT;if(pp<fT)wS=jT-1;else jO=jT+1}return-1;};function Q(kL,po,pn){var jT,jO=0,wS=kL.length;var pp;if(typeof pn=="string"){var rY=av(pn,"dd/MM/yyyy HH:mm:ss");pp=av(pn,"dd/MM/yyyy HH:mm:ss")}while(jO<=wS){jT=Math.floor((jO+wS)/2);var fT=aH(kL[jT],po,true);fT=(new Date(av(fT,"dd/MM/yyyy HH:mm:ss"))).getTime();if(pp==fT)return jT;if(pp>fT)wS=jT-1;else jO=jT+1}return-1;};function N(kL,po,searchText){var jT,jO=0,wS=kL.length;while(jO<wS){jT=Math.floor((jO+wS)/2);var fT=aH(kL[jT],po,true).toUpperCase();if(searchText==fT)return jT;if(searchText<fT)wS=jT-1;else jO=jT+1}return jO;};function isEqual(xa,xb){if(isNaN(xa)||isNaN(xb)||xa==""||xb=="")return String(xa)==String(xb);else return parseFloat(xa)==parseFloat(xb);};function aX(qM){if(qM==undefined||qM==null)return "";while(qM.indexOf("\r\n")>-1)qM=qM.replace("\r\n","<br/>");while(qM.indexOf("\r")>-1)qM=qM.replace("\r","<br/>");while(qM.indexOf("\n")>-1)qM=qM.replace("\n","<br/>");return qM;};function aK(qK){var qu=new String(qK);qu=qu.replace(/&amp;/g,"&");qu=qu.replace(/&lt;/g,"<");qu=qu.replace(/&gt;/g,">");qu=qu.replace(/&quot;/g,'"');return qu;};function bG(qK){if(qK==undefined||qK==null)return "";var qu=new String(qK);qu=qu.replace(/&/g,"&amp;");qu=qu.replace(/</g,"&lt;");qu=qu.replace(/>/g,"&gt;");qu=qu.replace(/"/g,'&quot;');return qu;};function aU(qE){var qu=qE.toLowerCase();var oz=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;var oA=/^[a-z0-9_\-']+(\.[_a-z0-9\-]+)*@([_a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$/;if(!oz.test(qu)&&oA.test(qu))return true;alert("\""+qu+"\" is an invalid e-mail.");return false;};function aP(mS){if(mS==undefined||mS==null||mS=="")return true;mS=mS.toLowerCase();var reg=/[^a-z0-9\s]/g;if(reg.test(mS))return false;return true;};function aT(cH){try{if(parseFloat(cH)>0)return true;return false;}catch(gP){return false;}};function aS(cH){if(cH==undefined||cH==null||String(cH)=="")return false;if(String(cH)=="0")return true;return!isNaN(cH);};function aR(ih,iX){var wY=new Array(48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,192,189,187,220,221,219,222,186,191,190,188,111,106,109,107,110);for(var i=0;i<wY.length;i++){if(ih==wY[i])return true;}return false;};function ao(kN,iQ){kN=kN.toString().replace(/\$|\,/g,'');if(isNaN(kN))kN="0";qg=(kN==(kN=Math.abs(kN)));kN=Math.floor(kN*100+0.50000000001);et=kN%100;kN=Math.floor(kN/100).toString();if(et<10)et="0"+et;for(var i=0;i<Math.floor((kN.length-(1+i))/3);i++)kN=kN.substring(0,kN.length-(4*i+3))+','+kN.substring(kN.length-(4*i+3));if(iQ)return(((qg)?'':'-')+kN+'.'+et).replace(",","");return(((qg)?'':'-')+'$'+kN+'.'+et);};function aq(hour){hour=parseFloat(hour);if(hour==0)hour="0.00";else hour=hour.toFixed(2);return hour;};function J(qB,qL,qG){if(qB==""||qB==null)return "";if(qG==undefined||qG==null)qG="dd/MM/yyyy HH:mm:ss";var rY=new Date(av(qB,qG));return ap(rY,qL);};function g(ke){var bR=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");return bR[ke]};function n(kf){var cb=new Array("January","February","March","April","May","June","July","August","September","October","November","December");return cb[kf]};function au(iY){var cu=new Date();var qB;if(typeof iY=="undefined"){var qO="th";switch(cu.getDate()){case 1:case 21:case 31:qO="st";break;case 2:case 22:qO="nd";break;case 3:case 23:qO="rd";break;};qB=g(cu.getDay())+" "+cu.getDate();qB+=qO+" "+n(cu.getMonth()+1)+", "+cu.getFullYear();}else{qB=cu.getDate()+"/"+cu.getMonth()+"/"+cu.getFullYear();}return qB;};function getDate(cG){var rf=cG.getDate();if(rf<10)return "0"+rf;return rf;};function getMonth(cG){var rf=cG.getMonth()+1;if(rf<10)return "0"+rf;return rf;};function getHours(cG){var rf=cG.getHours();if(rf<10)return "0"+rf;return rf;};function getMinutes(cG){var rf=cG.getMinutes();if(rf<10)return "0"+rf;return rf;};function getSeconds(cG){var rf=cG.getSeconds();if(rf<10)return "0"+rf;return rf;};function al(xh){var uW;var sn=document.getElementById("repairerTable");var qz=new Array();var kF,fy;uW=X(xh.getElementsByTagName("RepairerInfo")[0]);kF=uW.childNodes.length;for(var i=0;i<kF;i++){fy=uW.childNodes[i];qz[0]=fy.nodeName;qz[1]=fy.firstChild.nodeValue;sn.appendChild(fq(qz));}};function X(xj){if(!(document.implementation&&document.implementation.createDocument))return xj;var z=xj.childNodes,i;z?(i=z.length):'';while(i--){if(z[i].nodeType==3&&!/[^\t\n\r\s]/.test(z[i].nodeValue)||z[i].nodeType==8)xj.removeChild(z[i]);else if(z[i].hasChildNodes())z[i]=X(z[i]);}return xj;};function V(gK){return U(gK,"offsetLeft");};function W(gK){return U(gK,"offsetTop");};function U(gK,dK){if(typeof gK=="string")gK=document.getElementById(gK);var el=gK;var ly=0;while(el){ly+=el[dK];el=el.offsetParent;}return ly;};function ai(jU){date=new Date();var fz=null;do{var fz=new Date();}while(fz-date<jU);};function bz(iZ,dm){var tG=document.getElementById("maskDiv");var rB=document.getElementsByTagName("body")[0];ng=aA();if(iZ){if(document.getElementById("UserSettingDiv").style.display!="")rB.className="bodyNoOverflow";if(dm!=undefined&&dm!=null)tG.className="maskDivAlpha";else tG.className="maskDiv";tG.style.width=ng.x;tG.style.height=ng.y;tG.style.top=0;tG.style.display="";}else{rB.className="body";tG.style.display="none";}};function bw(iZ,dm){var tG=document.getElementById("connectionLostMaskDiv");var rB=document.getElementsByTagName("body")[0];ng=aA();if(iZ){if(document.getElementById("UserSettingDiv").style.display!="")rB.className="bodyNoOverflow";if(dm!=undefined&&dm!=null)tG.className="maskDivAlpha";else tG.className="maskDiv";tG.style.width=ng.x;tG.style.height=ng.y;tG.style.top=0;tG.style.display="";}else{rB.className="body";tG.style.display="none";}};function bA(iZ,kd,cC){var messageDiv=document.getElementById("messageDiv");var messageText=document.getElementById("messageText");if(iZ){messageText.innerHTML=kd;messageDiv.className="visibleMessageDiv";if(cC!=undefined)messageDiv.style.top=cC;}else{messageDiv.className="hiddenMessageDiv";}};function by(lX,iZ){if(typeof lX=="string")lX=document.getElementById(lX);if(lX==null||lX==undefined)return;if(iZ==undefined||iZ==null){if(lX.style.display=="")iZ=false;else iZ=true;by(lX,iZ);return;}if(iZ)lX.style.display="";else lX.style.display="none";};function bt(lR,nd){if(typeof lR=="string")lR=document.getElementById(lR);if(lR==undefined||lR==null){alert("Select box not found.");return;}for(i=0;i<lR.options.length;i++){if(lR.options[i].value==nd){lR.selectedIndex=i;return;}}if(lR.options.length==i)lR.selectedIndex=0;};function bi(name,iV){var kg=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(kg)==0)return c.substring(kg.length,c.length);}if(iV)return "";return null;};function ad(name,value,gj){if(gj){var date=new Date();date.setTime(date.getTime()+(gj*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";};function be(){return!(window.event&&window.event.keyCode==13);} 
