var browserName = navigator.appName; 
var browserVer = parseInt(navigator.appVersion);
var ie4 = "";
var version = "";

if ((browserName == "Netscape" && browserVer >= 3) || (browserName == "Microsoft Internet Explorer" && browserVer >= 4)){  
		version = "n3";
	if (browserName == "Microsoft Internet Explorer" && browserVer >= 4){
		ie4 = true;
	}
	else{
		ie4 = false;
	}
}
else{
	version="n2";
}

if (document.images) {

	/* Active images */
	img1on = new Image();
	img1on.src = "images/shoeon.gif";
	img2on = new Image();
	img2on.src = "images/sockson.gif";
	img3on = new Image();
	img3on.src = "images/gloveson.gif";
	img4on = new Image();
	img4on.src = "images/moreon.gif";

	/* Inactive images */
	img1off = new Image();
	img1off.src = "images/shoeoff.gif";
	img2off = new Image();
	img2off.src = "images/socksoff.gif";
	img3off = new Image();
	img3off.src = "images/glovesoff.gif";
	img4off = new Image();
	img4off.src = "images/moreoff.gif";
}


function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + 'on.src');
	}
}

function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + 'off.src');
	}
}

if (ie4)document.write("<STYLE>.searchInput {border: 2px groove buttonhighlight; }</STYLE>")

function printPage(pid) {
	if (pid && pid != "") {
		var page = "printpage.cfm?action=print&pageid=" + pid;
		var printwindow = window.open(page, 'printwin', 'toolbar,menubar,scrollbars,resizable,status,location,height=400,width=600');
	}
	else {
	alert('This feature is not available for the currently loaded page.');
	}
}
