// // THIS LINE LOADS THE JS LIBRARY FOR THE WINDOW COMPONENT // // // // This script is dependent on the pop-up scripts in awCalendarPopUp.js // Global popup-reference variable var awPopUp=null; //add window div document.write("
"); //add local prompt div document.write(""); // JAVASCRIPT FUNCTION -- DOES NOTHING (USED FOR THE HREF) function doNothing() { } // SET THE INITIAL VALUE OF THE GLOBAL DATE FIELD function setReturnField(RtnFld1, RtnFld2, RtnFld3, RtnFld4, RtnFld5, RtnFld6, RtnFld7, RtnFld8, RtnFld9, RtnFld10) { // ASSIGN THE INCOMING FIELD OBJECT TO A GLOBAL VARIABLE if(RtnFld1 != null) Local1 = RtnFld1; if(RtnFld2 != null) Local2 = RtnFld2; if(RtnFld3 != null) Local3 = RtnFld3; if(RtnFld4 != null) Local4 = RtnFld4; if(RtnFld5 != null) Local5 = RtnFld5; if(RtnFld6 != null) Local6 = RtnFld6; if(RtnFld7 != null) Local7 = RtnFld7; if(RtnFld8 != null) Local8 = RtnFld8; if(RtnFld9 != null) Local9 = RtnFld9; if(RtnFld10 != null) Local10 = RtnFld10; } // SET FIELD VALUE TO THE SELECTED DATA AND CLOSE THE WINDOW function returnField(Rtn1, Rtn2, Rtn3, Rtn4, Rtn5, Rtn6, Rtn7, Rtn8, Rtn9, Rtn10, touchdev) { // SET THE VALUE OF THE FIELD THAT WAS PASSED TO THE WINDOW if(Rtn1 != null) Local1.value = Rtn1; if(Rtn2 != null) Local2.value = Rtn2; if(Rtn3 != null) Local3.value = Rtn3; if(Rtn4 != null) Local4.value = Rtn4; if(Rtn5 != null) Local5.value = Rtn5; if(Rtn6 != null) Local6.value = Rtn6; if(Rtn7 != null) Local7.value = Rtn7; if(Rtn8 != null) Local8.value = Rtn8; if(Rtn9 != null) Local9.value = Rtn9; if(Rtn10 != null) Local10.value = Rtn10 ; // CLOSE THE WINDOW //top.newWin.close(); //awPopUp.hidePopup(); //determine local or parent popup to close UseLocal='N'; if (typeof awPopUp!=='undefined') { if(awPopUp!==null) { UseLocal='Y'; } } //if local screen has popup, hide it if(UseLocal=='Y') { awPopUp.hidePopup(); } else { //otherwise use parent to hide div parent.awPopUp.hidePopup(); } if (touchdev!=='Y') { // GIVE FOCUS BACK TO THE 1st Return FIELD Local1.focus(); // SELECT THE FIELD FOR EDIT Local1.select(); } // FIRE THE ONCHANGE EVENT if(Local1.fireEvent) { Local1.fireEvent("onchange") } else { //On Gecko based browsers if(document.createEvent) { var evt = document.createEvent('HTMLEvents'); if(evt.initEvent) { evt.initEvent('change', true, true); } if(Local1.dispatchEvent) { Local1.dispatchEvent(evt); } } } } // POPUP A WINDOW function showWindow(winPrefs, parms, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10) { var AddParms = ""; var now = new Date(); var winName = now.getTime(); if(Key1 != null) if(Key1.value != "") AddParms = "KV1=" + Key1.value + "&"; if(Key2 != null) if(Key2.value != "") AddParms = AddParms + "KV2=" + Key2.value + "&"; if(Key3 != null) if(Key3.value != "") AddParms = AddParms + "KV3=" + Key3.value + "&"; if(Key4 != null) if(Key4.value != "") AddParms = AddParms + "KV4=" + Key4.value + "&"; if(Key5 != null) if(Key5.value != "") AddParms = AddParms + "KV5=" + Key5.value + "&"; if(Key6 != null) if(Key6.value != "") AddParms = AddParms + "KV6=" + Key6.value + "&"; if(Key7 != null) if(Key7.value != "") AddParms = AddParms + "KV7=" + Key7.value + "&"; if(Key8 != null) if(Key8.value != "") AddParms = AddParms + "KV8=" + Key8.value + "&"; if(Key9 != null) if(Key9.value != "") AddParms = AddParms + "KV9=" + Key9.value + "&"; if(Key10 != null) if(Key10.value != "") AddParms = AddParms + "KV10=" + Key10.value + "&"; parms = parms + "&" + AddParms; //detect if in a frame, and the frame[0],[1] names, and pass them too inframe='Y'; frame0name=''; frame1name=''; if (top === self) {inframe='N'}; if (inframe=='Y') {try{frame0name=parent.frames[0].name} catch(e) {frame0name=''}}; if (inframe=='Y') {try{frame1name=parent.frames[1].name} catch(e) {frame1name=''}}; parms = parms + "frame0name=" + frame0name; parms = parms + "&frame1name=" + frame1name; // DISPLAY THE PICK LIST IN A NEW POPUP WINDOW //top.newWin = window.open("/sys/win.asp?" + parms, winName, winPrefs + ",resizable=1,scrollbars=1,menubar=0,toolbar=0,dependent=0"); //top.newWin.focus(); var valpair = ''; var screenx = ''; var screeny = ''; var divwidth = ''; var divheight = ''; var Prefs = winPrefs.split(','); valpair = Prefs[0].split('='); // width divwidth = valpair[1]; valpair = Prefs[1].split('='); // height divheight = valpair[1]; valpair = Prefs[2].split('='); // x-coordinate (recalculated below with centering logic) screenx = valpair[1]; valpair = Prefs[3].split('='); // y=coordinate (recalculated below with centering logic) screeny = valpair[1]; // awPopUp = new PopupWindow('windiv'); // awPopUp.populate('