function validate_contactus(thisform)
{
	if(thisform.txtName.value == '')	
		{
			alert("Woops! You forgot to fill in your Name");
			thisform.txtName.focus();
			return false;
		}
		
	if(thisform.txtOrganisation.value == '')	
		{
			alert("Woops! You forgot to fill in your Organisation Name");
			thisform.txtOrganisation.focus();
			return false;
		}
		
	if(thisform.txtEmail.value == '')	
		{
			alert("Woops! You forgot to fill in your Email");
			thisform.txtEmail.focus();
			return false;
		}
	if(validate_email(thisform.txtEmail,"Woops! You have entered an invalid Email Address")==false)
		{
			thisform.txtEmail.select();
			thisform.txtEmail.focus();
			return false;
		}

	if(thisform.txtPhone.value == '')	
		{
			alert("Woops! You forgot to fill in your Phone");
			thisform.txtPhone.focus();
			return false;
		}
	if(IsNumeric(thisform.txtPhone.value)==false)
		{
			alert("Woops! You have entered an invalid Phone Number");
			thisform.txtPhone.select();
			thisform.txtPhone.focus();
			return false;
		}
	/*	
	if(thisform.txtFax.value == '')	
		{
			alert("Woops! You forgot to fill in your Fax");
			thisform.txtFax.focus();
			return false;
		}
	
	if(IsNumeric(thisform.txtFax.value)==false)
		{
			alert("Woops! You have entered an invalid Fax Number");
			thisform.txtFax.select();
			thisform.txtFax.focus();
			return false;
		}*/
		
		
	if(thisform.txtPOBox.value == '')	
		{
			alert("Woops! You forgot to fill in your PO Box");
			thisform.txtPOBox.focus();
			return false;
		}	
	
	if(thisform.txtAddress.value == '')	
		{
			alert("Woops! You forgot to fill in your Address");
			thisform.txtAddress.focus();
			return false;
		}
		
	if(thisform.country.value == '')	
		{
			alert("Woops! You forgot to select your Country");
			thisform.country.focus();
			return false;
		}
		
	if(thisform.txtPresenterName.value == '')	
		{
			alert("Woops! You forgot to fill in your Presenter Name");
			thisform.txtPresenterName.focus();
			return false;
		}
		
	if(thisform.txtPresenterBio.value == '')	
		{
			alert("Woops! You forgot to fill in your Presenter's biography");
			thisform.txtPresenterBio.focus();
			return false;
		}
		
	if(thisform.txtAbstractTitle.value == '')	
		{
			alert("Woops! You forgot to fill in your Abstract Title");
			thisform.txtAbstractTitle.focus();
			return false;
		}
		
	if(thisform.txtAbstract.value == '')	
		{
			alert("Woops! You forgot to fill in your Abstract");
			thisform.txtAbstract.focus();
			return false;
		}
		
	if(thisform.txtAbstractTitle.value == '')	
		{
			alert("Woops! You forgot to fill in your Abstract Title");
			thisform.txtAbstractTitle.focus();
			return false;
		}
		
	thisform.submit();
	return true;
}

function validate_email(entered,alertbox) {

   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = entered.value;
   if(reg.test(address) == false) {
     if (alertbox!="") alert(alertbox,entered);
      return false;
   }
}

function IsNumeric(strString)
{
   var strValidChars = "0123456789-(). ";
   var strChar;
   var blnResult = true;
   if (strString.length == 0) return false;

   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         	{
        	 blnResult = false;
         	}
      }
   return blnResult;
}
