function el(n){ return document.getElementById(n); } function fObj(o,e){ if(o.nodeType==1 || o.nodeType==11){ if(o.tagName.toLowerCase()==e) tobj=o; for(var i=o.firstChild;i;i=i.nextSibling) fObj(i,e); } } function pleft(obj){ var l=0; if(obj.offsetParent){ while(obj.offsetParent){ l+=obj.offsetLeft; obj=obj.offsetParent; } }else if(obj.x) l+=obj.x; return l; } function ptop(obj){ var t=0; if(obj.offsetParent){ while(obj.offsetParent){ t+=obj.offsetTop; obj=obj.offsetParent; } }else if(obj.y) t+=obj.y; return t; } function cClick(src){ tobj=null; fObj(src,"a"); if(!tobj) return; try{ tobj.click(); }catch(e){ try{ window.location=tobj.href; }catch(e){} } } function mOver(obj){ obj.className="mnu1"; tobj=null; fObj(obj,"a"); if(tobj) tobj.className="mnulnk1"; } function mOut(obj){ obj.className="mnu0"; tobj=null; fObj(obj,"a"); if(tobj) tobj.className="mnulnk0"; } function hOver(src){ src.className="hdr1"; } function hOut(src){ src.className="hdr"; } function rOver(src){ var a=rOver.arguments; if(a.length==1) src.className="lrow1"; else src.style.background=a[1]; } function rOut(src){ var a=rOut.arguments; if(a.length==1) src.className="lrow0"; else src.style.background=a[1]; } function bAction(o,a){ if(typeof o=="string") o=el(o); if(a==-1) o.className="b-disb"; if(a==0) o.className="b-norm"; if(o.className=="b-disb") return; s=o.className.indexOf("-selt"); if(a==1) o.className=(s==-1)?"b-norm":"b-selt"; if(a==2) o.className="b-over"+((s==-1)?"":"-selt"); if(a==3) o.className="b-down"+((s==-1)?"":"-selt"); if(a==4) o.className="b-selt"; if(a==5) return true; } function bFile(o,n){ d=el("DELETE_"+n); d.value^=1; o.className=(d.value==1)?"b-selt":"b-norm"; el(n).disabled=(d.value==1); } function getCookie(nme){ var cnme=nme+"="; if((cini=document.cookie.indexOf(cnme))==-1) return null; var cend=document.cookie.indexOf(";",cini+cnme.length); if(cend==-1) cend=document.cookie.length; return unescape(document.cookie.substring(cini+cnme.length,cend)); } function sAjax(url){ var p; if(window.XMLHttpRequest) p=new XMLHttpRequest(); else if(window.ActiveXObject){ try{ p=new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ p=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ } } } if(typeof p=="undefined") return; p.open("GET",url,false); p.send(null); if(p.status==200) return p.responseText; } function openWin(url,t,w,h){ window.open(url,t,"top="+(screen.height-h)/2+",left="+(screen.width-w)/2+",width="+w+",height="+h+",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,personalbar=no"); } function TCode(id){ openWin("text.html?id="+id,"text",700,450); } var wdbdlgmodl=wdbdlgargs=wdbdlgretn=null; function showDlg(u,a,i){ if(typeof i=="undefined") i=window; var arg=showDlg.arguments; w=(arg.length>3)?arg[3]:100; h=(arg.length>4)?arg[4]:100; var dlg=window.open(u,"ha_dlg","top="+(screen.height-h)/2+",left="+(screen.width-w)/2+",width="+w+",height="+h+",location=no,status=no,toolbar=no,menubar=no,personalbar=no,width=10,height=10,scrollbars=no,resizable=no"); wdbdlgmodl=dlg; wdbdlgargs=i; p=function(ev){ if(wdbdlgmodl && !wdbdlgmodl.closed){ wdbdlgmodl.focus(); ev.preventDefault(); ev.stopPropagation(); } }; function capwin(w){ w.addEventListener("click",p,true); w.addEventListener("mousedown",p,true); w.addEventListener("focus",p,true); }; function relwin(w){ w.removeEventListener("focus",p,true); w.removeEventListener("mousedown",p,true); w.removeEventListener("click",p,true); }; capwin(window); for(var j=0;j0 && c==sc); } sc+=sh; window.status=sc+" Selected(s)"; return sc; } var selChk1=0,selChk; function checkActiveSel(frm,pref,chk,n){ if(document.all && event.shiftKey && selChk1!=0){ selChk2=n; v1=Math.min(selChk1,selChk2); v2=Math.max(selChk1,selChk2); f=el(frm); for(i=0;i=v1 && n<=v2) el(e.value).checked=selChk; } selChk1=0; }else{ selChk1=n; selChk=chk.checked; } return checkActive(frm,pref); } function frmAction(frm,pref,conf,t,a){ i=1; if(pref!=""){ i=checkActive(frm,pref); if(!i){ alert("None Selected"); return; } } if(conf && t!="" && !confirm(t+((i==1)?"":"\nSelected(s): "+i))) return; el("action").value=a; el(frm).submit(); } function frmPage(frm,v){ el("action").value="page_change"; el("visual").value=v; el(frm).submit(); } function frmGoTo(s,p,ps,url,frm,rpp,ord){ if(s.value==-1){ v=parseInt(prompt("Go To (1 - "+ps+"):",p)); if(!v || v<1 || v>ps){ if(p<=500) s.selectedIndex=(p-1); return; } }else v=s.value; if(frm=="") window.location=url+rpp+v+ord; else frmPage(frm,rpp+v+ord); } function trim(s){ while(s.substring(0,1)==" ") s=s.substring(1,s.length); while(s.substring(s.length-1,s.length)==" ") s=s.substring(0,s.length-1); return s; } function setHTML(o,t){ el("TXT_"+o).innerHTML=t; } function checkRE(o,r){ var regex=new RegExp(r,"i"); if(typeof o=="string") return regex.test(o); bAction(el("IMG_"+o.name),(regex.test(o.value))?0:-1); } function checkEMail(o){ return checkRE(o,"^[-_\.0-9a-z]+@([-_0-9a-z]+\.)+\.(com|net|org|gov|mil|edu|int|biz|info|name|pro|aero|coop|museum|jobs|cat|mobi|asia|xxx|[a-z]{2})$"); } function checkURL(o){ return checkRE(o,"^http(s)*://(www\.)*([-0-9a-z_\.]+)([\.]{1})(com|net|org|gov|mil|edu|int|biz|info|name|pro|aero|coop|museum|jobs|cat|mobi|asia|xxx|[a-z]{2})($|\/([#%&+\-\.\/0-9:;=?@a-z_]+)*$)"); } function checkIPv4(o){ return checkRE(o,"^([0-9]{1,3})([\.]{1})([0-9]{1,3})([\.]{1})([0-9]{1,3})([\.]{1})([0-9]{1,3})$"); } function checkRGB(o){ return checkRE(o,"^#([a-f0-9]{6})$"); } function checkCCC(o,e){ if(checkKey(e)<32) return; a=o.name.substring(5); n=parseInt(o.name.substring(3,4)); if(n==1 && o.value.length!=o.maxLength) el("TXT_"+a).innerHTML="
"; if(n<4 && o.value.length>=o.maxLength){ el("CCC"+(n+1)+"_"+a).focus(); if(n==1) el("IFR_"+a).src="/file/banks/"+a+"/"+o.value; } } function checkFind(s){ o=el("id"); if(trim(o.value)==""){ alert("Missing Value(s)"); o.focus(); return false; } el("findfrm").value=o.value; if(s) el("frmfind").submit(); } function checkForm(fields,efields){ if(typeof fields=="object"){ var flds="",c=0,f1; for(i in fields){ if(trim(el(i).value)==""){ flds+="\nĚ "+fields[i]; c++; if(!f1) f1=i; } } if(c){ alert("Missing Value(s):"+flds); el(f1).focus(); return false; } } if(typeof efields=="object"){ var efls="",e=0,e1; for(i in efields){ v=el(i).value; if(v!="" && !checkEMail(v)){ efls+="\nĚ "+efields[i];e++; if(!e1) e1=i; } } if(e){ alert("Invalid EMail Address:"+efls); el(e1).focus(); return false; } } return true; } function checkKey(e){ return e.which; } function checkChar(e,t){ switch(t){ case 'num': var o=/[\-0-9]/; break; case 'uns': var o=/[0-9]/; break; case 'dec': var o=/[\-\.\,0-9]/; break; case 'deu': var o=/[\.\,0-9]/; break; case 'dte': var o=/[\-\/0-9]/; break; case 'eml': var o=/[\.\-0-9\@a-zA-Z\_]/; break; case 'url': var o=/[\#\%\&\+\-\.\/0-9\:\;\=\?\@a-zA-Z\_]/; break; case 'ip4': var o=/[\.0-9]/; break; case 'rgb': var o=/[\#0-9a-fA-F]/; break; } k=checkKey(e); return k<32 || o.test(String.fromCharCode(k)) } function emptyOptions(s){ o=el(s); for(i=o.options.length-1;i>=0;i--) o.options[i]=null; } function addOptions(s,d,f,n){ o=el(s); if(d=="" && o.selectedIndex!=-1) d=o.options[o.selectedIndex].value; emptyOptions(s); k=0; for(i=0;i=el("wdbcalm").options.length){ caldm=0; if(caldy<2060) caldy++; }if(caldm<0){ caldm=el("wdbcalm").options.length-1; if(caldy>1920) caldy--; } calBuild(); } var wdbcfld="",wdbtc=false,caldy=0,caldm=0,caldd=0; function selDate(obj,f){ if(el("wdbcal").style.display==""){ hideCal(); return; } wdbcfld=f; cdate=el(f).value; if(!isNaN(obj) && cdate=="") return; cdp=cdate.split("/"); if(cdp.length!=3) cdp=cdate.split("-"); if(cdp.length==3){ caldy=parseInt(cdp[2]); caldm=parseInt(cdp[1])-1; caldd=parseInt(cdp[0]); if(caldy>=0 && caldy<=60) caldy+=2000; if(caldy<1900) caldy+=1900; } cdp=new Date(caldy, caldm, caldd); if(isNaN(caldy) || isNaN(caldm) || isNaN(caldd) || caldy<1920 || caldy>2060 || caldm<0 || caldm>11 || caldd<1 || caldd>31 || isNaN(cdp) || cdp.getFullYear()!=caldy || cdp.getMonth()!=caldm || cdp.getDate()!=caldd){ cdp=new Date(); caldy=cdp.getFullYear(); caldm=cdp.getMonth(); caldd=cdp.getDate(); }if(!isNaN(obj)){ el(wdbcfld).value=caldd+"/"+parseInt(caldm+1)+"/"+caldy; return; } calBuild(); showCal(obj); } function calBuild(){ var strdays="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "); cdatei=new Date(caldy,caldm,1); cdatef=new Date(caldy,caldm,27); for(mf=27;mf<=31;mf++){ cdatef.setDate(mf+1); if(caldm!=cdatef.getMonth()) break; } cdatef=new Date(caldy,caldm,mf); str=''; j=0; for(i=0;i<7;i++){ str+='"; if((++j)>=strdays.length) j=0; } str+=""; if((j=0+cdatei.getDay())>6) j-=7; for(i=0;i6){ j=0; str+=""; } c="cl-hnd"; if((k=j+0)>6) k-=7; if(k==0 || k==6) c="cl-hwe"; if(i==caldd) c="cl-hdy"; str+=''; j++; } for(i=j;i<7;i++) str+=''; if(j>0) str+=""; str+='
'+strdays[j].substr(0,3)+"
'+i+' 
x
'; el("cmdays").innerHTML=str; el("wdbcalm").selectedIndex=caldm; el("wdbcaly").selectedIndex=2060-caldy; } function showCal(obj){ n=165; el("wdbcal").style.left=(pleft(el("SELD_"+wdbcfld))-n)+"px"; el("wdbcal").style.top=(ptop(el("SELD_"+wdbcfld))+16)+"px"; el("wdbcal").style.display=""; } function hideCal(){ caldy=0; el("wdbcal").style.display="none"; } function pop_onclose(){ if(!document.all) opener.wdbdlgretn(null); } function pop_init(){ window.dialogArguments=opener.wdbdlgargs; window.sizeToContent(); window.sizeToContent(); window.addEventListener("unload",pop_onclose,true); document.body.onkeypress=function(){if(checkKey(event)==27) window.close();}; } function pop_close(v){ if(document.all) window.returnValue=v; else opener.wdbdlgretn(v); window.close(); } var ifrminres=0,ifrdragok=false,ifriniww,ifriniwh,ifrinitw,ifrinith,ifrinitl,ifrinitt; function iecompattest(){ return(!window.opera && document.compatMode && document.compatMode!="BackCompat")?document.documentElement:document.body; } function innerWinIfr(){ ifriniww=window.innerWidth-20; ifriniwh=window.innerHeight-20; } function openIfr(url,w,h,s){ openWin(url,"_blank",w,h); } function closeIfr(){ el("ifrwin").style.display="none"; } function showIfr(w,h,l,t){ el("ifrwin").style.width=w+"px"; el("ifrwin").style.height=h+"px"; el("ifrwin").style.left=window.pageXOffset+l+"px"; el("ifrwin").style.top=window.pageYOffset+t+"px"; el("ifrwin").style.display=""; } function maxIfr(){ if(ifrminres){ ifrminres=0; w=ifrinitw; h=ifrinith; l=ifrinitl; t=ifrinitt; }else{ ifrminres=1; innerWinIfr(); w=ifriniww h=ifriniwh; l=t=0; } el("ifrmax").src="/images/wdb/ifr_"+((ifrminres)?"restore":"maximize")+".gif"; showIfr(w,h,l,t); } function initDragIfr(e){ offsetx=e.clientX; offsety=e.clientY; tempx=parseInt(el("ifrwin").style.left); tempy=parseInt(el("ifrwin").style.top); ifrdragok=true; el("ifrwin").onmousemove=dragdropIfr; } function dragdropIfr(e){ if(!ifrdragok) return; ifrinitl=tempx+e.clientX-offsetx; ifrinitt=tempy+e.clientY-offsety; el("ifrwin").style.left=ifrinitl+"px"; el("ifrwin").style.top=ifrinitt+"px"; } function stopDragIfr(){ ifrdragok=false; el("ifrwin").onmousemove=null; }