// JavaScript Document
function checkFields() 
{ 
	var checkSelected = false; 
	for (var i = 0; i < enqexh.wish.length; i++){ 
	if (enqexh.wish[i].checked) 
	checkSelected = true; 
	} 
	if (!checkSelected){ 
	alert("Please choose \"I wish to...\""); 
	return false; 
	} 
	
	if (enqexh.LastName.value == "") { 
		alert("Please fill in \"Last Name\".");
		enqexh.LastName.focus();
		return false;
	} 

	if (enqexh.FirstName.value == "") { 
		alert("Please fill in \"First Name\".");
		enqexh.FirstName.focus();
		return false;
	} 

	if (enqexh.Email.value == "") {
		alert("Please fill in \"Email Address\".");
		enqexh.Email.focus();
		return false;
	}
	else
		{
			ChkEmail1 = 0;
			ChkEmail2 = 0;
			for (j=0; j < enqexh.Email.value.length; j++)
			{
				if (enqexh.Email.value.charAt(j) == "@")
					ChkEmail1 = 1;
				if (enqexh.Email.value.charAt(j) == ".")
					ChkEmail2 = 1;				
			}			
		  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
		  	{
				alert("Not a valid email address.");
				enqexh.Email.focus();
				return false;  		
			}  			
		}

	if (enqexh.CompanyName.value == "") {
		alert("Please fill in \"Company Name\".");
		enqexh.CompanyName.focus();
		return false;
	}

	if (enqexh.CompanyAddress1.value == "") {
		alert("Please fill in \"Company Address\".");
		enqexh.CompanyAddress1.focus();
		return false;
	}

	if (enqexh.Country.value == "") {
		alert("Please fill in \"Country\".");
		enqexh.Country.focus();
		return false;
	}

	if (enqexh.TelCountryCode.value == "") {
		alert("Please fill in \"Country Code\" for your telephone number.");
		enqexh.TelCountryCode.focus();
		return false;
	}

	if (enqexh.TelAreaCode.value == "") {
		alert("Please fill in \"Area Code\" for your telephone number.");
		enqexh.TelAreaCode.focus();
		return false;
	}

	if (enqexh.Tel.value == "") {
		alert("Please fill in \"Telephone\".");
		enqexh.Tel.focus();
		return false;
	}

	if (enqexh.Title.options[enqexh.Title.selectedIndex].value =="0") { 
		alert("Please select \"Title\".");
		enqexh.Title.focus();
		return false;
	} 

	if (enqexh.Department.options[enqexh.Department.selectedIndex].value =="0") { 
		alert("Please select \"Department\".");
		enqexh.Department.focus();
		return false;
	} 

	if (enqexh.BusinessNature.options[enqexh.BusinessNature.selectedIndex].value =="0") { 
		alert("Please select \"Business Nature\".");
		enqexh.BusinessNature.focus();
		return false;
	} 

	if (enqexh.Ownership.options[enqexh.Ownership.selectedIndex].value =="0") { 
		alert("Please select \"Ownership\".");
		enqexh.Ownership.focus();
		return false;
	} 

	if (enqexh.NoOfEmployee.options[enqexh.NoOfEmployee.selectedIndex].value =="0") { 
		alert("Please select \"No Of Employee\".");
		enqexh.NoOfEmployee.focus();
		return false;
	} 
	return true; 
} 