// JavaScript Document
function ValidateEmail(theinput){
 var s=theinput;
 if(s.search)
  return (s.search(new RegExp("^([-!#$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}$","gi"))>=0);
 if(s.indexOf)
 {
  at_character=s.indexOf('@');
  if(at_character<=0 || at_character+4>s.length)
   return false;
 }
 if(s.length<6)
  return false;
 else
  return true;
}
 



function CheckForm(){
	var error="";
	
/*
myOption = -1;
for (i=document.RegForm.sponsershippack.length-1; i > -1; i--) {
if (document.RegForm.sponsershippack[i].checked) {
myOption = i; i = -1;
}
}
*/


if(document.RegForm.agency.value=="")
		error+="Agency\n";
if(document.RegForm.address.value=="")
		error+="Address\n";
if(document.RegForm.city.value=="")
		error+="City\n";
if(document.RegForm.zip.value=="")
		error+="Zip\n";
if(document.RegForm.phone.value=="")
		error+="Phone\n";
if(document.RegForm.fax.value=="")
		error+="Fax\n";
if(!ValidateEmail(document.RegForm.email.value))
		error+="Email\n";
if(document.RegForm.contact.value=="")
		error+="Contact First Name\n";
		if(document.RegForm.contactlname.value=="")
		error+="Contact Last Name\n";
if(document.RegForm.title.value=="")
		error+="Title\n";
		
/*
if (myOption == -1) {
error+="Sponsership Package\n";
}

*/
if(document.RegForm.description.value=="")
		error+="Brief Description\n";



	
	if(error!="")
		alert("Error! Please check:\n"+error);
	else
		document.RegForm.submit();
	
	return;
}

function CheckForm1(){
	var error="";
	
/*
myOption = -1;
for (i=document.RegForm.sponsershippack.length-1; i > -1; i--) {
if (document.RegForm.sponsershippack[i].checked) {
myOption = i; i = -1;
}
}
*/


if(document.RegForm.fname.value=="")
		error+="First Name\n";
		if(document.RegForm.lname.value=="")
		error+="Last Name\n";
				if(document.RegForm.title.value=="")
		error+="Title\n";
if(document.RegForm.organization.value=="")
		error+="Organization\n";
if(document.RegForm.address.value=="")
		error+="Address\n";
if(document.RegForm.city.value=="")
		error+="City\n";
if(document.RegForm.zip.value=="")
		error+="Zip\n";
if(document.RegForm.phone.value=="")
		error+="Phone\n";

if(!ValidateEmail(document.RegForm.email.value))
		error+="Email\n";

		
/*
if (myOption == -1) {
error+="Sponsership Package\n";
}

*/

if ((document.RegForm.am1a[0].checked==false) && (document.RegForm.am1a[1].checked==false)&& (document.RegForm.am1a[2].checked==false)&& (document.RegForm.am1a[3].checked==false)&& (document.RegForm.am1a[4].checked==false)&& (document.RegForm.am1a[5].checked==false))
 
error+="MORNING BREAKOUT (10:15 A.M.)\n";

if ((document.RegForm.pm2a[0].checked==false) && (document.RegForm.pm2a[1].checked==false)&& (document.RegForm.pm2a[2].checked==false)&& (document.RegForm.pm2a[3].checked==false)&& (document.RegForm.pm2a[4].checked==false)&& (document.RegForm.pm2a[5].checked==false))
 
error+="AFTERNOON BREAKOUT #1 (1:15 P.M.)\n";

if ((document.RegForm.pm2b[0].checked==false) && (document.RegForm.pm2b[1].checked==false)&& (document.RegForm.pm2b[2].checked==false)&& (document.RegForm.pm2b[3].checked==false)&& (document.RegForm.pm2b[4].checked==false)&& (document.RegForm.pm2b[5].checked==false)&& (document.RegForm.pm2b[6].checked==false))
 
error+="AFTERNOON BREAKOUT #2 (2:45 P.M.)\n";
	
	if(error!="")
		alert("Error! Please check:\n"+error);
	else
		document.RegForm.submit();
	
	return;
}
	
	
	function CheckForm2(){
	var error="";
	



if(document.RegForm.fname.value=="")
		error+="First Name\n";
		if(document.RegForm.lname.value=="")
		error+="Last Name\n";
				if(document.RegForm.title.value=="")
		error+="Title\n";
if(document.RegForm.organization.value=="")
		error+="Organization\n";
if(document.RegForm.address.value=="")
		error+="Address\n";
if(document.RegForm.city.value=="")
		error+="City\n";
if(document.RegForm.zip.value=="")
		error+="Zip\n";
if(document.RegForm.phone.value=="")
		error+="Phone\n";

if(!ValidateEmail(document.RegForm.email.value))
		error+="Email\n";

		
	
	if(error!="")
		alert("Error! Please check:\n"+error);
	else
		document.RegForm.submit();
	
	return;
}
	
		function CheckForm3(){
	var error="";
	



if(document.RegForm.fname.value=="")
		error+="First Name\n";
		if(document.RegForm.lname.value=="")
		error+="Last Name\n";
				if(document.RegForm.title.value=="")
		error+="Title\n";
if(document.RegForm.organization.value=="")
		error+="Organization\n";
if(document.RegForm.address.value=="")
		error+="Address\n";
if(document.RegForm.city.value=="")
		error+="City\n";
if(document.RegForm.zip.value=="")
		error+="Zip\n";
if(document.RegForm.phone.value=="")
		error+="Phone\n";

if(!ValidateEmail(document.RegForm.email.value))
		error+="Email\n";
if (document.RegForm.exhibitorbox.checked){
if (document.RegForm.additionalregcombo.value=="60"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 1 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 1 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 1 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 1 Email\n";
}
if (document.RegForm.additionalregcombo.value=="120"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 2 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 2 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 2 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 2 Email\n";
}

if (document.RegForm.additionalregcombo.value=="140"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 3 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 3 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 3 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 3 Email\n";
}

if (document.RegForm.additionalregcombo.value=="190"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 4 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 4 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 4 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 4 Email\n";
}
if (document.RegForm.additionalregcombo.value=="240"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 5 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 5 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 5 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 5 Email\n";
}
if (document.RegForm.additionalregcombo.value=="290"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 6 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 6 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 6 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 6 Email\n";
}
if (document.RegForm.additionalregcombo.value=="340"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 7 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 7 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 7 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 7 Email\n";
}
if (document.RegForm.additionalregcombo.value=="390"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 8 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 8 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 8 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 8 Email\n";
}
if (document.RegForm.additionalregcombo.value=="440"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 9 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 9 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 9 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 9 Email\n";
}
if (document.RegForm.additionalregcombo.value=="490"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 10 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 10 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 10 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 10 Email\n";
}
if (document.RegForm.additionalregcombo.value=="540"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 11 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 11 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 11 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 11 Email\n";
}
if (document.RegForm.additionalregcombo.value=="590"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 12 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 12 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 12 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 12 Email\n";
}
if (document.RegForm.additionalregcombo.value=="640"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 13 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 13 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 13 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 13 Email\n";
}
if (document.RegForm.additionalregcombo.value=="690"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 14 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 14 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 14 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 14 Email\n";
}
if (document.RegForm.additionalregcombo.value=="740"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 15 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 15 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 15 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 15 Email\n";
}
if (document.RegForm.additionalregcombo.value=="790"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 16 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 16 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 16 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 16 Email\n";
}
if (document.RegForm.additionalregcombo.value=="840"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 17 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 17 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 17 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 17 Email\n";
}
if (document.RegForm.additionalregcombo.value=="890"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 18 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 18 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 18 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 18 Email\n";
}
if (document.RegForm.additionalregcombo.value=="940"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 19 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 19 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 19 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 19 Email\n";
}
if (document.RegForm.additionalregcombo.value=="990"){

		if(document.RegForm.addattendee1.value=="")
		error+="    Attendee 20 First Name\n";
		if(document.RegForm.addattendeelname1.value=="")
		error+="    Attendee 20 Last Name\n";
				if(document.RegForm.addattendeetitle1.value=="")
		error+="    Attendee 20 Title\n";
		if(!ValidateEmail(document.RegForm.addattendeeemail1.value))
		error+="    Attendee 20 Email\n";
}

}
	
	if(error!="")
		alert("Error! Please check:\n"+error);
	else
		document.RegForm.submit();
	
	return;
}
	
