function updateCart(theForm){
		href="shoppingcart.asp?action=update&keys=" + theForm.keys.value + "&vals=" + theForm.vals.value;
		location.href=href;
}


function flagItem(strName, qty){
rExp = /qty/gi;
itemId = strName.replace(rExp, '')
var theForm = document.forms[0];
theForm.keys.value+=itemId + ","
theForm.vals.value+=qty + ","

}

function confEmpty(){

	var empty = confirm("Are you sure you want to remove all items from your shopping cart?");

	if	(empty){location.href="shoppingCart.asp?action=Empty&refer=viewCart";}


}

function toggleVis(visi){
	
	var obj = (document.getElementById)?document.getElementById("saved") : (document.all&&!document.getElementById)?document.all["saved"] : (document.layers)? document.layers["saved"] : 0;
	var styleRef = (!bw.ns4)?obj.style : obj
	styleRef.visibility=visi;
	//	obj.style.visibility = visi
	


}



function checkIt(sw){

	
	if(sw){
		//user is re-saving a previously saved cart
		//no need to ask the user to name it again
		HREF = "saveCart.asp?action=reSaveCart"
		location.href = HREF
		
	}
	else{

		//saving cart for first time
		//ask user to name their cart
		toggleVis("visible");
	}


}


function saveCart(){
	var theForm = document.forms[0]
	var strName = theForm.svName.value;
	HREF = "saveCart.asp?action=&name=" + strName;
	//alert(HREF)
	//var HREF = "saveCart.asp?action=&name=
	location.href = HREF;
}