var IE = (navigator.appName == "Microsoft Internet Explorer") ? 1 : 0;
var NS = (navigator.appName == "Netscape") ? 1 : 0;


function setSize() {
	alert(document.size_menu.sizePicker.value);
}



// open a window with the proper big image inside
function openImageWindow(imageName) {
	eval('imageSrc=document.images.' + imageName + '.src');
	pageSrc="productshot.php?img=" + imageSrc;
	popup(pageSrc,600,600);
}

// open a generic popup window, specifying source and size

	function popup(source,width,height) {
		
		now = new Date()
		window_name = now.getTime()
		popup_window = window.open(source,window_name,"width="+String(width)+",height="+String(height)+",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=yes");
		popup_window.focus()
	}


// rollover

	function swap(name,state) {
		eval('document.images.' + name + '.src = ' + name + '_' + String(state) + '.src')
	}
	


// make my preloads for image swaps

	function makePreloads(names) {
		names = names.split(",")
		
		for (i=0; i < names.length; i++) {
			thisName = names[i]
			eval(thisName+"_0 = new Image()")
			eval(thisName+"_0.src = '/images/"+thisName+"_0.gif'")
			eval(thisName+"_1 = new Image()")
			eval(thisName+"_1.src = '/images/"+thisName+"_1.gif'")
		}
	}
	
	function openContract() {
		var load = window.open('contract.html','','scrollbars=no,menubar=no,width=810,height=610,resizable=yes,toolbar=no,location=no,status=no');
}

	function openPopup(source) {
		var load = window.open(source,'','scrollbars=no,menubar=no,width=810,height=610,resizable=yes,toolbar=no,location=no,status=no');
}
		

