/**************************************************************/ // Init is run 'on Load' for all JSPs. // It runs the highlightError function if it's present. function init(){ if ((typeof highlightError) != "undefined") { highlightError(); } } // printThisPage is run 'on Load' when a page is openned in printer-friendly mode // It invokes the browser's print function // function printThisPage() { if ((typeof window.print) != "undefined") { window.print(); } } // openPagePrintFriendly takes the current pages location and adds the print flag // function OpenPagePrintFriendly () { newLoc = new String(); newLoc = window.location.toString(); if (newLoc.charAt(newLoc.length - 1) == "#") newLoc = newLoc.substring(0,newLoc.length-1); newLoc = newLoc + "&print=true"; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(newLoc, '" + id + "', 'resizable=yes');"); } /**************************************************************/ var agt=navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); // Note: Opera and WebTV spoof Navigator. We do strict client detection. // If you want to allow spoofing, take out the tests for opera and webtv. var NS = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); var NS4 = (NS && (is_major == 4)); var isResized = false; //to control resize in NS4 function pageResize() { isResized = true; if (NS4) history.go(0); } //to get the selected value from the list box (for NS4, IE is OK with this too) function findSelectValue(fieldNameWithForm) { for (i = 0; i < fieldNameWithForm.length; i++) { if (fieldNameWithForm[i].selected ) { return fieldNameWithForm[i].value; } } } function selectEditor(link) { var sLinkSrc = showModalDialog("/cms/SelectEditor.jsp","","dialogHeight: 300px; dialogWidth: 250px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: Yes; status: No;"); if(sLinkSrc == null) { return false; } link = link + "&action=InsertNewElement&editor=" + sLinkSrc; window.location.href = link; return false; }