function upgprice(joel,addon,upgradenumber,upgradeprice,currentproductprice,irok,upgradetype){
var ajaxRequest;  // The variable that makes Ajax possible!
	var joel, addon, upgradenumber, upgradeprice, currentproductprice, irok, upgradetype;


	var irlampa = document.getElementById('IRLAMP1');
	var irlampb = document.getElementById('IRLAMP2');
	
if (irok == "noir" && upgradetype == "Camera Type") {
	if (irlampa) {document.getElementById('IRLAMP1').innerHTML="<font color='red'>NOT COMPATIBLE.</font>";}
	if (irlampb) {document.getElementById('IRLAMP2').innerHTML="<font color='red'>NOT COMPATIBLE.</font>";}
	
} else if (irok == "yesir" && upgradetype == "Camera Type") {
	if (irlampa) {document.getElementById('IRLAMP1').innerHTML="";}
	if (irlampb) {document.getElementById('IRLAMP2').innerHTML="";}
}


	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var userInput = document.getElementById('theprice').innerHTML;
			newtotal = (parseFloat(userInput) + parseFloat(ajaxRequest.responseText))
			document.getElementById('theprice').innerHTML=ajaxRequest.responseText;
		}
	}
	ajaxRequest.open("GET", "_update_pricing.php?product=" + joel + "&a=" + addon + "&un=" + upgradenumber + "&up=" + upgradeprice + "&cpp=" + currentproductprice, true);
	ajaxRequest.send(null); 
}





function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = ""
     }
 }
 
 
 
 
 
function setVisibility(xLayer,yLayer) {
	var xLayer = document.getElementById(xLayer);
	var yLayer = document.getElementById(yLayer);
	var shiptois = document.getElementById('shiptois');
	xLayer.style.display = "none";
	yLayer.style.display = "block";
	shiptois.style.display = "block";
}





function displaypaymentmethod() {
	var joel;
	joel = document.orderform.paymentmethod.options[document.orderform.paymentmethod.selectedIndex].value;

	var bycreditcard = document.getElementById('bycreditcard');
	bycreditcard.style.display = "none";
	
	var byamex = document.getElementById('byamex');
	byamex.style.display = "none";
	
	var bycheck = document.getElementById('bycheck');
	bycheck.style.display = "none";
	
	var moneyorder = document.getElementById('moneyorder');
	moneyorder.style.display = "none";
	
	var westernunion = document.getElementById('westernunion');
	westernunion.style.display = "none";
	
	var yLayer = document.getElementById(joel);
	yLayer.style.display = "block";
}




function displaypaymentmethod2() {
	var joel;
	joel = document.orderform.paymentmethod.options[document.orderform.paymentmethod.selectedIndex].value;

	var bycreditcard = document.getElementById('bycreditcard');
	bycreditcard.style.display = "none";
	
	var byamex = document.getElementById('byamex');
	byamex.style.display = "none";
	
	var bycheck = document.getElementById('bycheck');
	bycheck.style.display = "none";
	
	var moneyorder = document.getElementById('moneyorder');
	moneyorder.style.display = "none";
	
	var westernunion = document.getElementById('westernunion');
	westernunion.style.display = "none";
	
	var bybankwire = document.getElementById('bybankwire');
	bybankwire.style.display = "none";

	var quoteonly = document.getElementById('quoteonly');
	quoteonly.style.display = "none";

	if (joel == "visa") { joel = "bycreditcard"; }
	if (joel == "amex") { joel = "byamex"; }
	if (joel == "mastercard") { joel = "bycreditcard"; }
	if (joel == "discover") { joel = "bycreditcard"; }
	if (joel == "check") { joel = "bycheck"; }
	if (joel == "bankwire") { joel = "bybankwire"; }
	if (joel == "quoteonly") { joel = "quoteonly"; }
	
	var yLayer = document.getElementById(joel);
	yLayer.style.display = "block";
}




function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}



function updateshipping(joel){
	var ajaxRequest;  // The variable that makes Ajax possible!
	var joel;
	var test;
	var signit;
	var crude;
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
document.getElementById('pricing').innerHTML=ajaxRequest.responseText;
		}
	}
	
if(document.getElementById("signaturerequired").checked==true){
	signit = "&signit=yes";
	} else {
		signit = "";
	}

	ajaxRequest.open("GET", "_update_shipping.php?service=" + joel + signit, true);
	ajaxRequest.send(null); 
}








function updateshipping2(joel){
	var ajaxRequest;  // The variable that makes Ajax possible!
	var joel;
	var test;
	var signit;
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
document.getElementById('pricing').innerHTML=ajaxRequest.responseText;
		}
	}
	

	ajaxRequest.open("GET", "_update_shipping.php?service=" + joel, true);
	ajaxRequest.send(null); 
}








function displaycountrybutton() {
	var shipping = document.getElementById('shipping');
	shipping.style.display = "none";

	var startprocess = document.getElementById('startprocess');
	startprocess.style.display = "none";

	var startprocessnonus = document.getElementById('startprocessnonus');


	stcountry = document.calc.country.options[document.calc.country.selectedIndex].value;
	if (stcountry == "USA") {
	shipping.style.display = "block";
	startprocess.style.display = "none";
	startprocessnonus.style.display = "none";
	} else {
	startprocessnonus.style.display = "block";
	}

}

function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}





function updateintlshipping(joel){
	var ajaxRequest;  // The variable that makes Ajax possible!
	var joel;
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
document.getElementById('newshiptotal').innerHTML=ajaxRequest.responseText;
		}
	}
	ajaxRequest.open("GET", "../intship.php?service=" + joel, true);
	ajaxRequest.send(null); 
}


function bookmarksite() {
if ( navigator.appName != 'Microsoft Internet Explorer' )
{ window.sidebar.addPanel("Spy Camera Specialists Inc., spy camera, hidden camera, nanny camera, wireless spycam, nannycam","http://www.spycameras.com/",""); }
else { window.external.AddFavorite("http://www.spycameras.com/","Spy Camera Specialists Inc., spy camera, hidden camera, nanny camera, wireless spycam, nannycam"); } }
