// JavaScript Document
function showDiv(dv)
{
	document.getElementById(dv).style.display = 'block';
}

function hideDiv(dv)
{
	document.getElementById(dv).style.display = 'none';	
}

function autoDiv(dv)
{
	if (document.getElementById(dv).style.display == 'none')
	{
		document.getElementById(dv).style.display = 'block';
	}
	else{
		document.getElementById(dv).style.display = 'none';	
	}
}

function submitonce(theform){
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById){
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++){
			var tempobj=theform.elements[i]
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
			//disable em
			tempobj.disabled=true
		}
	}
}

// For View Cart
function inputVal(val)
{
	document.form.action.value = val;
}

function checkAll()
{
	for(var i=0; i < document.form.elements.length; i++)
	{
		var e = document.form.elements[i];
		if(e.name != "allchk"){
			e.checked = document.form.allchk.checked;
		}
	}
}
