<!--
function IsEmailValid(FormName,ElemName)
{
	var EmailOk  = true
	var Temp     = document.forms[FormName].elements[ElemName]
	var AtSym    = Temp.value.indexOf('@')
	var Period   = Temp.value.lastIndexOf('.')
	var Space    = Temp.value.indexOf(' ')
	var Length   = Temp.value.length - 1   // Array is from 0 to length-1

	if ((AtSym < 1) ||                     // '@' cannot be in first position
    		(Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
    		(Period == Length ) ||             // Must be atleast one valid char after '.'
    		(Space  != -1))                    // No empty spaces permitted
   	{  	
      		EmailOk = false
   	}
   	
   	if ( Temp.value != "" ) {
		   	if ( Temp.value.toLowerCase().indexOf("@yahoo.co") != -1 ||
				Temp.value.toLowerCase().indexOf("@hotmail.co") != -1 ||
		   	     	Temp.value.toLowerCase().indexOf("@earthlink.net") != -1 ||
		   	     	Temp.value.toLowerCase().indexOf("@google.co") != -1 )
		   	{
	   			EmailOk = false
	   		}
   	}
	return EmailOk
}


function validateThis() {
	document.body.style.cursor = 'wait';
	document.enquiries.submit.style.cursor = 'wait';

        if (IsEmailValid("enquiries","email")==false) 
	{
		alert("Please supply valid company email address");
		document.forms["enquiries"].elements["email"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["salutation"].value == "")
	{
		alert("Please supply your title");
		document.forms["enquiries"].elements["salutation"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}


	if (document.forms["enquiries"].elements["first_name"].value == "")
	{
		alert("Please supply your first name");
		document.forms["enquiries"].elements["first_name"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["last_name"].value == "")
	{
		alert("Please supply your last name");
		document.forms["enquiries"].elements["last_name"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["title"].value == "")
	{
		alert("Please supply your position");
		document.forms["enquiries"].elements["title"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["company"].value == "")
	{
		alert("Please supply your company name");
		document.forms["enquiries"].elements["company"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}


	if (document.forms["enquiries"].elements["URL"].value == "")
	{
		alert("Please supply your company web address");
		document.forms["enquiries"].elements["URL"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["street"].value == "")
	{
		alert("Please supply your company address");
		document.forms["enquiries"].elements["street"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}

	if (document.forms["enquiries"].elements["city"].value == "")
	{
		alert("Please supply your company city");
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		document.forms["enquiries"].elements["city"].focus();
		return (false);
	}

	if (document.forms["enquiries"].elements["zip"].value == "")
	{
		alert("Please supply your company postcode/ZIP");
		document.forms["enquiries"].elements["zip"].focus();
		document.body.style.cursor = 'arrow';
		document.enquiries.submit.style.cursor = 'arrow';
		return (false);
	}
	
	if (document.forms["enquiries"].elements["country"].value == "")
		{
			alert("Please supply the country of the company address");
			document.forms["enquiries"].elements["country"].focus();
			document.body.style.cursor = 'arrow';
			document.enquiries.submit.style.cursor = 'arrow';
			return (false);
	}


	return true;
}
//-->