// JavaScript Document
 
function openComments(id)
{
	comment = document.getElementById('comments_'+id).style.display = 'block';
}

function openDeluxeSign()
{
	deluxe = document.getElementById('deluxeDisplay').style.display = 'block';
}

function opencloseShipping()
{
	shipwindow = document.getElementById('shippingwindow')
	shiptoggle = document.getElementById('ajax_ship')
	shipwindow.style.display = ( shipwindow.style.display == "none" ) ? "block" : "none";
	shiptoggle.innerHTML = "DON'T NEED DELIVERY? Click Here"
}

function setactionCart()
{
	var x = document.forms.recalculate;
	x.action = 'cart.asp?act=chkout'
}


function validate(form,findclass)
{
	var tag = document.body.getElementsByTagName('*');
	var errormsg = document.getElementById('errormsg')
	//var txt = ''
	for(var i=0; i<tag.length; i++) 
	{
		if(tag[i].className == findclass)
			{
				//alert("yes")
				//tag[i].style.className = 'ERROR'
					//confirm(tag[i].name)
				if(tag[i].value == '')
				{
					//alert("no")
					errormsg.style.display = "block"
					errormsg.style.color = "#C00"
					errormsg.style.fontWeight = 'bold'
					errormsg.style.padding = '20px'
					tag[i].style.border = '#C00 solid 3px'
					tag[i].style.marginRight = '18px'
					tag[i].style.background = 'url(/images/ico_checkmark.png) top right no-repeat #fff'
					tag[i].focus();
					return false;
				}
			}
	}
	//sendForm()
}
