function openWindow(URL, name, width, height) { wnd = window.open(URL, name, "status=0,titlebar=0,resizable=1,scrollbars=1,width="+width+",height="+height+""); wnd.focus(); } function openLockedWindow(URL, name, width, height) { wnd = window.open(URL, name, "status=0,titlebar=0,resizable=0,scrollbars=1,width="+width+",height="+height+""); wnd.focus(); } function openWindowFromParentWindow(parentWindow, URL, name, width, height) { wnd = parentWindow.open(URL, name, "status=0,titlebar=0,resizable=1,scrollbars=1,width="+width+",height="+height+""); wnd.focus(); } function tryAction(confirmText, url) { if (confirm(confirmText)) document.location.href = url; } function quickFindOption(selectElement, phrase) { phrase = phrase.toUpperCase(); var opts = selectElement.options; var i; for (i = 0; opts.length > i; i++) { if (opts[i].text.toUpperCase().indexOf(phrase) != -1) { selectElement.selectedIndex = i; return; } } } function trim(text) { text = text.replace(/^\s+/g, "");// strip leading return text.replace(/\s+$/g, "");// strip trailing } function show(i){ if(i) { if(document.getElementById(i)) document.getElementById(i).style.display="block"; } } function switchClass(i, nclass){ if(i) { if(document.getElementById(i)) { document.getElementById(i).className=nclass; } } } function hide(i){ if(i) { if(document.getElementById(i)) document.getElementById(i).style.display="none"; } } function hideVis(i){ if(i) { if(document.getElementById(i)) document.getElementById(i).style.visibility="hidden"; } } function showHide(showEl, hideEl){ if(showEl) { if(document.getElementById(showEl)) document.getElementById(showEl).style.display="block"; } if(hideEl) { if(document.getElementById(hideEl)) document.getElementById(hideEl).style.display="none"; } } function showByMouse(id, e, xmod, ymod) { var rightedge; var bottomedge; document.getElementById(id).left=window.pageXOffset+e.clientX-xmod; document.getElementById(id).top=window.pageYOffset+e.clientY-ymod; show(id); } function submitform(formId,targetPage) { var elt = document.getElementById(formId); elt.action = targetPage; elt.submit(); } function cookiesEnabled() { document.cookie="k4u_e"; cookieEnabled = (document.cookie.indexOf("k4u_e") != -1) ? true : false; return (cookieEnabled); }