function chkint(num) { for( i=0 ; i < num.value.length ; i++ ) { if((num.value.charAt(i)<"0") || (num.value.charAt(i)>"9")) { alert("You can write only numberic! "); num.value="" num.focus(); return false; } } return true; } function loadswf(src,w,h){ html=''; html += ''; html += ''; html += ''; //html += ''; html += ''; html += ''; html += '<\/embed>'; html += '<\/object>'; document.write(html); } function commasplit(srcNumber) { var txtNumber=''+srcNumber; var rxSplit=new RegExp('([0-9])([0-9][0-9][0-9][,.])'); var arrNumber=txtNumber.split('.'); arrNumber[0] += '.'; do { arrNumber[0]=arrNumber[0].replace(rxSplit, '$1,$2'); } while (rxSplit.test(arrNumber[0])); if (arrNumber.length > 1) { return arrNumber.join(''); } else { return arrNumber[0].split('.')[0]; } } function delcomma(thisCtrl) { var x, ch; var i=0; var newVal=""; var oCtrl; if(thisCtrl) oCtrl=thisCtrl; else oCtrl=this.ctl; for(x=0; x < oCtrl.value.length ; x++) { ch= oCtrl.value.substring(x,x+1) if( ch != ",") newVal += ch; } oCtrl.value= newVal; return true; } function numchk(num){ num=new String(num); num=num.replace(/,/gi,""); return numchkcal(num); } function numchkcal(num){ var sign=""; if(isNaN(num)) { alert("Number Only! "); return 0; } if(num==0) { return num; } if(num < 0){ num=num*(-1); sign="-"; } else { num=num*1; } num=new String(num) var temp=""; var pos=3; num_len=num.length; while (num_len > 0){ num_len=num_len-pos; if(num_len < 0) { pos=num_len+pos; num_len=0; } temp=","+num.substr(num_len,pos)+temp; } return sign+temp.substr(1); } function commanum(thisCtrl){ thisCtrl=new String(thisCtrl); thisCtrl=thisCtrl.replace(/,/gi,""); return commaproc(thisCtrl); } function commaproc(thisCtrl){ var sign=""; if(isNaN(thisCtrl)) { alert("Number Only! "); return 0; } if(thisCtrl==0) { return thisCtrl; } if(thisCtrl < 0){ thisCtrl=thisCtrl*(-1); sign="-"; } else { thisCtrl=thisCtrl*1; } thisCtrl=new String(thisCtrl) var temp=""; var pos=3; num_len=thisCtrl.length; while (num_len > 0){ num_len=num_len-pos; if(num_len < 0) { pos=num_len+pos; num_len=0; } temp=","+thisCtrl.substr(num_len,pos)+temp; } return sign+temp.substr(1); } var bSelectAll=false; function toggleall(checked) { if( checked == 0 ) { bSelectAll=true; } else if( checked == 1 ) { bSelectAll=false; } if( bSelectAll ) { checked=0; bSelectAll=false; } else { checked=1; bSelectAll=true; } var form=document.thislist; for(var i=0; i < form.elements.length; i++) { if (form.elements[i].type =="checkbox" && form.elements[i].name == "senduid") { form.elements[i].checked=checked; } } } function resizebtmframe() { var f1=document.all.btmframe; var f2=btmframe.document.body; f1.style.height=f2.scrollHeight+f2.offsetHeight-f2.clientHeight; } function chkmsgbyte(msgfield,bytewin,limitnum){ var str,msg; var len=0; var temp; var count=0; msg=msgfield.value; str=new String(msg); len=str.length; for (k=0 ; k < len ; k++){ temp=str.charAt(k); if (escape(temp).length > 4) { count += 2; } else if (temp == '\r' && str.charAt(k+1) == '\n') { count += 2; } else if (temp != '\n') { count++; } } bytewin.value=count; if(count > limitnum) { msgfield.blur(); msgfield.focus(); alert("You can write "+limitnum+" byte at this field. "); cutlimitchar(msgfield,bytewin,limitnum); } } function cutlimitchar(msgfield,bytewin,limitnum) { var str,msg,bytewin; var len=0; var temp; var count; count=0; msg=msgfield.value; str=new String(msg); len=str.length; for(k=0 ; k < len ; k++) { temp=str.charAt(k); if(escape(temp).length > 4) { count += 2; } else if (temp == '\r' && str.charAt(k+1) == '\n') { count += 2; } else if(temp != '\n') { count++; } if(count > limitnum) { str=str.substring(0,k); break; } } msgfield.value=str; chkmsgbyte(msgfield,bytewin,limitnum); } function tglon(o) { if (document.all && document.all[o]!=null) document.all[o].style.visibility='visible'; } function tgloff(o) { if (document.all && document.all[o]!=null) document.all[o].style.visibility='hidden'; } function bigpic(fname,fdir,fwidth,fheight) { var winpos="left="+((window.screen.width-(fwidth+30))/2)+",top="+((window.screen.height-(fheight+20))/2); window.open('/htm/picview.asp?fname='+fname+'&fdir='+fdir+'&fwidth='+fwidth+'&fheight='+fheight+'', 'picview', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+(fwidth+30)+',height='+(fheight+20)+',resizable=0,'+winpos); } function userinfo(userid) { var winpos="left="+((window.screen.width-600)/2)+",top="+((window.screen.height-600)/2); var modiWin=window.open('/htm/userinfo.asp?userid='+userid, "newwin", "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=600,height=600 resizable=0,"+winpos); } function smsabform(uid,aduid,ttuid,scuid,ptuid,pname,recphone,ncode) { var ffd=document.globalform; var popwidth=370; var popheight=630; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var smsabform=window.open('about:blank', 'smsabform', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.uid.value=uid; ffd.aduid.value=aduid; ffd.ttuid.value=ttuid; ffd.scuid.value=scuid; ffd.ptuid.value=ptuid; ffd.tgname.value=pname; ffd.tgcphone.value=recphone; ffd.ncode.value=ncode; ffd.target="smsabform"; ffd.action="/sms/smsabform.asp"; ffd.submit(); } function smsform(uid,aduid,ttuid,scuid,ptuid,pname,recphone,ncode,dbinfo) { var ffd=document.globalform; var popwidth=440; var popheight=480; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var smsform=window.open('about:blank', 'smsform', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.uid.value=uid; ffd.aduid.value=aduid; ffd.ttuid.value=ttuid; ffd.scuid.value=scuid; ffd.ptuid.value=ptuid; ffd.tgname.value=pname; ffd.tgcphone.value=recphone; ffd.ncode.value=ncode; ffd.dbinfo.value=dbinfo; ffd.target="smsform"; ffd.action="/sms/smsform.asp"; ffd.submit(); } function faxform(uid,aduid,ttuid,scuid,ptuid,pname,recphone,ncode,dbinfo) { var ffd=document.globalform; var popwidth=450; var popheight=350; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var faxform=window.open('about:blank', 'faxform', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.uid.value=uid; ffd.aduid.value=aduid; ffd.ttuid.value=ttuid; ffd.scuid.value=scuid; ffd.ptuid.value=ptuid; ffd.tgname.value=pname; ffd.tgcphone.value=recphone; ffd.ncode.value=ncode; ffd.dbinfo.value=dbinfo; ffd.target="faxform"; ffd.action="/fax/faxform.asp"; ffd.submit(); } function cmtcallform(uid,ccgubun,ccuid,pname,inout,steptxt) { var ffd=document.globalform; var popwidth=550; var popheight=385; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var cmtcallform=window.open('about:blank', 'cmtcallform', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.uid.value=uid; ffd.ncode.value=ccgubun; ffd.dbinfo.value=ccuid; ffd.tgname.value=pname; ffd.tgcphone.value=inout; ffd.emstep.value=steptxt; ffd.target="cmtcallform"; ffd.action="/htm/cmtcallform.asp"; ffd.submit(); } function emailform(uid,aduid,ttuid,scuid,ptuid,tgmail,tgname,emlcode,emstep) { var ffd=document.globalform; ffd.uid.value=uid; ffd.aduid.value=aduid; ffd.ttuid.value=ttuid; ffd.scuid.value=scuid; ffd.ptuid.value=ptuid; ffd.tgmail.value=tgmail; ffd.tgname.value=tgname; ffd.emlcode.value=emlcode; ffd.emstep.value=emstep; ffd.target="_self"; ffd.action="/email/mform.asp"; ffd.submit(); } function emailview(uid,tgmail) { var ffd=document.globalform; ffd.uid.value=uid; ffd.tgmail.value=tgmail; var popwidth=700; var popheight=650; var winpos="left="+((window.screen.width-650)/2)+",top="+((window.screen.height-550)/2); var emailview=window.open('about:blank', 'emailview', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.target="emailview"; ffd.action="/email/mview.asp"; ffd.submit(); } function wpform(uid,ttuid,dropflag,dropstep) { var popwidth=600; var popheight=500; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var wpform=window.open("wpform.asp?uid="+uid+"&ttuid="+ttuid+"&dropflag="+dropflag+"&dropstep="+dropstep,"wpform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function esljobcastprint() { var ffd=document.ppboard; var popwidth=700; var popheight=650; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var esljobcastprint=window.open('about:blank', 'esljobcastprint', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.target="esljobcastprint"; ffd.action="/esljobcast.com.print.asp"; ffd.submit(); } function esljobcastemail() { var ffd=document.ppboard; var popwidth=500; var popheight=500; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var esljobcastemail=window.open('about:blank', 'esljobcastemail', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); ffd.target="esljobcastemail"; ffd.action="/esljobcast.com.email.asp"; ffd.submit(); } function ttinfomail(jobuid,scuid,wpuid,ttuid,dbflag) { var ffd=document.jcboard; var popwidth=700; var popheight=650; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var ttinfomail=window.open('/tmem/ttinfomailform.asp?jobuid='+jobuid+'&scuid='+scuid+'&wpuid='+wpuid+'&ttuid='+ttuid+'&dbflag='+dbflag, 'ttinfomail', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); } function scinfomail(jobuid,scuid,wpuid,ttuid,dbflag) { var ffd=document.jcboard; var popwidth=700; var popheight=650; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var scinfomail=window.open('/smem/scinfomailform.asp?jobuid='+jobuid+'&scuid='+scuid+'&wpuid='+wpuid+'&ttuid='+ttuid+'&dbflag='+dbflag, 'scinfomail', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); } function mailtracking(delitype,delinum) { var trackingurl=""; var popwidth=800; var popheight=600; var winpos="left="+((window.screen.width-popwidth)/2)+",top=100"; if(delitype == "1"){ trackingurl="http://www.fedex.com/Tracking?ascend_header=1&clienttype=dotcom&cntry_code=us&language=english&tracknumbers="+delinum } if(delitype == "3"){ trackingurl="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum="+delinum } if(delitype == "4"){ trackingurl="http://wwwapps.ups.com/WebTracking/track?trackNums="+delinum } var mailtracking=window.open(trackingurl, 'mailtracking', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,'+winpos); } function zipcode() { var popwidth=520; var popheight=300; var zipcode=window.open('/htm/zipcode.asp', 'zipcode', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+popwidth+',height='+popheight+',resizable=0,left='+((window.screen.width-popwidth)/2)+',top='+((window.screen.height-popheight)/2)); } function visadocform(uid) { var popwidth=650; var popheight=650; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var visadocform=window.open("/tproc/visadocform.asp?uid="+uid,"visadocform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function turnform(uid) { var popwidth=650; var popheight=480; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var turnform=window.open("/tproc/turnform.asp?uid="+uid,"turnform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function dropttform(uid) { var popwidth=550; var popheight=180; if(confirm("Are you sure to drop this teacher? ")==true) { var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var dropttform=window.open("/tproc/dropttform.asp?uid="+uid,"dropttform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } else { return; } } function ttinfoemail(ttuid) { var popwidth=799; var popheight=680; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var ttinfoform=window.open("/email/ttinfoform.asp?ttuid="+ttuid,"ttinfoform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function scinfoemail(jobuid,scuid) { var popwidth=799; var popheight=680; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var scinfoform=window.open("/email/scinfoform.asp?jobuid="+jobuid+"&scuid="+scuid,"scinfoform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function scttpremail(scuid) { var popwidth=799; var popheight=680; var winpos="left="+((window.screen.width-popwidth)/2)+",top="+((window.screen.height-popheight)/2); var scttprform=window.open("/email/scttprform.asp?scuid="+scuid,"scttprform","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width="+popwidth+",height="+popheight+",resizable=0,"+winpos); } function ncodechk(chkipaddr) { var ffd=document.globalform; ffd.dbinfo.value=chkipaddr; ffd.target="hiddenframe"; ffd.action="/htm/ncodechk.asp"; ffd.submit(); }