/* Disable right click */ /* var message = ""; function clickIE() { if(document.all) { (message); return false; } } function clickNS(e) { if(document.layers||(document.getElementById&&!document.all)) { if(e.which==2||e.which==3) { (message); return false; } } } if(document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS; } else { document.onmouseup=clickNS; document.oncontextmenu=clickIE; } document.oncontextmenu=new Function("return false") */ var req; function ismaxlength(buf, maxlengh) { if(maxlengh == "") maxlengh = "16383"; if(buf.length > maxlengh) { //alert("Maxlength: " + maxlengh + ""); return(false); } else { return(true); } } function loadXML(location, url) { if(window.XMLHttpRequest) { // Native XMLHttpRequest call req = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE/Windows ActiveX call req = new ActiveXObject("Microsoft.XMLHTTP"); } if(req) { //alert("load XML:" + "http://affiliates.fareconnect.com" + location); req.open("POST", "http://affiliates.fareconnect.com" + location, true); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req.onreadystatechange = processReq; req.send(url); } } function processReq() { if(req.readyState == 4) { if(req.status == 200) { var node = req.responseXML.getElementsByTagName("method"); if(node && (node.length > 0)) { method = req.responseXML.getElementsByTagName("method")[0].firstChild.data; eval(method); } else { alert("Error: No 'method' found in responce from server.\n\n" + req.statusText); } } else { alert("Error:\n" + req.statusText); } } } /////////////////////////////////// Beginning of the Div Show Code ////////////////////////////////////////////// var timer = null; var divShowIsShown = false; var divShowName = null; var divShowWait = null; var divShowWaitMask = null; var divShowIframe = null; function divShow(a) { // show which div name divShowIsShown = true; if(a) { divShowName = document.getElementById(a); } divShowWaitMask.style.display = "block"; divShowIframe.style.display = "block"; divShowName.style.display = "block"; divShowPopup(); } function delayShow() { if(divShowIsShown == true) { timer = setTimeout("divShowPopup();", 200); } } function divShowPopup() { if(divShowWait.style.display == "block") { divShowWait.style.display = "block"; } div_wait_height = divShowWait.offsetHeight; div_wait_width = divShowWait.offsetWidth; var scTop = parseInt(getScrollTop(), 10); var scLeft = parseInt(getScrollLeft() ,10); var fullHeight = getViewportHeight(); var fullWidth = getViewportWidth(); divShowWait.style.top = (scTop + ((fullHeight - div_wait_height) / 2)) + "px"; divShowWait.style.left = (scLeft + ((fullWidth - div_wait_width) / 2)) + "px"; divShowWaitMask.style.height = fullHeight + "px"; divShowIframe.style.height = fullHeight + "px"; if(document.all) { // If IE divShowWaitMask.style.width = fullWidth + "px"; divShowIframe.style.width = fullWidth + "px"; } else { // If Firefox divShowWaitMask.style.width = (fullWidth - 17) + "px"; divShowIframe.style.width = (fullWidth - 17) + "px"; } divShowWaitMask.style.top = scTop + "px"; divShowIframe.style.top = scTop + "px"; divShowWaitMask.style.left = scLeft + "px"; divShowIframe.style.left = scLeft + "px"; if(divShowName != null) { div_name_height = divShowName.offsetHeight; div_name_width = divShowName.offsetWidth; divShowName.style.top = (scTop + ((fullHeight - div_name_height) / 2)) + "px"; divShowName.style.left = (scLeft + ((fullWidth - div_name_width) / 2)) + "px"; } if(divShowWait.style.display == "none") { divShowWait.style.display = "none"; } clearTimeout(timer); } function divShowWaitStart() { document.body.style.cursor = "wait"; if(divShowName != null) { divShowName.style.display = "none"; } divShowWait.style.display = "block"; divShowWaitMask.style.display = "block"; divShowIframe.style.display = "block"; div_wait_height = divShowWait.offsetHeight; div_wait_width = divShowWait.offsetWidth; var scTop = parseInt(getScrollTop(), 10); var scLeft = parseInt(getScrollLeft() ,10); var fullHeight = getViewportHeight(); var fullWidth = getViewportWidth(); divShowWait.style.top = (scTop + ((fullHeight - div_wait_height) / 2)) + "px"; divShowWait.style.left = (scLeft + ((fullWidth - div_wait_width) / 2)) + "px"; divShowWaitMask.style.height = fullHeight + "px"; divShowIframe.style.height = fullHeight + "px"; if(document.all) { // If IE divShowWaitMask.style.width = fullWidth + "px"; divShowIframe.style.width = fullWidth + "px"; } else { // If Firefox divShowWaitMask.style.width = (fullWidth - 17) + "px"; divShowIframe.style.width = (fullWidth - 17) + "px"; } divShowWaitMask.style.top = scTop + "px"; divShowIframe.style.top = scTop + "px"; divShowWaitMask.style.left = scLeft + "px"; divShowIframe.style.left = scLeft + "px"; } function divShowWaitStop() { document.body.style.cursor = "default"; if(divShowName != null) { divShowName.style.display = "block"; divShowPopup(); } divShowWait.style.display = "none"; } function getScrollTop() { if(self.pageYOffset) { // all except Explorer return self.pageYOffset; } else if(document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict return document.documentElement.scrollTop; } else if(document.body) { // all other Explorers return document.body.scrollTop; } } function getScrollLeft() { if(self.pageXOffset) { // all except Explorer return self.pageXOffset; } else if(document.documentElement && document.documentElement.scrollLeft) { // Explorer 6 Strict return document.documentElement.scrollLeft; } else if(document.body) { // all other Explorers return document.body.scrollLeft; } } function getViewportHeight() { if(window.innerHeight != window.undefined) return window.innerHeight; if(document.compatMode == 'CSS1Compat') return document.documentElement.clientHeight; if(document.body) return document.body.clientHeight; return window.undefined; } function getViewportWidth() { var offset = 17; var width = null; if(window.innerWidth != window.undefined) return window.innerWidth; if(document.compatMode == 'CSS1Compat') return document.documentElement.clientWidth; if(document.body) return document.body.clientWidth; } if(window.addEventListener) // DOM method for binding an event window.addEventListener("resize", delayShow, false); else if(window.attachEvent) // IE exclusive method for binding an event window.attachEvent("onresize", delayShow); else if(document.getElementById) // support older modern browsers window.onresize = delayShow; if(window.addEventListener) // DOM method for binding an event window.addEventListener("scroll", delayShow, false); else if(window.attachEvent) // IE exclusive method for binding an event window.attachEvent("onscroll", delayShow); else if(document.getElementById) // support older modern browsers window.onscroll = delayShow; //////////////////////////////////// End of the Div Show Code /////////////////////////////////////////