function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}

function disableSubmit(whichButton)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		document.getElementById(whichButton).disabled = true;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		document.all[whichButton].disabled = true;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		document.layers[whichButton].disabled = true;
	}
}


function check1()
{
	if(document.form1.name.value=="")
	{
		alert("Name is a required field.");
		document.form1.name.focus();
		return false;
	}
	if(document.form1.phone.value=="")
	{
		alert("Phone is a required field.");
		document.form1.phone.focus();
		return false;
	}

	if (document.form1.email.value=="")
	{
		 alert ("Email is a required field.");
		document.form1.email.focus();
		return false;
	}

	if(document.form1.email.value!="")
	{
		var result="no"
		var theStr = new String(document.form1.email.value);
		var index = theStr.indexOf("@");
		if (index > 0)
		{
			var pindex = theStr.indexOf(".",index);
			if ((pindex > index+1) && (theStr.length > pindex+1))
				result="ok"
	     }
		if(result=="no")
		{
			alert("Please enter a valid email address.");
			document.form1.email.focus();
			return (false);
		}
	}
	if (document.form1.notes.value=="")
	{
		alert ("Notes is a required field.");
		document.form1.notes.focus();
		return false;
	}
	

		return true;
}

