var gAU=null,gAV=null;gANullFunc=function(){};_getPath=function(){var A,B;if(typeof gAPath!="undefined"){return }A=document.getElementsByTagName("SCRIPT");for(B=0;B<A.length;++B){gAPath=A[B].src;if(gAPath.indexOf("gAjax_c.js")!=-1||gAPath.indexOf("gAjax-Utility.js")!=-1||gAPath.indexOf("gAjax_all.js")!=-1){B=gAPath.lastIndexOf("/");gAPath=gAPath.substr(0,B+1);break}}};_getPath();gAU={gAClassName:"gAUtility",Rand:function(B,A){return B+Math.floor((A-B+1)*(Math.random()%1))},$:function(B){var A;if(!B){return null}if(arguments.length>1){for(A=0,elems=[];A<arguments.length;++A){elems.push(gAU.$(arguments[A]))}return elems}if(typeof B=="string"){return document.getElementById(B)}else{if(typeof B=="Object"||typeof B=="object"){return B}else{return false}}},IsClass:function(D,A){var C,B=new RegExp("\\b"+A+"\\b");if(!D||typeof D.className=="undefined"){return false}C=D.className.search(B);return(D.className.search(B)!=-1)},AddClass:function(C,A){var B;if(typeof C=="string"){B=gAU.$(C)}else{B=C}if(!B||typeof B.className=="undefined"){return }if(gAU.IsClass(B,A)){return }B.className+=" "+A;B.className.strip()},RemoveClass:function(D,A){var C,B=new RegExp("\\b"+A+"\\b");if(typeof D=="string"){C=gAU.$(D)}else{C=D}if(!C||!gAU.IsClass(C,A)){return }C.className=C.className.replace(B,"").strip();C.className.strip()},FindSelf:function(B){var A,C;for(A in window){C=window[A];if(C==B){return A}}return null},SetInfo:function(D,A,C){var B;if(typeof D=="string"){B=gAU.$(D)}else{B=D}if(!B){return }if(!B.gAjaxInfo||typeof B.gAjaxInfo=="undefined"){B.gAjaxInfo={}}B.gAjaxInfo[A]=C},GetInfo:function(C,A){var B;if(typeof C=="string"){B=gAU.$(C)}else{B=C}if(!B){return null}if(B.gAjaxInfo&&B.gAjaxInfo[A]!=undefined){return B.gAjaxInfo[A]}else{return null}},GetElementPos:function(E,B){var A=document.getElementsByTagName("BODY").item(0),C,D={x:0,y:0};if(typeof E=="string"){C=gAU.$(E)}else{C=E}if(!C){return D}if(gAjax.isIE&&gAU.IsClass(C.offsetParent,"gAGrid")){D.x=C.offsetLeft-C.offsetParent.parentNode.scrollLeft;D.y=C.offsetTop-C.offsetParent.parentNode.scrollTop}else{D.x=C.offsetLeft-C.parentNode.scrollLeft;D.y=C.offsetTop-C.parentNode.scrollTop}while(C.offsetParent&&C.offsetParent!=B){D.x+=C.offsetParent.offsetLeft;D.y+=C.offsetParent.offsetTop;if(C==A){break}else{C=C.offsetParent}}return D},ParseQueryString:function(){var B,A,D,C=new Object();B=location.search.substr(1).split("&");for(A in B){if(typeof B[A]=="string"){D=B[A].split("=");C[D[0]]=D[1]}}return C},GetVal:function(E){var D,B,A,G,F="";if(typeof E=="string"){D=gAU.$(E)}else{D=E}try{switch(D.nodeName){case"SELECT":if(D.selectedIndex==-1){return""}if(D.multiple){F=[];for(B=0;B<D.length;++B){if(D.options[B].selected){A=D.options[B].value.strip();if(A==""){A=D.options[B].text.strip()}if(A=="!"){A=""}F.push(A)}}if(F.length==0){return""}else{return F}}else{F=D.options[D.selectedIndex].value.strip();if(F==""){F=D.options[D.selectedIndex].text.strip()}if(F=="!"){F=""}}break;case"OPTION":F=D.value.strip();if(F==""){F=D.text.strip()}if(F=="!"){F=""}break;case"INPUT":switch(D.type){case"checkbox":if(D.checked){F=D.value.strip()}break;case"radio":G=document.getElementsByName(D.name);for(B=0;B<G.length;++B){if(G[B].checked){F=G[B].value.strip();break}}break;default:F=D.value.strip()}break;case"TEXTAREA":F=D.value.strip();break;default:F=D.innerHTML.strip();break;break}}catch(C){return""}return F},GetNodeText:function(B){var D,C,A;if(typeof B=="string"){D=gAU.$(B)}else{D=B}if(typeof D.textContent!="undefined"){return D.textContent}if(typeof D.innerText!="undefined"){return D.innerText}if(typeof D.text!="undefined"){return D.text}switch(D.nodeType){case 3:case 4:return D.nodeValue;break;case 1:case 11:A="";for(C=0;C<D.childNodes.length;C++){A+=getInnerText(D.childNodes[C])}return A;break;default:return""}},GetTableCellText:function(C,G,A){var E,D,B,F;if(typeof C=="string"){E=gAU.$(C)}else{E=C}D=E.tBodies[0].rows;B=D[G];F=gAU.GetNodeText(B.cells[A]);return F},FindTableValue:function(G,D,C){var F,E,B,A,H;if(typeof D=="string"){F=gAU.$(D)}else{F=D}E=F.tBodies[0].rows;for(A=0;A<E.length;++A){B=E[A];H=gAU.GetNodeText(B.cells[C]);if(H==G){return A}}return -1},GetNodesByAttrib:function(B,H,F){var C,E,A,D,G=[];F=F||document;if(gAjax.isIE&&gAjax.isIE<6){C=document.all}else{C=F.getElementsByTagName("*")}for(D=0;D<C.length;++D){E=C[D];A=E.getAttribute(B);if(A===undefined||A==null){continue}if(H!=undefined&&H!=null&&H!=""&&H!=A){continue}G[G.length]=E}return G},GetNodesByClass:function(B,E){var A,D,C,F=new Array();E=E||document;if(gAjax.isIE&&gAjax.isIE<6){A=document.all}else{A=E.getElementsByTagName("*")}for(C=0;C<A.length;++C){D=A[C];if(gAU.IsClass(D,B)){F[F.length]=D}}return F},HtmlEncode:function(B){if(!B){return""}var A=B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return A},UrlEncode:function(A){return escape(A).replace(/\*/g,"%2A").replace(/\+/g,"%2B").replace(/-/g,"%2D").replace(/\./g,"%2E").replace(/\//g,"%2F").replace(/@/g,"%40").replace(/_/g,"%5F")},StripNumber:function(A){if(!A){return""}A=Number((A.toString().replace(/\$|\,/g,"")));if(isNaN(A)){return 0}else{return A}},Round:function(D,A){var B=D,C;if(typeof A!="number"){return""}if(typeof D=="string"){B=Number(D)}else{if(typeof D=="number"){B=D}else{return""}}if(B.toFixed){B=B.toFixed(A)}else{C=Math.pow(10,A);B=Math.round(B*C)/C}return B},Format:function(E,A){var D=/^([$%]*)([,]*)([\d]*)([\+]*)$/,B=/^(mdy|ymd)$/,C;C=D.exec(A);if(C){return gAU.NumberFormat(E,C[3],C[1],C[4],C[2])}else{C=B.exec(A);if(C){return gAU.DateFormat(E,A)}}return E},NumberFormat:function(E,B,A,C,I){var F,H,D=false,G;if(typeof I=="undefined"||I==null){I=","}B=Number(B);E=gAU.StripNumber(E);if(E<0){E=-E;D=true}if(E==0){E="0"}else{F=Math.pow(10,B);E=Math.round(E*F)/F;E+=Math.pow(10,-(B+1));E=String(E)}if(I==","){H=E.indexOf(".");if(H<0){H=E.length}H-=3;while(H>0){E=E.substring(0,H)+","+E.substr(H);H-=3}}if(E.indexOf(".")<0){E+="."}E+="000000000000000";G=B==0?E.indexOf("."):E.indexOf(".")+B+1;if(B>0&&C=="+"){B=1;--G;H=E.indexOf(".")+B+1;while(G>H&&E.charAt(G)=="0"){--G}++G}E=E.substring(0,G);if(A){if(A=="$"){E="$"+E}else{if(A=="%"){E=E+"%"}}}if(D){E="-"+E}return E},DateFormat:function(G,C){var E,B,F,H,D=/^([01]?\d)\/([0-3]?\d)\/([12]\d{3})$/,A=/^([12]\d{3})-([01]\d)-([0-3]\d)$/;C=C||"mdy";E=D.exec(G);if(E){B=E[1];F=E[2];H=E[3]}else{E=A.exec(G);if(E){H=E[1];B=E[2];F=E[3]}}if(!E){return""}B=("0"+B).right(2);F=("0"+F).right(2);if(C=="mdy"){return B+"/"+F+"/"+H}else{if(C=="ymd"){return H+"-"+B+"-"+F}else{return""}}}};String.prototype.strip=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.left=function(A){return this.substring(0,A)};String.prototype.right=function(B){var A=this.length-B;if(A<=0){return this}return this.substring(A)};String.prototype.asInt=function(){return parseInt(this.replace(/[^-?0-9.]/g,""))};String.prototype.asFloat=function(){return parseFloat(this.replace(/[^-?0-9.]/g,""))};Date.prototype.toYMDString=function(){var C,A,B;C=this.getFullYear();A=String(this.getMonth()+1);B=String(this.getDate());if(A.length==1){A="0"+A}if(B.length==1){B="0"+B}return C+"-"+A+"-"+B};arrayPush=function(){var A;for(A=0;A<arguments.length;++A){this[this.length]=arguments[A]}return this.length};if(typeof Array.prototype.push=="undefined"){Array.prototype.push=arrayPush}arrayShift=function(){var B,A=this[0];for(B=0;B<this.length-1;++B){this[B]=this[B+1]}this.length--;return A};if(typeof Array.prototype.shift=="undefined"){Array.prototype.shift=arrayShift}Super=function(B,A){if(arguments.length>2){A.apply(B,Array.prototype.slice.call(arguments,2))}else{A.call(B)}};Function.prototype.Inherits=function(A,B){this.prototype=new A();this.prototype.constructor=this;this.prototype.classType=B};gAThemes={gAClassName:"gAThemes",styles:{},init:function(){this.LoadRules()},LoadRules:function(){var E,D,C,H,J,I,A,F,B;this.styles={};for(E=0;E<document.styleSheets.length;++E){H=document.styleSheets[E];try{J=H.cssRules||H.rules}catch(G){continue}for(D=0;D<J.length;++D){I=J[D];A=I.selectorText.split(",");for(C=0;C<A.length;++C){F=A[C].strip();if(!this.styles[F]){this.styles[F]=[]}B=this.styles[F].length;if(gAjax.isIE){I.style["-gAjax-parentStyleSheet"]=H}this.styles[F][B]=I}}}},GetStyle:function(A){var D,B=new RegExp(A,"i"),C=[];for(D in this.styles){if(D.match(B)){C=C.concat(this.styles[D])}}return C},SetStyle:function(A,D,G){var C,F,B,H,E=this.GetStyle(A);F=D.replace(/\-(.)/g,function(I,J){return J.toUpperCase()});for(C=0;C<E.length;++C){if(E[C].style[F]!=""){E[C].style[F]=G}else{if(gAjax.isIE){B=E[C].style["-gAjax-parentStyleSheet"]}else{B=E[C].parentStyleSheet}H=D+":"+G;if(gAjax.isIE){B.addRule(E[C].selectorText,H)}else{B.insertRule(E[C].selectorText+" {"+H+";}",0)}}}},ReplaceStyle:function(A,E,C,D){var B,G,F=this.GetStyle(A);G=E.replace(/\-(.)/g,function(H,I){return I.toUpperCase()});for(B=0;B<F.length;++B){if(D&&F[B].style[G]!=D){continue}F[B].style[G]=C}}};gAEventManager={gAClassName:"gAEventManager",loadEvents:[],unloadEvents:[],Handler:function(C){var B,A=C||window.event;if(!A){if(this.document&&this.document.parentWindow){A=this.document.parentWindow.event}if(!A){return }}B=A.type;if(B.left(2)!="on"){B="on"+B}this.gAEPublish(B,A)},Subscribe:function(F,E,B,H){var G=this,A,D,C;if(this.history&&this!==window){G=window}if(E.left(2)!="on"){A="on"+E}else{A=E}if(typeof G.gAE_Listeners=="undefined"){G.gAE_Listeners={}}D=G.gAE_Listeners[A];if(D===undefined){D=[]}if(typeof (G[A])=="function"){if(G[A]!==gAEventManager.Handler){C=G[A];D=G.gAE_Listeners[A];if(D===undefined){D=[]}D.push({Dest:null,Func:C,EventOnly:false});G.gAE_Listeners[A]=D;G[A]=gAEventManager.Handler}}if(typeof G[A]!="function"){G[A]=gAEventManager.Handler}if(typeof F=="string"){F=gAU.$(F)}if(!G.gAE_IsSubscribed(F,A,B)){D.push({Dest:F,Func:B,EventOnly:H});G.gAE_Listeners[A]=D}},Unsubscribe:function(F,E,C){var A,B,D;if(E.left(2)!="on"){A="on"+E}else{A=E}D=this.gAE_Listeners[A];if(D===undefined){return false}for(B=0;B<D.length;++B){if(F===D[B].Dest&&C===D[B].Func){D.splice(B,1);return }}},IsSubscribed:function(F,E,C){var A,B,D=D;if(E.left(2)!="on"){A="on"+E}else{A=E}D=this.gAE_Listeners[A];if(D===undefined){return false}for(B=0;B<D.length;++B){if(F===D[B].Dest&&C===D[B].Func){return true}}return false},Publish:function(G,A){var C,F,D,B,E=this.gAE_Listeners[G];if(E===undefined){return }for(C=0;C<E.length;++C){F=E[C].Dest;D=E[C].Func;B=E[C].EventOnly;if(F){if(B){if(D.call(F,A)==false){break}}else{if(D.call(F,this,F,G,A)==false){break}}}else{if(B){if(D.call(this,A)==false){break}}else{if(D.call(this,this,F,G,A)==false){break}}}}},Schedule:function(F,A,E,C){var D,B=[];for(D=3;D<arguments.length;++D){B.push(arguments[D])}if(F){return setTimeout(function(){return E.apply(F,B)},A)}else{return setTimeout(function(){return E(F,B)},A)}},SetPublisher:function(node,attr){var e,evts,ename,f,list;if(node.gAClassName){return }if(!node.gAE_Listeners){node.gAE_Listeners={}}if(!node.gAE_Subscribe){node.gAE_Subscribe=gAEventManager.Subscribe}if(!node.gAE_Unsubscribe){node.gAE_Unsubscribe=gAEventManager.Unsubscribe}if(!node.gAE_IsSubscribed){node.gAE_IsSubscribed=gAEventManager.IsSubscribed}if(!node.gAEPublish){node.gAEPublish=gAEventManager.Publish}if(!node.gAEHandler){node.gAEHandler=gAEventManager.Handler}if(!attr||typeof (attr)=="undefined"){return }if(typeof (attr)=="string"){if(attr.strip().left(1)!="["||attr.strip().right(1)!="]"){return }evts=eval(attr)}else{if(typeof (attr.length)=="undefined"){return }else{evts=attr}}if(!evts||typeof (evts.length)=="undefined"){return }for(e=0;e<evts.length;++e){ename=evts[e];if(typeof (node[ename])=="function"){if(node[ename]!==gAEventManager.Handler){f=node[ename];list=node.gAE_Listeners[ename];if(list===undefined){list=[]}list.push({Dest:null,Func:f});node.gAE_Listeners[ename]=list}}node[ename]=gAEventManager.Handler}},Add:function(D,C,B,A){var E=gAU.$(D);this.SetPublisher(E);A=A||null;E.gAE_Subscribe(A,C,B,true)},AddLoadEvent:function(B,A){this.loadEvents[this.loadEvents.length]={func:B,obj:A}},AddUnloadEvent:function(B,A){this.unloadEvents[this.unloadEvents.length]={func:B,obj:A}},GetEventSource:function(A){var B=A.srcElement||A.target;if(B&&B.nodeType==3){B=B.parentNode}return B},OnLoad:function(){var A,B,C;gAEventManager.SetPublisher(document,[]);gAEventManager.SetPublisher(window,[]);for(A=0;A<gAEventManager.loadEvents.length;++A){B=gAEventManager.loadEvents[A].func;C=gAEventManager.loadEvents[A].obj;if(C){B.call(C)}else{B()}}gAEventManager.loadEvents=null},OnUnload:function(){var A,B,C;for(A=0;A<gAEventManager.unloadEvents.length;++A){B=gAEventManager.unloadEvents[A].func;C=gAEventManager.unloadEvents[A].obj;if(C){B.call(C)}else{B()}}gAEventManager.unloadEvents=null;if(window.removeEventListener){window.removeEventListener("load",gAEventManager.OnLoad,false);window.removeEventListener("beforeunload",gAEventManager.OnUnload,false)}else{if(window.detachEvent){window.detachEvent("onload",gAEventManager.OnLoad);window.detachEvent("onbeforeunload",gAEventManager.OnUnload)}}}};if(window.attachEvent){window.attachEvent("onload",gAEventManager.OnLoad);window.attachEvent("onbeforeunload",gAEventManager.OnUnload)}else{window.addEventListener("load",gAEventManager.OnLoad,false);window.addEventListener("beforeunload",gAEventManager.OnUnload,false)}gAData=function(B){this.gAClassName="gAData";this.boundControls=[];var C,A=false;if(B){if(B[0]!=undefined){A=true;this._data=new Array()}for(C=0;C<B.length;++C){if(A){this._data[C]=B[C]}else{this[C]=B[C]}}}C=null};gAData.prototype.LoadFromXml=function(E){var B,D,C,A;for(B=0;B<E.childNodes.length;++B){D=E.childNodes[B];if(D.nodeType!=1){continue}C=D.firstChild;while(C&&C.nodeType!=1){C=C.nextSibling}if(C){A=C.firstChild}else{A=null}while(A&&A.nodeType!=1){A=A.nextSibling}if(C&&E.getElementsByTagName(C.nodeName).length>1){this[D.nodeName]=new Array()}else{if(A&&A.childNodes.length>0){this[D.nodeName]=new Array()}else{this[D.nodeName]=new Object()}}this.loadXmlBranch(this[D.nodeName],D)}};gAData.prototype.loadXmlBranch=function(B,E){var C,D,A;for(C=0;C<E.childNodes.length;++C){D=E.childNodes[C];if(D.nodeType==1){if(D.childNodes.length<=1){B[D.nodeName]=gAU.GetNodeText(D)}else{for(A=0;A<D.childNodes.length;++A){if(D.childNodes[A].nodeType!=3){break}}if(A==D.childNodes.length){B[D.nodeName]=gAU.GetNodeText(D);continue}if(B.constructor==Array){A=B.length;B[A]=new Object();this.loadXmlBranch(B[A],D)}else{B[D.nodeName]=new Object();this.loadXmlBranch(B[D.nodeName],D)}}}}};gAData.prototype.Populate=function(){var ctrlindx,ctrl,dsarray,idx,ds,recs,rec,rnum;for(ctrlindx=0;ctrlindx<this.boundControls.length;++ctrlindx){ctrl=this.boundControls[ctrlindx];dsarray=gAU.GetInfo(ctrl,"DataSource");for(idx=0;idx<dsarray.length;++idx){ds=dsarray[idx];if(ds.datasrc===this||(ds.datasrc.data!=undefined&&ds.datasrc.data===this)){if(ds.recs===undefined&&ds.datasrc._data===undefined){recs={};recs[ds.val]=window[ds.val]}else{recs=eval("this."+ds.recs);if(recs===undefined){recs=this._data}}if(recs===undefined){continue}if(ctrl.className=="gAGrid"&&gAU.GetInfo(ctrl,"gAGrid")){gAU.GetInfo(ctrl,"gAGrid").ClearTable();gAU.GetInfo(ctrl,"gAGrid").LoadData(recs);gAU.GetInfo(ctrl,"gAGrid").init();gAU.GetInfo(ctrl,"gAGrid").setColors();continue}else{if(ctrl.tagName=="TABLE"){this.clearTable(ctrl);for(idx=0;idx<recs.length;++idx){this.populateTable(ctrl,ds,recs[idx])}continue}else{if(ctrl.tagName=="SELECT"){this.clearSelect(ctrl,ds)}else{this.clearText(ctrl)}}}if(recs[0]===undefined){rec=recs;this.populateRec(ctrl,ds,rec)}else{for(rnum=0;rnum<recs.length;++rnum){rec=recs[rnum];this.populateRec(ctrl,ds,rec)}}}}}};gAData.prototype.clearSelect=function(B,A){if(A.selectOnly){B.selectedIndex=-1}else{while(B.options.length){B.options[B.options.length-1]=null}}};gAData.prototype.clearTable=function(B){var A=B.tBodies[0];while(A.rows.length>0){A.deleteRow(0)}};gAData.prototype.clearText=function(A){if(A.tagName=="SPAN"||A.tagName=="DIV"){A.innerHTML=""}else{A.value=""}};gAData.prototype.populateRec=function(ctrl,ds,rec){var val,fmt;gAV.SetError(ctrl,false);if(ctrl.tagName=="SELECT"){this.populateSelect(ctrl,ds,rec);return }if(ds.val.left(4)=="{js}"){val=eval(ds.val.substr(4)+"(rec)")}else{val=rec[ds.val]}fmt=ctrl.getAttribute("gAFormat");if(!fmt&&ds.gAFormat){fmt=ds.gAFormat}if(fmt){val=gAU.Format(val,fmt)}if(ctrl.tagName=="SPAN"||ctrl.tagName=="DIV"){if(fmt!="html"){val=gAU.HtmlEncode(val);val=val.replace(/\n/g,"<br>")}ctrl.innerHTML=val}else{ctrl.value=val}};gAData.prototype.populateSelect=function(D,C,F){var E,B,A;E=F[C.val];B=F[C.label];if(C.selectOnly){for(A=0;A<D.options.length;++A){if(D.options[A].value==""&&E==""){D.selectedIndex=A;break}else{if(D.options[A].value==E||(E==""&&D.options[A].value=="!")){D.selectedIndex=A;break}}}}else{if(E===undefined||E==""||E==null){E=B}if(B===undefined||B==""||B==null){B=E}D.options[D.options.length]=new Option(B,E)}};gAData.prototype.populateTable=function(ctrl,ds,rec){var val,hdrs,hRow,hCol,hdrTr,tbody,hdrTh,name,tr,td,fmt;hdrs=ctrl.tHead;hRow=0;hCol=0;hdrTr=hdrs.rows[hRow];tbody=ctrl.tBodies[0];tr=tbody.appendChild(document.createElement("TR"));while(true){hdrTh=hdrTr.cells[hCol++];if(hCol>hdrTr.cells.length){hdrTr=hdrs.rows[++hRow];if(!hdrTr){break}hCol=0;hdrTh=hdrTr.cells[hCol++];if(!hdrTh){break}tr=tbody.appendChild(document.createElement("TR"))}name=hdrTh.getAttribute("item");td=tr.appendChild(document.createElement("TD"));td.rowSpan=hdrTh.rowSpan;td.colSpan=hdrTh.colSpan;td.style.textAlign=hdrTh.style.textAlign;td.style.verticalAlign=hdrTh.style.verticalAlign;if(name.left(4)=="{js}"){val=eval(name.substr(4)+"(rec)");td.innerHTML=val}else{val=rec[name];fmt=hdrTh.getAttribute("gAFormat");if(!fmt&&ds.gAFormat){fmt=ds.gAFormat}if(fmt){val=gAU.Format(val,fmt)}val=gAU.HtmlEncode(val);val=val.replace(/\n/g,"<br>");td.innerHTML=val}td=null}td=null;tr=null};gAV={gAClassName:"gAValidate",IsSet:function(C,F,E){var B,D,A;if(typeof C=="string"){B=gAU.$(C)}else{B=C}if(!B){return false}D=gAU.GetVal(B).strip();A=B.getAttribute("gAFormat");if(A){A=gAU.Format(D,A)}else{A=D}if(B.nodeName!="SELECT"){B.value=A}if(D!=""){this.SetError(B,false,E);return true}if(F){this.SetError(B,true,E)}return false},IsAlphaNum:function(E,D,H,G){var B,F,C=/^[0-9A-Za-z]*$/,A;if(typeof E=="string"){B=gAU.$(E)}else{B=E}if(!B){return false}F=gAU.GetVal(B).strip();if(D){F=F.toUpperCase()}A=B.getAttribute("gAFormat");if(A){A=gAU.Format(F,A)}else{A=F}if(B.nodeName!="SELECT"){B.value=A}if(F==""&&!H){this.SetError(B,false,G);return true}if(!C.test(F)){this.SetError(B,true,G);return false}this.SetError(B,false,G);return true},IsValidDate:function(M,A,D){var K=/^([01]?\d)\/([0-3]?\d)\/([12]\d{3})$/,G=/^([12]\d{3})-([01]\d)-([0-3]\d)$/,C,F,I,L,E,H,J,B;if(typeof M=="string"){F=gAU.$(M)}else{F=M}if(!F){return false}C=gAU.GetVal(F).strip();B=F.getAttribute("gAFormat");if(B){B=gAU.Format(C,B)}else{B=C}if(F.nodeName!="SELECT"){F.value=B}if(C==""&&!A){this.SetError(F,false,D);return true}I=K.exec(C);if(I){E=I[1];H=I[2];L=I[3]}else{I=G.exec(C);if(I){L=I[1];E=I[2];H=I[3]}}if(!I){this.SetError(F,true,D);return false}J=new Date(L,E-1,H);if(J.getFullYear()==L&&J.getMonth()+1==E&&J.getDate()==H){this.SetError(F,false,D);return true}else{this.SetError(F,true,D);return false}},IsValidPhone:function(E,H,G){var D=/^\((\d{3})\)[ ]?(\d{3})[ -]?(\d{4})$|^(\d{3})[ -]?(\d{3})[ -]?(\d{4})$/,C,F,B,A;if(typeof E=="string"){C=gAU.$(E)}else{C=E}if(!C){return false}F=gAU.GetVal(C).strip();A=C.getAttribute("gAFormat");if(A){A=gAU.Format(F,A)}else{A=F}if(C.nodeName!="SELECT"){C.value=A}if(F==""&&!H){this.SetError(C,false,G);return true}B=D.exec(F);if(!B){this.SetError(C,true,G);return false}if(B[1]){F=B[1]+"-"+B[2]+"-"+B[3]}else{F=B[4]+"-"+B[5]+"-"+B[6]}C.value=F;this.SetError(C,false,G);return true},IsValidPhoneExt:function(D,G,F){var C=/^\d{1,10}$/,B,E,A;if(typeof D=="string"){B=gAU.$(D)}else{B=D}if(!B){return false}E=gAU.GetVal(B).strip();A=B.getAttribute("gAFormat");if(A){A=gAU.Format(E,A)}else{A=E}if(B.nodeName!="SELECT"){B.value=A}if(E==""&&!G){this.SetError(B,false,F);return true}if(!C.test(E)){this.SetError(B,true,F);return false}this.SetError(B,false,F);return true},IsValidEmail:function(E,H,B,G){var C,F,A,D=/^(\w+(((\.)|(\-))\w+)*@{1}\w+(((\.)|(\-))\w+)*\.{1}\w{2,4})$/;if(typeof E=="string"){C=gAU.$(E)}else{C=E}if(!C){return false}F=gAU.GetVal(C).strip();A=C.getAttribute("gAFormat");if(A){A=gAU.Format(F,A)}else{A=F}if(C.nodeName!="SELECT"&&(C.nodeName!="INPUT"||C.type!="checkbox")){C.value=A}if(F==""&&!H){this.SetError(C,false,G);return true}if(F.toLowerCase()=="n/a"&&B){this.SetError(C,false,G);return true}if(!D.test(F)){this.SetError(C,true,G);return false}this.SetError(C,false,G);return true},IsValidAmount:function(H,A,G,C,E){var F,D,I,B;if(typeof H=="string"){F=gAU.$(H)}else{F=H}if(!F){return false}D=gAU.GetVal(F).strip().toUpperCase();I=/\./;if(!I.test(D)){D=D.replace(/M/g,"000")}B=F.getAttribute("gAFormat");if(B){B=gAU.Format(D,B)}else{B=D}if(F.nodeName!="SELECT"){F.value=B}D=gAU.StripNumber(D);if(D==""&&!A){this.SetError(F,false,E);return true}I=new RegExp("^(\\d{1,"+G+"})((\\.{1})(\\d{0,"+C+"}))?$");if(!I.test(D)){this.SetError(F,true,E);return false}this.SetError(F,false,E);return true},IsAmountInRange:function(E,B,D,G){var C,F,A;if(typeof E=="string"){C=gAU.$(E)}else{C=E}if(!C){return false}F=gAU.GetVal(C).strip().toUpperCase();A=C.getAttribute("gAFormat");if(A){A=gAU.Format(F,A)}else{A=F}if(C.nodeName!="SELECT"){C.value=A}F=parseFloat(gAU.StripNumber(F));if(isNaN(F)||F<parseFloat(B)||F>parseFloat(D)){this.SetError(C,true,G);return false}this.SetError(C,false,G);return true},IsValidPrice:function(J,A,I,D,F){var G,E,K,H,B,C;if(typeof J=="string"){G=gAU.$(J)}else{G=J}if(!G){return false}E=gAU.GetVal(G).strip().toUpperCase();C=G.getAttribute("gAFormat");if(C){C=gAU.Format(E,C)}else{C=E}if(G.nodeName!="SELECT"){G.value=C}E=gAU.StripNumber(E);if(E==""&&!A){this.SetError(G,false,F);return true}K=/^\d+ \d{1,3}\/\d{1,3}$/;if(K.test(E)){H=E.split(" ");B=H[1].split("/");B=B[0]/B[1];E=(H[0]*1)+B}if(G.nodeName!="SELECT"){G.value=E}K=new RegExp("^(\\d{1,"+I+"})((\\.{1})(\\d{0,"+D+"}))?$");if(!K.test(E)){this.SetError(G,true,F);return false}this.SetError(G,false,F);return true},IsValidPassword:function(P,C,H){var L,B,I,G,J=false,Q=0,F=0,O=0,E=0,K=/[A-Z]/,N=/[a-z]/,A=/[0-9]/,M=/[-_!@&\*\+#]/,D=/^[A-Za-z].+[A-Za-z0-9]$/;if(typeof P=="string"){I=gAU.$(P)}else{I=P}if(!I){return false}G=gAU.GetVal(I).strip();if(G==""&&!C){this.SetError(I,false,H);return true}for(L=0;L<G.length;++L){B=G.charAt(L);if(A.test(B)){++O}else{if(K.test(B)){++Q}else{if(N.test(B)){++F}else{if(M.test(B)){++E}else{J=true;break}}}}}if(Q<2||F<2||O==0||E==0){J=true}if(G.length<10){J=true}if(!D.test(G)){J=true}if(J){this.SetError(I,true,H);return false}this.SetError(I,false,H);return true},Matches:function(D,G,F){var C,B,E,A;if(typeof D=="string"){C=gAU.$(D)}else{C=D}if(!C){return false}B=C.getAttribute("gAVRE");if(!B||B==""){this.SetError(C,false,F);return true}E=gAU.GetVal(C).strip();A=C.getAttribute("gAFormat");if(A){A=gAU.Format(E,A)}else{A=E}if(C.nodeName!="SELECT"){C.value=A}if(E==""&&!G){this.SetError(C,false,F);return true}if(E.search(B)==-1){this.SetError(C,true,F);return false}this.SetError(C,false,F);return true},FlashMessage:function(F,C,A,E){var B=750,D=gAU.$(F);if(E&&D.timerId){clearTimeout(D.timerId)}D.timerId=null;if(C>0){--C}if(A>0){--A}if((C%2)==0&&A>0){D.style.visibility="visible"}else{D.style.visibility="hidden";B=250}if(A>0){D.timerId=gAEventManager.Schedule(this,B,this.FlashMessage,F,C,A)}},SetError:function(D,B,E){var C,A;if(typeof D=="string"){A=gAU.$(D)}else{A=D}if(!A){return }gAU.SetInfo(A,"gAV.Error",B);C=gAU.$(A.id+"-err");if(!C){C=document.createElement("SPAN");C.id=A.id+"-err";C.className="gAValErr";A.parentNode.appendChild(C)}C.style.maxWidth=C.parentNode.offsetWidth+"px";if(B){if(E){C.innerHTML=E}C.style.display="block"}else{C.style.display="none"}C=gAU.$(A.id+"-prmpt");if(C){if(B){C.style.border="2px solid red"}else{C.style.border=""}}},getFldVal:function(C){var B,D,A;if(typeof C=="string"){B=gAU.$(C)}else{B=C}if(!B){return }D=gAU.GetVal(B).strip();A=B.getAttribute("gAFormat");if(A){A=gAU.Format(D,A)}else{A=D}B.value=A}};gAjax={gAClassName:"gAjax",isOpera:0,isKonq:0,isSafari:0,isMozilla:0,isFF:0,isIE:0,isChrome:0,prescanFunc:null,onloadFunc:null,init:function(){this.getBrowser();gAEventManager.AddLoadEvent(this.doScans,this);gAEventManager.AddLoadEvent(this.callOnLoad,this)},getBrowser:function(){var B=parseFloat(navigator.appVersion),A=navigator.userAgent.indexOf("Gecko");this.isChrome=(navigator.userAgent.indexOf("Chrome")>=0)?1:0;if(this.isChrome){this.isChrome=parseFloat(navigator.appVersion.split("Chrome/")[1].split(";")[0]);return }this.isOpera=(navigator.userAgent.indexOf("Opera")>=0)?B:0;this.isKonq=(navigator.appVersion.indexOf("Konqueror")>=0)||(navigator.appVersion.indexOf("Safari")>=0)?B:0;if(navigator.appVersion.indexOf("Safari")>=0){this.isSafari=parseFloat(navigator.appVersion.split("Version/")[1])||2}this.isMozilla=((A>=0)&&(!this.isKonq))?B:0;try{if(this.isMozilla){this.isFF=parseFloat(navigator.userAgent.split("Firefox/")[1].split(" ")[0])}if((document.all)&&(!this.isOpera)){this.isIE=parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0])}}catch(C){}},doScans:function(startAt){var start,doc,nodes,node,attr=null,i,j,ds=null,dsarray;if(!startAt){start=window;doc=document;gAThemes.init()}else{start=startAt;doc=start}this.prescanFunc=start.gAOnLoadPrescan;if(this.prescanFunc){this.prescanFunc()}this.onloadFunc=start.gAOnLoad;nodes=gAU.GetNodesByAttrib("gAObj",null,doc);for(i=0;i<nodes.length;++i){node=nodes[i];gAEventManager.SetPublisher(node,"[]");attr=node.getAttribute("gAData");if(attr!=undefined){dsarray=eval(attr);gAU.SetInfo(node,"DataSource",dsarray);for(j=0;j<dsarray.length;++j){attr=dsarray[j];ds=attr.datasrc;if(ds!=undefined){if(ds.gAClassName=="gAComm"){ds=ds.data}if(ds.boundControls[0]==undefined){ds.boundControls[0]=node}else{ds.boundControls[ds.boundControls.length]=node}if(attr.populateNow!=undefined&&attr.populateNow){ds.Populate()}}}}attr=node.getAttribute("gAInit");if(attr!=undefined){node.gAInit=function(){eval(attr)};node.gAInit()}}},callOnLoad:function(){if(this.onloadFunc){this.onloadFunc()}}};gAjax.init();gAComm=function(A){this.gAClassName="gAComm";this._xhr=null;this.url=A.url||"";this.command=A.command||"";this._args={};this.boundControls=[];this.gAE_Listeners={};this.data=new gAData();this.varName=null;this.onProgress=A.onProgress||gANullFunc;this.onComplete=A.onComplete||gANullFunc;this.onError=A.onError||gANullFunc;this.ReturnCode="";this.Message="";this.XmlDoc={};this.Status="";this.Error=false;this.gAEPublish("Initialized",null)};gAComm.prototype.AddArg=function(A,C){var B=typeof C;if(B=="undefined"){this._args[A]=""}else{if(B=="string"){this._args[A]=gAU.UrlEncode(C)}else{if(B=="number"){this._args[A]=gAU.UrlEncode(C)}}}};gAComm.prototype.ClearArgs=function(){this._args={}};gAComm.prototype.GetFormData=function(F){var C,B=null,E="",G="",A,D=gAU.$(F);if(!D){return false}for(C=0;C<D.elements.length;++C){B=D.elements.item(C);G=B.name;if(G==""){G=B.id}if(G==""){continue}E=gAU.GetVal(B);A=B.getAttribute("gAPostFormat");if(A){E=gAU.Format(E,A)}this.AddArg(G,E)}return true};gAComm_stateChange=function(){var A=gAU.GetInfo(this,"gAComm");A._stateChange()};gAComm.prototype.Post=function(){var C=this,B,D,A;this.Error=false;if(!this.varName){this.varName=gAU.FindSelf(this)}A=this.url+"?"+this.command;this._xhr=this._getXHR();this._xhr.open("POST",A,true);if((gAjax.isFF&&gAjax.isFF<3)||(gAjax.isIE&&gAjax.isIE<7)){this._xhr.onreadystatechange=function(){C._stateChange()}}else{gAU.SetInfo(this._xhr,"gAComm",this);this._xhr.onreadystatechange=gAComm_stateChange}this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xhr.setRequestHeader("Connection","close");B="command="+this.command;for(D in this._args){B+="&"+D+"="+this._args[D]}this.gAEPublish("Post",{url:this.url,data:B});this._xhr.send(B)};gAComm.prototype.Populate=function(){if(!this.varName){this.varName=gAU.FindSelf(this)}this.data.Populate()};gAComm.prototype._getXHR=function(){var A,D,B;if(window.XMLHttpRequest){return new XMLHttpRequest()}else{B=new Array("Msxml2.XMLHTTP.7.0","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");for(A=0;A<B.length;++A){try{D=new ActiveXObject(B[A])}catch(C){D=null}}if(!D&&typeof XMLHttpRequest!="undefined"){D=new XMLHttpRequest()}return D}};gAComm.prototype._stateChange=function(){var A=this._xhr.readyState;this.gAEPublish("StateChange",{state:A});switch(A){case 3:if(this.onProgress){this.onProgress()}break;case 4:this._getXML();this._xhr=null;if(this.Error){break}if(this.onComplete){this.onComplete(this)}this.gAEPublish("Complete",null);break}};gAComm.prototype._getXML=function(){var D,C,B,E,A;for(C in this.data){if(C=="gAClassName"||C=="boundControls"){continue}if(typeof this.data[C]=="function"){continue}delete this.data[C]}this.Status=this._xhr.status;if(this.Status!="200"){this.Error=true;if(this.onError){this.onError(this.Status)}return }this.XmlDoc=this._xhr.responseXML;if(!this.XmlDoc||typeof this.XmlDoc.childNodes=="undefined"){return }if(this._xhr.responseXML.parseError){if(this._xhr.responseXML.parseError.errorCode!=0){this.Error=true;if(this.onError){D=this._xhr.responseXML.parseError;this.onError("ParserError: "+D.errorCode+" "+gAU.HtmlEncode(D.reason)+" Line "+D.line+", Column "+D.linepos)}return }}if(this.XmlDoc.documentElement.nodeName=="parsererror"){this.Error=true;if(this.onError){this.onError("ParserError: "+gAU.HtmlEncode(this.XmlDoc.documentElement.firstChild.nodeValue))}return }A=this.XmlDoc.getElementsByTagName("response");if(A&&A.length){A=A[0]}else{this.Error=true;this.onError("Command "+this.command+' did not return a "response" XML section');return }this.data.LoadFromXml(A);C=this.XmlDoc.getElementsByTagName("ReturnCode").item(0);if(C){B=C.getElementsByTagName("code").item(0);this.ReturnCode=gAU.GetNodeText(B);E=C.getElementsByTagName("message").item(0);this.Message=gAU.GetNodeText(E)}else{this.ReturnCode="";this.Message=""}};gAComm.prototype.gAE_Subscribe=function(D,C,A){var B=this.gAE_Listeners[C];if(B===undefined){B=[]}if(typeof D=="string"){D=gAU.$(D)}B.push({Dest:D,Func:A});this.gAE_Listeners[C]=B};gAComm.prototype.gAEPublish=function(F,D){var A,E,B,C=this.gAE_Listeners[F];if(C===undefined){return }for(A=0;A<C.length;++A){E=C[A].Dest;B=C[A].Func;if(E){if(B.call(E,this,E,F,D)==false){break}}else{if(B.call(this,this,E,F,D)==false){break}}}};gAContentLoader=function(A){this.gAClassName="gAContentLoader";this.xhr=null;this.loaded=null;this.element=null;this.animate=A;this.url="";this.opacity=10};gAContentLoader.prototype.GetContent=function(B,A){if(A==this.loaded){return }this.url=A;this.element=gAU.$(B);if(!this.xhr){this.xhr=this.getXHR()}if(this.animate){if(this.loaded){this.runAnim(true);return }else{this.element.style.opacity=0;this.element.style.MozOpacity=0;this.element.style.filter="alpha(opacity=0)"}}this.loadContent()};gAContentLoader.prototype.runAnim=function(A){if(A){if(this.opacity==0){this.loadContent();return }--this.opacity}else{++this.opacity}this.element.style.opacity=this.opacity/10;this.element.style.MozOpacity=this.opacity/10;this.element.style.filter="alpha(opacity="+this.opacity*10+")";if(!A&&this.opacity==10){return }gAEventManager.Schedule(this,40,this.runAnim,A)};gAContentLoader.prototype.loadContent=function(){this.xhr.open("get",this.url,false);this.xhr.setRequestHeader("Connection","close");this.xhr.send("");this.element.innerHTML=this.xhr.responseText;this.loaded=this.url;this.element.style.opacity=0;this.element.style.MozOpacity=0;this.element.style.filter="alpha(opacity=0)";if(this.animate){this.opacity=0;this.runAnim(false)}};gAContentLoader.prototype.getXHR=function(){var A,D,B=["Msxml2.XMLHTTP.7.0","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];if(window.XMLHttpRequest){return new XMLHttpRequest()}else{for(A=0;A<B.length;++A){try{D=new ActiveXObject(B[A])}catch(C){D=null}}if(!D&&typeof XMLHttpRequest!="undefined"){D=new XMLHttpRequest()}return D}};gAFrames=function(){this.gAClassName="gAFrames";this._frameList=new Array;this._debug=false;this.frmNum=0;this.getFrames=function(E){var B,C,A,D;if(E&&E.length>0){for(B=0;B<E.length;++B){C=E.frames[B];try{A=E.frames[B].name;if(A==""){++this.frmNum;A="frame_"+this.frmNum}this._frameList[A]=C;this.getFrames(E.frames[B])}catch(D){}}}};this.getFrames(top)};gAFrames.prototype.GetFrameWindow=function(A){var B=this._frameList[A];return B};gAFrames.prototype.ListFrames=function(D){var C,B,A=0;if(D=="object"){return this._frameList}if(D=="array"){B=[]}else{if(D=="pre"){B="<pre>"}}for(C in this._frameList){if(D=="text"||D=="pre"){B+="Frame: "+C+"\n"}else{if(D=="html"){B+="Frame: "+C+"<br>"}else{if(D=="array"){B[A++]=C}}}}if(D=="pre"){B+="</pre>\n"}return B};gAFrames.prototype.Broadcast=function(B){var A;for(A in this._frameList){if(this._frameList[A].gAFrameMessage){if(this._debug){alert("Sending broadcast to "+A)}this._frameList[A].gAFrameMessage(B)}}};gAFrames.prototype.SendMessage=function(A,C){var B=this._frameList[A];if(B&&B.gAFrameMessage){if(this._debug){alert("Sending message to "+A)}B.gAFrameMessage(C)}};gAFrames.prototype.ReloadFrame=function(A){var B=this._frameList[A];if(B){B.location.reload()}};gAFrames.prototype.LoadFrame=function(A,B){var C=this._frameList[A];if(C){C.location.replace(B)}};gAFrames.prototype.CheckFrame=function(B,C,A){var D=this._frameList[B];if(D){if(D.location.pathname!=C){if(A){alert("Frame "+B+"\r\nis "+D.location+"\r\nnot "+C+"\r\nReloading")}D.location.replace(C)}}};gaFrames=new gAFrames();gAGrid=function(B,A,C,D){this.gAClassName="gAGrid";this._divId=B;this._tableId=A;this._table=gAU.$(A);this._div=gAU.$(B);this._filter={};this._sortInfo={};this._gotSortCols=false;this._loading=null;this.totalRows=0;this.visibleRows=0;this.rowHeight=25;this.gAE_Listeners={};this.iePadding=0;this.hdrsHeight=0;gAU.SetInfo(this._table,"gAGrid",this);this._numRows=C.numrows||1;this._sortStart=C.sortStart||gANullFunc;this._sortEnd=C.sortEnd||gANullFunc;this._loadBatch=C.loadBatch||100;this._noSelect=C.noSelect||false;this._noResize=C.noResize||false;if(D){gAU.SetInfo(this._table,"evenbg",D.evenbg||"#fefefe");gAU.SetInfo(this._table,"oddbg",D.oddbg||"#ececec");gAU.SetInfo(this._table,"hoverbg",D.hoverbg||"#ffff66");gAU.SetInfo(this._table,"selbg",D.selbg||"#ccccff")}else{gAU.SetInfo(this._table,"evenbg","#fefefe");gAU.SetInfo(this._table,"oddbg","#ececec");gAU.SetInfo(this._table,"hoverbg","#ffff66");gAU.SetInfo(this._table,"selbg","#ccccff")}this.lastClick=new Date();if(!this._div||!this._table){return }this._loading=document.createElement("DIV");this._loading.style.position="absolute";this._loading.style.zIndex="100";this._loading.style.backgroundColor="#ffffcc";this._loading.style.border="1px solid #333300";this._loading.style.width="200px";this._loading.style.padding="5px";this._loading.style.textAlign="center";this._loading.style.fontWeight="bold";this._loading.style.fontStyle="italic";this._loading.innerHTML="loading data...";this._div.insertBefore(this._loading,this._table);this.setLodingPos();this._loading.style.display="none";this.init();this.setColors();this.browserSetup();this.gAEPublish("Initialized",null)};gAGrid.prototype.setLodingPos=function(){var A=gAU.GetElementPos(this._loading);this._loading.style.left=(A.x+3)+"px";this._loading.style.top=(A.y+(25*this._numRows))+"px"};gAGrid.prototype.browserSetup=function(){var B,C,A,D;if(gAjax.isFF){this._div.style.overflowY="hidden";if(this._div.style.width==this._table.style.width){this._div.style.overflowX="hidden"}C=this._div.clientHeight-this._table.tHead.clientHeight;if(C>0){this._table.tBodies[0].style.height=C+"px"}}else{if(gAjax.isIE){D=0;if(this._div.currentStyle.width==this._table.currentStyle.width){this.iePadding=0;this._div.style.overflowX="hidden";A=parseInt(this._table.currentStyle.width,10)-16;this._table.runtimeStyle.width=A+"px";if(gAjax.isIE>=8){for(B=0;B<this._table.tHead.rows.length;++B){this._table.tHead.rows[B].style.position="absolute";if(D==0){D=this._table.tHead.rows[B].offsetTop}this._table.tHead.rows[B].style.top=D+"px";this._table.tHead.rows[B].style.width=this._table.runtimeStyle.width;this.iePadding+=this._table.tHead.rows[B].offsetHeight;D+=this._table.tHead.rows[B].offsetHeight}this.iePadding+=2}else{for(B=0;B<this._table.tHead.rows.length;++B){this.iePadding+=this._table.tHead.rows[B].offsetHeight;if(gAjax.isIE<6){this._table.tHead.rows[B].style.position="relative"}else{this._table.tHead.rows[B].style.position="absolute"}}this.iePadding+=2;if(gAjax.isIE<6){gAEventManager.SetPublisher(this._div);this._div.gAE_Subscribe(this,"scroll",this.positionHeaders)}else{window.gAE_Subscribe(this,"scroll",this.positionHeaders)}this.positionHeaders()}}}else{if(gAjax.isSafari||gAjax.isOpera||gAjax.isChrome){this.iePadding=0;D=0;if(this._div.style.width==this._table.style.width){this._div.style.overflowX="hidden";A=parseInt(this._table.style.width,10)-16;this._table.style.width=A+"px";for(B=0;B<this._table.tHead.rows.length;++B){this._table.tHead.rows[B].style.position="absolute";if(D==0){D=this._table.tHead.rows[B].offsetTop}this._table.tHead.rows[B].style.top=D+"px";this._table.tHead.rows[B].style.width=this._table.style.width;this.iePadding+=this._table.tHead.rows[B].offsetHeight;D+=this._table.tHead.rows[B].offsetHeight}this.iePadding+=2}}}}};gAGrid.prototype.init=function(){gAU.SetInfo(this._table,"selectedRow",null);this.getSortCols();gAEventManager.SetPublisher(this._table,["onmouseover","onmouseout","onclick","ondblclick"]);if(!this._noSelect){this._table.gAE_Subscribe(this,"onclick",this.clickRow);this._table.gAE_Subscribe(this,"ondblclick",this.dblClickRow)}if(!gAjax.isFF||gAjax.isFF!=3){this._table.gAE_Subscribe(this,"onmouseover",this.mouseOverRow);this._table.gAE_Subscribe(this,"onmouseout",this.mouseOutRow)}};gAGrid.prototype.positionHeaders=function(D,I,E,K){var C=0,H,G=0,F,L,J,A=this._table.tBodies[0],B=A.rows;this.hdrsHeight=0;L=this._table.tHead.rows;if(gAjax.isIE&&gAjax.isIE>=6){F=gAU.GetElementPos(this._table)}else{F=gAU.GetElementPos(B[0],this._table);F.y-=this.iePadding;F.y*=-1;if(B.length==0){F.y=0}}G=F.y;H=F.x;for(C=0;C<L.length;++C){J=L[C];J.style.top=G+"px";F=gAU.GetElementPos(L[0],this._table);if(gAjax.isIE>=6){G+=J.clientHeight}this.hdrsHeight+=J.clientHeight}};gAGrid.prototype.ShrinkTable=function(){var G,F,C,D,B,E,H=this._table,A=H.tBodies[0];if(!gAjax.isFF){return }if(!this._noResize&&this.totalRows>0){if(gAjax.isIE||gAjax.isSafari||gAjax.isChrome||gAjax.isOpera){if(gAjax.isIE&&gAjax.isIE<8){G=this._div.clientHeight;F=G}else{G=this._div.clientHeight;F=G-H.tHead.offsetHeight}}else{G=this._div.clientHeight;F=A.clientHeight}C=A.rows[0].offsetHeight;D=C*this._numRows;B=Math.floor(F/D);E=F%D;if(this.totalRows>=B&&F>0){if(E>(C/2)){++B}E=B*D;F=G-F+E-1;this._div.style.height=F+"px"}}F=this._div.clientHeight-this._table.tHead.clientHeight;C=this.visibleRows*this._numRows*this.rowHeight;if(C<F){F=C}this._table.tBodies[0].style.height=F+"px"};gAGrid.prototype.SetHeaderWidth=function(){if(!gAjax.isIE||gAjax.isIE<8){if(!gAjax.isSafari&&!gAjax.isOpera&&!gAjax.isChrome){return }}var G,E,H=this._table.tBodies[0],M=this._table.tHead,L=M.rows,D=H.rows,A,B,K,C,F,I,J=[];if(D.length==0){return }F=L[0].style.position;for(G=0;G<L.length;++G){L[G].style.position=""}for(G=0;G<D.length;++G){if(D[G].style.display!="none"){C=D[G];break}}for(G=0;G<L.length;++G){K=L[G];J[G]=[];for(E=0;E<K.cells.length;++E){A=K.cells[E];if(gAjax.isSafari||gAjax.isOpera||gAjax.isChrome){I=A.clientWidth-2;if(E==K.cells.length-1){I-=21}}else{I=A.clientWidth}J[G][E]=I+"px"}}for(G=0;G<L.length;++G){L[G].style.position=F}for(G=0;G<L.length;++G){K=L[G];for(E=0;E<K.cells.length;++E){A=K.cells[E];if(C){B=C.cells[E]}else{B=null}A.style.width=J[G][E];if(B&&B.style){B.style.width=J[G][E]}}}};gAGrid.prototype.LoadData=function(data,start){var tmp,rec,tbl,tr,td,hRow,hCol,hdrTr,hdrTh,style,loop,fmt,cnt=0,ttBody,tBody,name,val,hdrs=this._table.tHead,This,rnum;start=start||0;if(start==0){this.gAEPublish("BeginLoad",null)}this._loading.innerHTML="loading data...";this._loading.style.display="block";if(typeof this._loadBatch=="string"&&this._loadBatch.left(3)=="js:"){loop=eval(this._loadBatch.substr(3))}else{loop=this._loadBatch}if(loop<20){loop=20}tmp="loading ";if(start+loop>data.length){tmp+=data.length}else{tmp+=(start+loop)}tmp+=" of "+data.length+" records";this._loading.innerHTML=tmp;tmp=document.createElement("DIV");tbl="<table>";for(rec=start;rec<data.length;++rec){tr="";for(hRow=0;hRow<hdrs.rows.length;++hRow){tr+="<tr>";hdrTr=hdrs.rows[hRow];for(hCol=0;hCol<hdrTr.cells.length;++hCol){hdrTh=hdrTr.cells[hCol];name=hdrTh.getAttribute("item");if(name){td="<td";style="";if(hdrTh.rowSpan>1){td+=" rowspan="+hdrTh.rowSpan}if(hdrTh.colSpan>1){td+=" colspan="+hdrTh.colSpan}if(hdrTh.style.textAlign!=""){style+="text-align:"+hdrTh.style.textAlign+";"}if(hdrTh.style.verticalAlign!=""){style+="vertical-align:"+hdrTh.style.verticalAlign+";"}if(style!=""){td+=" style='"+style+"'>"}else{td+=">"}if(name.left(4)=="{js}"){val=eval(name.substr(4)+"(data[rec])")}else{val=data[rec][name];fmt=hdrTh.getAttribute("gAFormat");if(fmt){val=gAU.Format(val,fmt)}val=gAU.HtmlEncode(val);val=val.replace(/\n/g,"<br>")}}else{val=""}tr+=td+val+"</td>"}tr+="</tr>"}tbl+=tr;if(++cnt==loop){break}}tmp.innerHTML=tbl;ttBody=tmp.firstChild.tBodies[0];tBody=this._table.tBodies[0];rnum=start;cnt=0;while(ttBody&&ttBody.childNodes.length){tr=ttBody.removeChild(ttBody.firstChild);gAU.SetInfo(tr,"Record",data[rnum]);if((cnt%this._numRows)==0){++rnum}++cnt;tBody.appendChild(tr);gAU.SetInfo(tr,"gAGrid",this);gAU.SetInfo(tr,"savebgc",null);gAU.SetInfo(tr,"visible",true);if(gAjax.isFF==3){gAEventManager.SetPublisher(tr,["onmouseover","onmouseout"]);tr.gAE_Subscribe(this,"onmouseover",this.mouseOverRow);tr.gAE_Subscribe(this,"onmouseout",this.mouseOutRow)}}if(rec<data.length){++rec;start=rec;This=this;gAEventManager.Schedule(this,10,this.LoadData,data,rec)}else{this.setColors();this._loading.style.display="none";if(data.length===undefined){this.totalRows=0;this.visibleRows=0}else{this.totalRows=data.length;this.visibleRows=data.length}this.applyFilters();this.gAEPublish("Loaded",{total:this.totalRows,visible:this.totalRows})}};gAGrid.prototype.ClearTable=function(A){if(A){this._loading.innerHTML="loading data...";this._loading.style.display="block";gAEventManager.Schedule(this,10,this._clearTable)}else{this._clearTable()}};gAGrid.prototype._clearTable=function(){var A=this._table.tBodies[0];while(A.rows.length>0){A.rows[0].gAjaxInfo=null;A.deleteRow(0)}};gAGrid.prototype.ShowMessage=function(A){this._loading.innerHTML=A;if(A==""){this._loading.style.display="none"}else{this._loading.style.display="block"}};gAGrid.prototype.EnsureVisible=function(G){var F,H,C,B,D=G,E=this._table,A=E.tBodies[0];if(this._numRows){while((D.sectionRowIndex%this._numRows)!=0){D=D.previousSibling}}if(gAjax.isIE){if(gAjax.isIE<8){F=D.offsetTop-this.hdrsHeight}else{F=D.offsetTop-this.iePadding}}else{F=D.offsetTop-A.offsetTop}if(F<0){F=0}H=0;for(B=0;B<this._numRows;++B){H=D.offsetTop+D.offsetHeight-A.offsetTop;D=D.nextSibling}if(gAjax.isIE||gAjax.isSafari||gAjax.isChrome||gAjax.isOpera){if(gAjax.isIE&&gAjax.isIE<8){C=this._div.clientHeight}else{C=this._div.clientHeight-E.tHead.offsetHeight}}else{C=A.clientHeight}if(gAjax.isIE||gAjax.isSafari||gAjax.isChrome){if(F<this._div.scrollTop){this._div.scrollTop=F}else{if(H>this._div.scrollTop+C){this._div.scrollTop=H-C}}}else{if(gAjax.isOpera){F-=this.iePadding;if(F<0){F=0}if(F<this._div.scrollTop){this._div.scrollTop=F}else{if(H>this._div.scrollTop+C){this._div.scrollTop=H-C}}}else{if(F<A.scrollTop){A.scrollTop=F}else{if(H>A.scrollTop+C){A.scrollTop=H-C}}}}};gAGrid.prototype.mouseOverRow=function(H,I,C,J){var F,D,B,A,E=this._table,G=gAEventManager.GetEventSource(J).parentNode;while(G&&G.tagName!="TR"){G=G.parentNode}if(!G||G.parentNode.tagName=="THEAD"){return }if(this._numRows){while((G.sectionRowIndex%this._numRows)!=0){G=G.previousSibling}}A=G;B=gAU.GetInfo(G,"selectedRow");this.gAEPublish("Hilight",{Row:G});this.EnsureVisible(A);for(F=0;F<this._numRows;++F){if(B){A.style.backgroundColor=gAU.GetInfo(E,"selbg");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(E,"selbg")}}}else{gAU.SetInfo(G,"savebgc",A.style.backgroundColor);A.style.backgroundColor=gAU.GetInfo(E,"hoverbg");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(E,"hoverbg")}}}A=A.nextSibling}};gAGrid.prototype.mouseOutRow=function(H,I,C,J){var F,D,B,A,E=this._table,G=gAEventManager.GetEventSource(J).parentNode;while(G&&G.tagName!="TR"){G=G.parentNode}if(!G||G.parentNode.tagName=="THEAD"){return }if(this._numRows){while((G.sectionRowIndex%this._numRows)!=0){G=G.previousSibling}}A=G;B=gAU.GetInfo(A,"selectedRow");this.gAEPublish("DeHilight",{Row:A});for(F=0;F<this._numRows;++F){if(B){A.style.backgroundColor=gAU.GetInfo(E,"selbg");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(E,"selbg")}}}else{A.style.backgroundColor=gAU.GetInfo(G,"savebgc");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(G,"savebgc")}}}A=A.nextSibling}};gAGrid.prototype.clickRow=function(F,H,C,I){var E,D,A,G=gAEventManager.GetEventSource(I).parentNode,B=new Date();while(G&&G.tagName!="TR"){G=G.parentNode}if(!G||G.parentNode.tagName=="THEAD"){return }if(this._numRows){while((G.sectionRowIndex%this._numRows)!=0){G=G.previousSibling}}A=G;if(gAU.GetInfo(F,"selectedRow")){if(gAU.GetInfo(F,"selectedRow")==A){if((B.getTime()-gAU.GetInfo(G,"lastClick").getTime())<500){return }}A=gAU.GetInfo(F,"selectedRow");if(gAU.GetInfo(A,"selectedRow")){gAU.SetInfo(A,"selectedRow",false);for(E=0;E<this._numRows;++E){A.style.backgroundColor=gAU.GetInfo(A,"savebgc");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(A,"savebgc")}}A=A.nextSibling}}A=G;if(this._numRows){while((A.sectionRowIndex%this._numRows)!=0){A=A.previousSibling}}if(gAU.GetInfo(F,"selectedRow")==A){gAU.SetInfo(F,"selectedRow",null);this.gAEPublish("Deselected",{Row:A});return }gAU.SetInfo(F,"selectedRow",A)}gAU.SetInfo(G,"selectedRow",true);gAU.SetInfo(F,"selectedRow",A);gAU.SetInfo(G,"lastClick",B);for(E=0;E<this._numRows;++E){A.style.backgroundColor=gAU.GetInfo(F,"selbg");if(gAjax.isIE&&gAjax.isIE<8){for(D=0;D<A.cells.length;++D){A.cells[D].style.backgroundColor=gAU.GetInfo(F,"selbg")}}A=A.nextSibling}this.gAEPublish("Selected",{Row:G})};gAGrid.prototype.dblClickRow=function(E,B,F,A){var D,C=gAEventManager.GetEventSource(A).parentNode;while(C&&C.tagName!="TR"){C=C.parentNode}if(!C||C.parentNode.tagName=="THEAD"){return }if(this._numRows){while((C.sectionRowIndex%this._numRows)!=0){C=C.previousSibling}}D=gAU.GetInfo(E,"selectedRow");if(D==null||D!=C){this.clickRow(E,B,F,A)}this.gAEPublish("DblClicked",{Row:C})};gAGrid.prototype.getSortCols=function(){if(this._gotSortCols){return }var E=this._table.tHead,B,D,C,A;this._sortInfo=[{Row:-1,Col:-1,Fmt:"",Dir:""},{Row:-1,Col:-1,Fmt:"",Dir:""},{Row:-1,Col:-1,Fmt:"",Dir:""}];for(D=0;D<E.rows.length;++D){for(C=0;C<E.rows[D].cells.length;++C){A=E.rows[D].cells[C];if(A.className=="ggSortStr"||A.className=="ggSortInt"||A.className=="ggSortDbl"){A.gAGrid=this;A.colnum=C;A.rownum=D;gAEventManager.SetPublisher(A);A.gAE_Subscribe(this,"click",this.headerSort);B=A.innerHTML;B="<span class=sort>&deg;</span>"+B;A.innerHTML=B}}}this._gotSortCols=true};gAGrid.prototype.setColors=function(){var G=this._table.tBodies[0].rows,F=G.length,D,E=true,C,B,A;for(D=0;D<F;D+=this._numRows){if(gAU.GetInfo(G[D],"visible")){for(B=0;B<this._numRows;++B){if(E){A=gAU.GetInfo(this._table,"oddbg")}else{A=gAU.GetInfo(this._table,"evenbg")}G[D+B].style.backgroundColor=A;if(gAjax.isIE&&gAjax.isIE<8){for(C=0;C<G[D+B].cells.length;++C){G[D+B].cells[C].style.backgroundColor=A}}gAU.SetInfo(G[D+B],"savebgc",A)}E=E?false:true}}this.SetHeaderWidth()};gAGrid.prototype.addFilter=function(ctrl,event,action){var row,col,c=gAU.$(ctrl),fltr,parms,hdrs=this._table.tHead,cols,item;fltr=c.getAttribute("gaGridFilter");if(!fltr){return }eval("parms = "+fltr);if(typeof parms.fItem=="undefined"){return }if(typeof parms.fCond=="undefined"){parms.fCond="eq"}if(typeof parms.fType=="undefined"){parms.fType="text"}for(row=0;row<hdrs.rows.length;++row){cols=hdrs.rows[row].cells;for(col=0;col<cols.length;++col){item=cols[col].getAttribute("item");if(typeof item!="undefined"&&item==parms.fItem){fltr={src:c,row:row,col:col,type:parms.fType,cond:parms.fCond};this._filter[c.id]=fltr;event=event||"onchange";action=action||this.applyFilters;c[event]=action;break}}}};gAGrid.prototype.applyFilters=function(){var A=this._table.tBodies[0].rows,C,O,L=-1,I=A.length,M,B,H,G,E,N,K,J,F,D;this.gAEPublish("BeginFilter",null);this.visibleRows=0;for(H=0;H<I;H+=this._numRows){N=true;for(C in this._filter){K=this._filter[C];J=gAU.GetVal(K.src);if(K.cond=="range"){J=J.split("-",2);F=J[0];D=J[1];if(D<F){D=""}}else{F=J;D=""}if(K.type=="num"){F=parseFloat(F);D=parseFloat(D);if(isNaN(F)){F=Number.NEGATIVE_INFINITY}if(isNaN(D)){D=Number.POSITIVE_INFINITY}}M=A[H+K.row];B=M.cells[K.col].innerHTML;if(K.cond!="in"){B=B.toLowerCase();J=J.toLowerCase()}if(K.type=="num"){B=B.asFloat();if(isNaN(B)){B=0}}if(J!=""){switch(K.cond){case"in":for(G=0;G<J.length;++G){if(J[G]==B){break}}if(G>0&&G==J.length){N=false}break;case"eq":if(K.type=="num"){if(B!=F){N=false}}else{if(B.indexOf(J)<0){N=false}}break;case"starts":O=new RegExp("^"+J);if(B.search(O)==-1){N=false}break;case"lt":if(B>=F){N=false}break;case"gt":if(B<=F){N=false}break;case"range":if(K.type=="num"&&D==0){if(B<F){N=false}break}else{if(!K.type=="num"&&D==""){if(B<F){N=false}break}}if(B<F||B>D){N=false}break;default:return }}}for(G=0;G<this._numRows;++G){M=A[H+G];for(E=0;E<M.cells.length;++E){M.cells[E].style.paddingTop=""}if(N){if(G==0){this.visibleRows++}gAU.SetInfo(M,"visible",true);M.style.display="";if(gAjax.isIE&&(H==0||(H>0&&A[0].style.display=="none"))){if(L==-1){L=H;for(E=0;E<M.cells.length;++E){M.cells[E].style.paddingTop=this.iePadding+"px"}}}}else{gAU.SetInfo(M,"visible",false);M.style.display="none"}}}this.setColors();this.gAEPublish("EndFilter",{total:this.totalRows,visible:this.visibleRows})};gAGrid.prototype.headerSort=function(C,B,D,A){this._loading.innerHTML="Resorting table...";this._loading.style.display="block";this._sortStart(true);this.gAEPublish("BeginSort",null);gAEventManager.Schedule(this,20,this.headerSort2,C)};gAGrid.prototype.headerSort2=function(B){var C=B,D=this._table,J=D.tHead.rows[C.rownum],H=C.firstChild,G,E,I,K,A=false,F=false;K=gAU.GetInfo(D,"selectedRow");if(K){gAU.SetInfo(K,"selectedRow",false);gAU.SetInfo(D,"selectedRow",null)}for(G=0;G<3;++G){if(C.colnum==this._sortInfo[G].Col&&C.rownum==this._sortInfo[G].Row){F=true;E=this._sortInfo[G].Dir;if(E==""){this._sortInfo[G].Dir="a";H.innerHTML="&sup"+(G+1)+";&uarr;";A=true}else{if(E=="a"){this._sortInfo[G].Dir="d";H.innerHTML="&sup"+(G+1)+";&darr;";A=true}else{this._sortInfo[G].Col=-1;this._sortInfo[G].Dir="";H.innerHTML="&deg;"}}}}for(G=0;G<2;++G){if(this._sortInfo[G].Col==-1){I=this._sortInfo[G+1].Col;K=this._sortInfo[G+1].Row;this._sortInfo[G].Col=I;this._sortInfo[G].Row=K;this._sortInfo[G].Dir=this._sortInfo[G+1].Dir;if(I!=-1){H=J.cells[I].firstChild;H.innerHTML="&sup"+(G+1)+";";if(this._sortInfo[G].Dir=="a"){H.innerHTML+="&uarr;"}else{H.innerHTML+="&darr;"}}this._sortInfo[G+1].Row=-1;this._sortInfo[G+1].Col=-1;this._sortInfo[G+1].Dir=""}}if(!F){if(this._sortInfo[0].Col==-1){G=0}else{if(this._sortInfo[1].Col==-1){G=1}else{if(this._sortInfo[2].Col==-1){G=2}else{G=-1}}}if(G==-1){I=this._sortInfo[2].Col;H=J.cells[I].firstChild;H.innerHTML="&deg;";G=2}this._sortInfo[G].Col=C.colnum;this._sortInfo[G].Row=C.rownum;I=J.cells[C.colnum];this._sortInfo[G].Fmt=I.className.substr(6);this._sortInfo[G].Dir="a";H=I.firstChild;H.innerHTML="&sup"+(G+1)+";&uarr;";A=true}if(A){this.sortRows()}this._sortEnd(false);this.setColors();this._loading.style.display="none";this.gAEPublish("EndSort",null)};gAGrid.prototype.sortRows=function(){var H=[],D=this._table.tBodies[0],I=D.rows,G,E,C,K,B,F,J,A;for(G=0;G<I.length;G+=this._numRows){F=new Array();for(E=0;E<3;++E){if(this._sortInfo[E].Col==-1){break}K=G+this._sortInfo[E].Row;B=this._sortInfo[E].Col;F[E]=I[K].cells[B].innerHTML}J=new Array();for(E=0;E<this._numRows;++E){J[E]=I[G+E]}H.push({gAGrid:this,txt:F,tr:J})}H=H.sort(this.compareCells);for(G=0,E=0;G<I.length;G+=this._numRows){for(C=0;C<this._numRows;++C){A=D.appendChild(H[E].tr[C],I[G+C])}++E}};gAGrid.prototype.compareCells=function(B,A){var D,E,F,C=B.gAGrid;for(D=0;D<3;++D){if(!B.txt[D]){break}E=B.txt[D].toLowerCase();F=A.txt[D].toLowerCase();if(C._sortInfo[D].Fmt=="Int"){E=parseInt(E.replace(/[^-?0-9.]/g,""));if(isNaN(E)){E=0}F=parseInt(F.replace(/[^-?0-9.]/g,""));if(isNaN(F)){F=0}}else{if(C._sortInfo[D].Fmt=="Dbl"){E=parseFloat(E.replace(/[^-?0-9.]/g,""));if(isNaN(E)){E=0}F=parseFloat(F.replace(/[^-?0-9.]/g,""));if(isNaN(F)){F=0}}}if(E<F){return C._sortInfo[D].Dir=="a"?-1:1}if(E>F){return C._sortInfo[D].Dir=="a"?1:-1}}return 0};gAGrid.prototype.gAEPublish=function(F,D){var A,E,B,C=this.gAE_Listeners[F];if(C===undefined){return }for(A=0;A<C.length;++A){E=C[A].Dest;B=C[A].Func;if(E){if(B.call(E,this,E,F,D)==false){break}}else{if(B.call(this,this,E,F,D)==false){break}}}};gAGrid.prototype.gAE_Subscribe=function(D,C,A){var B=this.gAE_Listeners[C];if(B===undefined){B=[]}if(typeof D=="string"){D=gAU.$(D)}B.push({Dest:D,Func:A});this.gAE_Listeners[C]=B};gAGrid.prototype.gAE_Unsubscribe=function(E,D,B){var A,C=this.gAE_Listeners[D];if(C===undefined){return }if(typeof E=="string"){E=gAU.$(E)}for(A=0;A<C.length;++A){if(C[A].Dest==E&&C[A].Func==B){C.splice(A,1)}}this.gAE_Listeners[D]=C};gAMask=function(A){this.gAClassName="gAMask";this.mask=null;this.zIndex=null;this.init();if(A){this.Show()}};gAMask.prototype.init=function(){var A=document.getElementsByTagName("BODY").item(0);this.mask=document.createElement("DIV");this.mask.className="gMask";if(gAjax.isIE&&gAjax.isIE<7){if(gAjax.isIE>=6){this.mask.style.height=document.documentElement.scrollHeight+"px";this.mask.style.width=document.documentElement.scrollWidth+"px"}else{this.mask.style.height=document.body.clientHeight+"px";this.mask.style.width=document.body.clientWidth+"px"}}A.appendChild(this.mask)};gAMask.prototype.concatCollection=function(A,B){var C;for(C=0;C<B.length;++C){A.push(B[C])}};gAMask.prototype.pushCollection=function(A,B){for(var C=0;C<B.length;++C){A.push(B[C])}};gAMask.prototype.Show=function(){var B,A,C;if(gAjax.isIE){C=new Array();this.pushCollection(C,document.getElementsByTagName("SELECT"));this.pushCollection(C,document.getElementsByTagName("BUTTON"));this.pushCollection(C,document.getElementsByTagName("button"));this.pushCollection(C,document.getElementsByTagName("checkbox"));this.pushCollection(C,document.getElementsByTagName("DIV"));this.pushCollection(C,document.getElementsByTagName("radio"));this.pushCollection(C,document.getElementsByTagName("reset"));this.pushCollection(C,document.getElementsByTagName("submit"));this.pushCollection(C,document.getElementsByTagName("password"));this.pushCollection(C,document.getElementsByTagName("fileUpload"));this.pushCollection(C,document.getElementsByTagName("TEXTAREA"));this.pushCollection(C,document.getElementsByTagName("window"))}else{C=document.getElementsByTagName("*")}if(this.zIndex){this.mask.style.zIndex=this.zIndex}for(B=0;B<C.length;++B){A=C[B];if(A.style.zIndex>this.mask.style.zIndex){continue}if(A.tabIndex!=undefined&&A.tabIndex!=-1){gAU.SetInfo(A,"saveTabIndex",A.tabIndex);A.tabIndex=-1}if(A.tagName=="SELECT"&&gAjax.isIE>0&&gAjax.isIE<7){gAU.SetInfo(A,"saveVisibility",A.style.visibility);A.style.visibility="hidden"}}if(gAjax.isIE&&gAjax.isIE<7){if(gAjax.isIE>=6){this.mask.style.height=document.documentElement.scrollHeight+"px";this.mask.style.width=document.documentElement.scrollWidth+"px"}else{this.mask.style.height=document.body.scrollHeight+"px";this.mask.style.width=document.body.scrollWidth+"px"}}this.mask.style.display="block"};gAMask.prototype.positionMask=function(E,C,F,B){var D,A=document.documentElement;this.mask.style.top=A.scrollTop+"px";this.mask.style.left=A.scrollLeft+"px";++D};gAMask.prototype.Hide=function(){var B,A,C,D;if(gAjax.isIE){D=new Array();this.pushCollection(D,document.getElementsByTagName("SELECT"));this.pushCollection(D,document.getElementsByTagName("BUTTON"));this.pushCollection(D,document.getElementsByTagName("button"));this.pushCollection(D,document.getElementsByTagName("checkbox"));this.pushCollection(D,document.getElementsByTagName("DIV"));this.pushCollection(D,document.getElementsByTagName("radio"));this.pushCollection(D,document.getElementsByTagName("reset"));this.pushCollection(D,document.getElementsByTagName("submit"));this.pushCollection(D,document.getElementsByTagName("password"));this.pushCollection(D,document.getElementsByTagName("fileUpload"));this.pushCollection(D,document.getElementsByTagName("TEXTAREA"));this.pushCollection(D,document.getElementsByTagName("window"))}else{D=document.getElementsByTagName("*")}for(B=0;B<D.length;++B){A=D[B];if(A.style.zIndex>this.mask.style.zIndex){continue}C=gAU.GetInfo(A,"saveTabIndex");if(C!=null&&C>-1){A.tabIndex=C}if(A.tagName=="SELECT"&&gAjax.isIE>0&&gAjax.isIE<7){C=gAU.GetInfo(A,"saveVisibility");if(C==null){A.style.visibility=""}else{A.style.visibility=gAU.GetInfo(A,"saveVisibility")}}}this.mask.style.display=""};gAMask.prototype.Close=function(){this.Hide();var A=document.getElementsByTagName("BODY").item(0);A.removeChild(this.mask)};gAMask.prototype.SetTimeout=function(A){gAEventManager.Schedule(this,A,this.Hide)};gAMovable=function(A){this.gAClassName="gAMovable";this.modal=(A&&A.modal)||false;this.titleText=(A&&A.title)||"Title Here";this.closeAction=(A&&A.close)||"hide";this.zIndex=(A&&A.zIndex)||1001;this.baseWindow=(A&&A.baseWindow)||window;this.closable=false;this.minable=false;this.dragging=false;this.lastX=0;this.lastY=0;this.mask=null;this.frame=null;this.titleBar=null;this.title=null;this.closeBtn=null;this.overlay=null;this.winSize={w:-1,h:-1};this.id=0;this.baseDocument=this.baseWindow.document};gAMovable.prototype.baseinit=function(){var B,C,A=this.baseDocument.getElementsByTagName("BODY").item(0);if(this.modal){this.zIndex=8001;if(!this.mask){this.mask=new gAMask()}}B=gAU.GetInfo(this.baseWindow,"gMovableList");if(!B){B={};gAU.SetInfo(this.baseWindow,"gMovableList",B)}C=gAU.GetInfo(this.baseWindow,"gAMovableId");if(C){++C}else{C=1}gAU.SetInfo(this.baseWindow,"gAMovableId",C);this.id="gAMovable_"+C;this.frame=this.baseDocument.createElement("DIV");gAU.SetInfo(this.frame,"gAMovable",this);this.frame.className=this.classType;this.frame.id="frame_"+this.id;A.appendChild(this.frame);this.titleBar=this.baseDocument.createElement("DIV");this.titleBar.className=this.classType+"TitleBar";this.titleBar.id="titleBar_"+this.id;this.frame.appendChild(this.titleBar);if(this.closable){this.closeBtn=this.baseDocument.createElement("DIV");this.closeBtn.className=this.classType+"Close";this.closeBtn.id="closeBtn_"+this.id;this.closeBtn.gAWindowParent=this;gAEventManager.SetPublisher(this.closeBtn);this.closeBtn.gAE_Subscribe(this,"click",this.closeClicked);this.closeBtn.gAE_Subscribe(this,"mouseover",function(F,E,G,D){F.style.backgroundPosition="0% 50%"});this.closeBtn.gAE_Subscribe(this,"mouseout",function(F,E,G,D){F.style.backgroundPosition="0% 0%"});this.closeBtn.gAE_Subscribe(this,"mousedown",function(F,E,G,D){F.style.backgroundPosition="0% 100%"});this.titleBar.appendChild(this.closeBtn)}if(this.minable){this.minBtn=this.baseDocument.createElement("DIV");this.minBtn.className=this.classType+"Minimize";this.minBtn.id="minBtn_"+this.id;this.minBtn.gAWindowParent=this;gAEventManager.SetPublisher(this.minBtn);this.minBtn.gAE_Subscribe(this,"click",this.minClicked);this.minBtn.gAE_Subscribe(this,"mouseover",function(F,E,G,D){F.style.backgroundPosition="0% 50%"});this.minBtn.gAE_Subscribe(this,"mouseout",function(F,E,G,D){F.style.backgroundPosition="0% 0%"});this.minBtn.gAE_Subscribe(this,"mousedown",function(F,E,G,D){F.style.backgroundPosition="0% 100%"});this.titleBar.appendChild(this.minBtn)}this.title=this.baseDocument.createElement("DIV");this.title.className=this.classType+"Title";this.title.id="title_"+this.id;this.title.innerHTML=this.titleText;this.titleBar.appendChild(this.title);this.title.gAWindowParent=this;this.overlay=this.baseDocument.createElement("DIV");this.overlay.className="gOverlay";this.overlay.id="overlay_"+this.id;this.overlay.gAWindowParent=this;this.frame.appendChild(this.overlay);gAEventManager.SetPublisher(this.title);gAEventManager.SetPublisher(this.overlay);gAEventManager.SetPublisher(this.frame);this.frame.gAE_Subscribe(this,"mousedown",this.setZIndex);this.title.gAE_Subscribe(this,"mousedown",this.startDrag);this.title.gAE_Subscribe(this,"mouseup",this.endDrag);this.overlay.gAE_Subscribe(this,"mouseup",this.endDrag);this.overlay.gAE_Subscribe(this,"mousemove",this.drag);document.gAE_Subscribe(this,"mousemove",this.drag)};gAMovable.prototype.baseShow=function(){var C,A,B;if(this.modal){if(this.zIndex){this.mask.zIndex=this.zIndex-1}this.mask.Show()}else{A=gAU.GetInfo(this.baseWindow,"gMovableList");for(C in A){B=A[C];if(this.zIndex<=B.zIndex){this.zIndex=B.zIndex+1}}A[this.id]=this;gAU.SetInfo(this.baseWindow,"gMovableList",A)}if(this.zIndex){this.frame.style.zIndex=this.zIndex}this.frame.style.display="block";document.gACaptureTarget=this};gAMovable.prototype.setZIndex=function(F,H,G,I){var E,C=0,B,A,D;if(this.frame==null||this.modal){return }E=this.zIndex;A=gAU.GetInfo(this.baseWindow,"gMovableList");for(B in A){D=A[B];if(D.zIndex>C){C=D.zIndex}if(D.zIndex>E){--D.zIndex;--D.frame.style.zIndex}}if(this.zIndex!=C){this.zIndex=C;this.frame.style.zIndex=C}};gAMovable.prototype.Hide=function(){document.gACaptureTarget=null;this.frame.style.display="";if(this.modal){this.mask.Hide()}if(this.dragging){this.dragging=false;this.overlay.style.display=""}};gAMovable.prototype.Close=function(){var B,E,C,D,A=this.baseDocument.getElementsByTagName("BODY").item(0);if(this.modal){this.mask.Close();this.mask=null}A.removeChild(this.frame);this.frame=null;B=this.zIndex;C=gAU.GetInfo(this.baseWindow,"gMovableList");if(!C){return }for(E in C){D=C[E];if(D.zIndex>B){--D.zIndex;--D.frame.style.zIndex}}if(C[this.id]){delete C[this.id]}};gAMovable.prototype.closeClicked=function(C,B,D,A){if(this.closeAction=="close"){this.Close()}else{this.Hide()}this.rc="{closed}";clearTimeout(this.timer);this.timer=null;if(this.callback){gAEventManager.Schedule(this,10,this.callback,this.rc)}};gAMovable.prototype.minClicked=function(C,B,D,A){var E=gAU.GetInfo(this,"minimized");if(E){gAU.SetInfo(this,"minimized",false);gAU.RemoveClass(this.frame,this.classType+"Minimized");gAU.RemoveClass(this.title,this.classType+"TitleMinimized");gAU.RemoveClass(this.titleBar,this.classType+"TitleBarMinimized");if(this.doc){gAU.RemoveClass(this.doc,this.classType+"DocMinimized")}if(this.text){gAU.RemoveClass(this.text,this.classType+"MsgMinimized")}if(this.btnBar){gAU.RemoveClass(this.btnBar,this.classType+"BtnsMinimized")}if(this.closeBtn){gAU.RemoveClass(this.closeBtn,this.classType+"CloseMinimized")}gAU.RemoveClass(this.minBtn,this.classType+"MinimizeRestore")}else{gAU.SetInfo(this,"minimized",true);gAU.AddClass(this.frame,this.classType+"Minimized");gAU.AddClass(this.title,this.classType+"TitleMinimized");gAU.AddClass(this.titleBar,this.classType+"TitleBarMinimized");if(this.doc){gAU.AddClass(this.doc,this.classType+"DocMinimized")}if(this.text){gAU.AddClass(this.text,this.classType+"MsgMinimized")}if(this.btnBar){gAU.AddClass(this.btnBar,this.classType+"BtnsMinimized")}if(this.closeBtn){gAU.AddClass(this.closeBtn,this.classType+"CloseMinimized")}gAU.AddClass(this.minBtn,this.classType+"MinimizeRestore")}};gAMovable.prototype.startDrag=function(C,B,D,A){if(A.which!=1&&A.button!=1){return true}this.dragging=true;this.lastX=A.clientX;this.lastY=A.clientY;this.overlay.style.display="block";return false};gAMovable.prototype.drag=function(C,B,D,A){if(!this.dragging){return true}if(this.winSize.w==-1){if(gAjax.isIE){if(gAjax.isIE>=6){this.winSize.h=document.documentElement.clientHeight;this.winSize.w=document.documentElement.clientWidth}else{this.winSize.h=document.body.clientHeight;this.winSize.w=document.body.clientWidth}}else{this.winSize.w=this.frame.parentNode.clientWidth;if(this.frame.parentNode.tagName=="BODY"){this.winSize.h=window.innerHeight}else{this.winSize.h=this.frame.parentNode.clientHeight}}}if(A.clientY<0||A.clientY>this.winSize.h||A.clientX<0||A.clientX>this.winSize.w){return false}newx=parseInt(this.frame.style.left,10)+(A.clientX-this.lastX);newy=parseInt(this.frame.style.top,10)+(A.clientY-this.lastY);this.frame.style.left=newx+"px";this.frame.style.top=newy+"px";this.lastX=A.clientX;this.lastY=A.clientY;return false};gAMovable.prototype.endDrag=function(C,B,D,A){if(!this.dragging||(A.which!=1&&A.button!=1)){return true}this.dragging=false;this.overlay.style.display="";return false};gAMsgBox=function(A){Super(this,gAMovable,A);this.gAClassName="gAMsgBox";this.message=A.message||"";this.buttons=A.buttons||[];this.timeout=A.timeout||0;this.closable=A.closeBtn||false;this.minable=A.minBtn||false;this.centered=A.centered||true;this.text=null;this.btnBar=null;this.timer=null;this.rc=null;this.callback=null;this.baseinit();this.init();if(A.show){this.Show(this.message)}};gAMsgBox.Inherits(gAMovable,"gAMsgBox");gAMsgBox.prototype.init=function(){this.text=document.createElement("DIV");this.text.className="gAMsgBoxMsg";this.text.innerHTML=this.message;this.frame.appendChild(this.text);this.btnBar=document.createElement("DIV");this.btnBar.className="gAMsgBoxBtns";this.frame.appendChild(this.btnBar)};gAMsgBox.prototype.Show=function(J,I,F,H){var E,D,A,C,B,G;if(J){this.text.innerHTML=J}if(this.centered){this.text.style.textAlign="center"}else{this.text.style.textAlign="left"}if(I){this.title.innerHTML=I}if(H){this.callback=H}D=F||this.buttons;while(this.btnBar.hasChildNodes()){A=this.btnBar.firstChild;this.btnBar.removeChild(A)}for(E=0;E<D.length;++E){C=D[E];A=document.createElement("BUTTON");A.id=C;A.innerHTML=C;A.className="gAButton gAMsgBoxButton";A.gAWindowParent=this;gAEventManager.SetPublisher(A);A.gAE_Subscribe(this,"click",this.buttonClick);this.btnBar.appendChild(A)}this.baseShow();if(this.frame.scrollWidth>this.frame.clientWidth){this.frame.style.width=this.frame.scrollWidth+"px";this.titleBar.style.width=(this.frame.scrollWidth-8)+"px"}if(gAjax.isIE){if(gAjax.isIE>=6){B=(this.baseDocument.documentElement.clientWidth/2)-(parseInt(this.frame.currentStyle.width,10)/2);G=(this.baseDocument.documentElement.clientHeight/2)-(parseInt(this.frame.offsetHeight,10)/2)}else{B=(this.baseDocument.body.clientWidth/2)-(parseInt(this.frame.currentStyle.width,10)/2);G=(this.baseDocument.body.clientHeight/2)-(parseInt(this.frame.offsetHeight,10)/2)}}else{if(this.frame.parentNode.tagName=="BODY"){B=(window.innerWidth/2)-(parseInt(this.frame.clientWidth,10)/2);G=(window.innerHeight/2)-(parseInt(this.frame.clientHeight,10)/2)}else{B=(this.frame.parentNode.clientWidth/2)-(parseInt(this.frame.clientWidth,10)/2);G=(this.frame.parentNode.clientHeight/2)-(parseInt(this.frame.clientHeight,10)/2)}}if(G>20){G/=2}this.frame.style.left=Math.floor(B)+"px";this.frame.style.top=Math.floor(G)+"px";this.titleBar.style.width=(this.frame.scrollWidth-8)+"px";E=this.closable?16:0;E+=this.minable?16:0;this.title.style.width=(parseInt(this.titleBar.style.width)-E)+"px";if(this.timeout>0){this.SetTimeout(this.timeout)}};gAMsgBox.prototype.Timeout=function(){if(this.timer){clearTimeout(this.timer)}this.timer=null;this.rc="{timeout}";if(this.closeAction=="close"){this.Close()}else{this.Hide()}if(this.callback){gAEventManager.Schedule(this,10,this.callback,this.rc)}};gAMsgBox.prototype.SetTimeout=function(A){if(this.timer){clearTimeout(this.timer)}this.timer=gAEventManager.Schedule(this,A,this.Timeout)};gAMsgBox.prototype.buttonClick=function(C,B,D,A){this.rc=C.id;if(this.closeAction=="close"){this.Close()}else{this.Hide()}clearTimeout(this.timer);this.timer=null;if(this.callback){gAEventManager.Schedule(this,10,this.callback,this.rc)}};gAPopup=function(obj,timeout,getTextCallback){var txt,max;this.gAClassName="gAPopup";this.show=false;this.obj=obj;this.span=document.createElement("SPAN");this.span.className="gAPopup";this.timeout=timeout||750;this.getText=getTextCallback;this.srcObj=null;if(obj){if(obj.title!=""){this.span.innerHTML=obj.title;obj.title=""}else{txt=obj.getAttribute("gAPopupVar");if(txt!=undefined&&txt!=null&&txt!=""){this.span.innerHTML=eval(txt)}else{this.span.innerHTML="No information available..."}}max=obj.getAttribute("gAPopupMaxX")}else{this.span.innerHTML="No information available..."}if(max!=undefined&&max!=null){if(max.right(2)!="em"&&max.right(2)!="px"){max=parseInt(max,10);max+="px"}this.span.style.maxWidth=max}};gAPopup.prototype.CleanUp=function(){var A=this.span.parentNode;if(this.obj){gAU.SetInfo(this.obj,"gAPopup",null);if(this.obj.gAE_Unsubscribe){this.obj.gAE_Unsubscribe(null,"onmouseover",this.PopUp);this.obj.gAE_Unsubscribe(null,"onmouseout",this.PopDown)}this.obj=null}A.removeChild(this.span);this.span=null};gAPopup.prototype.PopUp=function(H,C,B,L,G){var A,I,J=0,F=0,K=0,D=0,E;A=gAU.GetInfo(H,"gAPopup");if(!A){if(this.gAClassName&&this.gAClassName=="gAPopup"){A=this}}if(!A){return }if(!G){A.show=true;gAEventManager.Schedule(A,A.timeout,A.PopUp,H,C,B,L,true);A.srcObj=H;return }else{if(!A.show||H!=A.srcObj){return }}if(A.getText){A.span.innerHTML=A.getText(H,A.span.innerHTML)}I=gAU.GetElementPos(H);A.span.style.display="block";if(gAjax.isIE&&typeof A.span.style.maxWidth!="undefined"){K=A.span.style.maxWidth;A.span.style.width=K}if(document.all){K=document.body.clientWidth;D=document.body.clientHeight}else{K=window.innerWidth;D=window.innerHeight}E=H.clientHeight;if(E==0){E=H.offsetHeight}F=E+I.y+2;J=I.x;if(J<0){J=0}if(J+A.span.clientWidth>K){J=K-A.span.clientWidth}if(F<0){F=0}if(F+A.span.clientHeight>D-5){F=D-A.span.clientHeight-10}if(F<=(I.y+E)&&(F+A.span.clientHeight)>=I.y&&(I.y-A.span.clientHeight-5)>=0){F=I.y-A.span.clientHeight-5}if(document.all){A.span.style.pixelTop=F;A.span.style.pixelLeft=J}else{A.span.style.top=F+"px";A.span.style.left=J+"px"}A.span.style.visibility="visible"};gAPopup.prototype.PopDown=function(D,C,E,B){var A;A=gAU.GetInfo(D,"gAPopup");if(!A){if(this.gAClassName&&this.gAClassName=="gAPopup"){A=this}}if(!A){return }A.show=false;A.span.style.visibility="hidden";A.span.style.display="none"};gAPopup_scan=function(){var B=document.getElementsByTagName("BODY").item(0),D,F,E,A,G,C;D=gAU.GetNodesByAttrib("gAPopup");for(E=0;E<D.length;++E){F=D[E];A=F.getAttribute("gAPopupVar");if(F.title==""&&(A===undefined||A==null||A=="")){continue}G=F.getAttribute("gAPopupTimeout");C=new gAPopup(F,G);B.appendChild(C.span);gAEventManager.SetPublisher(F,["onmouseover","onmouseout"]);F.gAE_Subscribe(null,"onmouseover",C.PopUp);F.gAE_Subscribe(null,"onmouseout",C.PopDown);gAU.SetInfo(F,"gAPopup",C)}};gAPopup_clean=function(){var B,D,C,A;B=gAU.GetNodesByAttrib("gAPopup");for(C=0;C<B.length;++C){D=B[C];A=gAU.GetInfo(D,"gAPopup");if(A&&A.gAClassName&&A.gAClassName=="gAPopup"){A.CleanUp()}}};gAEventManager.AddLoadEvent(gAPopup_scan);gAEventManager.AddUnloadEvent(gAPopup_clean);gAStack=function(B,A,C){this.gAClassName="gAStack";this.container=gAU.$(B);this.pages={};this.tabs=[];this.btnType=A||"none";this.alignment=C||"left";this.btnBar=null;this.active=null;this.init()};gAStack.prototype.clicked=function(C,B,D,A){this.ShowPage(gAU.GetInfo(C,"associatedPage").id)};gAStack.prototype.init=function(){var B,A,C,D=this.container.firstChild;if(this.btnType=="tabs"){B=document.createElement("DIV");B.className="gStackTabBar";this.container.insertBefore(B,D)}while(true){if(typeof D=="undefined"||D==null){break}if(D.id){if(D.className){if(D.className=="gStackPage"){this.pages[D.id]=D;C=D.getAttribute("gATabTitle");if(this.btnType=="none"){D.style.MozBorderRadius="10px"}else{if(this.btnType=="tabs"&&C!="#"){A=document.createElement("SPAN");A.className="gStackTab";A.id=D.id+"_tab";gAU.SetInfo(A,"associatedPage",D);gAEventManager.SetPublisher(A);A.gAE_Subscribe(this,"click",this.clicked);if(C&&C!=""){A.innerHTML=C}else{A.innerHTML="Tab "+(this.tabs.length+1)}this.tabs[this.tabs.length]=A;B.appendChild(A);gAU.SetInfo(D,"stackTab",A)}else{if(this.btnType=="accordian"){D.style.MozBorderRadius="5px";D.style.WebkitBorderRadius="5px";D.style.borderRadius="5px";A=document.createElement("DIV");A.className="gStackAccordianBar";A.style.width=this.container.style.width;A.style.textAlign=this.alignment;A.id=D.id+"_tab";gAU.SetInfo(A,"associatedPage",D);gAEventManager.SetPublisher(A);A.gAE_Subscribe(this,"click",this.clicked);if(C&&C!=""){A.innerHTML=C}else{A.innerHTML="Tab "+(this.tabs.length+1)}this.tabs[this.tabs.length]=A;this.container.insertBefore(A,D);gAU.SetInfo(D,"stackTab",A)}}}}}}D=D.nextSibling}this.SetHeight();this.btnBar=B};gAStack.prototype.SetHeight=function(){var B=0,A,C;if(this.btnType!="accordian"){return }for(C in this.pages){B+=gAU.GetInfo(C,"stackTab").offsetHeight}A=parseInt(this.container.style.height,10);B=A-B;for(C in this.pages){this.pages[C].style.height=(B-2)+"px"}};gAStack.prototype.HideTab=function(B){var C=B+"_tab",A=gAU.$(C);if(A&&A.className=="gStackTab"){A.style.display="none"}};gAStack.prototype.UnhideTab=function(B){var C=B+"_tab",A=gAU.$(C);if(A&&A.className=="gStackTab"){A.style.display=""}};gAStack.prototype.HideTabBar=function(){this.btnBar.style.display="none"};gAStack.prototype.ShowPage=function(B){var D,C=gAU.$(B),A=this.active;if(!C.id){return }D=C.id;this.active=C;if(this.btnType=="tabs"){gAU.AddClass(gAU.GetInfo(C,"stackTab"),"gStackTabSelected");if(A){gAU.RemoveClass(gAU.GetInfo(A,"stackTab"),"gStackTabSelected")}}if(A===C){return }if(A&&this.btnType=="accordian"){this.AnimAccordianPage(A,C);return }C.style.display="block";if(A){A.style.display="none"}};gAStack.prototype.AnimAccordianPage=function(D,B){var F,C,A,E=Math.round(parseInt(this.container.style.height,10)/7);F=B.style.display;if(F=="none"||F==""){gAU.SetInfo(D,"origH",D.style.height);gAU.SetInfo(B,"origH",B.style.height);B.style.height="0px"}C=parseInt(D.style.height,10);if(C<=0){D.style.height=gAU.GetInfo(D,"origH");B.style.height=gAU.GetInfo(B,"origH");return }if(C<E){E=C}C-=E;if(C==0){D.style.display="none"}D.style.height=C+"px";A=B.clientHeight-parseInt(B.style.height,10);C=parseInt(B.style.height,10)+E;if(C<=E){C-=A}if(F=="none"||F==""){C-=2}if(D.style.display=="none"){B.style.height=gAU.GetInfo(B,"origH")}else{B.style.height=C+"px"}if(F=="none"||F==""){B.style.display="block"}gAEventManager.Schedule(this,20,this.AnimAccordianPage,D,B)};gAWindow=function(A){Super(this,gAMovable,A);this.gAClassName="gAWindow";this.doc=null;if(A&&typeof A.closeBtn!="undefined"){this.closable=A.closeBtn}else{this.closable=true}this.minable=A.minBtn||false;this.url=A.url||null;this.content=A.content||null;this.pos=A.pos||{left:-1,top:-1};this.size=A.size||{width:400,height:400};this.baseinit();this.init()};gAWindow.Inherits(gAMovable,"gAWindow");gAWindow.prototype.init=function(){var A;if(this.content){A=gAU.$(this.content);if(A){if(this.close=="close"){this.doc=A.cloneNode(true)}else{this.doc=A}this.doc.style.display="block"}else{this.doc=this.baseDocument.createElement("DIV")}}else{this.doc=this.baseDocument.createElement("IFRAME")}this.doc.className="gAWindowDoc";this.frame.appendChild(this.doc)};gAWindow.prototype.Show=function(B){var E,D,C,A;if(this.content&&this.close=="close"){E=gAU.$(this.content);if(E){this.doc=E.cloneNode(true);this.doc.style.display="block"}}this.baseShow();if(gAjax.isIE){if(gAjax.isIE>=6){A=this.baseDocument.documentElement.clientHeight}else{A=this.baseDocument.body.clientHeight}}else{if(this.frame.parentNode.tagName=="BODY"){A=window.innerHeight}else{A=this.frame.parentNode.clientHeight}}if(this.size.height>A){this.size.height=A;this.pos.top=0}this.frame.style.width=this.size.width+"px";this.frame.style.height=this.size.height+"px";if(this.pos.left==-1){if(gAjax.isIE){if(gAjax.isIE>=6){D=(this.baseDocument.documentElement.clientWidth/2)-(parseInt(this.frame.currentStyle.width,10)/2)}else{D=(this.baseDocument.body.clientWidth/2)-(parseInt(this.frame.currentStyle.width,10)/2)}}else{if(this.frame.parentNode.tagName=="BODY"){D=(window.innerWidth/2)-(this.size.width/2)}else{D=(this.frame.parentNode.clientWidth/2)-(this.frame.clientWidth/2)}}}else{D=this.pos.left}if(this.pos.top==-1){if(gAjax.isIE){if(gAjax.isIE>=6){C=(this.baseDocument.documentElement.clientHeight/2)-(this.size.height/2)}else{C=(this.baseDocument.body.clientHeight/2)-(this.size.height/2)}}else{if(this.frame.parentNode.tagName=="BODY"){C=(window.innerHeight/2)-(this.size.height/2)}else{C=(this.frame.parentNode.clientHeight/2)-(this.frame.clientHeight/2)}}}else{C=this.pos.top}if(C<0){C=0}this.frame.style.left=Math.floor(D)+"px";this.frame.style.top=Math.floor(C)+"px";this.titleBar.style.width=(this.size.width-8)+"px";this.title.style.width=(this.size.width-50)+"px";this.doc.style.height=(this.size.height-24)+"px";this.doc.style.width=(this.size.width-4)+"px";if(!this.content){this.doc.src=B||this.url}gAU.SetInfo(this.doc,"gAMovable",this)};gAWindow.prototype.Resize=function(A,B){if(A>0){this.frame.style.width=A+"px";this.titleBar.style.width=(A-8)+"px";this.title.style.width=(A-35)+"px";this.doc.style.width=(A-4)+"px"}if(B>0){this.frame.style.height=B+"px";this.doc.style.height=(B-24)+"px"}};