var pgn = "gpv2";

function checkForm()
{
	var filled = false;
	var correct = false;

	var email = document.forms.Form.address.value;

	if(document.forms.Form.name.value == "")
	{
		alert("Please enter your name.");
		document.forms.Form.name.focus();
	}
	else if(email == "")
	{
		alert("Please enter your e-mail address.");
		document.forms.Form.address.focus();
	}
	else if(document.forms.Form.enquiry.value == "")
	{
		alert("Please give details of your enquiry.");
		document.forms.Form.enquiry.focus();
	}
	else
	{
		filled = true;
	}

	if((email != "") && (filled == true))
	{
		if((email.indexOf('@') == 0) || (email.indexOf('@') == -1) || (email.lastIndexOf('.') == -1) || (email.indexOf('@') == email.lastIndexOf('.')-1) || (email.indexOf('@') > email.lastIndexOf('.')) || (email.lastIndexOf('.') == email.length-1))
		{
			alert("Please enter a vaild e-mail address.");
			document.forms.Form.address.focus();
		}
		else
		{
			correct = true;
		}
	}

	if((filled == true) && correct)
	{
		document.forms.Form.submit();
	}
}

function dldprog(sndtxt)
{
	var stxt = pgn + "-setup.";
	document.write("<a href=" + "/" + "progs" + "/" + stxt + "exe>" + sndtxt + "</a>");
}
