// JavaScript Document
function popitup(url) {
	newwindow=window.open(url,'Dp Doors Plus','height=450,width=680');
	if (window.focus) {newwindow.focus()}
	return false;
}
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@")
dotpos=value.lastIndexOf(".")
if (apos<1||dotpos-apos<2) 
  {alert(alerttxt);return false}
else {return true}
}
}

function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}

function validate_form(thisform)
{
with (thisform)
{
if (validate_required(visitor,"Please Input Your Name!")==false)
  {visitor.focus();return false}
}
with (thisform)
{
if (validate_email(email,"Invalid E-Mail Address!")==false)
  {email.focus();return false}
}
//with (thisform)
// {
// if (validate_required(tel,"Please Provide A Telephone Number!")==false)
//  {tel.focus();return false}
// }
// with (thisform)
// {
//if (validate_required(product,"Please Enter The Name Of The Product You Are Enquiring About!")==false)
//  {product.focus();return false}
// }
with (thisform)
{
if (validate_required(notes,"Please Provide Us With Details On Your Enquiry!")==false)
  {notes.focus();return false}
}


}

navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);