function windowOpen(sUrl, sName, sOptions, bDontAutoClose) { popup = window.open(sUrl, sName, sOptions); setTimeout("try{popup.focus();} catch(e) {}", 10); if(!bDontAutoClose) { if(window.name != popup.name) { childwindow = popup; } } return popup; } function windowOpenPrintPreview(sUrl) { return(windowOpen(sUrl, 'PrintPreview','left=100,top=100,height=550,width=700,resizable=1,scrollbars=1')); } function windowOpenExportPreview(sUrl) { return(windowOpen(sUrl, 'ExportPreview','top=20,left=20,height=200,width=300,resizable=1')); } function windowClose() { parentFocus(); window.close(); } function windowRefresh() { window.location.replace(window.location.href); // window.location.reload(true); // Javascript 1.3 } function windowReplace(sUrl) { window.location.replace(sUrl); } function eventWindowOnLoad() { if(0) window.status = 'Onload event took: ' + TimeEval(sWindowOnLoad, 'Onload event'); else eval(sWindowOnLoad); } var sWindowOnLoad = ''; function windowOnLoad(sJavascript) { if (navigator.appName == "Netscape") { appendToEvent('onload', sJavascript); } else { window.onload = function() { eventWindowOnLoad(); }; sWindowOnLoad += sJavascript; } } function appendToEvent(sEvent, sScript) { bBodyInitialised = false; try { if (document.body != null) bBodyInitialised = true; } catch (e) { } if (bBodyInitialised) { document.body.setAttribute(sEvent, document.body.getAttribute(sEvent) + ';' + sScript); } else { sCallSelf = 'appendToEvent("' + sEvent + '", "' + sScript.replace(/\'/g, "\\'") + '");'; window.setTimeout(sCallSelf, 0); } } var helpwindow; var childwindow; var calendarwindow; function eventWindowOnUnload() { try { childwindow.close(); } catch(e) {} try { calendarwindow.close(); } catch(e) {} eval(sWindowOnUnload); } var sWindowOnUnload = ''; function windowOnUnload(sJavascript) { sWindowOnUnload += sJavascript; } function windowPrint() { window.print(); } var bCloseOnFucus = 0; function eventWindowOnFocus() { if(bCloseOnFocus) window.close(); } function eventWindowOnBeforePrint() { try { document.getElementById('divPreviewHeader').style.display = 'none'; } catch(e) {} } function eventWindowOnAfterPrint() { try { document.getElementById('divPreviewHeader').style.display = 'inline'; } catch(e) {} } function parentFocus() { try { window.opener.focus(); } catch(e) {} } function parentRefresh() { try { window.opener.windowRefresh(); } catch(e) {} } function Collapse(sID, bCollapse) { var oCaption = document.getElementById(sID + "_caption"); var oBody = document.getElementById(sID + "_body"); var bDoCollapse = (bCollapse || (bCollapse == null && oCaption.className == 'stUncollCaption')); if(bDoCollapse) { oCaption.className = 'stCollCaption'; oBody.className = 'stCollBody'; eval("oCaption.innerHTML = " + sID + "_CollCaption;"); eval("try {" + sID + "_OnCollapse();} catch(e) {};"); } else { oCaption.className = 'stUncollCaption' oBody.className = 'stUncollBody'; eval("oCaption.innerHTML = " + sID + "_UncollCaption;"); eval("try {" + sID + "_OnUncollapse();} catch(e) {};"); } } function hideElements() { if (document.all) { for (i = 0; i < document.all.tags('SELECT').length; i++){ obj = document.all.tags('SELECT')[i]; if (!obj || !obj.offsetParent) continue; obj.style.visibility = 'hidden'; } for (i = 0; i < document.all.tags('IFRAME').length; i++){ obj = document.all.tags('IFRAME')[i]; if (!obj || !obj.offsetParent) continue; obj.style.visibility = 'hidden'; } } } function showElements() { if (document.all) { for (i = 0; i < document.all.tags('SELECT').length; i++) { obj = document.all.tags('SELECT')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = ''; } for (i = 0; i < document.all.tags('IFRAME').length; i++) { obj = document.all.tags('IFRAME')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = ''; } } } var sTimingReport = ""; var iTimeEvalRecursion = 0; function TimeEval(sCommand, sDesc) { iTimeEvalRecursion++; var dStart = new Date(); eval(sCommand); var dEnd = new Date(); var sDiff = DateDiffString(dStart, dEnd); for(i=0; i=0) iAfterDecimal++; } } if(iAfterDecimal == -1) { sNewString += ','; iAfterDecimal = 0; } for(; iAfterDecimal < iDecimals; iAfterDecimal++) sNewString += '0'; return(sNewString); } function WizNextOnEnter() { eCode = event.keyCode; switch (eCode) { case 13: // Enter event.keyCode = 0; WIZdoNext(); break; } } // removes leading and trailing spaces from a string function trim(s) { return ltrim(rtrim(s)); } // removes leading spaces from a string function ltrim(s) { while (s.length > 0 && s.charAt(0) == ' ') s = s.substr(1, s.length); return s; } // removes trailing spaces from a string function rtrim(s) { while (s.length > 0 && s.charAt(s.length - 1) == ' ') s = s.substr(0, s.length - 1); return s; }