// JScript File // -------- -------- -------- -------- // Window onload event handler var ClientEndLoadTime = null; var ClientUnloadTime = null; window.onload = windowOnloadHandler; function windowOnloadHandler() { //var offset = 4; //this.moveTo(-offset, -offset); //this.resizeTo(screen.availWidth+2*offset,screen.availHeight+2*offset-25); var tables = document.getElementsByTagName("table"); for (n=0; n1004) { tables[n].style.width = "1003px"; } } } var divHeight = document.getElementById("bodyHeight"); var divHeightAdj = document.getElementById("bodyHeightAdj"); var pageMinHeight = 700; if (divHeight!=null && divHeightAdj!=null) { if (divHeight.offsetHeight<=pageMinHeight) { divHeightAdj.style.height = pageMinHeight - divHeight.offsetHeight } } //checkMessageDisplay(); //Message_scroll(); //load_img(); //setScript(); // log page load time ClientEndLoadTime = new Date(); //recordClientLoadTime(); // Web.mster } //window.onbeforeunload = windowBeforeOnunloadHandler; function windowBeforeOnunloadHandler() { ClientUnloadTime = new Date(); recordClientUnloadTime(); // Web.mster } function setScript() { var txtArray=document.getElementsByTagName("input"); var DefaultQQ; for(var i=0;i8) { div2.innerHTML = ""; var span = document.createElement("span"); span.className = "progress"; span.innerText = "Loading "; div2.insertAdjacentElement("BeforeEnd",span); } var span = document.createElement("span"); span.className = "progressSquare"; div2.insertAdjacentElement("BeforeEnd",span); progressTimeout = window.setTimeout("progressBarFlash()",200); } function progressBarStop() { if (progressTimeout!=null) { window.clearTimeout(progressTimeout); } var div = document.getElementById("ProgressBar"); if (div!=null) { div.style.visibility = "hidden"; } } // -------- -------- -------- -------- // Web Service var xmlhttp = false; var xmlFunction = ""; // input: web service url with parameters function sendWebService(pUrl) { return sendWebService(pUrl, ""); } function sendWebService(pUrl, pFunction) { var xmlType = ""; xmlFunction = pFunction; try { xmlhttp = new XMLHttpRequest(); if (xmlhttp.overrideMimeType) { xmlhttp.overrideMimeType("text/xml"); } xmlType = "XMLHttpRequest"; throw Exception("xxx"); } catch (trymicrosoft) { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); xmlType = "Msxml2.XMLHTTP"; } catch (othermicrosoft) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlType = "Microsoft.XMLHTTP"; } catch (failed) { xmlhttp = false; xmlType = "fail"; } } } //jsText("xmlType: " + xmlType + "\n",true); xmlhttp.onreadystatechange = returnWebService; xmlhttp.open("GET", pUrl, true); xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(); return true; } // calls returnWebServicePage() method defined in each page function returnWebService() { //jsText("xmlhttp.readyState: " + xmlhttp.readyState + "\n" ); if (xmlhttp.readyState == 4 ) { //jsText("xmlhttp.status: " + xmlhttp.status + "\n\n"); if (xmlhttp.status == 200) { var xmlReturn = xmlhttp.responseXml.documentElement; //jsText(xmlhttp.responseXml.xml + "\n"); if (xmlReturn!=null) { var oException = xmlReturn.selectSingleNode("//HKI/Exception"); // exception from web service if (oException!=null) { //jsText(oException.xml); var oTr = oException.selectNodes("table/tr"); for (n=0; n0) { // -------- -------- -------- -------- gobAjaxDivResult = document.createElement("div"); gobAjaxDivResult.style.position = "absolute"; gobAjaxDivResult.style.border = "solid 1px #CCCCCC"; gobAjaxDivResult.style.top = gobAjaxTxtSearch.offsetTop + gobAjaxTxtSearch.offsetHeight - 1; gobAjaxDivResult.style.left = gobAjaxTxtSearch.offsetLeft; gobAjaxDivResult.style.width = gobAjaxTxtSearch.offsetWidth; gobAjaxDivResult.style.backgroundColor = "#FFFFFF"; gobAjaxDivResult.style.color = "#AAAAAA"; gobAjaxDivResult.style.zIndex = 102; gobAjaxTxtSearch.parentElement.insertAdjacentElement("BeforeEnd",gobAjaxDivResult); gobAjaxIFrameMask = document.createElement("iframe"); gobAjaxIFrameMask.frameBorder = 0; gobAjaxIFrameMask.style.position = "absolute"; gobAjaxIFrameMask.style.border = "solid green 0px"; gobAjaxIFrameMask.style.top = gobAjaxDivResult.offsetTop-1; gobAjaxIFrameMask.style.left = gobAjaxDivResult.offsetLeft-1; gobAjaxIFrameMask.style.width = gobAjaxDivResult.offsetWidth+2; gobAjaxIFrameMask.style.zIndex = 101; gobAjaxIFrameMask.src = "about:blank"; gobAjaxTxtSearch.parentElement.insertAdjacentElement("BeforeEnd",gobAjaxIFrameMask); gobAjaxIFrameMask.style.height = gobAjaxDivResult.offsetHeight; // -------- -------- -------- -------- var ShowCount = oRows.length<=10?oRows.length:10; for (n=0; n"; gobAjaxDivResult.insertAdjacentElement("BeforeEnd",oDivRecord); } gobAjaxIFrameMask.style.height = gobAjaxDivResult.offsetHeight+2; } return true; } else { return false; } } function ajaxSearchRecordMouseover() { if (window.event.srcElement!=null) { window.event.srcElement.className='MouseOver'; } return true; } function ajaxSearchRecordMouseout() { if (window.event.srcElement!=null) { window.event.srcElement.className=''; } return true; } function ajaxSearchRecordClick() { if (window.event.srcElement!=null) { gobAjaxTxtSearch.value = window.event.srcElement.innerText; } ajaxSearchRemoveResult(); return true; } function ajaxSearchRemoveResult() { if (gobAjaxDivResult!=null) { gobAjaxDivResult.style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=.3)" gobAjaxDivResult.filters[0].apply(); gobAjaxDivResult.style.visibility = "hidden"; gobAjaxDivResult.filters[0].play(); gobAjaxIFrameMask.style.visibility = "hidden"; gobAjaxDivResult = null; gobAjaxIFrameMask = null; return true; } else { return false; } } // -------- -------- -------- -------- function getTextValue(pObject,pPoint) { var xObject=document.getElementById(pObject); var xValue=xObject.value; xObject.value=formatxNumber(xValue,pPoint); } function formatxNumber (pNumber, pDecimal) { var output = ""; pNumber = pNumber.replace(",",""); // rounding var numRounded = pNumber*Math.pow(10,pDecimal); numRounded = Math.round(numRounded); numRounded = numRounded/Math.pow(10,pDecimal); numRounded = '' + numRounded; // split into 2 parts numberParts = new Array(); numberParts = numRounded.split("."); // number before decimal var numLeft = "" + numberParts[0]; if (numLeft.length > 3) { var mod = numLeft.length%3; var tempLeft = (mod > 0 ? (numLeft.substring(0,mod)) : ''); for (i=0 ; i < Math.floor(numLeft.length/3) ; i++) { if (mod==0 && i==0) { tempLeft += numLeft.substring(mod+3*i, mod+3*i+3); } else { tempLeft += ',' + numLeft.substring(mod+3*i, mod+3*i+3); } } numLeft = tempLeft; } output = numLeft; // number after decimal if (pDecimal>0) { output += "."; var numRight = ""; if (numberParts.length==2) { numRight = "" + numberParts[1]; } var tempRight = ""; for (var n=numRight.length; n