//********NOTE- Please read the function documentation to properly utilize the window open function

/*function to open a new window using customizable window attributes OR by just using default attributes.

The function takes a slew of parameters as shown below.  A description of each variable and it's purpose follows:

theURL --  is the actual url of the HTML page which you want to open in the 		     new window, it can be written as an absolute or relative path

custom -- is the variable which you must use to indicate whether or not you will be customizing the new window, setting custom = 1 will tell the function that you do want to customize the window, setting the custom variable = 0(or anything else) or not setting it will tell the function you want to use the default window attributes

w and h -- are the width and height parameters for the new window, these need to be set if you are going to customize the window, they are pixel based values

resize, stat, tool, loc, menu, scroll -- are all variables which you can set to display certain window attributes for the new window.  Setting any or all of these variables = 0(false), tells the function that the attribute specified by the variable will NOT be displayed in the new window, conversely setting any or all of the variables to any other INTEGER(for clarity's sake, use the integer, 1) value will indicate to the function that the attribute specified should be displayed.  The variables equate to the window attributes as follows:
resize = resizable, allowing the user the ability to resize the new window
stat = status bar, will display the status bar if true
tool = toolbar, will display the toolbar if true
loc = the input field for entering urls directly will be displayed if true
menu = menubar, will be displayed if true
scroll = scrollbars, will be displayed, if necessary, if true

x and y -- are pixel based values which you will use to position the top/left corner of the new window based on the assumption that x = 0 and y = 0 is the top/left coordinate of the browser. x = left/right positioning, y =top/bottom positioning.

REMEMBER:  If you are going to customize the window, you need to set custom = 1 and you have to include all of the additional variables.  Failing to include a variable or variables will effect the new window display. It may display as a default type window(if you provide no variables) it may display not as intended(if you mistakenly leave out one or more variables).

Again, use custom = 0 for the default window.

*/

function ow(theURL,custom,w,h,resize,stat,tool,loc,menu,scroll,x,y)

//determine browser name and version.  Four options: netscape 4.x, netscape 6.0, IE 4.0 or greater, and other browsers	

	{
							
		if ((navigator.appName  == "Netscape")	&& (parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5))	{
			
			browser = "netscape";			
		}
		else if ((navigator.appName == "Netscape") && (parseFloat(navigator.appVersion) >= 5))	{
			browser ="netscape6";
		}
		else if ((navigator.appName  == "Microsoft Internet Explorer") 	&& (parseFloat(navigator.appVersion) >= 4))	{
			browser = "ie";			
		}
		else	{
			browser = "altBrowser";
		}
	
//make sure that either 2 or 12 arguments are passed, if not provide the default window

if (arguments.length == 2 || arguments.length == 12) {	
		
//since netscape and IE have different naming schema for the window positioning properties, it is necessary to check for browser type as performed above.  This will serve the correct parameter names as variables in the window.open function which actually opens the new window as can be seen below.

if (custom == 1){
	
	if (browser  == "netscape")	{
			window.open(theURL,"","width=" + w + ",height=" + h + 						",resizable=" + resize + ",status=" + stat + ",toolbar=" + tool + ",location=" + loc + ",menubar=" + menu + ",scrollbars=" + scroll + ",screenX=" + x + ",screenY=" + y)
		}
		
	if (browser == "netscape6")	{							
			window.open(theURL,"","width=" + w + ",height=" + h + 						",resizable=" + resize + ",status=" + stat + ",toolbar=" + tool + ",location=" + loc + ",menubar=" + menu + ",scrollbars=" + scroll + ",screenX=" + x + ",screenY=" + y)
	}
		
	else if (browser == "ie")	{
		
window.open(theURL,"","width=" + w + ",height=" + h + ",resizable=" + resize + ",status=" + stat + ",toolbar=" + tool + ",location=" + loc + ",menubar=" + menu + ",scrollbars=" + scroll + ",left=" + x +",top=" + y)
		}		
		
	else {
		
window.open(theURL,"","width=" + w + ",height=" + h + ",resizable=" + resize + ",status=" + stat + ",toolbar=" + tool + ",location=" + loc + ",menubar=" + menu + ",scrollbars=" + scroll)
		}			
		
	}

else {

	if (browser  == "netscape" || "netscape6")	{
			window.open(theURL,"","width=640,height=480,resizable=yes,status=yes,toolbar=yes,history=no,location=yes,menubar=no,scrollbars=yes,screenX=25,screenY=50")
		}
		
	else if (browser == "ie")	{
		
window.open(theURL,"","width=640,height=480,resizable=yes,status=yes,toolbar=yes,history=no,location=yes,menubar=no,scrollbars=yes,left=25,top=50")
		}		
		
	else	{
		
window.open(theURL,"","width=640,height=480,resizable=yes,status=yes,toolbar=yes,history=no,location=yes,menubar=no,scrollbars=yes")
		}			
		
	} 
}
else{
	window.open(theURL,"","width=640,height=480,resizable=yes,status=yes,toolbar=yes,history=no,location=yes,menubar=no,scrollbars=yes")
}
}
