// Popup Window Version 1.0.2
// Written by Speedwell.
// Last Edited: 02/09/2003

// To reference the include file
// Place the following into the <head></head> section of the page
// <script language="Javascript" src="/common/popup.js"></script>

// Explanation of variables
// --  thisURL  : The page to open in a new window.
// --  winName  : The window name.
// --  wd       : The width of the new popup window.
// --  ht       : The height of the new popup window.
// --  scrlbars : Do you want the popup window to have scrollbars?
// --  resizing : Do you want to allow the user to resize the popup window?

// To call the function
// javascript:Popup('filename.htm','WindowPopup',600,300,'no','no');

function Popup(thisURL,winName,wd,ht,scrlbars,resizing){
  NewWindow = window.open(thisURL,winName,"toolbar=no,width=" + wd + ",height=" + ht + ",location=no,directories=no,status=yes,menubar=no,scrollbars=" + scrlbars + ",resizable=" + resizing);

  // Don't Do the Focus in IE 3
  if (!((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.substring(0, 3) < "3")))
  {
		NewWindow.focus();
  }
}

// --------------------------------
// This function determines what your screen resolution is and then creates a popup window of that particular size.

// To call the function
// javascript:MaxPopup('filename.htm','WindowPopup');

function MaxPopup(thisURL,winName) {
	maxWindow = "height=" + (screen.availHeight-25) + ",width=" + (screen.availWidth-10) + ",top=0,left=0";
	window.open(thisURL,winName,maxWindow);
}


// --------------------------------
// This function creates a popup in the center of the screen.

// To call the function
// javascript:MidPopup('filename.htm','WindowPopup',600,300,'no','no');

function MidPopup(thisURL2,winName2,wd2,ht2,scrlbars2,resizing2) {
	NewWin2 = window.open(thisURL2,winName2,"toolbar=no,width=" + wd2 + ",height=" + ht2 + ",location=no,directories=no,status=yes,menubar=no,scrollbars=" + scrlbars2 + ",resizable=" + resizing2 + ",top=" + ((screen.availHeight/2)-(ht2/2)) + ",left=" + ((screen.availWidth/2)-(wd2/2)));
}