/* <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
BHA Window Open Function
This function will Open up a new Window in the middle of the page.

Properties:
[.open] ([url],[name][w][h][scroll])


BHA_WindowOpen( 'New url to open',
				'New name of window',
				Width of New Window,
				Height of New Window,
				'Yes or No for scroll bar')
			
** NOTE all strings must be enclosed in "" or ''

How to Access the BHA Window Open Function:

Put this in the page to access the BHA browser object.
<script language="javascript" src="/systems/global/scripts/BHA_WindowOpen.js"></script>

Example:

Pseudo Call,
<a href="javascript:BHA_WindowOpen('myURL.asp','newWin',444,544,'yes')">Open Window</a>

Event Call,
onlick = "BHA_WindowOpen('MyOtherURL.asp','AnotherWin',500,600,'no')"
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>*/

function BHA_WindowOpen(url,name,w,h,scroll)
{
	
	// Work around for Netscape4.7 to allow spaces in the title
	// of the job.
	if(url.indexOf("title=") > -1)
	{
		DocURL = url; //document to open 
		protocolIndex = url.indexOf("title="); // search for the indexof
		urlresult=DocURL.substring(protocolIndex+6,url.length);
		newURL = DocURL.substring(0,protocolIndex);                            
		newnew = newURL + escape(urlresult);
	}
	else
	{
		// if title was not found, then just use url
		// as new title
		newnew = url;

	}

	var win = null;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no'
	win=window.open(newnew,name,settings);
	
	if(parseInt(navigator.appVersion) >= 4)
	{
		win.focus();
	}
}  