/* * Javascript which handles help display and resizing */ var isIE=(document.all != null)&&(document.getElementById != null); var isDOM=document.getElementById&&!document.all; var isNS4=document.layers?true:false; var isIE6withDocType=document.documentElement && document.documentElement.clientHeight; if (isNS4) { alert("Netscape Navigator 4 is not supported. Please use Netscape 7+, IE5.5+, or Mozilla 1.0+."); } /* If no cookie is set for helpExpanded, set it to false. */ var helpExpanded=getCookie("helpExpanded"); if (helpExpanded=="true"){ helpExpanded=true; } else if (helpExpanded=="false") { helpExpanded=false; } else if(helpExpanded == null) { setCookie("helpExpanded", "false"); helpExpanded=false; } function helpChangeState(state) { document.toggleHelpVisibilityForm.wlpHelp.value = state; if(isIE) showWaitState(); document.toggleHelpVisibilityForm.submit(); } function setCookie(name, value) { var curCookie = name + "=" + escape(value); document.cookie = curCookie; } // * return string containing value of specified cookie or null if cookie does not exist function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } var isDialogDisplayed = false; var dialogHeight = 0; var dialogWidth = 0; var theDialogDiv; var oldDialogInnerHTML; function toggleDialogBox(theId,height,width,title) { theDialogDiv = document.getElementById(theId); dialogHeight = height; dialogWidth = width; isDialogDisplayed = !isDialogDisplayed; dialogBkgdDiv = document.getElementById("dialogBackgroundDiv"); title = htmlChars(title); if (isDialogDisplayed) { addDialogTitle(title); setDialogSizeAndPos(); } else { theDialogDiv.innerHTML = oldDialogInnerHTML; } toggleDialogBkgd(); var viz = isDialogDisplayed ? "visible" : "hidden"; theDialogDiv.style.visibility = viz; if (isDialogDisplayed) { var keepGoing = true; var divElements = theDialogDiv.getElementsByTagName('INPUT'); for (i=0; i\n"; titleDiv += "\n"; titleDiv += "
\n"; theDialogDiv.innerHTML = titleDiv + oldDialogInnerHTML + "\n
\n"; } function toggleDialogBkgd() { var keepGoing = true; var dbdViz = isDialogDisplayed ? "visible" : "hidden"; var hfdViz = isDialogDisplayed ? "none" : "block"; var divElements = document.getElementsByTagName('SELECT'); for (i=0; i sh)? ch : sh) + "px"; dialogBkgdDiv.style.width = ((cw > sw)? cw : sw) + "px"; theDialogDiv.style.top = theTop + "px"; theDialogDiv.style.left = theLeft + "px"; theDialogDiv.style.height = dialogHeight + "px"; theDialogDiv.style.width = dialogWidth + "px"; } else { dialogBkgdDiv.style.height = (ch > sh)? ch : sh; dialogBkgdDiv.style.width = (cw > sw)? cw : sw; theDialogDiv.style.top = theTop; theDialogDiv.style.left = theLeft; theDialogDiv.style.height = dialogHeight; theDialogDiv.style.width = dialogWidth; } } } onresize=setDialogSizeAndPos; onscroll=setDialogSizeAndPos; function showWaitState() { var waitDiv = document.getElementById("waitDiv"); if (waitDiv != null) { waitDiv.style.visibility = "visible"; } } function checkEnter(e, evalOK, evalCancel) { e = isIE ? window.event : e; var characterCode = e.keyCode; if(characterCode == 13) { eval(evalOK); } else if (characterCode == 27) { if (evalCancel != null) eval(evalCancel); toggleDialogBox(theDialogDiv.id); } } function htmlChars(source) { if(source == null) return source; var target = source; target = target.replace(/&/g, "&"); target = target.replace(//g, ">"); return target; }