﻿Module.createNamespace('com.wjstc.Util');Module.require('com.wjstc.Common',1.1);com.wjstc.Util.NAME='com.wjstc.Util';com.wjstc.Util.VERSION=1.1;com.wjstc.Util.browserVersionI=parseInt(navigator.appVersion);com.wjstc.Util.browserVersionF=parseFloat(navigator.appVersion);com.wjstc.Util.isIE7=(navigator.appVersion.indexOf('MSIE 7')>=0);com.wjstc.Util.isIE=(navigator.appName=='Microsoft Internet Explorer'&&navigator.appVersion.indexOf('MSIE 7')<0&&navigator.appVersion.indexOf('MSIE 8')<0);com.wjstc.Util.isIEboth=(navigator.appName=='Microsoft Internet Explorer');com.wjstc.Util.isOpera=navigator.userAgent.toLowerCase().indexOf('opera')>=0;com.wjstc.Util.isSafari=navigator.userAgent.toLowerCase().indexOf('safari')>=0;com.wjstc.Util.isFireFox=navigator.userAgent.toLowerCase().indexOf('firefox')>=0;com.wjstc.Util.locale='en';com.wjstc.Util.browserLocale=(navigator.language||navigator.browserLanguage).toLowerCase().substr(0,2);com.wjstc.Util.fd='\x1f';com.wjstc.Util.rd='\x1e';com.wjstc.Util.sfd='\x1d';com.wjstc.Util.srd='\x1c';com.wjstc.Util.aF=true;com.wjstc.Util.tmp2=true;com.wjstc.Util.showButtonDescriptionIsOn=true;com.wjstc.Util.pageW=1280;com.wjstc.Util.pageH=1024;com.wjstc.Util.ToolTipTimer=null;com.wjstc.Util.ToolTipTarget=null;com.wjstc.Util.sessionTimeOut={pingInterval:120,pingIntervalId:null,isNotActive:'Y',logOutInterval:1800,showTimeOutMsgInterval:1680,msgAutoHideInterval:60,pingServerFn:'',logOutFn:'',idleTime:0.5};com.wjstc.Util.pageWasNotSubmitted=function(){var re=com.wjstc.Util.aF;if(!com.wjstc.Util.aF){alert('We are processing your request, please wait!');}com.wjstc.Util.aF=false;return re;};Number.prototype.toDecimals=function(n){n=(isNaN(n))?2:n;var nT=Math.pow(10,n);function bn(s){s=s||'.';return(s.length>n)?s:bn(s+'0');};return(isNaN(this))?this:(new String(Math.round(this*nT)/nT)).replace(/(\.\d*)?$/,pad);};if(!window.Node){var Node={ELEMENT_MODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11};}com.wjstc.Util.formatFloat=function(s,m,c,d,h,t){if(typeof(m)=='undefined'){m=0;}if(typeof(c)=='undefined'){c='';}if(typeof(d)=='undefined'){d='';}if(typeof(h)=='undefined'){h='';}if(typeof(t)=='undefined'){t='';}var n=parseFloat(s+'').NaN0().toFixed(m);if(c!=''||h!=''||t!=''){return h+ba()+t;}function ba(){var x=(n+'').split('.');var x1=x[0];var x2=(x[1])?d+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+c+'$2');}return x1+x2;};return n;};com.wjstc.Util.quoteProtect=function(H){return com.wjstc.Util.strReplStr('\n','\\n',com.wjstc.Util.strReplStr('\'','\\\'',com.wjstc.Util.strReplStr('\"','\\\"',com.wjstc.Util.strReplStr('\\','\\\\',H))));};com.wjstc.Util.arrayToString=function(J){var H='[';var aC=J.length;for(var C=0;C<aC;++C){if(C>0){H+=',';}H+="'"+com.wjstc.Util.strReplStr('\"','\\\"',com.wjstc.Util.strReplStr('\'','\\\'',J[C]+''))+"'";}H+=']';return H;};com.wjstc.Util.getFileExtension=function(bi){var ao=bi+'';var aa=ao.length-1;var as=ao.lastIndexOf('.');if(as<0||as==aa){return null;}var aH=ao.lastIndexOf('\\');if(aH<0){aH=ao.lastIndexOf('\/');}if(aH>as){return null;}return ao.substring(as+1).toLowerCase();};com.wjstc.Util.formatInt=function(s,c,h,t){return com.wjstc.Util.formatFloat(s,0,c,0,h,t);};com.wjstc.Util.getElements=function(aU,aW,at){at=(!at)?document:com.wjstc.Common.getObjById(at);var a=at.getElementsByTagName((!aW)?'*':aW);if(!aU){return a;}var e=[];var aC=a.length;for(var i=0;i<aC;i++){if((' '+a[i].className+' ').indexOf(' '+aU+' ')>=0){e.push(a[i]);}}return e;};com.wjstc.Util.setOpacity=function(ob,value){var o=com.wjstc.Common.getObjById(ob);if(!o.style){return;}o.style.opacity=value/100;o.style.filter="alpha(opacity="+value+")";o.style.display='';};com.wjstc.Util.objAddEvent=function(o,en,f){if(o.attachEvent){o.attachEvent("on"+en,f);}else if(o.addEventListener){o.addEventListener(en,f,true);}};com.wjstc.Util.objRemoveEvent=function(o,en,f){if(o.detachEvent){o.detachEvent("on"+en,f);}else if(o.removeEventListener){o.removeEventListener(en,f,true);}};com.wjstc.Util.eventStopDefault=function(e){e=(e)?e:window.event;if(e.preventDefault)e.preventDefault();else e.returnValue=false;};com.wjstc.Util.eventStopPropagation=function(e){e=(e)?e:window.event;if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;};function $$(ad,aB){if(document.body){if(typeof(document.$__$F)=='undefined'){var d=document.createElement('div');d.style.border='0';d.style.backgroundColor='white';d.style.position='absolute';com.wjstc.Common.moveToRight(d,0);com.wjstc.Common.moveToBottom(d,0);d.style.zIndex=996;d.style.padding='4px';d.style.fontFamily='Verdana,Helvetica,sans-serif';d.style.width='50em';d.style.height='10em';d.style.fontSize='0.8em';d.innerHTML="<table style='position:relative;'><tr>"+"<td style=\"width:3em;height:2em;border: 1px solid gray; padding: 4px; background-color: silver; text-align: center; vertical-align: middle;\" "+" onmousedown=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFB874';this.style.cursor='pointer';document.$__$F.aaa.value='';\" "+" onmouseup=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';\" "+" onmouseover=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';\" "+" onmouseout=\"this.style.borderColor='#999999'; this.style.backgroundColor='silver';this.style.cursor='default';\">Clear<\/td>"+"<td style=\"width:3em;height:2em;border: 1px solid gray; padding: 4px; background-color: silver; text-align: center; vertical-align: middle;\" "+" onmousedown=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFB874';this.style.cursor='pointer';com.wjstc.Common.getObjById('___$$$').style.display='none';\" "+" onmouseup=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';\" "+" onmouseover=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';\" "+" onmouseout=\"this.style.borderColor='#999999'; this.style.backgroundColor='silver';this.style.cursor='default';\">Close<\/td>"+"<td style=\" width:56em;height:2em;border: 1px solid gray; padding: 4px; background-color: silver; text-align: center; vertical-align: middle;\" "+" onmousedown=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFB874';this.style.cursor='move';com.wjstc.DragDrop.drag(com.wjstc.Common.getObjById('___$$$'),event,null,null,null);\" "+" onmouseup=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';\" "+" onmouseover=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFD494';this.style.cursor='pointer';this.innerHTML='Drag to move...';\" "+" onmouseout=\"this.style.borderColor='#999999'; this.style.backgroundColor='silver'; this.style.cursor='default';this.innerHTML='Debugging info:';\">Debugging info:"+"<\/td>"+"<\/tr><tr><td colspan='3'><form name='$__$F'><textarea name='aaa' style=\"width:62em;height:30em;padding:2px 4px;border: 1px solid gray;background-color: #F6F6F6;\" "+" onmouseover=\"this.style.borderColor='#000000';this.style.backgroundColor='#FFEEBB';\" "+" onmouseout=\"this.style.borderColor='#999999'; this.style.backgroundColor='#F6F6F6';\" "+"></textarea></form><\/td><\/tr><\/table>";d.id='___$$$';document.body.appendChild(d);}com.wjstc.Common.getObjById('___$$$').style.display='block';if(typeof(aB)=='undefined'){document.$__$F.aaa.value+='\n'+ad;}else if(aB==1){document.$__$F.aaa.value+='\n'+ad;}else if(aB==2){document.$__$F.aaa.value='\n'+ad+document.$__$F.aaa.value;}else{document.$__$F.aaa.value='\n'+ad;}}else{alert(ad);}};function $$o(M,A){var J=new Array();var s='Object "'+M+'":\n';for(var n in A){J.push(n);}J.sort();for(var ii=0;ii<J.length;++ii){s+=(ii+1)+'. '+J[ii]+"='"+A[J[ii]]+"'\n";}$$(s);return s;};function $$t(t){var s=t.name+'=';for(var i=0;i<t.m;++i){s+='\n';for(var j=0;j<t.n;++j){s+='['+i+']['+j+']='+t[t.p[i]][j]+', ';}}$$(s);};com.wjstc.Util.animate=function(ac,bl,aY,J,ap){var A=com.wjstc.Common.getObjById(ac);if(A==null|| !A.style){return;}var s=null;var f=0;var t=0;var i=setInterval(aZ,aY);function aZ(){if(f>bl){clearInterval(i);if(ap)ap(A);return;}for(var c in J){try{s=J[c](f,t,A);}catch(e){}if(s!=null){A.style[c]=s;}else{clearInterval(i);if(ap)ap(A);return;}}f++;t+=aY;}};com.wjstc.Util.getViewportW=function(doc){if(typeof(doc)=='undefined'){doc=document;}if(typeof(window.innerWidth)=='number'){return window.innerWidth-0;}else if(doc.documentElement&&doc.documentElement.clientWidth){return doc.documentElement.clientWidth-0;}return doc.body.clientWidth-0;};com.wjstc.Util.getViewportH=function(doc){if(typeof(doc)=='undefined'){doc=document;}if(typeof(window.innerWidth)=='number'){return window.innerHeight-0;}else if(doc.documentElement&&doc.documentElement.clientWidth){return doc.documentElement.clientHeight-0;}return doc.body.clientHeight-0;};com.wjstc.Util.getDocumentW=function(doc){if(typeof(doc)=='undefined'){doc=document;}if(doc.documentElement&&doc.documentElement.scrollWidth){return doc.documentElement.scrollWidth-0;}return doc.body.scrollWidth-0;};com.wjstc.Util.getDocumentH=function(doc){if(typeof(doc)=='undefined'){doc=document;}if(doc.documentElement&&doc.documentElement.scrollWidth){return doc.documentElement.scrollHeight-0;}return doc.body.scrollHeight-0;};com.wjstc.Util.getStyle=function(be,bk,bf){var elem=com.wjstc.Common.getObjById(be);if(window.getComputedStyle){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(bf);}else if(elem.currentStyle){return elem.currentStyle[bk];}return "";};com.wjstc.Util.moveToCenter=function(ac){var o=com.wjstc.Common.getObjById(ac);if(o.style.position=='absolute'){var x=((com.wjstc.Util.getViewportW()-com.wjstc.Common.getW(o))>>1)+com.wjstc.Common.getPageScrollX();var y=((com.wjstc.Util.getViewportH()-com.wjstc.Common.getH(o))>>1)+com.wjstc.Common.getPageScrollY();com.wjstc.Common.moveToXY(o,(x<0)?0:x,(y<0)?0:y);}};com.wjstc.Util.shadowDiv=function(c,w,z){var l=10;if(w<11&&w>0){l=w-0;}if(z<1){z=1;}var s="<b style='z-index:"+z+";position:absolute;display:block;width:100%;height:"+l+"px;bottom:-"+l+"px;right:0px;'>";for(var i=l;i>0;--i){s+="<b style='display:block;height:1px;width:100%;border:0px;margin: 0 "+i+"px 0 "+(l+1-i)+"px;background:"+c+";opacity:"+(i*.05)+";'></b>";}s+="</b><b style='z-index:"+z+";position:absolute;display:block;height:100%;bottom:-"+(l+1)+"px;right:-"+(l+1)+"px;font-size:1px;'>";for(var i=l;i>0;--i){s+="<b style='position:absolute;width:1px;height:100%;background:"+c+";opacity:"+(i*.05)+";bottom:"+i+"px;right:"+i+"px;'></b>";}return s+"</b>";};com.wjstc.Util.encode64=function(s,si,se){if(typeof(se)=='undefined'){se='';}if(typeof(si)=='undefined'){si=76;}var z='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/';var c=(si>>2)*3;var a=new com.wjstc.Util.StrJoin();var b,i;var P=s.length;var t=P%3;if(t){t^=3;s+='==';}var r='';for(i=0;i<P;i+=3){a.put(r);if(i>0&& !(i%c)){a.put(se);}b=(s.charCodeAt(i)<<16)|(s.charCodeAt(i+1)<<8)|s.charCodeAt(i+2);r=z.charAt((b>>18)&0x3F)+z.charAt((b>>12)&0x3F)+z.charAt((b>>6)&0x3F)+z.charAt(b&0x3F)}if(t>1){a.put(r.substr(0,r.length-2)+'==');}else if(t>0){a.put(r.substr(0,r.length-1)+'=');}else{a.put(r);}return a.get();};com.wjstc.Util.decode64=function(s){var j;var z='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/';var P=s.length;var a=new com.wjstc.Util.StrJoin();var b=0;var k=18;for(var i=0;i<P;++i){j=z.indexOf(s.charAt(i));if(j>=0){b|=j<<k;if(k<=0){a.put(String.fromCharCode((b>>16)&0xFF)+String.fromCharCode((b>>8)&0xFF)+String.fromCharCode(b&0xFF));k=18;b=0;}else{k-=6;}}}if(s.charAt(--P)=='='){if(s.charAt(--P)=='='){a.put(String.fromCharCode((b>>16)&0xFF));}else{a.put(String.fromCharCode((b>>16)&0xFF)+String.fromCharCode((b>>8)&0xFF));}}return a.get();};com.wjstc.Util.StrJoin=function(n){this.v=0;this.k=0;this.s='';this.n=((typeof(n)=='undefined')?5:(((n-0)<2)?2:(n-0)));this.a=',,,,,,,,,,,,,,,,,,,'.split(',');};com.wjstc.Util.StrJoin.prototype.set=function(){this.v=0;this.s='';this.k=0;this.a=',,,,,,,,,,,,,,,,,,,'.split(',');};com.wjstc.Util.StrJoin.prototype.put=function(s){if(++this.k>=this.n){this.a[0]+=this.s+s;this.k=0;this.s='';var i=0;while((this.v&(1<<i))!=0){this.a[i+1]+=this.a[i];this.a[i]='';++i;}++this.v;}else{this.s+=s;}};com.wjstc.Util.StrJoin.prototype.get=function(){var a=this.a;return a[19]+a[18]+a[17]+a[16]+a[15]+a[14]+a[13]+a[12]+a[11]+a[10]+a[9]+a[8]+a[7]+a[6]+a[5]+a[4]+a[3]+a[2]+a[1]+a[0]+this.s;};com.wjstc.Util.strSubstringCount=function(ay,bd){var count=0;ay.replace(new RegExp(bd,'gi'),function(){count++;});return count;};com.wjstc.Util.maxWordLength=function(ay){var a=ay.split(' ');var al=a.length;var ah=0;var i;for(i=0;i<al;++i){if(ah<a[i].length){ah=a[i].length;}}return ah;};com.wjstc.Util.I18n=function(aq){com.wjstc.I18n.D=new Array();for(var i=0;i<com.wjstc.I18n.tin.length;++i){com.wjstc.I18n.D[com.wjstc.I18n.tin[i][0]]=i;}com.wjstc.Util.setLocale(com.wjstc.Util.locale);};com.wjstc.Util.setLocale=function(aq,dictionary){if(typeof(aq)=='undefined'||aq==null){com.wjstc.Util.locale=com.wjstc.Util.browserLocale;}else{com.wjstc.Util.locale=aq.toLowerCase();}var a=com.wjstc.I18n.tin[0];var al=a.length;com.wjstc.I18n.locNum=0;for(var i=0;i<al;++i){if(a[i]==com.wjstc.Util.locale){com.wjstc.I18n.locNum=i;break;}}if(typeof(dictionary)!='undefined'&&dictionary!=null){var n=com.wjstc.I18n.tin.length;for(var i=0;i<dictionary.length;++i){com.wjstc.I18n.tin[n++]=dictionary[i];}com.wjstc.I18n.D=new Array();for(var i=0;i<com.wjstc.I18n.tin.length;++i){com.wjstc.I18n.D[com.wjstc.I18n.tin[i][0]]=i;}}};com.wjstc.Util.t=function(s){if(com.wjstc.I18n&&com.wjstc.I18n.D){var i=com.wjstc.I18n.D[s];if(typeof(i)=='undefined'){return s;}return com.wjstc.I18n.tin[i][com.wjstc.I18n.locNum];}else{return s;}};com.wjstc.Util.aMonth=function(m){if(m==0)return 'Jan';if(m==1)return 'Feb';if(m==2)return 'Mar';if(m==3)return 'Apr';if(m==4)return 'May';if(m==5)return 'Jun';if(m==6)return 'Jul';if(m==7)return 'Aug';if(m==8)return 'Sep';if(m==9)return 'Oct';if(m==10)return 'Nov';if(m==11)return 'Dec';return 'Err';};com.wjstc.Util.strMonthToInt=function(m){var s,s1,s2;var ss=m+'';s=ss.substring(0,1).toUpperCase();if(s=='F')return 1;if(s=='S')return 8;if(s=='O')return 9;if(s=='N')return 10;if(s=='D')return 11;s1=ss.substring(1,2).toUpperCase();if(s=='A'){if(s1=='U'){return 7;}return 3;}s2=ss.substring(2,3).toUpperCase();if(s=='J'){if(s1!='U'){return 0;}if(s2=='L'){return 6;}return 5;}if(s2!='Y')return 2;return 4;};com.wjstc.Util.dateToInt=function(O){var V,U,F;V=O.substr(8,4)-0;U=com.wjstc.Util.strMonthToInt(O.substr(0,3));F=O.substr(4,2)-0;return V*10000+U*100+F-0;};com.wjstc.Util.todayDate=function(){var n=new Date();return com.wjstc.Util.dateToStd(n);};com.wjstc.Util.todayDateTime=function(aj){var n=new Date();if(typeof(aj)=='undefined'){aj='%b %D, %Y';}return com.wjstc.Util.getDateTime(n,aj);};com.wjstc.Util.dateToStd=function(O){var V,U,F;V=O.getFullYear();U=O.getMonth();F=O.getDate();return com.wjstc.Util.aMonth(U)+((F<10)?' 0':' ')+F+', '+V;};com.wjstc.Util.formatDate=function(day,month,year,format){var da=new Date(year,month,day);var week=com.wjstc.Util.getDayOfWeek(year,month,1);var dy=com.wjstc.Util.getDayOfYear(year,month,day);var cen=(year-(year%100))/100+1;var s=com.wjstc.Util.strReplStr('%b',com.wjstc.Util.t(com.wjstc.DatePicker.dp.m_s[(month-0)])+'',format+'');s=com.wjstc.Util.strReplStr('%B',com.wjstc.Util.t(com.wjstc.DatePicker.dp.m_l[(month-0)])+'',s);s=com.wjstc.Util.strReplStr('%c',(cen-0),s);s=com.wjstc.Util.strReplStr('%C',((cen<10)?"0":"")+(cen-0),s);s=com.wjstc.Util.strReplStr('%d',(day-0),s);s=com.wjstc.Util.strReplStr('%D',((day<10)?"0":"")+(day-0),s);s=com.wjstc.Util.strReplStr('%j',(dy-0),s);s=com.wjstc.Util.strReplStr('%J',((dy<10)?"0":"")+(dy-0),s);s=com.wjstc.Util.strReplStr('%m',((month-0)+1)+'',s);s=com.wjstc.Util.strReplStr('%M',((month<9)?"0":"")+((month-0)+1)+'',s);s=com.wjstc.Util.strReplStr('%w',com.wjstc.Util.t(com.wjstc.DatePicker.dp.bq[week])+'',s);s=com.wjstc.Util.strReplStr('%W',com.wjstc.Util.t(com.wjstc.DatePicker.dp.F[week])+'',s);s=com.wjstc.Util.strReplStr('%y',(((year%100)<10)?"0":"")+(year%100)+'',s);s=com.wjstc.Util.strReplStr('%Y',((year<1000)?"0":"")+((year<100)?"0":"")+((year<10)?"0":"")+year+'',s);s=com.wjstc.Util.strReplStr('%%','%',s);return s;};com.wjstc.Util.isLeapYear=function(y){return(((y%4)==0)&&((y%100)!=0)||((y%400)==0))};com.wjstc.Util.getDaysInMonth=function(m,y){if(((m&1)&&m<8)||(m>7&& !(m&1))){return 31;}if(m==4||m==6||m==9||m==11){return 30;}if(m==2){if(com.wjstc.Util.isLeapYear(y)){return 29;}else{return 28;}}return 0;};com.wjstc.Util.getDayOfYear=function(bp,bo,bg){var n=0;switch(bo-0){case 11:n+=30;case 10:n+=31;case 9:n+=30;case 8:n+=31;case 7:n+=31;case 6:n+=30;case 5:n+=31;case 4:n+=30;case 3:n+=31;case 2:if(com.wjstc.Util.isLeapYear(bp)){n+=29;}else{n+=28;}case 1:n+=31;}n+=bg;return(n);};com.wjstc.Util.getDayOfWeek=function(y,m,d){var w;var yy=y-1;if(y>0){w=(yy*365+(yy>>2)-(yy-yy%100)/100+(yy-yy%400)/400+364+com.wjstc.Util.getDayOfYear(y,m,d))%7;}else{w=(com.wjstc.Util.getDayOfYear(y,m,d)-1)%7;}return w;};com.wjstc.Util.getDayOfWeek_bad=function(y,m,d){var da=new Date(y,m,d);return da.getDay();};com.wjstc.Util.isKeyInteger=function(e){var c;if(typeof(e)=='undefined'){e=window.event;}if(e.keyCode){c=e.keyCode;}else if(e.which){c=e.which;}if(c<32){return 2;}else if(c==46||c==62||c==37||c==39){return 1;}else if((c<48)||(c>57)){return 0;}else{return 3;}};com.wjstc.Util.getDateTime=function(O,aj){var V,U,F,ab,ak,H;if(typeof(aj)=='undefined'){aj='%b %D, %Y';}V=O.getFullYear();U=O.getMonth();F=O.getDate();ab=O.getHours();ak=O.getMinutes();H=O.getSeconds();return com.wjstc.Util.formatDate(F,U,V,aj)+((ab<10)?' 0':' ')+ab+((ak<10)?':0':':')+ak+((H<10)?':0':':')+H;};com.wjstc.Util.timeNow=function(ampm){if(typeof(ampm)=='undefined'){ampm='am';}var O=new Date();var V,U,F,ab,ak,H;var aI='';ab=O.getHours();if(ampm=='am'){var aI=' AM';if(ab>=12){ab-=12;aI=' PM';}if(ab==0){ab=12;}}ak=O.getMinutes();H=O.getSeconds();return((ab<10)?' 0':' ')+ab+((ak<10)?':0':':')+ak+((H<10)?':0':':')+H+aI;};com.wjstc.Util.strLeftTrim=function(ss){var s=ss;if(s==null){s="";}else{s+="";}return s.replace(/^\s+/g,"");};com.wjstc.Util.strRightTrim=function(ss){var s=ss;if(s==null){s="";}else{s+="";}return s.replace(/\s+$/g,"");};com.wjstc.Util.strWrap=function(H,M){var aa=H.length;var L='';var I;var U=0;for(var C=0;C<aa;++C){L+=H.charAt(C);I=H.charCodeAt(C);if(I<33&&I>126){U=0;}else{++U;if(U>=M){L+=' ';U=0;}}}return L;};com.wjstc.Util.strTrim=function(ss){var s=ss;if(s==null){s="";}else{s+="";}return s.replace(/^\s*/g,"").replace(/\s*$/g,"");};com.wjstc.Util.intToStr=function(v,b,n,c){if(typeof(b)=='undefined'){b=10;}if(typeof(n)=='undefined'){n=32;}if(typeof(c)=='undefined'){c=null;}var m=v-0;var k=v%b;m=(m-k)/b;var s=String.fromCharCode((k<10)?k+48:k+55);for(var i=1;i<n;++i){if(m==0){if(c==null){break;}else{s=c+s;continue;}}k=m%b;m=(m-k)/b;s=String.fromCharCode((k<10)?k+48:k+55)+s;}return(s);};com.wjstc.Util.strReplStr=function(A,M,H){var aL='';var C=0;var ar=0;if(typeof(H)=="undefined"||H==null)return('');var au=''+H;while(true){C=au.indexOf(A,ar);if(C<0)break;aL+=au.substring(ar,C)+M;ar=C+A.length;}return aL+=au.substring(ar);};com.wjstc.Util.CSStoJSstr=function(strCSS){var H=com.wjstc.Util.strReplStr('{','',com.wjstc.Util.strReplStr('}','',strCSS+''));var J=H.split(';');var aa=J.length;var C;var Q;var F;var I;var L='{';for(C=0;C<aa;++C){Q=J[C].split(':');if(Q.length<2){continue;}F=Q[0];I=F.indexOf('-');while(I>=0){F=F.slice(0,I)+F.charAt(I+1).toUpperCase()+F.slice(I+2);I=F.indexOf('-');}if(L!='{'){L+=',';}L+=F+":'"+Q[1]+"'";}L+='}';return L;};com.wjstc.Util.CSStoJSobj=function(strCSS){var H=com.wjstc.Util.strReplStr('{','',com.wjstc.Util.strReplStr('}','',strCSS+''));var J=H.split(';');var aa=J.length;var C;var Q;var F;var I;var L={};for(C=0;C<aa;++C){Q=J[C].split(':');if(Q.length<2){continue;}F=Q[0];I=F.indexOf('-');while(I>=0){F=F.slice(0,I)+F.charAt(I+1).toUpperCase()+F.slice(I+2);I=F.indexOf('-');}L[F]=Q[1];}return L;};com.wjstc.Util.CSStoJScode=function(strCSS,aD){if(typeof(aD)=='undefined'){aD='this'}var H=com.wjstc.Util.strReplStr('{','',com.wjstc.Util.strReplStr('}','',strCSS+''));var J=H.split(';');var aa=J.length;var C;var Q;var F;var I;var L='';for(C=0;C<aa;++C){Q=J[C].split(':');if(Q.length<2){continue;}F=Q[0];I=F.indexOf('-');while(I>=0){F=F.slice(0,I)+F.charAt(I+1).toUpperCase()+F.slice(I+2);I=F.indexOf('-');}if(Q[1]!=''){L+=aD+".style."+F+"='"+Q[1]+"';";}}L+='';return L;};com.wjstc.Util.strToInt=function(v,n){var s=v+'';var len=s.length;var ss='';var i,temp;var t=false;var c;if(typeof(n)=='undefined'){n=10;}if(len==0)return 0;for(i=0;i<len;i++){temp=s.charCodeAt(i);c=s.charAt(i);if(c=='-'&&ss==''){ss+=c;}else if(temp>47&&temp<58){ss+=c;}else if(temp==46&& !t){ss+=c;t=true;}else if(c==','){continue;}else{break;}}if(t&&(ss+'').length>1){ss=Math.round(ss);}else if((ss+'').length<1){ss='0';}ss=com.wjstc.Util.strLeftTrim(ss);if(n<ss.length)return ss.substring(0,n)-0;if(ss!='')return ss-0;return 0;};com.wjstc.Util.strToLimitedInt=function(v,n,aX,ah){var nm=com.wjstc.Util.strToInt(v,n);if((nm-0)<(aX-0)){return aX+'';}if((nm-0)>(ah-0)){return ah+'';}return nm+'';};com.wjstc.Util.isAlpha=function(s){var reg=/^[\u0041-\u007A\u00C0-\u00FF\u0100–\u017F\u0370-\u03FF\u0400-\u04FF\u0590–\u05FF\u0600–\u06FF\u0900–\u097F\u4E00–\u9FFF]+$/;return reg.test(s);};com.wjstc.Util.isAlphaNum=function(s){var reg=/^[\u0030-\u0039\u0041-\u007A\u00C0-\u00FF\u0100–\u017F\u0370-\u03FF\u0400-\u04FF\u0590–\u05FF\u0600–\u06FF\u0900–\u097F\u4E00–\u9FFF]+$/;return reg.test(s);};com.wjstc.Util.strToNum=function(s){return com.wjstc.Util.strReplStr(',','',s+'');};com.wjstc.Util.strToFloat=function(s0,n,m){var s=s0+'';var i,j,ss,temp;var len=s.length;var strout='';var f=0;if(len==0)return com.wjstc.Util.formatFloat('0.',m);if(s.charAt(0)=='-')strout='-';for(i=0;i<len;i++){temp=s.charCodeAt(i);if(temp>47&&temp<58){strout+=s.charAt(i);continue;}if(temp==46&&f==0){f=1;strout+='.';}}if(strout!=''&&strout!='.'){if(m>0)ss=com.wjstc.Util.formatFloat(strout,m);else ss=Math.round(strout);}else ss=com.wjstc.Util.formatFloat('0.',m);return ss;};com.wjstc.Util.strSelectFragment=function(a,v){var s='';var P=a.s.length;var c;var i;for(i=0;i<P;i++){c=a.s.charAt(i);if((c>='0'&&c<='9'&&(v&1)!=0)||(com.wjstc.Util.isAlphaNum(c)&&(v&6)!=0)){break;}}if(i>=P){a.s='';return s;}for(;i<P;i++){c=a.s.charAt(i);if((c>='0'&&c<='9'&&(v&1)!=0)||(com.wjstc.Util.isAlphaNum(c)&&(v&6)!=0)){s+=c;}else{a.s=a.s.substr(i);return s;}}a.s='';return s;};com.wjstc.Util.strCompressDateFormat=function(fo){var cf="";var s=fo+'';var P=s.length;var c;for(var i=0;i<P;i++){c=s.charAt(i);if(c!='%'){continue;}++i;if(i>=P){break;}c=s.charAt(i).toLowerCase();if(c=='%'){continue;}if((c=='y'&&cf.indexOf('y')<0)||((c=='m'||c=='b')&&cf.indexOf('m')<0)||(c=='d'&&cf.indexOf('d')<0)){cf+=(c=='b')?'m':c;}else{cf+='s';}}return cf;};com.wjstc.Util.parseFormattedDate=function(bh,aj){var n=new Date();var d=n.getDate();var m=n.getMonth();var y=n.getFullYear();var fo=com.wjstc.Util.strCompressDateFormat(aj);var a={s:bh};var fr='';var c;for(var i=0;i<fo.length;++i){c=fo.charAt(i);fr=com.wjstc.Util.strSelectFragment(a,7);if(c=='s'){continue;}if(c=='y'){if(fr!=''){y=com.wjstc.Util.strToLimitedInt(fr,4,1,9999);if(y<100){y=(y-0)+2000;}}}else if(c=='d'){if(fr!=''){d=com.wjstc.Util.strToLimitedInt(fr,2,1,31);if(y<100){y=(y-0)+2000;}}}else{if(fr!=''){if(fr.charAt(0)>='0'&&fr.charAt(0)<='9'){m=com.wjstc.Util.strToLimitedInt(fr,2,1,12)-1;}else{m=com.wjstc.Util.strMonthToInt(fr);}}}}var ah=com.wjstc.Util.getDaysInMonth((m-0)+1,y);if(d>ah){d=ah;}return{d:d,m:m,y:y}};com.wjstc.Util.getMonthMap=function(am){var a=new Array();var f=true;for(var i=0;i<am.length;++i){var si=com.wjstc.Util.t(am[i]);for(var j=1;j<=si.length;++j){var s=si.substr(0,j).toLowerCase();if(a[s]==null){a[s]=i;f=true;for(var k=i+1;k<am.length;++k){if(s==com.wjstc.Util.t(am[k]).substr(0,j).toLowerCase()){f=false;break;}}if(f){break;}}}}return(a);};com.wjstc.Util.getMonthIntFromStr=function(fr,ma){var s=fr.toLowerCase();var l=fr.length;var r=0;while(l>0){if(ma[s.substring(0,l)]!=null){return(ma[s.substring(0,l)]);}--l;}return r;};com.wjstc.Util.hideObj=function(aE){var A=com.wjstc.Common.getObjById(aE);if(A!=null){if(typeof(A.style)!='undefined'){A.style.display='none';}}};com.wjstc.Util.showObj=function(aE){var A=com.wjstc.Common.getObjById(aE);if(A!=null){if(typeof(A.style)!='undefined'){A.style.display='';}}};com.wjstc.Util.setPicklistFromArray=function(A,va,v,oTxt,oVal){var fd=com.wjstc.Util.fd;var j,r;if(typeof(oTxt)=='undefined'){oTxt='';}if(typeof(oVal)=='undefined'){oVal='';}if(typeof(v)=='undefined'){v=1;}var val=va.length;var e=v&1;var a=(v>>1)&1;var b=(v>>2)&1;A.length=(val-0)+e+a+b;if(e==1){A.options[0].value=oVal;A.options[0].text=oTxt;}for(j=0;j<val;++j){r=va[j].split(fd);A.options[j+e].value=r[1];A.options[j+e].text=r[2];}--j;if(a==1){o.options[++j+e].value='new';o.options[j+e].text='- Add New Item... -';}if(b==1){o.options[++j+e].value='edit';o.options[j+e].text='- Edit Pick List... -';}};com.wjstc.Util.setPicklistFromSimpleArray=function(A,va,v,oVal){var j;if(typeof(oVal)=='undefined'){oVal='';}if(typeof(v)=='undefined'){v=1;}var val=va.length;var e=v&1;var a=(v>>1)&1;var b=(v>>2)&1;A.length=(val-0)+e+a+b;if(e==1){A.options[0].value=oVal;A.options[0].text=oVal;}for(j=0;j<val;++j){A.options[j+e].value=va[j];A.options[j+e].text=va[j];}--j;if(a==1){o.options[++j+e].value='new';o.options[j+e].text='- Add New Item... -';}if(b==1){o.options[++j+e].value='edit';o.options[j+e].text='- Edit Pick List... -';}};com.wjstc.Util.setPicklistFromTableAndSimpleArray=function(A,vav,t,v,oVal){var srd=com.wjstc.Util.srd;var j;if(typeof(oVal)=='undefined'){oVal='';}if(typeof(v)=='undefined'){v=1;}var val=0;var k;var vaStr=srd+vav+srd;for(k=0;k<t.m;++k){if(vaStr.indexOf(srd+t[t.p[k]][0]+srd)>=0){++val;}}var e=v&1;var a=(v>>1)&1;var b=(v>>2)&1;A.length=(val-0)+e+a+b;if(e==1){A.options[0].value=oVal;A.options[0].text=oVal;}j=0;for(k=0;k<t.m;++k){if(vaStr.indexOf(srd+t[t.p[k]][0]+srd)>=0){A.options[j+e].value=t[t.p[k]][0];A.options[j+e].text=t[t.p[k]][1];++j;}}if(a==1){o.options[++j+e].value='new';o.options[j+e].text='- Add New Item... -';}if(b==1){o.options[++j+e].value='edit';o.options[j+e].text='- Edit Pick List... -';}};com.wjstc.Util.getKeyValue=function(e){if(window.event){return window.event.keyCode;}else if(e){return e.which;}return null;};com.wjstc.Util.RGBToHex=function(rgb){var H=com.wjstc.Util.strReplStr('rgb','',com.wjstc.Util.strReplStr('(','',com.wjstc.Util.strReplStr(')','',com.wjstc.Util.strReplStr(' ','',(rgb+'').toLowerCase()))));var J=H.split(',');return '#'+com.wjstc.Util.intToStr((J[0]<<16)+(J[1]<<8)+(J[2]-0),16,6,'0');};com.wjstc.Util.HexToRGB=function(h){var c=(h.indexOf('#')==0)?h.slice(1):h;var d=eval('0x'+c);var r=d>>16;var g=(d>>8)&0xFF;var b=d&0xFF;return{R:(d>>16),G:((d>>8)&0xFF),B:(d&0xFF)}};com.wjstc.Util.RGBAjust=function(K,p){return{R:Math.round((255-K.R)*p/100)+K.R,G:Math.round((255-K.G)*p/100)+K.G,B:Math.round((255-K.B)*p/100)+K.B};};com.wjstc.Util.HexAjust=function(h,p){var K=com.wjstc.Util.HexToRGB(h);K=com.wjstc.Util.RGBAjust(K,p);return '#'+com.wjstc.Util.intToStr((K.R<<16)+(K.G<<8)+K.B,16,6,'0');};com.wjstc.Util.RGBAjustBlack=function(K,p){return{R:Math.round((K.R)*p/100),G:Math.round((K.G)*p/100),B:Math.round((K.B)*p/100)};};com.wjstc.Util.HexAjustBlack=function(h,p){var K=com.wjstc.Util.HexToRGB(h);K=com.wjstc.Util.RGBAjustBlack(K,p);return '#'+com.wjstc.Util.intToStr((K.R<<16)+(K.G<<8)+K.B,16,6,'0');};com.wjstc.Util.setObjProperties=function(o,p,t){var i;for(i in p){if(i in o){o[i]=p[i];}else{throw new Error('Unable to set value "'+p[i]+'" of parameter "'+i+'". Parameter "'+i+'" does not belong to object "'+t+'"');}}};com.wjstc.Util.CPtoBR=function(s){return com.wjstc.Util.strReplStr(' ','<br />',s);};com.wjstc.Util.getCilinderH=function(c,h){var d=0;var m=h&1;var k=h>>1;var s='';var p=Math.round(60/k);if(h<2){s+="<div style='position:relative;background-color:"+c+";width:100%;display:block;height:1px;overflow:hidden;font-size:1px;'></div>";}else{for(var i=0;i<h;++i){s+="<div style='position:relative;background-color:"+com.wjstc.Util.HexAjust(c,((i<k||i==k&&m)?i:(h-1-i))*p)+";width:100%;display:block;height:1px;overflow:hidden;font-size:1px;'></div>";}}return s;};com.wjstc.Util.insertCilinderH=function(ac,c,b){var h=com.wjstc.Common.getH(ac)-b+1;com.wjstc.Common.getObjById(ac).innerHTML=com.wjstc.Util.getCilinderH(c,h);};com.wjstc.Util.insertCilinderV=function(ac,c,b){var d=0;var w=com.wjstc.Common.getW(ac)-b;var m=w&1;var k=w>>1;var s='';var s="<table cellspacing='0' cellpadding='0' border='0'style='height:100%;border:1px solid #000000;'><tr>";var p=Math.round(60/k);for(var i=0;i<w;++i){s+="<td style='background-color:"+com.wjstc.Util.HexAjust(c,((i<k||i==k&&m)?i:(w-1-i))*p)+";width:1px;height:100%;overflow:hidden;font-size:1px;'>&nbsp;</td>";}s+='</tr></table>';com.wjstc.Common.getObjById(ac).innerHTML=s;};com.wjstc.Util.cilinderV=function(id,w,h,pos,bc,bw,c){var d=0;w=(w<4)?4:w;var z=w-(bw<<1);var m=z&1;var k=z>>1;var s="<table cellspacing='0' cellpadding='0' style='"+pos+"border:"+bw+"px solid "+bc+";'><tr>";var p=Math.round(75/k);for(var i=0;i<z;++i){s+="<td style='padding:0;background-color:#"+c+";'><div style='overflow:hidden;background-color:"+com.wjstc.Util.HexAjust(c,((i<k||i==k&&m)?i:(z-1-i))*p)+";width:1px;height:"+h+";'>";s+="<span style='font-size:0.1px;background-color:transparent;'>&nbsp;</span>";s+="</div></td>";}s+='</tr></table>';return s;};com.wjstc.Util.cilinderVonly=function(w,h,c){var d=0;w=(w<4)?4:w;var z=w;var m=z&1;var k=z>>1;var s="<table cellspacing='0' cellpadding='0' style='border:0px solid #ffffff;'><tr>";var p=Math.round(75/k);for(var i=0;i<z;++i){s+="<td style='padding:0;background-color:#"+c+";'><div style='overflow:hidden;background-color:"+com.wjstc.Util.HexAjust(c,((i<k||i==k&&m)?i:(z-1-i))*p)+";width:1px;height:"+h+";'>";s+="<span style='font-size:0.1px;background-color:transparent;'>&nbsp;</span>";s+="</div></td>";}s+='</tr></table>';return s;};com.wjstc.Util.cilinderH=function(id,w,h,x,y,bc,bw,c){var d=0;var z=h-(bw<<1);var m=z&1;var k=z>>1;var s="<table cellspacing='0' cellpadding='0' style='position:absolute;left:"+x+";top:"+y+";border:"+bw+"px solid "+bc+"'><tr><td>";var p=Math.round(60/k);for(var i=0;i<z;++i){if(i<k||i==k&&m){d=i;}else{d=(z-1-i);}s+="<div style='position:relative;background-color:"+com.wjstc.Util.HexAjust(c,((i<k||i==k&&m)?i:(z-1-i))*p)+";width:"+w+";display:block;height:1px;overflow:hidden;font-size:1px;'></div>";}s+='</td></tr></table></td></tr></table>';return s;};com.wjstc.Util.showLoading=function(){var d=com.wjstc.Common.getObjById('wjst_widgetLoading');if(d){d.style.display='block';if(com.wjstc.Fading){com.wjstc.Fading.fs.registerObj('wjst_widgetLoading');}}};com.wjstc.Util.hideLoading=function(){var d=com.wjstc.Common.getObjById('wjst_widgetLoading');if(d){if(d.style.display=='none'){return;}d.style.display='none';if(com.wjstc.Fading){com.wjstc.Fading.fs.unregisterObj('wjst_widgetLoading');}}};com.wjstc.Util.initLoading=function(){var d=com.wjstc.Common.getObjById('wjst_widgetLoading');if(!d){if(document.body){d=document.createElement('div');d.id='wjst_widgetLoading';d.style.position='absolute';d.style.border='0px dotted #999999';d.style.backgroundColor='#CC4444';d.style.zIndex=94;d.style.padding='0px';d.style.fontFamily='Verdana,Helvetica,sans-serif';d.style.color='#FFFFFF';d.style.fontSize='0.8em';d.innerHTML="<div style='padding:10px 20px;border:1px dotted #999999;background-color:#CC4444;'>Processing<\/div>";d.style.display='none';document.body.appendChild(d);com.wjstc.Util.moveToCenter(d);}}com.wjstc.Util.pageW=com.wjstc.Util.getViewportW();com.wjstc.Util.pageH=com.wjstc.Util.getViewportH();};com.wjstc.Util.tooltipStart=function(e,ad,T,doc){if(typeof(doc)=='undefined'){doc=document;}if(typeof(com)!='undefined'&&typeof(com.wjstc)!='undefined'&&typeof(com.wjstc.Util)!='undefined'){if(com.wjstc.Util.tt){delete com.wjstc.Util.tt;}com.wjstc.Util.tt=new com.wjstc.Util.Tooltip(doc);com.wjstc.Util.tt.show(e,ad,T);}return false;};com.wjstc.Util.codeCR=function(s){var ss=com.wjstc.Util.strReplStr('\r',String.fromCharCode(2),s);return com.wjstc.Util.strReplStr('\n',String.fromCharCode(3),ss);};com.wjstc.Util.decodeCR=function(s){if(s=='')return '';var ss=com.wjstc.Util.strReplStr(String.fromCharCode(2),'\r',s);return com.wjstc.Util.strReplStr(String.fromCharCode(3),'\n',ss);};com.wjstc.Util.formatInteger=function(d,n){var i;var s=''+d;for(i=s.length;i<n;i++)s='0'+s;return(s);};com.wjstc.Util.showInteger=function(M,F){var C;var H=''+M;var ai='';var L='';var af=H.indexOf('.');if(af>=0){ai=H.substr(af);H=H.substr(0,af);}var P=H.length-1;for(C=P;C>=0;C--){if(P-C>0&&(P-C)%3==0){L=F+L;}L=H.substr(C,1)+L;}return(L+ai);};com.wjstc.Util.formatFloat=function(ae,fo){var i,s,l;ae=parseFloat(ae+'');if(isNaN(ae)||ae==0){s='0'+(((fo-0)==0)?'':'.');for(i=0;i<fo;++i){s+='0';}return s;}for(i=0;i<fo;++i){ae*=10;}ae=Math.round(ae)+'';l=ae.length;if(l>fo){return(ae.substring(0,l-fo)+(((fo-0)==0)?'':'.')+ae.substring(l-fo,l));}s='0.';for(i=0;i<fo-l;++i){s+='0';}return(s+ae);};com.wjstc.Util.isObjectCoveredByMouse=function(ev,ac){var A=com.wjstc.Common.getObjById(ac);if(!A){return false;}var aS=com.wjstc.Common.getMouseScrollX(ev);var V=com.wjstc.Common.getMouseScrollY(ev);var aN=com.wjstc.Common.getX(A);var aK=com.wjstc.Common.getY(A);if(aS<aN)return false;if(V<aK)return false;if(aS>aN+com.wjstc.Common.getW(A))return false;if(V>aK+com.wjstc.Common.getH(A))return false;return true;};com.wjstc.Util.parseObjectConfigs=function(A,an,funName,parName){if(typeof(an)=='undefined'){throw new Error("Parameter '"+parName+"' is undefined in function '"+funName+"'.");return;}if(an){if(typeof(an)!='object'){throw new Error("Parameter "+parName+"=["+an+"] in function '"+funName+"' is not Object .");return;}for(var M in an){A[M]=an[M];}}};com.wjstc.Util.addStyleProperties=function(A,aA){if(typeof(aA)=='object'){for(var M in aA){A[M]=aA[M];}}};com.wjstc.Util.createButton=function(oButtonConfigs){this.border_color_out='#D7D4C3';this.border_color_over='#000000';this.border_color_down='#000000';this.bg_color_out='transparent';this.bg_color_over='#FFD494';this.bg_color_down='#FFB874';this.bg_color_disabled='#e8e8e8';this.txt_color_disabled='#aaaaaa';this.bg_color_selected='#30fa5b';this.txt_color_selected='#000000';this.buttonId='';this.buttonStyle='padding:2px;vertical-align:middle;';this.buttonText='';this.buttonImgSrc='img/aib.gif';this.buttonImg2Src=null;this.buttonImgAlt='';this.buttonImgStyle='display:block;';this.onLeftClickFn='';this.onRightClickFn='';this.buttonStatus='';this.onMouseOverFn='';this.buttonDisabled='N';this.buttonSelected='n';this.buttonImgId='';if(typeof(oButtonConfigs)=='undefined'){return this;}if(!oButtonConfigs||typeof(oButtonConfigs)!='object'){throw new Error("Parameter oButtonConfigs=["+oButtonConfigs+"] in function 'com.wjstc.DatePicker.DatePicker.prototype.setDatePicker=function(oButtonConfigs)' is not an Object .");return this;}com.wjstc.Util.parseObjectConfigs(this,oButtonConfigs,'com.wjstc.DatePicker.DatePicker.prototype.setDatePicker=function(oButtonConfigs)','oButtonConfigs');var ss='';ss+="<table cellspacing='0' cellpadding='0' style='z-index:1000;'><tr><td align='center' nowrap='nowrap'"+((this.buttonId&&this.buttonId!='')?(" id='"+this.buttonId+"'"):"");if(this.buttonDisabled=='Y'){ss+=" style='"+this.buttonStyle+"border:1px  solid "+this.border_color_out+"; background-color:"+this.bg_color_disabled+";"+'color:'+this.txt_color_disabled+";'";}else if(this.buttonSelected=='y'){ss+=" style='"+this.buttonStyle+"border:1px  solid "+this.border_color_out+"; background-color:"+this.bg_color_selected+";"+'color:'+this.txt_color_selected+";'";}else{ss+=" style='"+this.buttonStyle+"border:1px  solid "+this.border_color_out+"; background-color:"+this.bg_color_out+";'";}if(this.buttonDisabled!='Y'&&this.buttonSelected!='Y'){ss+=" onmouseover=\"this.style.borderColor='"+this.border_color_over+"';this.style.backgroundColor='"+this.bg_color_over+"';this.style.cursor='pointer';window.status='"+this.buttonStatus+"';if(typeof(com)!='undefined')com.wjstc.Util.showButtonDescription(event,'"+this.buttonStatus+"');"+((!com.wjstc.Util.tmp2)?("if(typeof(com)!='undefined'){"+this.onMouseOverFn+"};"):"")+"\""+" onmousedown=\"this.style.borderColor='"+this.border_color_down+"';this.style.backgroundColor='"+this.bg_color_down+"';return false;\""+" onmouseup=\"this.style.borderColor='"+this.border_color_over+"';this.style.backgroundColor='"+this.bg_color_over+"';\""+" onmouseout= \"this.style.borderColor='"+this.border_color_out+"';this.style.backgroundColor='"+this.bg_color_out+"';this.style.cursor='default';window.status='';\""+" onclick=\""+this.onLeftClickFn+"\""+" oncontextmenu=\""+this.onRightClickFn+"return false;\"";}else{ss+=" onmousedown=\""+((!com.wjstc.Util.tmp2)?("if(typeof(com)!='undefined'){"+this.onMouseOverFn+"};"):"")+"return false;\""+" oncontextmenu=\"return false;\"";}ss+="><table cellspacing='0' cellpadding='0'><tr><td style='"+this.buttonStyle+"'><img ";if(this.buttonImgId&&this.buttonImgId!=''){ss+="id='"+this.buttonImgId+"' ";}ss+="src='"+this.buttonImgSrc+"' alt='"+this.buttonImgAlt+"' border='0' style='"+this.buttonImgStyle+"'\/><\/td>";if(this.buttonImg2Src){ss+="<td><img src='"+this.buttonImg2Src+"' alt='"+this.buttonImgAlt+"' border='0'\/><\/td>";}if(this.buttonText!=''){ss+="<td style='border:0px solid red;background-color:transparent;'>"+this.buttonText+"<\/td>";}ss+="<\/tr><\/table>"+"<\/td><\/tr><\/table>";return(ss);};com.wjstc.Util.showButtonDescription=function(evt,s){if(com.wjstc.Util.showButtonDescriptionIsOn&&s!=''){com.wjstc.Util.tooltipStart(evt,s,{width:'14em',background:'#CFFFFE',padding:'5px 7px 5px 5px',border:'1px dotted #007C84',color:'#001644',font:'0.75em Arial,Helvetica,sans-serif'});}};com.wjstc.Util.clone=function(obj){if(obj==null||typeof(obj)!='object')return obj;if(obj.constructor==Array){var temp=[];for(var i=0;i<obj.length;i++){if(typeof(obj[i])=='object'){temp.push(clone(obj[i]));}else{temp.push(obj[i]);}}return temp;}var temp={};for(var key in obj){temp[key]=clone(obj[key]);}return temp;};if(document.images){com.wjstc.Util.pre_images={};com.wjstc.Util.pre_images['sort_0']=new Image();com.wjstc.Util.pre_images['sort_0'].src='img/a0.gif';com.wjstc.Util.pre_images['sort_1']=new Image();com.wjstc.Util.pre_images['sort_1'].src='img/a1.gif';com.wjstc.Util.pre_images['sort_2']=new Image();com.wjstc.Util.pre_images['sort_2'].src='img/a2.gif';com.wjstc.Util.pre_images['chart_1']=new Image();com.wjstc.Util.pre_images['chart_1'].src='img/chart1.gif';com.wjstc.Util.pre_images['chart_2']=new Image();com.wjstc.Util.pre_images['chart_2'].src='img/chart2.gif';com.wjstc.Util.pre_images['chart_3']=new Image();com.wjstc.Util.pre_images['chart_3'].src='img/chart3.gif';com.wjstc.Util.pre_images['chart_4']=new Image();com.wjstc.Util.pre_images['chart_4'].src='img/chart4.gif';com.wjstc.Util.pre_images['chart_5']=new Image();com.wjstc.Util.pre_images['chart_5'].src='img/chart5.gif';com.wjstc.Util.pre_images['chart_6']=new Image();com.wjstc.Util.pre_images['chart_6'].src='img/chart6.gif';com.wjstc.Util.pre_images['pie_le']=new Image();com.wjstc.Util.pre_images['pie_le'].src='img/ble.gif';com.wjstc.Util.pre_images['pie_pe']=new Image();com.wjstc.Util.pre_images['pie_pe'].src='img/bpe.gif';com.wjstc.Util.pre_images['pie_ri']=new Image();com.wjstc.Util.pre_images['pie_ri'].src='img/bri.gif';com.wjstc.Util.pre_images['pie_pm']=new Image();com.wjstc.Util.pre_images['pie_pm'].src='img/piemask.png';com.wjstc.Util.pre_images['menu_gray']=new Image();com.wjstc.Util.pre_images['menu_gray'].src='siteimag/head_gray_bg.jpg';com.wjstc.Util.pre_images['menu_green']=new Image();com.wjstc.Util.pre_images['menu_green'].src='siteimag/head_green_bg.jpg';}com.wjstc.Util.sessionRegisterTimeOut=function(){com.wjstc.Util.sessionTimeOut.isNotActive='N';};com.wjstc.Util.sessionOnCancelFn=function(){com.wjstc.Util.sessionTimeOut.isNotActive='Y';};com.wjstc.Util.setTimeoutSession=function(oSessionTimeOutConfig){if(typeof(oSessionTimeOutConfig)=='undefined'){return this;}if(!oSessionTimeOutConfig||typeof(oSessionTimeOutConfig)!='object'){throw new Error("Parameter oSessionTimeOutConfig=["+oSessionTimeOutConfig+"] in function 'com.wjstc.Util.setTimeoutSession=function(oSessionTimeOutConfig)' is not an Object .");return this;}com.wjstc.Util.parseObjectConfigs(com.wjstc.Util.sessionTimeOut,oSessionTimeOutConfig,'com.wjstc.Util.setTimeoutSession=function(oSessionTimeOutConfig)','oSessionTimeOutConfig');return this;};com.wjstc.Util.sessionInitTimeout=function(){if(com.wjstc.Util.sessionTimeOut.logOutFn==''){return;}com.wjstc.Util.objAddEvent(document,"mousemove",com.wjstc.Util.sessionRegisterTimeOut);com.wjstc.Util.sessionTimeOut.idleTime=0.5-com.wjstc.Util.sessionTimeOut.pingInterval;com.wjstc.Util.sessionTimeOut.pingIntervalId=setInterval(com.wjstc.Util.sessionCheckTimeout,com.wjstc.Util.sessionTimeOut.pingInterval*1000);};com.wjstc.Util.sessionCheckTimeout=function(){if(com.wjstc.Util.sessionTimeOut.isNotActive=='Y'){com.wjstc.Util.sessionTimeOut.idleTime+=com.wjstc.Util.sessionTimeOut.pingInterval;if(com.wjstc.Util.sessionTimeOut.idleTime>=com.wjstc.Util.sessionTimeOut.showTimeOutMsgInterval&&com.wjstc.Util.sessionTimeOut.idleTime<(com.wjstc.Util.sessionTimeOut.showTimeOutMsgInterval+com.wjstc.Util.sessionTimeOut.pingInterval)){com.wjstc.Dialog.di.showDialog({zIndexValue:120,type:'Caution',title:'Session Inactivity',label:"Your current session is about to be terminated due to inactivity."+"<br \/>Please click the <b>Continue<\/b> button to resume your session,"+"<br \/>or <b>Log Out<\/b> to close it.",dialogButton1Tag:'&nbsp;&nbsp;Continue&nbsp;&nbsp;',dialogAction1Fn:'com.wjstc.Util.sessionResetTimeout();',dialogButton2Tag:'&nbsp;&nbsp;Log Out&nbsp;&nbsp;',dialogAction2Fn:"com.wjstc.Util.sessionTerminate();",autoHide:com.wjstc.Util.sessionTimeOut.msgAutoHideInterval,onCancelFn:"com.wjstc.Util.sessionOnCancelFn();"});return;}if(com.wjstc.Util.sessionTimeOut.idleTime>=com.wjstc.Util.sessionTimeOut.logOutInterval){com.wjstc.Util.sessionTerminate();}}else{com.wjstc.Util.sessionResetTimeout();}};com.wjstc.Util.sessionResetTimeout=function(){com.wjstc.Util.sessionTimeOut.idleTime=0.5-com.wjstc.Util.sessionTimeOut.pingInterval;com.wjstc.Util.sessionKeepServerAlive();com.wjstc.Util.sessionTimeOut.isNotActive='Y';};com.wjstc.Util.sessionKeepServerAlive=function(){eval(com.wjstc.Util.sessionTimeOut.pingServerFn);};com.wjstc.Util.sessionTerminate=function(){com.wjstc.Util.objRemoveEvent(document,'mousemove',com.wjstc.Util.sessionRegisterTimeOut);clearInterval(com.wjstc.Util.sessionTimeOut.pingIntervalId);com.wjstc.Util.sessionTimeOut.pingIntervalId=null;eval(com.wjstc.Util.sessionTimeOut.logOutFn);};com.wjstc.Common.onLoadCall(com.wjstc.Util.sessionInitTimeout);com.wjstc.Util.removeFromDOM=function(bm){var A=com.wjstc.Common.getObjById(bm);var ax;if(A){A.style.display="none";ax=A.parentNode;if(ax){ax.removeChild(A);}}};com.wjstc.Util.getCSSItemSuffix=function(val){var suf=val;var aa=val.length;for(C=aa;C>=0;--C){var c=val.charCodeAt(C);if((c>=48&&c<=57)||c==46){suf=val.slice(C+1);break;}}return suf;};com.wjstc.Util.getCSSItemNumber=function(val,suf){return val.substr(0,val.length-suf.length);};com.wjstc.Util.bubbleSort=function(J,ai,H,aP){var C,af,I;for(C=H;C<aP;++C){for(af=C+1;af<=aP;++af){if(J[ai[af]]<J[ai[C]]){I=ai[C];ai[C]=ai[af];ai[af]=I;}}}};function bt(s,charset){var i;var ii;var d;var ss;if(typeof(charset)=="undefined"){charset='UTF-8';}var reportw=window.open("","Confirm",'menubar=yes,width=750,height=550,resizable=yes,scrollbars=yes');d=reportw.document;d.write(s);d.close();reportw.print();reportw.close();return;};com.wjstc.Util.Tooltip=function(doc,T){if(typeof(doc)=='undefined'){this.doc=document;}else{this.doc=doc;}this.Id='com.wjstc.Util.tooltipId';this.T={width:'10em',height:'auto',background:'#fefee1',padding:'8px',border:'1px solid #666',color:'#666',font:'0.75em Arial,Helvetica,sans-serif'};if(typeof(T)!='undefined'){this.T=T;}this.sc=(typeof(sc)!='undefined')?sc:'#666';this.ss=(typeof(ss)!='undefined')?ss:8;this.msie=navigator.userAgent.toUpperCase().indexOf("MSIE ")>=0;if(!com.wjstc.Common.getObjById(this.Id+"ad",this.doc)){var msgDiv=this.doc.createElement('div');msgDiv.id=this.Id+"ad";msgDiv.style.position='absolute';msgDiv.style.display='none';msgDiv.style.zIndex=1001;if(this.msie){msgDiv.style.filter='progid:DXImageTransform.Microsoft.Shadow(color=#CCCCCC,direction=135)';}msgDiv.innerHTML=((this.msie)?'':com.wjstc.Util.shadowDiv(this.sc,this.ss,98))+"<div id='"+this.Id+"_tc' style='position:relative;overflow:hidden;display:block; z-index: 21;'><\/div><\/div>";this.doc.body.appendChild(msgDiv);}this.msg=com.wjstc.Common.getObjById(this.Id+"ad",this.doc);this.tc=com.wjstc.Common.getObjById(this.Id+"_tc",this.doc);};com.wjstc.Util.Tooltip.prototype.set=function(T){var tt=com.wjstc.Util.tt;if(typeof(tt)=="undefined"){return;}this.T=T;};com.wjstc.Util.Tooltip.prototype.show=function(evt,msg,T){evt=(evt)?evt:event;com.wjstc.Util.ToolTipTarget=(evt.target)?evt.target:evt.srcElement;com.wjstc.Util.ToolTipTimer=null;if(!this.msg|| !this.tc){this.msg=com.wjstc.Common.getObjById(this.Id+'ad',this.doc);this.tc=com.wjstc.Common.getObjById(this.Id+'_tc',this.doc);}for(var M in this.T){this.tc.style[M]=this.T[M];}for(var M in T){this.tc.style[M]=T[M];}com.wjstc.Util.objAddEvent(this.doc,"mousemove",com.wjstc.Util.aO);com.wjstc.Util.objAddEvent(com.wjstc.Util.ToolTipTarget,"mouseout",com.wjstc.Util.tooltipStop);this.tc.innerHTML=msg;this.msg.style.display='block';this.msg.style.visibility='hidden';var self=this;com.wjstc.Util.ToolTipTimer=setTimeout(function(){self.msg.style.visibility='visible';},500);};com.wjstc.Util.aO=function(e){if(com.wjstc.Common.getObjById(com.wjstc.Util.tt.doc)){if(typeof(com)!='undefined'&&com){var w=com.wjstc.Common.getW(com.wjstc.Util.tt.msg,com.wjstc.Util.tt.doc);var h=com.wjstc.Common.getH(com.wjstc.Util.tt.msg,com.wjstc.Util.tt.doc);var wW=com.wjstc.Util.getViewportW(com.wjstc.Util.tt.doc);var wH=com.wjstc.Util.getViewportH(com.wjstc.Util.tt.doc);var sX=com.wjstc.Common.getPageScrollX(com.wjstc.Util.tt.doc);var sY=com.wjstc.Common.getPageScrollY(com.wjstc.Util.tt.doc);var x=com.wjstc.Common.getMouseScrollX(e,com.wjstc.Util.tt.doc);var y=com.wjstc.Common.getMouseScrollY(e,com.wjstc.Util.tt.doc);if(x+w+32>wW+sX){x=x-w-12;if(x<sX){x=sX;}}else{x=x+12;}if(y+h+31>wH+sY){y=y-h-11;if(y<sY){y=sY;}}else{y=y+11;}com.wjstc.Common.moveToXY(com.wjstc.Util.tt.msg,x,y);}}else{com.wjstc.Util.tooltipStop();}};com.wjstc.Util.tooltipStop=function(){if(typeof(com.wjstc.Util.tt)=="undefined"){return false;}if(com.wjstc.Util.ToolTipTimer){clearTimeout(com.wjstc.Util.ToolTipTimer);com.wjstc.Util.ToolTipTimer=null;}com.wjstc.Util.tt.msg.style.visibility='hidden';com.wjstc.Util.objRemoveEvent(com.wjstc.Util.tt,"mousemove",com.wjstc.Util.aO);com.wjstc.Util.objRemoveEvent(com.wjstc.Util.ToolTipTarget,"mouseout",com.wjstc.Util.tooltipStop);return false;};com.wjstc.Util.setCookie=function(az,bb,aQ){var aT="";if(aQ){var av=new Date();av.setTime(av.getTime()+(aQ*24*60*60*1000));aT="; expires="+av.toGMTString();}document.cookie=az+"="+bb+aT+"; path=/";};com.wjstc.Util.getCookie=function(az){var I;var aV=az+"=";var aM=document.cookie.split(';');for(var C=0;C<aM.length;C++){I=aM[i];while(I.charAt(0)==' ')I=I.substring(1,I.length);if(I.indexOf(aV)==0)return I.substring(aV.length,I.length);}return null;};com.wjstc.Util.aR=false;com.wjstc.Util.aw=76;com.wjstc.Util.ag=com.wjstc.Util.aw;com.wjstc.Util.setDefaultFontSize=function(){com.wjstc.Util.ag=com.wjstc.Util.aw;com.wjstc.Util.ajustFontSize(0);};com.wjstc.Util.ajustFontSize=function(bj){com.wjstc.Util.ag=parseInt(com.wjstc.Util.ag)+parseInt(bj*5);if(com.wjstc.Util.ag>100){com.wjstc.Util.ag=100;}else if(com.wjstc.Util.ag<60){com.wjstc.Util.ag=60;}com.wjstc.Util.aJ(com.wjstc.Util.ag);};com.wjstc.Util.aJ=function(aG){document.body.style.aG=aG+'%';com.wjstc.Util.setCookie("wjstc_font_size_cookie",aG,60);};com.wjstc.Util.bs=function(){if(!com.wjstc.Util.aR){cookie=com.wjstc.Util.getCookie("wjstc_font_size_cookie");com.wjstc.Util.ag=cookie?cookie:com.wjstc.Util.aw;com.wjstc.Util.aJ(com.wjstc.Util.ag);com.wjstc.Util.aR=true;}};com.wjstc.Common.onLoadCall(com.wjstc.Util.initLoading);