// ---- disable right-click //document.oncontextmenu = disableRightClick; var submitForm = "yes"; function checkIfSubmitted() { if (submitForm=="yes") { submitForm="no"; return true; } else { return false; } } function resetSubmittedForm() { submitForm="yes"; return true; } function disableRightClick() { return false; //return true; } // ---- end of disable right-click function dispMonth(mon) { switch (mon) { case 1: return "Jan"; case 2: return "Feb"; case 3: return "Mar"; case 4: return "Apr"; case 5: return "May"; case 6: return "Jun"; case 7: return "Jul"; case 8: return "Aug"; case 9: return "Sep"; case 10: return "Oct"; case 11: return "Nov"; case 12: return "Dec"; } } function fmtCurrency(amount) { a = fmtDecimal(amount); if (a.substr(a.indexOf('.')).length = 3 && a.substr(a.indexOf('.')) == '.00'){ amountResult = a.substr(0, a.indexOf('.')); } else amountResult = a; return amountResult; } function fmtDecimal(amount) { return fmtNumber(amount/100); } function fmtNumber(amount) { var textFormat = ""; s = new String(amount); decimalPt = s.indexOf('.'); if ( decimalPt>0 && decimalPt==(s.length - 2)) { s += '0'; } //if ( decimalPt<0 ) s += ".00"; if ( decimalPt < 0 ) { beforeDecimal = s; //afterDecimal = ""; // by William 20040521 afterDecimal = ".00"; } else { beforeDecimal = s.substr(0,s.indexOf('.')); afterDecimal = "." + s.substr(s.indexOf('.')+1); } //if ( afterDecimal.indexOf(".00") >= 0 ) // by William 20040521 // afterDecimal = ""; // by William 20040521 for (var t=0,k=beforeDecimal.length-1; k>=0; k--) { t++; if (t % 3 == 0) textFormat = "," + beforeDecimal.substr(k,1) + textFormat; else textFormat = beforeDecimal.substr(k,1) + textFormat; //document.write("
" + textFormat); } if (textFormat.substr(0,1) == ",") return textFormat.substr(1,textFormat.length-1) + afterDecimal; return textFormat + afterDecimal; } function leadingZero(nr) { if (nr < 10) nr = "0" + nr; return nr; } function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images) { for (var i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&iHelp Window"); win.document.write(""); win.document.write(""); win.document.write("

"+msg+"

"); win.document.write("
close
"); win.document.write(""); } function popWinSB(url) { window.open(url,"InternetPPS","width=850,height=520,status=no,resizable=yes,scrollbars=yes,top=0,left=0"); } function popWin(url) { window.open(url,"InternetPPS","width=780,height=520,status=no,resizable=yes,top=0,left=0"); } function popUp(url) { windowprops = "top=0,left=0,location=no,resizable=yes,status=yes,scrollbars=yes," + ",width=" + screen.width + ",height=" + (screen.height-80); window.open(url, "popupPage", windowprops); } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i"); document.write(""); document.write("
"); document.write(""); document.write(""); document.write("
"); document.write("
\"快ㄆの筿癟坝夹\"
"); document.write("
     
"); document.write("
© 2004 - 2008 快ㄆ翠Τその翠筿杠Τそ玂痙┮Τ舦"); document.write("
煤禣艶狝叭パ 快ㄆ翠Τそ翠筿杠Τそ羛矗ㄑ
"); document.write(""); document.write(""); } function writeNonFramedChiFooter() { document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("
\"\"
"); document.write("© 2004 - 2008 快ㄆ翠Τその翠筿杠Τそ玂痙┮Τ舦
"); document.write("煤禣艶狝叭パ快ㄆ翠Τそ翠筿杠Τそ羛矗ㄑ"); document.write("
"); document.write("\"快ㄆの筿癟坝夹\""); document.write("
"); } function writeFramedEngFooter() { document.write(""); document.write(""); document.write("
"); document.write(""); document.write(""); document.write("
"); document.write("
\"EPS
"); document.write("
     
"); document.write("
© 2004 - 2008 EPS Company (Hong Kong) Limited and PCCW-HKT Telephone Limited. All rights reserved."); document.write("
PPS is jointly provided by EPS Company (Hong Kong) Limited and PCCW-HKT Telephone Limited.
"); document.write(""); document.write(""); } function writeNonFramedEngFooter() { document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("
\"\"
"); document.write("© 2004 - 2008 EPS Company (Hong Kong) Limited and PCCW-HKT Telephone Limited. All rights reserved.
"); document.write("PPS is jointly provided by EPS Company (Hong Kong) Limited and PCCW-HKT Telephone Limited."); document.write("
"); document.write("\"EPS"); document.write("
"); } function writeFramedGBFooter() { document.write(""); document.write(""); document.write("
"); document.write(""); document.write(""); document.write("
"); document.write("
\"易办事及电讯盈科商标\"
"); document.write("
     
"); document.write("
Copyright (c) 2008。保留所有权利。"); document.write("
缴费灵服务由 易办事(香港)有限公司电讯盈科联合提供。
"); document.write(""); document.write(""); } function writeNonFramedGBFooter() { document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("
\"\"
"); document.write("Copyright (c) 2008。保留所有权利。
"); document.write("缴费灵服务由易办事(香港)有限公司电讯盈科联合提供。"); document.write("
"); document.write("\"易办事及电讯盈科商标\""); document.write("
"); } function printAlert(lang) { if (GetCookie("pAlert")!="N") { if(lang=="Chi") alert("叫ㄏノ绢匡兜"); else alert("Please use the landscape printing option."); SetCookie("pAlert", "N"); } print(); } function getLastPaymentDate(d) { var lastPaymentDate = new Date(d.substring(0,4),d.substring(4,6)-1,d.substring(6,8)); if (leadingZero(lastPaymentDate.getMonth() + 1) != d.substring(4,6) ) lastPaymentDate.setDate(0); return lastPaymentDate.getFullYear() + "" + leadingZero(lastPaymentDate.getMonth() + 1) + "" + leadingZero(lastPaymentDate.getDate()); } function getNextPaymentDate(serverTime, recPayDoM, language) { var d = serverTime; var rtDate = ""; d = new Date(d); var nextPayDate = new Date(d); nextPayDate.setDate(recPayDoM); if (nextPayDate.getMonth() != d.getMonth()) nextPayDate.setDate(0); if ( d >= nextPayDate ){ nextPayDate.setFullYear(nextPayDate.getFullYear(), nextPayDate.getMonth()+1, recPayDoM); if ( (nextPayDate.getMonth() - d.getMonth()) == 2) nextPayDate.setFullYear(nextPayDate.getFullYear(), nextPayDate.getMonth(), 0); } if (language == 2) rtDate = nextPayDate.getFullYear() + "" + leadingZero(nextPayDate.getMonth()+1) + "る" + leadingZero(nextPayDate.getDate()) + "ら"; else rtDate = leadingZero(nextPayDate.getDate())+ " " + dispMonth(nextPayDate.getMonth()+1) + " " + nextPayDate.getFullYear(); return rtDate; } function convertCardNoToBillNo(cardNo) { if (cardNo.length != 19) { return cardNo; } return cardNo.substring(0, 4) + cardNo.substring(5, 9) + cardNo.substring(10, 14) + cardNo.substring(15, 19); } function convertBillNoToCardNo(billNo) { if(billNo.length != 16) { return billNo; } return billNo.substring(0,4) + " - " + billNo.substring(4, 8) + " - " + billNo.substring(8, 12) + " - " + billNo.substring(12, 16); } function int2float(prefix, index) { result = ""; len = prefix.length; for(i=0; i