var ABOUT_WIDTH = 600; var ABOUT_HEIGHT = 450; var FILEDLG_WIDTH = 750; var FILEDLG_HEIGHT = 480; var CUBENAV_WIDTH = 750; var CUBENAV_HEIGHT = 575; var DIMBROWSER_WIDTH = 640; var DIMBROWSER_HEIGHT = 480; var SUBVAR_WIDTH = 320; var SUBVAR_HEIGHT = 240; var SORTDLG_WIDTH = 470; var SORTDLG_HEIGHT = 340; var CALCDLG_WIDTH = 700; var CALCDLG_HEIGHT = 740; var FORMATDLG_WIDTH = 650; var FORMATDLG_HEIGHT = 660; var TOPBOTTOMDLG_WIDTH = 485; var TOPBOTTOMDLG_HEIGHT = 335; var SHOWHIDEDLG_WIDTH = 645; var SHOWHIDEDLG_HEIGHT = 375; var RESTRICTDLG_WIDTH = 585; var RESTRICTDLG_HEIGHT = 550; var TRAFFICDLG_WIDTH = 560; var TRAFFICDLG_HEIGHT = 530; var DTOMANAGERDLG_WIDTH = 700; var DTOMANAGERDLG_HEIGHT = 460; var RELATEDCONTENT_WIDTH = 400; var RELATEDCONTENT_HEIGHT = 400; var EXPORTWIN_WIDTH = 500; var EXPORTWIN_HEIGHT = 300; var SELMBRS_WIDTH = 320; var SELMBRS_HEIGHT = 330; NS = (document.layers) ? 1 : 0; IE = (document.all) ? 1 : 0; DOM = (document.getElementById) ? 1 : 0; function getCookie(name) { var re = new RegExp(name + "=([^;]+)"); var value = re.exec(document.cookie); return (value != null) ? value[1] : null; } function setCookie(name, value) { if (IE && document.cookie.split(";").length >= 19) { // reached IE cookies limit return; } if(name=="ORA_WA_currTab" && 0<=value && value<=30) // Added for bug # 8489625 - the tab value can be between 0 and 30 including. document.cookie = name + "=" + value; } function popupWindow(url, width, height, scroll) { var bound = ""; if (width != null && height != null) { bound += ',left='+ ((screen.width - width) / 2) + ',top='+ ((screen.height - height) / 2); bound += ',width='+width + ',height='+height; } var scrollbars = (scroll != null) ? ",scrollbars=1" : ",scrollbars=0"; window.open(url, "_blank", "toolbar=0,location=0,statusbar=0,menubar=0,resizable=1"+scrollbars+bound); } function popupRealWindow(url, width, height) { var bound = ""; if (width != null && height != null) { bound += ',left='+ ((screen.width - width) / 2) + ',top='+ ((screen.height - height) / 2); bound += ',width='+width + ',height='+height; } window.open(url, "_blank", bound); } function loadURL(url) { //Added for bug# 6914767 var tempURL = RemoveBadChars(url); if(tempURL==url) document.location.href = url; else alert("The requested URL was found to be malformed and the request will be discarded");//bug# 6914767 } // Function added for cross site scripting check - bug# 6914767 function RemoveBadChars(InStr){ InStr = InStr.replace(/\/g,""); InStr = InStr.replace(/\"/g,""); InStr = InStr.replace(/\'/g,""); InStr = InStr.replace(/\;/g,""); InStr = InStr.replace(/\(/g,""); InStr = InStr.replace(/\)/g,""); InStr = InStr.replace(/\+/g,""); return InStr; } function dsh(objID) { var obj = getObj(objID); var obg = (obj != null) ? obj.style : null; if (obg != null) { obg.display = 'block'; } } function dhd(objID) { var obj = getObj(objID); var obg = (obj != null) ? obj.style : null; if (obg != null) { obg.display = 'none'; } } function getObj(objID) { if (IE) return document.all[objID]; if (DOM) return document.getElementById(objID); return null; } function isVisible(objID) { var obj = getObj(objID); var obg = (obj != null) ? obj.style : null; return (obg != null && obg.display == "block"); } function toggleDisplay(objID) { var obj = getObj(objID); var obg = (obj != null) ? obj.style : null; if (obg == null) { return; } if (obg.display == 'block') { obg.display == 'none'; } else { obg.display == 'block'; } } function getXYcoord(objID) { var obj = getObj(objID); if (NS) return obj; // NS object contains x and y values var loc = { x : 0, y : 0 }; do { loc.x += parseInt(obj.offsetLeft); loc.y += parseInt(obj.offsetTop); obj = obj.offsetParent; } while (obj); return loc; // returns object{x,y} }; //Use "Enter" key to submit form var nn4 = (navigator.appName.indexOf("Netscape") > -1 && navigator.appVersion.indexOf("4") > -1) ? true : false function checkEnter(e){ var characterCode if(e && e.which){ e = e characterCode = e.which } else{ e = event characterCode = e.keyCode } if(characterCode == 13){ return false } return true } function checkCancel(e){ var characterCode if(e && e.which){ e = e characterCode = e.which } else{ e = event characterCode = e.keyCode } if(characterCode == 13){ self.close() return false } return true } var tabCount = 0; var currTab = 0; function initTab(count) { tabCount = parseInt(count); var tab = getCookie("ORA_WA_currTab"); currTab = (tab == null) ? 0 : parseInt(tab); if (currTab > tabCount) { currTab = tabCount; } if (currTab == 0 && tabCount > 0) { currTab = 1; } setCurrTab(currTab); for (var i = 1; i < currTab; i++) { var currTabNode = document.getElementById(i); if (currTabNode.style.display != "none") { currTabNode.style.display = "none"; } } var first = document.getElementById("first"); if (first != null) { first.setAttribute("orig_onClick", first.getAttribute("onClick")); } var previous = document.getElementById("previous"); if (previous != null) { previous.setAttribute("orig_onClick", previous.getAttribute("onClick")); } var next = document.getElementById("next"); if (next != null) { next.setAttribute("orig_onClick", next.getAttribute("onClick")); } var last = document.getElementById("last"); if (last != null) { last.setAttribute("orig_onClick", last.getAttribute("onClick")); } updateTabControls(); } function setCurrTab(index) { if (index < 1 || index > tabCount) { return; } currTab = index; setCookie("ORA_WA_currTab", currTab); } function updateTabControls() { if (tabCount == 0) { return; } var first = document.getElementById("first"); var previous = document.getElementById("previous"); var firstTabVisible = (document.getElementById("1").style.display != "none"); if (first != null) { if (firstTabVisible) { first.className = "taskFirst_Rollover_disabled"; first.setAttribute("onClick", null); } else { first.className = "taskFirst_Rollover"; first.setAttribute("onClick", first.getAttribute("orig_onClick")); } } if (previous != null) { if (firstTabVisible) { previous.className = "taskPrev_Rollover_disabled"; previous.setAttribute("onClick", null); } else { previous.className = "taskPrev_Rollover"; previous.setAttribute("onClick", previous.getAttribute("orig_onClick")); } } var next = document.getElementById("next"); var last = document.getElementById("last"); var lastTabVisible = (document.getElementById(tabCount).offsetTop == 0); if (next != null) { if (lastTabVisible) { next.className = "taskNext_Rollover_disabled"; next.setAttribute("onClick", null); } else { next.className = "taskNext_Rollover"; next.setAttribute("onClick", next.getAttribute("orig_onClick")); } } if (last != null) { if (lastTabVisible) { last.className = "taskLast_Rollover_disabled"; last.setAttribute("onClick", null); } else { last.className = "taskLast_Rollover"; last.setAttribute("onClick", last.getAttribute("orig_onClick")); } } } function setFirstTab() { if (currTab <= 1) { return; } for (var i = 1; i < currTab; i++) { var currTabNode = document.getElementById(i); currTabNode.style.display = "block"; } setCurrTab(1); updateTabControls(); } function setPreviousTab() { if (currTab <= 1) { return; } setCurrTab(--currTab); var currTabNode = document.getElementById(currTab); currTabNode.style.display = "block"; updateTabControls(); } function setNextTab() { if (currTab >= tabCount) { return; } var lastTabVisible = (document.getElementById(tabCount).offsetTop == 0); if (lastTabVisible) { return; } var currTabNode = document.getElementById(currTab); if (currTabNode) { currTabNode.style.display = "none"; setCurrTab(++currTab); updateTabControls(); } } function setLastTab() { if (currTab >= tabCount) { return; } while (document.getElementById(tabCount).offsetTop != 0) { setNextTab(); } }