function cal(frmCust)
{
var choice = frmCust.selTitle.selectedIndex;
var title =(frmCust.selTitle.options[choice].value);
frmCust.Other.value = "";
frmCust.Title.value = title;
return;
}
function cal1(frmCust)
{
var title = frmCust.Other.value;
frmCust.selTitle.selectedIndex= 0;
frmCust.Title.value = title;
return;
}
function selCty(frmCust)
{
var choice = frmCust.CountryCode.selectedIndex;
var ctry =(frmCust.CountryCode.options[choice].text);
frmCust.Country.value = ctry;
return;
}
function Validate(frmCust)
{
		if(frmCust.Address1.value == "")
	{
		alert("Please enter your company / business name.");
		frmCust.Address1.focus();
		return false;
	}
	if(frmCust.Title.value == "" || frmCust.Title.value.length < 2)
	{
		alert("Please enter your title.");
		frmCust.selTitle.focus();
		return false;
	}
	if(frmCust.Name.value == "")
	{
		alert("Please enter your name.");
		frmCust.Name.focus();
		return false;
	}
		if(frmCust.Address2.value == "")
	{
		alert("Please enter street & door number");
		frmCust.Address2.focus();
		return false;
	}

		if(frmCust.Address3.value == "")
	{
		alert("Please enter your town/city");
		frmCust.Address3.focus();
		return false;
	}
	var i;
	i = frmCust.CountryCode.selectedIndex;		
	
	if(i == 0 || frmCust.CountryCode.options[i].text == "")
	{
		alert("Please select your Country");
		frmCust.CountryCode.focus();
		return false;
	}

	if(frmCust.CountryCode.options[i].text == "United Kingdom" && frmCust.Postcode.value == "")

	//UK Customer has not put postcode
	{
		alert("Please enter your post code.");
		frmCust.Postcode.focus();
		return false;
	}
	if(frmCust.CountryCode.options[i].text == "USA" && frmCust.Address5.value == "")

	//USA Customer has not put zip code
	{
		alert("Please enter your zip code.");
		frmCust.Address5.focus();
		return false;
	}
	if(frmCust.EMail.value == "")
	//Not entered email address
	{
		alert("Please enter your e-mail address.");
		frmCust.EMail.focus();
		return false;
	}
	var r, re, sp, spc;
	var s = frmCust.EMail.value;
	
	if(s.length < 6)
	{
		alert("Please enter a valid e-mail address.");
		frmCust.EMail.focus();
		return false;
	}
	re = /@/i;
	r = s.search(re);
	if (r<0)
	{
		//No @ character present
		alert("Please enter a valid e-mail address which must contain an '@' sign.");
		frmCust.EMail.focus();
		return false;
	}
	sp = new String(s);
	spc = sp.indexOf(" ");
	if (spc > 0)
	{
		//A space is present
		alert("Please enter a valid e-mail address which must not contains blank spaces.");
		frmCust.EMail.focus();
		return false;
	}
	p = frmCust.Password.value
	if(p.length<4)
	{
		alert("Your password must be a minimum of 4 characters long.");
		frmCust.Password.focus();
		return false;
	}
	if(frmCust.Password.value != frmCust.Confirm.value)
	{
		alert("Your confirmation password does not match your password.");
		frmCust.Confirm.focus();
		return false;
	}
	if(frmCust.strVerify.value == "")
	{
		alert("Please answer the anti-spam question.");
		frmCust.strVerify.focus();
		return false;
	}
	return true;
}