// JavaScript Document
<!--
function doPreload() {} // This .js file needs to be before all javascripts on other pages

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function countryChange(formpage) {
	var qString = "";

	if(formpage == "shipinfo") {
		ShipContactTitle		= shipinfo.ShipContactTitle.value;
		ShipContactFirstName	= shipinfo.ShipContactFirstName.value;
		ShipContactLastName		= shipinfo.ShipContactLastName.value;
		ShipAddress				= shipinfo.ShipAddress.value;
		ShipAddress2			= shipinfo.ShipAddress2.value;
		ShipCity				= shipinfo.ShipCity.value;
		ShipState				= shipinfo.ShipState.value;
		ShipPostalCode			= shipinfo.ShipPostalCode.value
		ShipPhoneNumber			= shipinfo.ShipPhoneNumber.value;
//		ShipEmailAddress		= shipinfo.ShipEmailAddress.value;
//		ShipEmailAddress2		= shipinfo.ShipEmailAddress2.value;

		qString = '&ShipContactTitle=' + ShipContactTitle + 
			'&ShipContactFirstName=' + ShipContactFirstName + 
			'&ShipContactLastName=' + ShipContactLastName + 
			'&ShipAddress=' + ShipAddress + 
			'&ShipAddress2=' + ShipAddress2 + 
			'&ShipCity=' + ShipCity + 
			'&ShipState=' + ShipState + 
			'&ShipPostalCode=' + ShipPostalCode + 
			'&ShipPhoneNumber=' + ShipPhoneNumber;

	} else if(formpage == "billinfo") {
		BillContactTitle		= billinfo.BillContactTitle.value;
		BillContactFirstName	= billinfo.BillContactFirstName.value;
		BillContactLastName		= billinfo.BillContactLastName.value;
		BillAddress				= billinfo.BillAddress.value;
		BillAddress2			= billinfo.BillAddress2.value;
		BillCity				= billinfo.BillCity.value;
		BillState				= billinfo.BillState.value;
		BillPostalCode			= billinfo.BillPostalCode.value
		BillPhoneNumber			= billinfo.BillPhoneNumber.value;
		BillEmailAddress		= billinfo.BillEmailAddress.value;
		BillEmailAddress2		= billinfo.BillEmailAddress2.value;

		qString = '&BillContactTitle=' + BillContactTitle + 
			'&BillContactFirstName=' + BillContactFirstName + 
			'&BillContactLastName=' + BillContactLastName + 
			'&BillAddress=' + BillAddress + 
			'&BillAddress2=' + BillAddress2 + 
			'&BillCity=' + BillCity + 
			'&BillState=' + BillState + 
			'&BillPostalCode=' + BillPostalCode + 
			'&BillPhoneNumber=' + BillPhoneNumber + 
			'&BillEmailAddress=' + BillEmailAddress + 
			'&BillEmailAddress2=' + BillEmailAddress2;
	}

	return qString;
}

function request(jenk) { // Clone of VBScript's Response.Request() function
	var querystring = location.search.substring(1,location.search.length);	// Skip the "?"
	var x, tmp;

	if(!querystring =="") {
		var varArray = querystring.split("&");
		for(i=0; i<varArray.length; i++) {
			tmp = varArray[i].split("=");
			if(tmp[0] == jenk) {
				x = tmp[1];
				break;
			} // END if()
		} // END for()
	} // END if()

	return x;

} // END function request()




function showhide(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'none')
		e.style.display = 'block';
	else
		e.style.display = 'none';
}

function jenkCheckbox(jenk) { // Changes state of specified checkbox
	var z = document.getElementById(jenk);
	z.checked = (z.checked) ? false : true;
}

function jenkRadiobutton(jenk) { // Selects specified radio button if unchecked
	var z = document.getElementById(jenk);
	if(!z.checked) z.checked = true;
}

//-->