image1 = new Image();
image1.src = "../images/products_head_on.gif";
image2 = new Image();
image2.src = "../images/products_head_1off.gif";

function determineObject(targetOBJ) {
	var element = null;
	if(document.all) {
		element = document.all[targetOBJ];
	}
	if (document.getElementById) {
		element = document.getElementById(targetOBJ);
	}
	return element;
}
function showPanel(targetBTN, targetOBJ) {
	var button = determineObject(targetBTN);
	var target = determineObject(targetOBJ);
	var button1 = determineObject('link1');
	var button2 = determineObject('link2');
	var button3 = determineObject('link3');
	var button4 = determineObject('link4');
	var button5 = determineObject('link5');
	var button6 = determineObject('link6');
	var content1 = determineObject('content1');
	var content2 = determineObject('content2');
	var content3 = determineObject('content3');
	var content4 = determineObject('content4');
	var content5 = determineObject('content5');
	var content6 = determineObject('content6');
	button1.setAttribute("class", "productfirstoff");
	button1.setAttribute("className", "productfirstoff");
	button2.setAttribute("class", "productcelloff");
	button2.setAttribute("className", "productcelloff");
	button3.setAttribute("class", "productcelloff");
	button3.setAttribute("className", "productcelloff");
	button4.setAttribute("class", "productcelloff");
	button4.setAttribute("className", "productcelloff");
	button5.setAttribute("class", "productcelloff");
	button5.setAttribute("className", "productcelloff");
	button6.setAttribute("class", "productcelloff");
	button6.setAttribute("className", "productcelloff");
	content1.setAttribute("class", "invisible");
	content1.setAttribute("className", "invisible");
	content2.setAttribute("class", "invisible");
	content2.setAttribute("className", "invisible");
	content3.setAttribute("class", "invisible");
	content3.setAttribute("className", "invisible");
	content4.setAttribute("class", "invisible");
	content4.setAttribute("className", "invisible");
	content5.setAttribute("class", "invisible");
	content5.setAttribute("className", "invisible");
	content6.setAttribute("class", "invisible");
	content6.setAttribute("className", "invisible");
	if(targetBTN == 'link1') {
		button.setAttribute("class", "productfirston");
		button.setAttribute("className", "productfirston");
	} else {
		button.setAttribute("class", "productcellon");
		button.setAttribute("className", "productcellon");
	}
	target.setAttribute("class", "visible");
	target.setAttribute("className", "visible");
	return true;
}
function newWindow(target, width, height, name) {
	var newPane = window.open(target, name, 'toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizable=0,width='+width+',height='+height+',top=100,left=100');
}
function imagePreview(image) {
	var newPane = window.open('', 'accessoryPreview', 'toolbar=0,location=0,scrollbars=0,directories=0,status=0,menubar=0,resizable=0,width=300,height=400,top=100,left=100');
	newPane.document.writeln('<html><head><title>Accessory Preview</title></head><body bgcolor="#FFFFFF">');
	newPane.document.writeln('<table width="100%" align="center" style="width:100%;height:100%;"><tr><td align="center" valign="center">');
	newPane.document.writeln('<a href="javascript:window.close();"><img src="/products/images/accessory/'+image+'" border="0" alt="Click to Close" title="Click to Close" /></a>');
	newPane.document.writeln('<br /><br /><a href="javascript:window.close();"><font face="Arial" size="2" color="#000000">Click Here to Close</a></td></tr></table></body></html>');
	newPane.document.close();
}
function printNow() {
	window.print();  
}
