var isRIAAshxMode=true;var g_RIAWebUrlBeginStr='/GE.BGOffice/ria'; /* ================================================================================ Desc: JS函数库 Called by: Auth: Gianteasy Date: 2004-08-05 ================================================================================ Change History ================================================================================ Date: Author: Description: -------- -------- ------------------- ================================================================================ Copyright (C) 2004-2007 Gianteasy Corporation ================================================================================ */ if(!Array.prototype.push){Array.prototype.push=function(){var u=this.length;for(var i=0;i0)return _d;return null;};function DoIncJs(q){var _f=escape(q);if(!document.getElementById(_f)){var _g=ajax_getURLCode(q);if(_g!=null){var _h=document.getElementsByTagName('head')[0];var _i=document.createElement('script');_i.language="javascript";_i.type="text/javascript";_i.id=_f;_i.defer=true;_i.text=_g;_h.appendChild(_i);}}};function IncJsFiles(s){var _j=s.split("|");for(var i=0;i<_j.length;i++){DoIncJs(_j[i]);}}; function _GEDataConst(){this.strMinDate="1900-1-1";this.strMinDateTime="1900-1-1 0:0:0";this.strMaxDate="2060-12-31";this.strMaxDateTime="2060-12-31 0:0:0";this.strFileSrvRootPath='FileSrv\\Files';this.DEBUG=true;}GEDataConst=new _GEDataConst(); String.prototype.isEmpty=function(){return((!this)||(this.length==0));};String.prototype.trim=function(a){if(a==null||typeof(a)!='string'){return this.replace(/(^\s*)|(\s*$)/g,"");}else{var f=new RegExp("(^("+a+")*)|(("+a+")*$)","ig");return this.replace(f,"");}};String.prototype.trimStart=function(a){if(a==null||typeof(a)!='string'){return this.replace(/(^\s*)/g,"");}else{var f=new RegExp("(^("+a+")*)","ig");return this.replace(f,"");}};String.prototype.trimEnd=function(a){if(a==null||typeof(a)!='string'){return this.replace(/(\s*$)/g,"");}else{var f=new RegExp("(("+a+")*$)","ig");return this.replace(f,"");}};String.prototype.isURL=function(){var g;var b=true;g=this.substring(0,7);g=g.toUpperCase();if((g!="HTTP://")||(this.length<10)){b=false;}return b;};String.prototype.isColor=function(){var h=this;if(h=="")return true;if(h.length!=7)return false;return(h.search(/\#[a-fA-F0-9]{6}/)!=-1);};String.prototype.startsWith=function(c){if(c!=null&&c.length<=this.length){var j=this;j=j.substring(0,c.length);return c==j;}return false;};String.prototype.endsWith=function(c){if(c!=null&&c.length<=this.length){var j=this;j=j.substring(this.length-c.length,this.length);return c==j;}return false;};Date.prototype.getFirstDay=function(){return new Date(this.getFullYear(),this.getMonth(),1,this.getHours(),this.getMinutes(),this.getSeconds())};Date.prototype.getLastDay=function(){var k=new Date(this);var l=k.getNextDay();while(l.getMonth()==k.getMonth()){k=l;l=k.getNextDay();}return k;};Date.prototype.getPrevDay=function(){var k=new Date(this);if(k.getDate()==1){k=k.getPrevMonth();k=k.getLastDay();}else{k.setDate(k.getDate()-1);}return k;};Date.prototype.getNextDay=function(){var k=new Date(this);k.setDate(k.getDate()+1);return k;};Date.prototype.getPrevMonth=function(){var k=new Date(this);var m=k.getDate();if(k.getMonth()==0){k.setFullYear(k.getFullYear()-1) k.setMonth(11);}else{k.setMonth(k.getMonth()-1);}var n=k.getLastDay();if(m>n.getDate()){k.setDate(n.getDate());}return k;};Date.prototype.getNextMonth=function(){var k=new Date(this);var m=k.getDate();if(k.getMonth()==11){k.setFullYear(k.getFullYear()+1) k.setMonth(0);}else{k.setMonth(k.getMonth()+1);}var n=k.getLastDay();if(m>n.getDate()){k.setDate(n.getDate());}return k;};Date.prototype.getPrevYear=function(){var k=new Date(this);k.setFullYear(k.getFullYear()-1);return k;};Date.prototype.getNextYear=function(){var k=new Date(this);k.setFullYear(k.getFullYear()+1);return k;};Date.prototype.getPrevWeek=function(){var k=new Date(this);for(var i=0;i<7;i++){k=k.getPrevDay();}return k;};Date.prototype.getNextWeek=function(){var k=new Date(this);for(var i=0;i<7;i++){k=k.getNextDay();}return k;};function GEStringBuilder(){this.m_buffer='';}GEStringBuilder.prototype.toString=function(){return this.m_buffer;};GEStringBuilder.prototype.length=function(){return this.m_buffer.length;};GEStringBuilder.prototype.setLength=function(d){this.m_buffer.length=d;return this.m_buffer.length;};GEStringBuilder.prototype.clear=function(){this.m_buffer='';};GEStringBuilder.prototype.append=function(){for(var i=0;i=0&&a=0)this._Coll.splice(b,1);};GEStringCollection.prototype.removeValueNoCase=function(a){var b=this.findValueNoCase(a);if(b>=0)this._Coll.splice(b,1);};GEStringCollection.prototype.removeValueByIndex=function(b){if(b>=0&&b=0;};GEStringCollection.prototype.containsNoCase=function(a){return this.findValueNoCase(a)>=0;};GEStringCollection.prototype.clear=function(){this._Coll.splice(0,this._Coll.length)};GEStringCollection.prototype.toString=function(){return GEConvert.StringCollectionToString(this);}; function GEHashtable(){this._hash=new Object();}GEHashtable.prototype.add=function(a,b){if(typeof(a)!="undefined"){this._hash[a]=typeof(b)=="undefined"?null:b;return true;}else{return false;}};GEHashtable.prototype.remove=function(a){delete this._hash[a];return true;};GEHashtable.prototype.removeNoCase=function(a){var k;for(k in this._hash){if(k.toLowerCase()==a.toLowerCase()){delete this._hash[k];return true;}}return false;};GEHashtable.prototype.count=function(){var i=0;var k;for(k in this._hash){i++;}return i;};GEHashtable.prototype.findValueByIndex=function(c){var i=0;var k;for(k in this._hash){if(c==i){return this.findValue(k);}i++;}return null;};GEHashtable.prototype.findKeyByIndex=function(c){var i=0;var k;for(k in this._hash){if(c==i){return k;}i++;}return null;};GEHashtable.prototype.findValue=function(a){var h=this._hash[a];if(typeof(h)!="undefined")return h;return null;};GEHashtable.prototype.findValueNoCase=function(a){var k;for(k in this._hash){if(k.toLowerCase()==a.toLowerCase()){return this._hash[k];}}return null;};GEHashtable.prototype.contains=function(a){return this.findValue(a)!=null;};GEHashtable.prototype.containsNoCase=function(a){return this.findValueNoCase(a)!=null;};GEHashtable.prototype.clear=function(){var k;for(k in this._hash){delete this._hash[k];}};GEHashtable.prototype.clone=function(){var j=new GEHashtable();var k;for(k in this._hash){j.add(k,this.findValue(k))}return j;};GEHashtable.prototype.intersectHash=function(d){var j=new GEHashtable();var k;for(k in this._hash){if(d.contains(k)){j.add(k,this.findValue(k));}}return j;};GEHashtable.prototype.unionHash=function(d){var j=this.clone();var k;for(k in d._hash){j.add(k,d.findValue(k))}return j;};GEHashtable.prototype.getValue=function(e,f){var l=this.findValue(e);if(l==null){if(f==null)f='';l=f;}return l;};GEHashtable.prototype.getValueNoCase=function(e,f){var l=this.findValueNoCase(e);if(l==null){if(f==null)f='';l=f;}return l;};GEHashtable.prototype.toString=function(){return GEConvert.HashtableToString(this);};GEHashtable.prototype.copyTo=function(g){var k;for(k in this._hash){g.add(k,this.findValue(k))}}; function _GESqlBuildWhere(){}_GESqlBuildWhere.prototype.ToDBString=function(a){return a.replace(/\'/g,"''");};_GESqlBuildWhere.prototype.BuildEquString=function(b,a){if(a!=null){a=a.trim();if(a.length>0)return b+" = '"+this.ToDBString(a)+"'";}return"";};_GESqlBuildWhere.prototype.BuildEquNumber=function(b,a){if(a!=null){a=a.trim();if(a.length>0){a=parseFloat(a);if(isNaN(a)){return"";}else{return b+" = "+a;}}}return"";};_GESqlBuildWhere.prototype.BuildLikeString=function(b,a,c){if(a!=null){a=a.trim();if(a.length>0){if(c==null||c==0)return b+" like '%"+this.ToDBString(a)+"%' ";else if(c==1)return b+" like '"+this.ToDBString(a)+"%' ";else if(c==2)return b+" like '%"+this.ToDBString(a)+"' ";else return"";}}return"";};_GESqlBuildWhere.prototype.BuildIn=function(b,a){if(a!=null){a=a.trim();if(a.length>0)return b+" in ("+a+") ";}return"";};_GESqlBuildWhere.prototype.BuildBetweenDate=function(b,d,e){if((d==null||d.length<=0)&&(e==null||e.length<=0)){return"";}if(d==null||d.length<=0){d="1900-01-01";}if(e==null||e.length<=0){e="2050-01-01";}d=d.trim();e=e.trim();return b+" between '"+d+" 00:00:00.001' and '"+e+" 23:59:59.996'";return"";};_GESqlBuildWhere.prototype.BuildBetweenNumber=function(b,d,e){if(d!=null||e!=null){d=d.trim();e=e.trim();if(d.length<=0){d=parseFloat(d);if(isNaN(d)){d=0;}d=0;}if(e.length<=0){e=parseFloat(e);if(isNaN(e)){e=99999999;}e=99999999;}return b+" between "+d+" and "+e+" ";}return"";};_GESqlBuildWhere.prototype.ANDEquString=function(b,a,f){var k=this.BuildEquString(b,a);if(k!=null&&k.length>0){if(f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}}else{return f;}};_GESqlBuildWhere.prototype.ANDEquNumber=function(b,a,f){var k=this.BuildEquNumber(b,a);if(k.length>0&&f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ANDIn=function(b,a,f){var k=this.BuildIn(b,a);if(k.length>0&&f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ANDLike=function(b,a,c,f){var k=this.BuildLikeString(b,a,c);if(k.length>0&&f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ANDBetweenDate=function(b,d,e,f){var k=this.BuildBetweenDate(b,d,e);if(k.length>0&&f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ANDBetweenNumber=function(b,d,e,f){var k=this.BuildBetweenNumber(b,d,e);if(k.length>0&&f.length>0){return f+" and "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ANDBool=function(g,h,i){if(g)return i+" and "+h;};_GESqlBuildWhere.prototype.OREquString=function(b,a,f){var k=this.BuildEquString(b,a);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.OREquNumber=function(b,a,f){var k=this.BuildEquNumber(b,a);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ORLike=function(b,a,c,f){var k=this.BuildLikeString(b,a,c);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ORIn=function(b,a,f){var k=this.BuildIn(b,a);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ORBetweenDate=function(b,d,e,f){var k=this.BuildBetweenDate(b,d,e);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ORBetweenNumber=function(b,d,e,f){var k=this.BuildBetweenNumber(b,d,e);if(k.length>0&&f.length>0){return f+" or "+k+" ";}else if(k.length>0){return k;}else{return f;}};_GESqlBuildWhere.prototype.ORBool=function(g,j,i){if(g)return i+" or "+h;};GESqlBuildWhere=new _GESqlBuildWhere(); function _GEUtil(){this._IntIDIndex=0;}_GEUtil.prototype.newIntID=function(){return this._IntIDIndex++;};_GEUtil.prototype.newGuidStrID=function(){return GetSupportAXOper().NewGuidStrID;};_GEUtil.prototype.emptyGuidStrID=function(){return'00000000000000000000000000000000';};_GEUtil.prototype.isValidNotNullGuidStrID=function(a){return this.isValidGuidStrID(a)&&a!=this.emptyGuidStrID();};_GEUtil.prototype.isValidGuidStrID=function(a){return(a!=null&&a.length==32);};_GEUtil.prototype.DeleteTempFile=function(b){return GetSupportAXOper().DeleteTempFile(b);};_GEUtil.prototype.setBuffer=function(c,d){return GetSupportAXOper().SetBuffer(c,d);};_GEUtil.prototype.getBuffer=function(c){return GetSupportAXOper().GetBuffer(c);};_GEUtil.prototype.getFileExtName=function(e){var i=e.lastIndexOf(".");return e.substring(i+1).toUpperCase();};_GEUtil.prototype.getFileName=function(e){var _c=e.lastIndexOf("\\");var _d=e.lastIndexOf("/");return e.substring(((_c>_d)?_c:_d)+1);};_GEUtil.prototype.getFileViewURL=function(b,f,g,h){if(h==null)h=GEDataConst.strFileSrvRootPath;if(g==null)g=g_UserAppID;b="/"+h.replace(/\\/g,"/").trim("/")+"/"+g+"/"+f.replace(/\\/g,"/").trim("/")+"/"+b;return b;};_GEUtil.prototype.StringFormat=function(j){var _e=new Array();for(var i=1;i0){var _i=j.substring(i+1,_h);_i=_i.trim().trimStart('0');if(_i.length==0)_i='0';var _j=parseInt(_i);if(_j>=0&&_j0){var _i=j.substring(i+1,_h);_f+=GEXMLHelper.getAttrAsStringNoCase(l,_i,'');i=_h;}}else{_f+=ch;}}}return _f;};_GEUtil.prototype.GetHasValue=function(m,n,o,p){var d=m.findValue(n);if(d==null){d=p==null?'':p;}else{if(o!=null){var _l=o.findValue(n);if(_l!=null){var _m=GEConvert.StringToHashtable(_l);var _i=_m.findValue(d);if(_i!=null)d=_i;}}}return d;};_GEUtil.prototype.RunReport=function(q,r,s){return GetSupportAXOper().RunReport(q,r,s);};_GEUtil.prototype.PrintReport=function(q,t,r,u,v){var _n='';return GetSupportAXOper().PrintReport(q,t,r,_n,u==null?true:u,v==null?true:v);};_GEUtil.prototype.PrintReportByXMLStruct=function(q,t,r,w,u,v){var _n=this.XMLStructToReportXML(w);return GetSupportAXOper().PrintReport(q,t,r,_n,u,v);};_GEUtil.prototype.GetReportHTML=function(q,t,r){var d=GetSupportAXOper().BuildReportHTML(q,t,r,'');if(d==null)d='';return d;};_GEUtil.prototype.GetReportHTMLByXMLStruct=function(q,t,r,w){var _n=this.XMLStructToReportXML(w);var d=GetSupportAXOper().BuildReportHTML(q,t,r,_n);if(d==null)d='';return d;};_GEUtil.prototype.SaveReportToTempFile=function(q,t,r,x,y,z,w){var _n='';if(w!=null)_n=this.XMLStructToReportXML(w);var d=GetSupportAXOper().SaveReportToTempFile(q,t,r,_n,x,y,z);if(d==null)d='';return d;};_GEUtil.prototype.XMLStructToReportXML=function(w){var _o="";var _p=GEXMLHelper.createXMLDoc();_p.loadXML("");var _a=_p.selectSingleNode("DataSet");if(w!=null){var _q=w.enumBaseInfoNameList();var _r=w.enumTableNameList();if(_q!=null&&_q.length>0){var _s=GEConvert.StringToStringCollection(_q);for(var i=0;i<_s.count();i++){this._BuildReportXMLByTableName(_a,w,_s.items(i));}}if(_r!=null&&_r.length>0){var _t=GEConvert.StringToStringCollection(_r);for(var i=0;i<_t.count();i++){this._BuildReportXMLByTableName(_a,w,_t.items(i));}}_o+=_a.xml;_o=_o.replace(/\r/g,"&enter;").replace(/\n/g,"&newline;");return _o;}};_GEUtil.prototype._BuildReportXMLByTableName=function(_a,w,_b){if(w.isExistBaseInfo(_b)){var _u=w.getBaseInfoAlias(_b);if(_u.length>0){var _v=GEXMLHelper.appendNode(_a,_u);_v.setAttribute("ID","0");var l=GEXMLHelper.appendNode(_v,"DataRow");var _w=w.getBaseInfoToHas(_b);GEXMLHelper.setXmlNodeAttrByHashtable(l,_w);return true;}}else if(w.isExistTable(_b)){var _u=w.getTableAlias(_b);if(_u.length>0){var _v=GEXMLHelper.appendNode(_a,_u);_v.setAttribute("ID","0");for(var i=0;i=48&&c<=57)||c==45)){o=false;}break;}case"unit":{if(!((c>=48&&c<=57)||c==37)){o=false;}break;}case"money":case"double":{if(!((c>=48&&c<=57)||c==45||c==46)){o=false;}break;}case"date":{if(!((c>=48&&c<=57)||c==45)){o=false;}break;}case"time":{if(!((c>=48&&c<=57)||c==58)){o=false;}break;}case"datetime":{if(!((c>=48&&c<=57)||c==45||c==58||c==32)){o=false;}break;}}return o;};_GEValid.prototype.filterMask=function(a,b,c,f){var o=true;if(f==null||f.length<=0){switch(a.toLowerCase()){case"date":{f="####-##-##";break;}case"time":{f="##:##:##";break;}case"datetime":{f="####-##-## ##:##:##";break;}default:{f="";break;}}}if(f.length>0){}return o;};_GEValid.prototype.getMaxLength=function(a,g){if(g==null)g='';if(!isFinite(g)||g.length<=0){switch(a.toLowerCase()){case"passwordtext":g='20';break;case"unit":g='20';break;case"date":g='10';break;case"time":g='8';break;case"datetime":g='19';break;case"color":g='20';break;case"username":case"emailusername":g='64';break;case"httpurl":case"emailaddress":case"identitycard":case"phone":case"postcode":g='64';break;case"guid":g='32';break;case"text":g='64';break;}}return g;};_GEValid.prototype.getMaxValue=function(a,h){if(h==null)h='';if(h.length<=0){switch(a.toLowerCase()){case"int":h='2147483647';break;case"bigint":h='999999999999999';break;case"double":h='9999999999999';break;case"money":h='9999999999999';break;}}return h;};_GEValid.prototype.validTextBox=function(i,b){var o=false;var a=GEDocUtil.getAttribute(i,"DataType","");var k=parseInt(GEDocUtil.getAttribute(i,"MinLength","0"));var l=this.getMaxValue(a,GEDocUtil.getAttribute(i,"MaxValue",""));var m=GEDocUtil.getAttribute(i,"MinValue","");var n=GEDocUtil.getAttribute(i,"ValidRegex","");if(b==null)b=GEDocUtil.getAttribute(i,"Value","");var j=GEDocUtil.getAttribute(i,"IsRequire","false").toLowerCase()=="true";var p=GEDocUtil.getAttribute(i,"IsLabel","false").toLowerCase()=="true";var q=GEDocUtil.getAttribute(i,"IsReadOnly","false").toLowerCase()=="true";if(p){o=true;}else{o=this.validValue(b,a,j,k,l,m,n);}if(!o){}return o;};_GEValid.prototype.validValue=function(b,a,j,k,l,m,n){this.m_strLastError='';a=a.toLowerCase();var o=true;if(j&&(b==null||b.length<=0)){this.m_strLastError="必填!";o=false;}if(o){if(typeof(k)=='number'&&k>0){if(b==null||b.length<=k){this.m_strLastError="最小长度为 "+k+" 字符!";o=false;}}}if(o){if(b!=null&&b.length>0){var r=this._hasRegex.findValue(a);if(r==null){r=GEConvert.StringToRegex(n);}if(r!=null&&typeof(r)=='object'){o=r.test(b);if(!o){this.m_strLastError="数据格式错误!";}}}}if(o){o=this.validMaxMin(b,l,m,a);if(!o){this.m_strLastError="超过允许输入的范围!";}}return o;};_GEValid.prototype.validMaxMin=function(b,l,m,a){var o=true;switch(a.toLowerCase()){case'int':case'bigint':case'double':case'money':{var s=parseFloat(b);if(isNaN(s))s=0;var t=0;var u=0;try{if(l!=null&&l.length>0){t=parseFloat(l);o=s<=t;}if(o&&m!=null&&m.length>0){u=parseFloat(m);o=s>=u;}}catch(e){alert('validMaxMin:'+e.message);}break;}}return o;};GEValid=new _GEValid(); function _GEConvert(){}_GEConvert.prototype.StringToRegex=function(a){if(typeof(a)=='string'){return RegExp(a,"ig");}return a;};_GEConvert.prototype.XMLStringToString=function(b){b=b.replace(/>/g,">");b=b.replace(/</g,"<");b=b.replace(/"/g,"\"");b=b.replace(/'/g,"\'");b=b.replace(/&enter;/g,"\r");b=b.replace(/&newline;/g,"\n");b=b.replace(/&tab;/g,"\t");b=b.replace(/&/g,"&");return b;};_GEConvert.prototype.StringToXMLString=function(b){b=b.replace(/&/g,"&");b=b.replace(/>/g,">");b=b.replace(/0){if(u.count()>1){m=u.items(0);n=u.items(1);}else{if(u.items(0).indexOf(":")>=0){n=u.items(0);}else{m=u.items(0);}}}else{return null;}}else{return null;}if(m!=null){var u=GEConvert.StringToStringCollection(m,"-");if(u.count()==3){o=parseInt(u.items(0).trimStart('0'));p=parseInt(u.items(1).trimStart('0'))-1;q=parseInt(u.items(2).trimStart('0'));}}if(n!=null){var u=GEConvert.StringToStringCollection(n,":");if(u.count()>0){r=parseInt(u.items(0).trimStart('0'));if(isNaN(r))r=0;}if(u.count()>1){s=parseInt(u.items(1).trimStart('0'));if(isNaN(s))s=0;}if(u.count()>2){t=parseInt(u.items(2).trimStart('0'));if(isNaN(t))t=0;}}var d=new Date(o,p,q,r,s,t);if(o==d.getFullYear()&&p==d.getMonth()&&q==d.getDate()&&r==d.getHours()&&s==d.getMinutes()&&t==d.getSeconds())return d;return null;};_GEConvert.prototype.DateTimeToString=function(d){var v=new Date(d);var o=v.getFullYear();var p=v.getMonth()+1;var q=v.getDate();var r=v.getHours();var s=v.getMinutes();var t=v.getSeconds();return o+"-"+(p>9?p:"0"+p)+"-"+(q>9?q:"0"+q)+" "+(r>9?r:"0"+r)+":"+(s>9?s:"0"+s)+":"+(t>9?t:"0"+t);};_GEConvert.prototype.TimeToString=function(d){var v=new Date(d);var r=v.getHours();var s=v.getMinutes();var t=v.getSeconds();return(r>9?r:"0"+r)+":"+(s>9?s:"0"+s)+":"+(t>9?t:"0"+t);};_GEConvert.prototype.DateToString=function(d){var v=new Date(d);var o=v.getFullYear();var p=v.getMonth()+1;var q=v.getDate();return o+"-"+(p>9?p:"0"+p)+"-"+(q>9?q:"0"+q);};_GEConvert.prototype.StringToInt=function(b){var w=0;if(b!=null){b=b.toString().trim();var x=parseInt(b);if(isFinite(x)){w=x;}}return w;};_GEConvert.prototype.StringToFloat=function(b){var y=0;if(b!=null){b=b.toString().trim();var x=parseFloat(b);if(isFinite(x)){y=x;}}return y;};_GEConvert.prototype.FindEndQuot=function(c,e){if(e<0)e=0;var z=c.length;if(z>0&&e=2&&_c.charAt(0)=="\""&&_c.charAt(_c.length-1)=="\""){_c=_c.substr(1,_c.length-2);}if(c.length>=2&&c.charAt(0)=='"'&&c.charAt(c.length-1)=='"'){c=c.substr(1,c.length-2);}if(h)_c=_c.toUpperCase();j.add(_c,c.replace(/\\\"/g,"\""));}}return j;}return j;};_GEConvert.prototype.HashtableToString=function(j,f,g,h){if(j==null)return"";if(f==null)f="|";if(g==null)g="=";if(h!=null)h=false;var _d="";for(var i=0;i0){_d+=f;}_d+="\""+_c+"\""+g+"\""+c.toString().replace(/\"/g,"\\\"")+"\"";}}return _d;};_GEConvert.prototype.HashtableToStringNoQuot=function(j,f,g,h){if(j==null)return"";if(f==null)f="|";if(g==null)g="=";if(h!=null)h=false;var _d="";for(var i=0;i0){_d+=f;}_d+=_c+g+c.replace(/\"/g,"\\\"");}return _d;};_GEConvert.prototype.HashtableToXMLString=function(j){if(j==null)return"";var _d="0){_d+=" ";}_d+=_c+"=\""+this.StringToXMLString(c)+"\"";}_d+=" />" return _d};_GEConvert.prototype.StringToStringCollection=function(b,f){var k=new GEStringCollection();if(b==null)return k;if(f==null)f="|";if(typeof(b)!="string"){b=b.toString();}if(typeof(f)!="string"){f=b.toString();}b=b.trim();if(f.length<=0){k.add(b);}else{var _e=0,_f=0,_g=-1,_h=f.length;_g=b.indexOf('\"',_f);while(_f>=0){_f=b.indexOf(f,_f);if(_g>=0){if(_g<_f){_g=this.FindEndQuot(b,_g+1);if(_g<0){k.add(b.substr(_e));break;}_f=_g+1;_g=b.indexOf('\"',_g+1);continue;}}if(_f>=0){_f+=_h;k.add(b.substr(_e,_f-_e-_h));}else{if(_e0){_d+=f;}_d+=k.items(i);}return _d;};_GEConvert.prototype.MoneyToString=function(l){var _i='';if(typeof(l)=='string'){l=parseFloat(l);}if(isFinite(l)){var _i=l.toFixed(4).toString().trimEnd('0');if(_i.endsWith('.')){_i=_i.substr(0,_i.length-1);}}return _i;};GEConvert=new _GEConvert(); function _GEXMLHelper(){}_GEXMLHelper.prototype.createXMLDoc=function(){var m=Try.these(function(){return new ActiveXObject("Msxml2.DOMDocument");});return m;};_GEXMLHelper.prototype.convertXmlNode=function(a){if(typeof(a)=='string'){var m=GEXMLHelper.createXMLDoc();m.loadXML(a);a=m.documentElement;}return a;};_GEXMLHelper.prototype.copyXmlNodeAttr=function(b,c){if(b!=null&&c!=null){var n=this.xmlNodeAttrToHashtable(b);return this.setXmlNodeAttrByHashtable(c,n);}return false;};_GEXMLHelper.prototype.setXmlNodeAttrByHashtable=function(c,d){if(d!=null&&c!=null){this.clearXmlNodeAllAttr(c);for(var i=0;i0){e.removeAttribute(e.attributes.item(0).nodeName);}return true;}return false;};_GEXMLHelper.prototype.xmlNodeAttrToHashtable=function(e){var n=new GEHashtable();if(e!=null){for(var i=0;i0){var t=e;for(var i=0;i0){this.m_obj=$(d);if(this.m_obj!=null)this.m_strValue=d;}else if(d!=null&&typeof(d)!='string'){this.m_obj=d;}else{}}GECSSNames.prototype.getNames=function(){if(this.m_obj!=null){return this.m_obj.className;}else{return this.m_strValue;}};GECSSNames.prototype.setNames=function(e){if(this.m_obj!=null){this.m_obj.className=e;}else{this.m_strValue=e;}};GECSSNames.prototype.add=function(f){var j=this.getNames();var v=GEConvert.StringToStringCollection(j," ");if(!v.containsNoCase(f)){v.add(f);j=GEConvert.StringCollectionToString(v," ");this.setNames(j);}return j;};GECSSNames.prototype.remove=function(f){var j=this.getNames();var v=GEConvert.StringToStringCollection(j," ");if(v.containsNoCase(f)){v.removeValueNoCase(f);j=GEConvert.StringCollectionToString(v," ");this.setNames(j);}return j;};GECSSNames.prototype.isExist=function(f){var j=this.getNames();var v=GEConvert.StringToStringCollection(j," ");if(v.containsNoCase(f)){return true;}return false;};function GEStyles(d){this.m_obj=null;this.m_strValue='';if(typeof(d)=='string'&&d.length>0){this.m_obj=$(d);if(this.m_obj==null)this.m_strValue=d;}else if(d!=null&&typeof(d)!='string'){this.m_obj=d;}else{}}GEStyles.prototype.getStyles=function(){if(this.m_obj!=null){var w=this.m_obj.getAttribute("style");return w!=null?w:'';}else{return this.m_strValue;}};GEStyles.prototype.setStyles=function(e){if(this.m_obj!=null){this.m_obj.setAttribute("style",e);}else{this.m_strValue=e;}};GEStyles.prototype.add=function(f,e){if(e!=null&&e.length>0){var x=this.getStyles();var y=GEConvert.StringToHashtable(x,";",":");y.add(f,e);x=GEConvert.HashtableToStringNoQuot(y,";",":");this.setStyles(x);return x;}else{return this.remove(f);}};GEStyles.prototype.remove=function(f){var x=this.getStyles();var y=GEConvert.StringToHashtable(x,";",":");if(y.containsNoCase(f)){y.removeNoCase(f);x=GEConvert.HashtableToStringNoQuot(y,";",":");this.setStyles(x);}return x;};GEStyles.prototype.get=function(f){var x=this.getStyless();var y=GEConvert.StringToHashtable(x,";",":");if(y.containsNoCase(f)){return true;}return false;};GEStyles.prototype.isExist=function(f){var x=this.getStyles();var y=GEConvert.StringToHashtable(x,";",":");return y.findValueNoCase(f);};function _GEDocUtil(){this.m_CurrentPullDownDiv=null;}_GEDocUtil.prototype.getHTML=function(g){var z=$(g);if(jscomTestObj(z)){return z.outerHTML;}return'';};_GEDocUtil.prototype.setEnabled=function(h,g){for(var i=1;io.offsetHeight){o.style.pixelTop=_i.absoluteTop+_i.offsetHeight;}else if(_n>o.offsetHeight){o.style.pixelTop=_i.absoluteTop-o.offsetHeight;}else{if(_m-_n-_i.offsetHeight>_n){o.style.pixelHeight=_m-_n-_i.offsetHeight;o.style.pixelTop=_i.absoluteTop+_i.offsetHeight;}else{o.style.pixelHeight=_n;o.style.pixelTop=_i.absoluteTop-o.offsetHeight;}}};_GEDocUtil.prototype.showPullDownDiv=function(n,o){if(this.m_CurrentPullDownDiv!=null&&this.m_CurrentPullDownDiv!=o){this.setVisible(false,this.m_CurrentPullDownDiv);}this.m_CurrentPullDownDiv=o;document.body.appendChild(o);o.style.position='absolute';this.setVisible(true,o);this.checkPullDownSize(n,o);};_GEDocUtil.prototype.showhideCoverIfm=function(p,q,r){if($(p)==null)document.body.insertAdjacentHTML('afterBegin','');var _o=document.getElementsByTagName('IFRAME');var _p=null;for(i=0;i<_o.length;i++){if(_o.item(i).id==p){_p=_o.item(i);}}if(_p!=null){if((r==null&&this.isVisible(q))||r==true){var _q=0;var _r=0;var _s=0;var _t=0;if(q.style.position=='absolute'){_q=q.style.pixelLeft;_r=q.style.pixelTop;_s=q.offsetWidth;_t=q.offsetHeight;}else{var _i=this.getAbsoluteLocation(q);_q=_i.absoluteLeft;_r=_i.absoluteTop;_s=_i.offsetWidth;_t=_i.offsetHeight;}_p.style.left=_q;_p.style.top=_r;_p.style.width=_s;_p.style.height=_t;_p.style.visibility="visible";}else{_p.style.left=0;_p.style.top=0;_p.style.visibility='hidden';}}};GEDocUtil=new _GEDocUtil(); function _GECookie(){}_GECookie.prototype.GetCookie=function(a){var f=document.cookie.split("; ");for(var i=0;i0){if(f[i].substring(0,g)==a){return unescape(f[i].substr(g+1));}}}return"";};_GECookie.prototype.SetCookie=function(a,b,c,d){var h=a+"="+escape(b)+"; ";if(c!=null&&c.length>0){h+="domain="+c+"; ";}else{if(g_CookieDomainName!=null&&g_CookieDomainName.length>0){h+="domain="+g_CookieDomainName+"; ";}}if(d!=null&&d>0){var j=new Date();j.setTime(j.getTime()+d*60*1000);h+="expires="+j.toGMTString()+"; ";}h+=" path=/; ";document.cookie=h;};_GECookie.prototype.DelCookie=function(a,c){var h=a+"=; ";if(c!=null&&c.length>0){h+="domain="+c+"; ";}else{if(g_CookieDomainName!=null&&g_CookieDomainName.length>0){h+="domain="+g_CookieDomainName+"; ";}}h+=" expires=Fri, 31 Dec 1999 23:59:59 GMT; path=/; ";document.cookie=h;};_GECookie.prototype.GetCookieByHas=function(a,e){var k=this.GetCookie(a);var f=k.split("|");for(var i=0;i0){if(f[i].substring(0,g)==e){return unescape(f[i].substr(g+1));}}}return"";};_GECookie.prototype.SetCookieByHas=function(a,e,b){var k=this.GetCookie(a);var f=k.split("|");var l=false;for(var i=0;i0){if(f[i].substring(0,g)==e){l=true;f[i]=e+"="+escape(b);break;}}}if(!l){f[f.length]=e+"="+escape(b);}this.SetCookie(a,f.join("|").trim("|"));};_GECookie.prototype.DelCookieByHas=function(a,e){var k=this.GetCookie(a);var f=k.split("|");var m=new Array();var n=0;for(var i=0;i0){if(f[i].substring(0,g)==e){continue;}}m[n]=f[i];n++;}this.SetCookie(a,m.join("|").trim("|"));};GECookie=new _GECookie();