<!--
/* Global functions for Atvantage.com
Printing - printPage
NN4 resize bug - resizeFix
The javascript function printPage() is called from /_gb/includes/footer.asp, 
and it opens a window with content formatted such that it that will fit on a 
standard 8.5x11 sheet of paper when printed.  
*/
var printWin;
function printPage(thePath) {
printWin = window.open(thePath, 'printableWin','width=570,height=400,menubar=yes,toolbar=yes,scrollbars=yes');
printWin.focus();
}
/*
Workaround for a Netscape 4 bug that causes stylesheets to be corrupted when the window is resized.
*/
if (document.layers) {
var widthCheck = window.innerWidth;
var heightCheck = window.innerHeight;
window.onResize = resizeFix;
}
function resizeFix() {
with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)){
if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
document.location.href = document.location.href;
}}
}
function doClear(theText) {
if (theText.value == theText.defaultValue) {
theText.value = ""
}
}
function findhome(){
document.F1.submit();
}
function findhome2(){
document.F2.submit();
}
function swapPhoto(imgTo){
document.photo.src = document[imgTo].src;
}
function swapPhoto1(imgTo){
document.photo1.src = document[imgTo].src;
}
function swapPhotoX(imgTo){
document.photoX.src = document[imgTo].src;
}
function swapPhotoZ(imgTo){
document.photoZ.src = document[imgTo].src;
}

var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

function popUpWin(url, type, strWidth, strHeight){
	
	closeWin();
	
	if (type == "fullScreen"){
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=300,top=300";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}


//-->