function doPrintVoucher(inRSVID, inHotelCounter) { if ( confirm("Please confirm, your printer is ready to print and\nconfirm you want to continue printing this Voucher?") ) { /* sURL = 'id=voucherPrint&rsvNum=' + inRSVID; sURL += '&agnc=' + $$$('Agnc').value + '&agncusr=' + $$$('AgncUser').value + '&lang=' + $$$('Lang').value + '&sessID=' + $$$('SessID').value; transaction = YAHOO.util.Connect.asyncRequest('POST', bookURL, {success: handleSuccessPrintVoucher, failure: handleFailure, argument: inHotelCounter } , sURL); */ } function fakeResponse() { this.status = 200; this.responseText = '1'; } o = new fakeResponse; handleSuccessPrintVoucher(o); } function handleSuccessPrintVoucher(o) { if (o.responseText != "" && o.status == 200) { if (o.responseText != "0") { for (idx=0; idx<=o.argument-1; idx++) { $$$('voucherNumberDIV' + idx).innerHTML = o.responseText; } //$$$("printButton").style.display = "none"; window.print(); } else { alert ("You cannot rePrint the voucher. Please contact FORTHcrs"); } } else { alert ("System unavailable. Please try again later."); } } function handleFailure (o) { alert ("Communication Error on Transaction " + o.tId + ".\n Please try again later to print Voucher.\n\n" + "The HTTP status is: " + o.status + ".\n The message is " + o.statusText + "\n\n Please refer this error..." ); } function doHandleMouse(e) { //return true; return false; } function doKeyPressHandle(e) { var keynum; var keychar; if(window.event) { // IE keynum = e.keyCode; } else if(e.which) { // Netscape/Firefox/Opera keynum = e.which; } //keychar = String.fromCharCode(keynum) //alert (keynum); return false; //return true; } function doOnLoad() { document.onmousedown = doHandleMouse; document.oncontextmenu = doHandleMouse; document.onkeypress = doKeyPressHandle; }