/* CONTAINS THE FOLLOWING: function window_OpenDialog(winOpener, strURL, strName, varArguments, strFeatures) { function popup_GetFeatures(strPopupLocation, intIdealWidth, intIdealHeight) { */ function window_OpenDialog(winOpener, strURL, strWinName, strWinProps, varWinArgs) { //01-12-07 RMcQ //NOTE: Could use to simulate modality in NetScape, //but that method has problems (e.g., see www.webreference.com/js/tips/000613.html; "Modal Windows in Netscape" by Yehuda Shiran, Ph.D. (Doc Javascript)). if (false) { //(document.all) { winOpener.showModalDialog(strURL, varWinArgs, strWinProps) } else { // var win = winOpener.open(strURL, strWinName, strWinProps); // win.focus(); //02-02-16 RMcQ REPLACED WITH THIS FROM TVG: var win; win = window.open("", strWinName, strWinProps); win.focus(); win.location = strURL; } } function popup_GetFeatures(strPopupLocation, intIdealWidth, intIdealHeight) { //01-10-11 RMcQ //Gets the "sFeatures" argument of the window.open method for a popup. //WARNING: Right-aligned windows will not truncate intIdealWidth, //so intIdealWidth for right-aligned windows must be limited to a size //that will not cause the popup to display outside of the screen area. var intTop; var intLeft; var intHeight; var intWidth; var intPIX_FROM_BOTTOM = 60 //can't explain why it's 60, but this is best var intPIX_FROM_RIGHT = 10 switch (strPopupLocation) { case 'L1' : intTop=160; intLeft= 20; break; case 'L2' : intTop=140; intLeft= 40; break; case 'L3' : intTop=120; intLeft= 60; break; case 'L4' : intTop=100; intLeft= 80; break; case 'L5' : intTop= 80; intLeft=100; break; case 'L6' : intTop= 60; intLeft=120; break; case 'L7' : intTop= 40; intLeft=140; break; case 'L8' : intTop= 20; intLeft=160; break; case 'M' : //all values for 'M' can be calc'ed right here: intHeight = Math.min(intIdealHeight, window.screen.height); intWidth = Math.min(intIdealWidth, window.screen.width); intTop = (window.screen.height - intHeight) * 1 / 4 intLeft = (window.screen.width - intWidth ) / 2 break; case 'R1' : intTop= 80; intLeft=window.screen.width-intIdealWidth- 20; break; case 'R2' : intTop= 60; intLeft=window.screen.width-intIdealWidth- 40; break; case 'R3' : intTop= 40; intLeft=window.screen.width-intIdealWidth- 60; break; case 'R4' : intTop= 20; intLeft=window.screen.width-intIdealWidth- 80; break; } //note that cases L1-L8 have the same result as do cases R1-R4: //(actually all cases are the same here): switch (strPopupLocation) { case 'L1' : case 'L2' : case 'L3' : case 'L4' : case 'L5' : case 'L6' : case 'L7' : case 'L8' : intHeight=Math.min(intIdealHeight, window.screen.height-intTop-intPIX_FROM_BOTTOM); break; case 'R1' : case 'R2' : case 'R3' : case 'R4' : intHeight=Math.min(intIdealHeight, window.screen.height-intTop-intPIX_FROM_BOTTOM); break; } //note that cases L1-L8 have the same result as do cases R1-R4: switch (strPopupLocation) { case 'L1' : case 'L2' : case 'L3' : case 'L4' : case 'L5' : case 'L6' : case 'L7' : case 'L8' : intWidth=Math.min(intIdealWidth, window.screen.width-intLeft-intPIX_FROM_RIGHT); break; case 'R1' : case 'R2' : case 'R3' : case 'R4' : intWidth=intIdealWidth; break; } var strDisplayParams = "scrollbars=yes,resizable=yes,status=yes," + "top=" + intTop + ",left=" + intLeft + ",height=" + intHeight + ",width=" + intWidth; // alert(strDisplayParams); return strDisplayParams; }