function checkfield(loginform)
{
	ok=true
	var xx=document.getElementById("validatecode").value;
	
   	if(loginform.name.value=="")
	{
		alert("Please Enter Your First Name.")
		loginform.name.focus()
		ok=false
	}
	else if (loginform.email.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform.email.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform.email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform.email.focus();
		ok=false
	}
	else if(loginform.phone.value=="")
	{
		alert("Please Enter Phone Number or contact number.")
		loginform.phone.focus()
		ok=false
	}
	else if(loginform.Country.value=="")
	{
		alert("Please Select Country Name.")
		loginform.Country.focus()
		ok=false
	}
		
	else if(loginform.description.value=="")
	{
		alert("Please Specify the description.")
		loginform.description.focus()
		ok=false
	}
	else if(loginform.validation.value=="")
	{
		alert("Please Enter The Validation code.")
		loginform.validation.focus()
		ok=false
	}
	else if(loginform.validation.value!=xx)
	{
		alert("Please Enter The Validation code as shown in the Left.")
		loginform.validation.focus()
		ok=false
	}
	


		
   
	return ok
}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function ValidateNum(input,event)
	{
			var keyCode = event.which ? event.which : event.keyCode;
			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57)
			{
				return true;
			}
			return false;
	}
