<!--

// -----------------------
// Layer Hide or display...

var state = '';
function showhidediv(layer_ref) {
	if (state == 'visible') {
		state = 'hidden';
	}else{
		state = 'visible';
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
	}
	if (document.getElementById && !document.all) {
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
	}
}
function toggleDisplay(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'none')
		e.style.display = 'block';
	else
		e.style.display = 'none';
}
function hidediv(layer_ref){
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = 'hidden'");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = 'hidden';
	}
	if (document.getElementById && !document.all) {
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = 'hidden';
	}
}
function showdiv(layer_ref){
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = 'visible'");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = 'visible';
	}
	if (document.getElementById && !document.all) {
		document.getElementById(layer_ref).style.visibility = 'visible';
	}
}

function toggleDiv(divToDisplay,divToHide,divToHideAlso){
	document.getElementById(divToHide).style.display = "none";
	if(divToHideAlso!=""){
		document.getElementById(divToHideAlso).style.display = "none";
	}
	document.getElementById(divToDisplay).style.display = "block";
}
function hideAllProducts(){
		document.getElementById('product1').style.display = "none";
		document.getElementById('product2').style.display = "none";
		document.getElementById('product3').style.display = "none";
		document.getElementById('product4').style.display = "none";
		document.getElementById('product5').style.display = "none";
		document.getElementById('product6').style.display = "none";
	}
function setDisplay(t,a){
	var divt = "product"+t;
	var diva = "product"+a;
	var divy = "product"+t+"y";
	var divw = "product"+t+"w";
	hideAllProducts();
	document.getElementById(diva).style.display = "none";
	document.getElementById(divy).style.display = "none";
	document.getElementById(divw).style.display = "inline";
	document.getElementById(divt).style.display = "block";
}
function unsetDisplay(t,a){
	var divt = "product"+t;
	var diva = "product"+a;
	var divy = "product"+t+"y";
	var divw = "product"+t+"w";
	hideAllProducts();
	document.getElementById(divt).style.display = "none";
	document.getElementById(divw).style.display = "none";
	document.getElementById(diva).style.display = "block";
	document.getElementById(divy).style.display = "inline";

}

function buyPaypal(formfrm,txtname,txtamount,txtshipping,txttax){
	document.paypalform.item_name.value = txtname;
	document.paypalform.amount.value = parseFloat(txtamount);
	document.paypalform.shipping.value = txtshipping;
//	document.paypalform.tax.value = txttax;
//	document.paypalform.tax.value = parseFloat(txtamount) * 0.12;
	document.paypalform.submit();
}
function addPaypal(txtname,txtamount,txtshipping,txttax){
	document.paypalcart.item_name.value = txtname;
	document.paypalcart.amount.value = parseFloat(txtamount);
	document.paypalcart.shipping.value = txtshipping;
//	document.paypalcart.tax.value = txttax;
//	document.paypalcart.tax.value = parseFloat(txtamount) * 0.12;	
	document.paypalcart.submit();
}
function addPaypalFromOpener(txtname,txtamount,txtshipping,txttax){
	window.opener.document.paypalcart.item_name.value = txtname;
	window.opener.document.paypalcart.amount.value = parseFloat(txtamount);
	window.opener.document.paypalcart.shipping.value = txtshipping;
//	window.opener.document.paypalcart.tax.value = txttax;
//	window.opener.document.paypalcart.tax.value = parseFloat(txtamount) * 0.12;	
	window.opener.focus();
	window.opener.document.paypalcart.submit();
	window.close();
}
function openupdater(tpage){

	var uptr = window.open(tpage,'enhancements','width=450, height=590, resizable=yes, scrollbars=yes, status=no');
	uptr.focus();
}

//-----------------------------
// Tooltip Feature
//-----------------------------
var thedoc = top.document;
var tooltip;
var lasttext;

var eventX = null;
var eventY = null;


function showToolTip(evt,text,x,y,w) {

	// req ie 5.5+
	if (navigator.userAgent.indexOf('MSIE') > 0) isIE = true; else isIE = false;

	if (text.length == 0) return true;

	if (!(tooltip)) {
		if (isIE) {
			tooltip = window.createPopup();
			bod = tooltip.document.body;
		} else {
			tooltip = document.createElement('DIV'); //new Div('hello');
			document.body.appendChild(tooltip);
			bod = tooltip;
		}
		if (isIE) {
			bod.scroll = "no";
			bod.leftMargin = "0";
			bod.topMargin = "0";
			bod.rightMargin = "0";
			bod.bottomMargin = "0";
		}
		bod.style.cssText = "position:fixed; padding:2px 4px; margin-bottom:2px; background:#FFFFE7; border:1px solid black; font-size:8pt; color:#000000; font-weight: normal; font-family:tahoma,arial";

	} else if (isIE) {
		bod = tooltip.document.body;
	} else {
		bod = tooltip;
	}

	bod.innerHTML = text;

	if (isIE) {
		divX = top.screenLeft + evt.clientX + 6 + x;
		divY = top.screenTop + evt.clientY + 12 + y;
		tooltip.show(divX, divY, w, bod.scrollHeight)	;
	} else {
		tooltip.style.left = evt.clientX + 6 + 'px';
		tooltip.style.top = evt.clientY + 12 + 'px';
		if(w!=0){
			tooltip.style.width = w + 'px';
		}
		tooltip.style.visibility = 'visible';
	}

}

function hideToolTip() {
	if (!(tooltip)) return;
	if (isIE)
		tooltip.hide();
	else
		tooltip.style.visibility = 'hidden';
}

var contentR = false;
   try {
     contentR = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       contentR = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         contentR = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         contentR = false;
       }
     }
   }
   if (!contentR){
     alert("Error initializing XMLHttpRequest1! Browser does not support AJAX.");
	}
	var cartR = false;
   try {
     cartR = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       cartR = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         cartR = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         cartR = false;
       }
     }
   }
   if (!cartR){
     alert("Error initializing XMLHttpRequest2! Browser does not support AJAX.");
	}

function DisplayResult(request,divID){
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById(divID).innerHTML = request.responseText;
		}
	}
}


//-->