function Validateform(myform)
{	
 if (myform.namebox.value=="")
	{
	  alert("Please enter your First Name.");
	  myform.namebox.focus();
	  return (false);
	}
 if (myform.salutationbox.options[0].selected)
	{
	  alert("Please choose your Title.");
	  myform.salutationbox.focus();
	  return (false);
	}
 if (myform.eventtownbox.value=="")
	{
	  alert("Please enter the event town.");
	  myform.eventtownbox.focus();
	  return (false);
	}			
 if (myform.phonebox.value=="")
	{
	  alert("Please enter your contact number.");
	  myform.phonebox.focus();
	  return (false);
	}
 if (myform.datebox1.options[0].selected)
	{
	  alert("Please select the date.");
	  myform.datebox1.focus();
	  return (false);
	}			
 if (myform.datebox2.options[0].selected)
	{
	  alert("Please select the month.");
	  myform.datebox2.focus();
	  return (false);
	}
 if (myform.datebox3.options[0].selected)
	{
	  alert("Please select the year.");
	  myform.datebox3.focus();
	  return (false);
	}	
 if (!(myform.robinbox[0].checked || myform.robinbox[1].checked))
	{
	  alert("Please select whether you would like the reliant.");
	  return (false);
	}	
 if (myform.functionbox.options[0].selected)
	{
	  alert("Please select the function.");
	  myform.functionbox.focus();
	  return (false);
	}
 if (myform.functionbox.options[7].selected)
	{
 	  if ((myform.otherbox1.value=="(Other)") || (myform.otherbox1.value==""))
	   {
	     alert("Please enter the function.");
	     myform.otherbox1.focus();
	     myform.otherbox1.select();
	     return (false);
	   }
	}
 if (!(myform.patsybox[0].checked || myform.patsybox[1].checked))
	{
	  alert("Please select whether you would like a double act with Patsy.");
	  return (false);
	}					
 if (re.test(myform.emailbox.value))
	{
	  return (true);
	}
	  alert("Invalid email address");
	  myform.emailbox.focus();
	  myform.emailbox.select();
	  return (false);
}

function Check(f)
{
  var func = f.functionbox.options[f.functionbox.selectedIndex].value;
  myform.hidden2.value=(func);
   if (f.functionbox.options[f.functionbox.selectedIndex].value=="Other")
    {
     var func = f.otherbox1.value;
     myform.hidden2.value=(func);
    }
}
