function verify_contact_form()
{
	var err = '';
	var name = document.forms.contact.cust_name.value;
	var email= document.forms.contact.cust_email.value;
	var regarding = document.forms.contact.cust_regarding.value;
	var message = document.forms.contact.cust_message.value.length;
	//Check for name	
	if (name == '')
	{
		err += "Name Missing\n";
	}
	//Validate email
	var apos=email.indexOf("@")
	var dotpos=email.lastIndexOf(".")
	if (apos<1||dotpos-apos<2)
	{	
		err += "Email missing or incorrect format\n";
	}
	//Check for reason
	if (regarding == 'null')
	{
		err += "Please select a reason for contact from the drop down menu\n";
	}
	//Check For message
	if (message < 20)
	{
		err += "Message of at least 20 characters required";
	}
	//Process
	if (err == '')
	{	
		return true;
	}
	else
	{
		alert(err);
		return false;
	}
}
function print_link(section)
{
	var towrite = '<span onmouseover="window.status=\'Print '+section+' Instructions\';" onmouseout="window.status=\'\';" onclick="pop_print_window(\''+section+'\');" style="cursor: pointer; font-weight: bold; font-size: x-small; color: #515F6D;">[print]</span>';
	document.write(towrite);
}
function pop_print_window(page)
{
	window.open('http://www.townefurniture.com/print.php?page='+page);
}
function pop_custom_item_window(orientation,pic)
{
	if (orientation == "p")
	{
		var size = "width=545,height=720";
	}
	if (orientation == "l")
	{
		var size = "width=705,height=560";
	}
	
	window.open('http://townefurniture.com/picture.php?pic=images/custom/'+pic+','+size);
}

function coupon()
{
	window.open('http://www.townefurniture.com/coupon.php');
	return false;
}