/* Global functions for Sapient.com
Nav images - utilOn, utilOff
Printing - printPage
NN4 resize bug - resizeFix
*/

/*
Utility nav image swap
*/

// Initialize utility nav images
if (document.images) {
	sitemapOff = new Image(31,68);
	sitemapOff.src = "index4_archivos/sitemap_main_off.gif";
	careersOff = new Image(31,128);
	careersOff.src = "index4_archivos/careers_main_off.gif";
	contactOff = new Image(31,107);
	contactOff.src = "index4_archivos/contactus_main_off.gif";
	extranetOff = new Image(31,134);
	extranetOff.src = "index4_archivos/extranet_main_off.gif";
    
    sitemapOn = new Image(31,68);
	sitemapOn.src = "index4_archivos/sitemap_on.gif";
	careersOn = new Image(31,128);
	careersOn.src = "index4_archivos/careers_on.gif";
	contactOn = new Image(31,107);
	contactOn.src = "index4_archivos/contactus_on.gif";
	extranetOn = new Image(31,134);
	extranetOn.src = "index4_archivos/extranet_on.gif";
}


function utilOn(imgName) {
    if (document.images) { 
        imgOn = eval(imgName + "On.src");
        document [imgName].src = imgOn;
	}
}

function utilOff(imgName) {
	if (document.images) {
        imgOff = eval(imgName + "Off.src");
        document [imgName].src = imgOff;
	}
}

/*
The javascript function printPage() is called from /includes/global/footer_print.inc, 
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();
}

/*
Code for Netscape 4 Resize bug 
This is a 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;
	}}

}
