
function frm_check()
{
if(document.fiesta_info.first_name.value=="")
{
alert("Enter the First Name!")
document.fiesta_info.first_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789";

  for (var i = 0; i < document.fiesta_info.first_name.value.length; i++) {
  	if (iChars.indexOf(document.fiesta_info.first_name.value.charAt(i)) != -1) {
  	alert ("First Name Should be Only Alphabets");
document.fiesta_info.first_name.focus();
  	return false;
  	}
  }
if(document.fiesta_info.last_name.value=="")
{
alert("Enter the Last Name!")
document.fiesta_info.last_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789";

  for (var i = 0; i < document.fiesta_info.last_name.value.length; i++) {
  	if (iChars.indexOf(document.fiesta_info.last_name.value.charAt(i)) != -1) {
  	alert ("Last Name Should be Only Alphabets");
document.fiesta_info.last_name.focus();
  	return false;
  	}
  }
if(document.fiesta_info.school_name.value=="")
{
alert("Enter the School Name!")
document.fiesta_info.school_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?0123456789";

  for (var i = 0; i < document.fiesta_info.school_name.value.length; i++) {
  	if (iChars.indexOf(document.fiesta_info.school_name.value.charAt(i)) != -1) {
  	alert ("School Name Should be Only Alphabets");
document.fiesta_info.school_name.focus();
  	return false;
  	}
  }
if(document.fiesta_info.city.value=="")
{
alert("Enter the City")
document.fiesta_info.city.focus();
return false
}

var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?0123456789";

  for (var i = 0; i < document.fiesta_info.city.value.length; i++) {
  	if (iChars.indexOf(document.fiesta_info.city.value.charAt(i)) != -1) {
  	alert ("City Name Should be Only Alphabets");
document.fiesta_info.city.focus();
  	return false;
  	}
  }

if(document.fiesta_info.state.value=='0')
{
alert("Select the state")
document.fiesta_info.state.focus();
return false
}
str=document.fiesta_info.email_address.value;
if(dstr=='')
{
alert("Please enter the Email Address")
document.fiesta_info.email_address.focus();
return false
}


		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.fiesta_info.email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.fiesta_info.email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.fiesta_info.email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.fiesta_info.email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.fiesta_info.email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.fiesta_info.email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.fiesta_info.email_address.focus();



		    return false

		 }
if(document.fiesta_info.COMMENTS.value=="")
{
alert("Enter the COMMENTS")
document.fiesta_info.COMMENTS.focus();
return false
}



return true
}

//Signup Step one page
function usr_reg()
{

if(document.user_register.user_name.value=="" || document.user_register.username_hidden.value=="")
{
alert("Enter the User name!")
document.user_register.user_name.focus();
return false
}
if(document.user_register.password.value=="")
{
alert("Enter the Password!")
document.user_register.password.focus();
return false
}
if(document.user_register.first_name.value=="")
{
alert("Enter your First Name!")
document.user_register.first_name.focus();
return false
}
if(document.user_register.last_name.value=="")
{
alert("Enter your Last Name!")
document.user_register.last_name.focus();
return false
}
str=document.user_register.Email_address.value;



		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.user_register.Email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.user_register.Email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.user_register.Email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.user_register.Email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.user_register.Email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.user_register.Email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.user_register.Email_address.focus();



		    return false

		 }



if(document.user_register.address1.value=="")
{
alert("Enter your address!")
document.user_register.address1.focus();
return false
}
if(document.user_register.city.value=="")
{
alert("Enter your city!")
document.user_register.city.focus();
return false
}
if(document.user_register.zip_code.value=="")
{
alert("Enter your Zip code!")
document.user_register.zip_code.focus();
return false
}


if(document.user_register.phone.value=="")
{
alert("Enter your phone number!")
document.user_register.phone.focus();
return false
}
var strValidChars = "1234567890";
  var strChar;
strString =document.user_register.phone.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.user_register.phone.focus()
 blnResult = false;
         }
      }
   return blnResult;


return true


}


//contact us page
function frm_cont()
{

if(document.contact.select_topic.value=='none')
{
alert("Select the Topic")
document.contact.select_topic.focus();
return false
}

if(document.contact.request.value=="")
{
alert("Enter the request!")
document.contact.request.focus();
return false
}
if(document.contact.first_name.value=="")
{
alert("Enter the First Name!")
document.contact.first_name.focus();
return false
}
checkString=document.contact.first_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("First Name Should be Only Alphabets")
            
document.contact.first_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }


if(document.contact.last_name.value=="")
{
alert("Enter the Last Name!")
document.contact.last_name.focus();
return false
}
checkString=document.contact.last_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("Last Name Should be Only Alphabets")
            
document.contact.last_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }

if(document.contact.school_name.value=="")
{
alert("Enter the School Name!")
document.contact.school_name.focus();
return false
}if(document.contact.mailing_address.value=="")
{
alert("Enter the Mailing Address!")
document.contact.mailing_address.focus();
return false
}
if(document.contact.city.value=="")
{
alert("Enter the City!")
document.contact.city.focus();
return false
}
if(document.contact.state.value=='0')
{
alert("Select the state!")
document.contact.state.focus();
return false
}
str=document.contact.email_address.value;



		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.contact.email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.contact.email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();



		    return false

		 }
}


function frm_cont_us()
{



if(document.contact.first_name.value=="")
{
alert("Enter the Full Name!")
document.contact.first_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789";

  for (var i = 0; i < document.contact.first_name.value.length; i++) {
  	if (iChars.indexOf(document.contact.first_name.value.charAt(i)) != -1) {
  	alert ("Full Name Should be Only Alphabets");
document.contact.first_name.focus();
  	return false;
  	}
  }


if(document.contact.Telephone.value=="")
{
alert("Enter the Telephone!")
document.contact.Telephone.focus();
return false
}
var strValidChars = "1234567890";
  var strChar;
strString =document.contact.Telephone.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Telephone no. should be Numeric only") 


 document.contact.Telephone.focus()
 return false;
         }
      }



str=document.contact.email_address.value;

if(str=="")
{
alert("Please enter the Email Address")
document.contact.email_address.focus();
return false
}

		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.contact.email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.contact.email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.contact.email_address.focus();



		    return false

		 }

if(document.contact.state.value=='0')
{
alert("Select the state!")
document.contact.state.focus();
return false
}

if(document.contact.zip.value=='')
{
alert("Enter the zipcode")
document.contact.zip.focus();
return false
}
var strValidChars = "1234567890";
  var strChar;
strString =document.contact.zip.value
blnResult =true;


 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("ZIP code. should be Numeric only") 


 document.contact.zip.focus()
 return false;
         }
      }

if(strString.length!=5)
{
alert("ZIP code should be 5 letters")
document.contact.zip.focus();
return false
}

if(document.contact.How.value=='')
{
alert("Enter the How can we help?")
document.contact.How.focus();
return false
}
}


function fies_reg()
{
if(document.fiesta_reg.school_name.value=="")
{
alert("Enter the School Name!")
document.fiesta_reg.school_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?0123456789";

  for (var i = 0; i < document.fiesta_reg.school_name.value.length; i++) {
  	if (iChars.indexOf(document.fiesta_reg.school_name.value.charAt(i)) != -1) {
  	alert (" School Namee Should be Only Alphabets");
document.fiesta_reg.school_name.focus();
  	return false;
  	}
  }
if(document.fiesta_reg.state.value=='0')
{
alert("Select the state")
document.fiesta_reg.state.focus();
return false
}
checkString=document.fiesta_reg.school_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("School name Should be Only Alphabets")
            
document.fiesta_reg.school_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }


if(document.fiesta_reg.first_name.value=="")
{
alert("Enter the First Name!")
document.fiesta_reg.first_name.focus();
return false
}
checkString=document.fiesta_reg.first_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("First Name Should be Only Alphabets")
            
document.fiesta_reg.first_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }


if(document.fiesta_reg.last_name.value=="")
{
alert("Enter the Last Name!")
document.fiesta_reg.last_name.focus();
return false
}
checkString=document.fiesta_reg.last_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("Last Name Should be Only Alphabets")
            
document.fiesta_reg.last_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }

str=document.fiesta_reg.email_address.value;



		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.fiesta_reg.email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.fiesta_reg.email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.fiesta_reg.email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.fiesta_reg.email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.fiesta_reg.email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.fiesta_reg.email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.fiesta_reg.email_address.focus();



		    return false

		 }

}

function fies_reg2()
{

if(document.fiesta_reg.EventList.value=="")
{
alert("Select the EventList!")
document.fiesta_reg.EventList.focus();
return false
}
if(document.fiesta_reg.Girls.value=="")
{
alert("Enter the girls!")
document.fiesta_reg.Girls.focus();
return false
}

var strValidChars = "1234567890";
  var strChar;
strString =document.fiesta_reg.Girls.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.fiesta_reg.Girls.focus()
 return false;
         }
      }
 
if(document.fiesta_reg.Boys.value=="")
{
alert("Enter the boys!")
document.fiesta_reg.Boys.focus();
return false
}
strString =document.fiesta_reg.Boys.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.fiesta_reg.Boys.focus()
 return false;
         }
      }
if(document.fiesta_reg.Staff.value=="")
{
alert("Enter the staff!")
document.fiesta_reg.Staff.focus();
return false
}
strString =document.fiesta_reg.Staff.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.fiesta_reg.Staff.focus()
 return false;
         }
      }

if(document.getElementById("festival").checked==false && document.getElementById("festival1").checked==false)
{
alert("Please Select the Festival!")
document.getElementById("festival").focus();
return false
}
if(document.getElementById("class").checked==false && document.getElementById("class1").checked==false && document.getElementById("class2").checked==false)
{
alert("Please Select the CLASSIFICATION!")
document.getElementById("festival").focus();
return false
}

}

function mus_reg()
{
if(document.musi_reg.school_name.value=="")
{
alert("Enter the School Name!")
document.musi_reg.school_name.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?0123456789";

  for (var i = 0; i < document.musi_reg.school_name.value.length; i++) {
  	if (iChars.indexOf(document.musi_reg.school_name.value.charAt(i)) != -1) {
  	alert ("School Name Should be Only Alphabets");
document.musi_reg.city.focus();
  	return false;
  	}
  }

if(document.musi_reg.city.value=="")
{
alert("Enter the City Name!")
document.musi_reg.city.focus();
return false
}
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":.<>?0123456789";

  for (var i = 0; i < document.musi_reg.city.value.length; i++) {
  	if (iChars.indexOf(document.musi_reg.city.value.charAt(i)) != -1) {
  	alert ("City Name Should be Only Alphabets");
document.musi_reg.city.focus();
  	return false;
  	}
  }
if(document.musi_reg.state.value=="0")
{
alert("Select the State")
document.musi_reg.state.focus();
return false
}
if(document.musi_reg.first_name.value=="")
{
alert("Enter the First Name!")
document.musi_reg.first_name.focus();
return false
}
checkString=document.musi_reg.first_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("First Name Should be Only Alphabets")
            
document.musi_reg.first_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }


if(document.musi_reg.last_name.value=="")
{
alert("Enter the Last Name!")
document.musi_reg.last_name.focus();
return false
}
checkString=document.musi_reg.last_name.value
 var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
alert("Last Name Should be Only Alphabets")
            
document.musi_reg.last_name.focus();  return false;
            }
          }
        }
        else
        {
          return false;
        }


str=document.musi_reg.email_address.value;

if(str=="")
{
alert("Please enter the Email Address")
document.musi_reg.email_address.focus();
return false
}

		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Email address is invaild")

		document.musi_reg.email_address.focus();

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Email address is invaild")

document.musi_reg.email_address.focus();

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Email address is invaild")

document.musi_reg.email_address.focus();

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Email address is invaild")

document.musi_reg.email_address.focus();

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Email address is invaild")

document.musi_reg.email_address.focus();

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Email address is invaild")

document.musi_reg.email_address.focus();

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Email address is invaild")

document.musi_reg.email_address.focus();



		    return false

		 }

if(document.musi_reg.busch_gardens.value=="0")
{
alert("Select the EventList!")
document.musi_reg.busch_gardens.focus();
return false
}
if(document.musi_reg.Girls.value=="")
{
alert("Enter the girls!")
document.musi_reg.Girls.focus();
return false
}

var strValidChars = "1234567890";
  var strChar;
strString =document.musi_reg.Girls.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.musi_reg.Girls.focus()
 return false;
         }
      }
 
if(document.musi_reg.Boys.value=="")
{
alert("Enter the boys!")
document.musi_reg.Boys.focus();
return false
}
strString =document.musi_reg.Boys.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.musi_reg.Boys.focus()
 return false;
         }
      }
if(document.musi_reg.Staff.value=="")
{
alert("Enter the staff!")
document.musi_reg.Staff.focus();
return false
}
strString =document.musi_reg.Staff.value
blnResult =true;

 for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
      
alert("Numeric value only Accepted") 


 document.musi_reg.Staff.focus()
 return false;
         }
      }

if(document.getElementById("festival").checked==false && document.getElementById("festival1").checked==false)
{
alert("Please Select the Festival!")
document.getElementById("festival").focus();
return false
}
if(document.getElementById("class").checked==false && document.getElementById("class1").checked==false && document.getElementById("class2").checked==false)
{
alert("Please Select the CLASSIFICATION!")
document.getElementById("festival").focus();
return false
}
}




