
// To add a Popup Window use this line in the HTML
// <a href=# onclick="javascript:popUp(URL, window width, window Height);return false;"></a>

var popup = null;

function popUp(page,PWidth,PHeight) { 
 	if (popup){
		if (!popup.closed){
			//  Close any open popup windows before opening a new one 
			popup.close()
			}
		}
	//  Set popup window variable back to null
	//  If window is closed variable will still have a value
	popup = null 
 	//	Define Top & Left properties to center any size popup window
	var PTop = (screen.height/2)-(PHeight/2)
 	var PLeft = (screen.width/2)-(PWidth/2)
 	
	popup = window.open(page,"popup", "TOP=" + PTop + ",LEFT=" + PLeft + ",HEIGHT=" + PHeight + ",WIDTH=" + PWidth)
 	//  Set the popup window to the forefront
	popup.focus()
 }
 
// Additional function for resizable popup window with scrollbars and status bars
// To add a Popup Window use this line in the HTML
// <a href="javascript: void popUpFeatured(URL, window width, window Height)"></a>

function popUpFeatured(page,PWidth,PHeight) { 
 	if (popup){
		if (!popup.closed){
			//  Close any open popup windows before opening a new one 
			popup.close()
			}
		}
	//  Set popup window variable back to null
	//  If window is closed variable will still have a value
	popup = null 
 	//	Define Top & Left properties to center any size popup window
	var PTop = (screen.height/2)-(PHeight/2)
 	var PLeft = (screen.width/2)-(PWidth/2)
 	
	popup = window.open(page,"popup", "TOP=" + PTop + ",LEFT=" + PLeft + ",HEIGHT=" + PHeight + ",WIDTH=" + PWidth + ",resizable,scrollbars,status" )
 	//  Set the popup window to the forefront
	popup.focus()
 }
 
 
 
 
// function for presenting user with popup indicating that they're
// leaving the site before continuing to an external page.

var mainform = new Object;

// for this function to work, the page must contain a form as shown:
//	<form name="f1" method="post" action="">
//		<input type="hidden" name="loc_ref" value="error.html">
//	</form>

function exitingWin(loc)
{
 if (is_ie || is_nav5up){
    mainform = document.f1;
	var newTop = (375) / 2;
	var newLeft = (360) / 2;
    mainform.loc_ref.value = loc; 
	XLinkWindow = window.open("leaving.html","Leave","TOP=" + newTop + ",LEFT=" + newLeft + ",width=400,height=180");

} else {
    mainform = document.content.document.f1;
	var newTop = (375) / 2;
	var newLeft = (360) / 2;
    mainform.loc_ref.value = loc; 
	XLinkWindow = window.open("leaving.html","Leave","TOP=" + newTop + ",LEFT=" + newLeft + ",width=400,height=180");
   }
}

function exitingSafe(loc)
{
 if (is_ie || is_nav5up){
    mainform = document.f1;
	var newTop = 50;
	var newLeft = 180;
    mainform.loc_ref.value = loc; 
	XLinkWindow = window.open("leaving_safe.html","Leave","TOP=" + newTop + ",LEFT=" + newLeft + ",width=430,height=500,resizable,scrollbars");

} else {
    mainform = document.content.document.f1;
	var newTop = 50;
	var newLeft = 180;
    mainform.loc_ref.value = loc; 
	XLinkWindow = window.open("leaving_safe.html","Leave","TOP=" + newTop + ",LEFT=" + newLeft + ",width=430,height=500,resizable,scrollbars");
   }
}
