function clearSizes()
{
  document.productForm.s.checked = 0;
  document.productForm.m.checked = 0;
  document.productForm.l.checked = 0;
  document.productForm.xl.checked = 0;
  document.productForm.xxl.checked = 0;
  document.productForm.xxxl.checked = 0;
  document.productForm.suffix.value='';
}

function osClear()
{
  document.productForm.onesize.checked = 0;
}

function delconf(formname)
{
  if(window.confirm('Are you sure want to remove this item?'))
  {
    var obj = eval('document.'+formname);
    obj.submit();
  }
}

function verifySubmit(type)
{
	var errormsg = "";
	var pattern = /[a-z]/i;
	
	if( type == "Guest" && document.shippingForm.fname.value == '')
		errormsg = errormsg + "First Name\n";
	
	if( type == "Guest" && document.shippingForm.lname.value == '')
		errormsg = errormsg + "Last Name\n";
	
	if( type == "Guest" && document.shippingForm.address2.value == '' && document.shippingForm.address1.value=='' )
		errormsg = errormsg + "Address\n";
	
	if( type == "Guest" && document.shippingForm.city.value == '')
		errormsg = errormsg + "City\n";
	
	if( type == "Guest" && document.shippingForm.zip.value == '')
		errormsg = errormsg + "Zip\n";
	
	if( type == "Guest" && document.shippingForm.email.value == '')
		errormsg = errormsg + "Email\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_fname.value == '' )
		errormsg = errormsg + "First Name (shipping)\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_lname.value == '' )
		errormsg = errormsg + "Last Name (shipping)\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_address2.value == '' && document.shippingForm.s_address1.value=='' )
		errormsg = errormsg + "Address (shipping)\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_city.value == '' )
		errormsg = errormsg + "City (shipping)\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_state.value == '' )
		errormsg = errormsg + "State (shipping)\n";
	
	if( document.shippingForm.billship.checked!="1" && document.shippingForm.s_zip.value == '' )
		errormsg = errormsg + "Zip (shipping)\n";
	
	if( document.shippingForm.payment[0].checked ) {
		
		if( document.shippingForm.cname.value == '')
		errormsg = errormsg + "Name on Card\n";
		if( document.shippingForm.cnum1.value == '' || document.shippingForm.cnum2.value == '' || document.shippingForm.cnum3.value=='' || document.shippingForm.cnum4.value == '' )
			errormsg = errormsg + "Card Number\n";
		else if( pattern.test(document.shippingForm.cnum1.value) || pattern.test(document.shippingForm.cnum2.value) || pattern.test(document.shippingForm.cnum3.value) || pattern.test(document.shippingForm.cnum4.value) )
			errormsg = errormsg + "A valid credit card number is required\n";
			
	}	
  
	if( errormsg != "" )
	{
		alert("The following fields require values:\n\n" + errormsg);
		return false;
	}
	
	return true;
}
function logoRemove(logo,del)
{
		if (del){
			if(confirm('You have not ordered the minimum amount.  Items with this logo will be removed from your cart.')){
				window.location= '?remove='+logo+'&unset='+logo;
			}
			else
				alert("NOT REMOVED")
		}
		else{
				window.location= '?unset='+logo;
		}
	
}
