<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=520,height=690,left = 395,top = 150');");
}

function Validate(){
if(ValidateForm(this) && ValidateForm2(this) && verify(this)){
}
}


<!-- Begin
function verify() {
var answer = confirm ("Are you sure you would like to submit your registration?                                                                   Please allow up to several minutes for the information to be processed and files to be uploaded.  Do not use the back button on your browser during or after submission.")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";

//BEGIN filled session restrictions
// if ((document.form.Instrument.value=="Drums") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting Drums for session 4. Please contact the camp office to be placed on a waiting list. Sessions 1 and 2 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Drums") && (document.form.Session3.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting Drums for session 3. Please contact the camp office to be placed on a waiting list. Sessions 1 and 2 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Guitar") && (document.form.Session2.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting Guitar for session 2 or 4. Please contact the camp office to be placed on a waiting list. Sessions 1, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Guitar") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting Guitar for session 2 or 4. Please contact the camp office to be placed on a waiting list. Sessions 1, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Soprano Sax") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting saxophones for session 4. Please contact the camp office to be placed on a waiting list. Sessions 1, 2, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Alto Sax") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting saxophones for session 4. Please contact the camp office to be placed on a waiting list. Sessions 1, 2, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Tenor Sax") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting saxophones for session 4. Please contact the camp office to be placed on a waiting list. Sessions 1, 2, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Baritone Sax") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting saxophones for session 4. Please contact the camp office to be placed on a waiting list. Sessions 1, 2, and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Piano") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting piano for sessions 2 and 4. Please contact the camp office to be placed on a waiting list. Sessions 1 and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Piano") && (document.form.Session2.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting piano for sessions 2 and 4. Please contact the camp office to be placed on a waiting list. Sessions 1 and 3 are still available";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Clarinet") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Flute") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Trombone") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Trumpet") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="French Horn") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Violin") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// if ((document.form.Instrument.value=="Other") && (document.form.Session4.checked == true)) {
// themessage = themessage + "Attendance: We are no longer accepting this instrument for sessions 4. Please contact the camp office to be placed on a waiting list.";
// document.getElementById('attending').style.border="2px solid red"; 
// }
// // END filled sessions restrictions


if (document.form.Student_First.value=="") {
themessage = themessage + " - Student First Name";
document.getElementById('Student_First').style.border="2px solid red"; 
}
if (document.form.Student_Last.value=="") {
themessage = themessage + " - Student Last Name";
document.getElementById('Student_Last').style.border="2px solid red"; 
}
if (document.form.Student_eMail.value=="") {
themessage = themessage + " - Student eMail";
document.getElementById('Student_eMail').style.border="2px solid red"; 
}
if (document.form.Guardian1_First.value=="") {
themessage = themessage + " - Parent/Guardian 1 First Name";
document.getElementById('Guardian1_First').style.border="2px solid red"; 
}
if (document.form.Guardian1_Last.value=="") {
themessage = themessage + " - Parent/Guardian 1 Last Name";
document.getElementById('Guardian1_Last').style.border="2px solid red"; 
}
if (document.form.Parent_eMail.value=="") {
themessage = themessage + " - Parent/Guardian eMail";
document.getElementById('Parent_eMail').style.border="2px solid red"; 
}
if (document.form.Address.value=="") {
themessage = themessage + " -  Address";
document.getElementById('Address').style.border="2px solid red"; 
}
if (document.form.City.value=="") {
themessage = themessage + " -  City";
document.getElementById('City').style.border="2px solid red"; 
}
if (document.form.State.value=="") {
themessage = themessage + " -  State";
document.getElementById('State').style.border="2px solid red"; 
}
if (document.form.Zip.value=="") {
themessage = themessage + " -  Zip Code";
document.getElementById('Zip').style.border="2px solid red"; 
}
if (document.form.Home_Phone.value=="") {
themessage = themessage + " -  Home Phone";
document.getElementById('Home_Phone').style.border="2px solid red"; 
}
if (document.form.Student_Age.value=="") {
themessage = themessage + " -  Age";
document.getElementById('Student_Age').style.border="2px solid red"; 
}
if (document.form.BirthdateMonth.value=="") {
themessage = themessage + " -  Date of Birth Month";
document.getElementById('BirthdateMonth').style.border="2px solid red"; 
}
if (document.form.Ethnicity.value=="") {
themessage = themessage + " -  Student Ethnicity";
document.getElementById('Ethnicity').style.border="2px solid red"; 
}
if (document.form.EmerName1.value=="") {
themessage = themessage + " - Emergency Contact Name";
document.getElementById('EmerName1').style.border="2px solid red"; 
}
if (document.form.EmerPhone1.value=="") {
themessage = themessage + " - Emergency Contact Phone";
document.getElementById('EmerPhone1').style.border="2px solid red"; 
}
if (document.form.EmereMail1.value=="") {
themessage = themessage + " - Emergency Contact eMail";
document.getElementById('EmereMail1').style.border="2px solid red"; 
}
if (document.form.EmerRel1.value=="") {
themessage = themessage + " - Emergency Contact Relationship";
document.getElementById('EmerRel1').style.border="2px solid red"; 
}
if (document.form.Student_School.value=="") {
themessage = themessage + " -  School";
document.getElementById('Student_School').style.border="2px solid red"; 
}
if (document.form.schoolteacherfirst.value=="") {
themessage = themessage + " -  School Music Teacher First Name";
document.getElementById('schoolteacherfirst').style.border="2px solid red"; 
}
if (document.form.schoolteacherlast.value=="") {
themessage = themessage + " -  School Music Teacher Last Name";
document.getElementById('schoolteacherlast').style.border="2px solid red"; 
}
if (document.form.Instrument.value=="") {
themessage = themessage + " -  Instrument";
document.getElementById('Instrument').style.border="2px solid red"; 
}
if (document.form.Years_Played.value=="") {
themessage = themessage + " -  Years Played";
document.getElementById('Years_Played').style.border="2px solid red"; 
}
if (document.form.Ability_Level.value=="") {
themessage = themessage + " -  Ability Level";
document.getElementById('Ability_Level').style.border="2px solid red"; 
}
if (document.form.How_Heard.value=="") {
themessage = themessage + " -  How you heard of LJC";
document.getElementById('How_Heard').style.border="2px solid red"; 
}
if (document.form.TShirt_Size.value=="") {
themessage = themessage + " -  Tshirt Size";
document.getElementById('TShirt_Size').style.border="2px solid red"; 
}
if (document.form.Session1.checked == false &&
	    document.form.Session2.checked == false &&
		document.form.Session3.checked == false &&
	    document.form.Session4.checked == false) {
themessage = themessage + " -  Sessions attending";
document.getElementById('attending').style.border="2px solid red"; 
}
if (document.form.Essay_Upload.value=="") {
themessage = themessage + " -  Essay Upload";
document.getElementById('Essay_Upload').style.border="2px solid red"; 
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End --> 

<!-- Begin
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail Address")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail Address")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail Address")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail Address")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail Address")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail Address")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail Address")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.form.Student_eMail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter Student Email Address")
		emailID.focus()
		document.getElementById('Student_eMail').style.border="2px solid red"; 
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		document.getElementById('Student_eMail').style.border="2px solid red"; 
		return false
	}
	return true
 }

 <!-- Begin
 function ValidateForm2(){
	var emailID=document.form.Parent_eMail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter Parent/Guardian Email Address")
		emailID.focus()
		document.getElementById('Parent_eMail').style.border="2px solid red"; 
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		document.getElementById('Parent_eMail').style.border="2px solid red"; 
		return false
	}
	return true
 }
 //  End --> 
 
<!-- Begin
function verify1() {
var themessage = "You are required to complete the following fields: ";
if (document.form1.ID1.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form1.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify2() {
var themessage = "You are required to complete the following fields: ";
if (document.form2.ID2.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form2.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify3() {
var themessage = "You are required to complete the following fields: ";
if (document.form3.ID3.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form3.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify4() {
var themessage = "You are required to complete the following fields: ";
if (document.form4.ID4.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form4.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify5() {
var themessage = "You are required to complete the following fields: ";
if (document.form5.ID5.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form5.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify6() {
var themessage = "You are required to complete the following fields: ";
if (document.form6.ID6.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form6.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify7() {
var themessage = "You are required to complete the following fields: ";
if (document.form7.ID7.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form7.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify8() {
var themessage = "You are required to complete the following fields: ";
if (document.form8.ID8.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form8.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify9() {
var themessage = "You are required to complete the following fields: ";
if (document.form9.ID9.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form9.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->
<!-- Begin
function verify10() {
var themessage = "You are required to complete the following fields: ";
if (document.form10.ID10.value=="") {
themessage = themessage + " - Student ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form10.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verifyp() {
var themessage = "You are required to complete the following fields: ";
if (document.form1.PayID.value=="") {
themessage = themessage + " - Payment ID #";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form1.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verifyr() {
var themessage = "You are required to complete the following fields: ";
if (document.form.Parent_eMail.value=="") {
themessage = themessage + " - Email Address";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify1a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form1.ID1.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form1.Essay_Upload.value=="") {
themessage = themessage + " -  Essay File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form1.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify2a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form2.ID2.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form2.MedicalFormUpload.value=="") {
themessage = themessage + " -  Health Exam Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form2.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify3a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form3.ID3.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form3.NonPrescription_Upload.value=="") {
themessage = themessage + " -  Non Prescription Authorization File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form3.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify4a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form4.ID4.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form4.Picture_Upload.value=="") {
themessage = themessage + " -  Picture File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form4.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify5a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form5.ID5.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form5.CampPermission_Upload.value=="") {
themessage = themessage + " -  Permission Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form5.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify6a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form6.ID6.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form6.AdminMedicine_Upload.value=="") {
themessage = themessage + " -  Administer Medicine Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form6.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify7a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form7.ID7.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form7.MAR_Upload.value=="") {
themessage = themessage + " -  MAR Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form7.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify8a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form8.ID8.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form8.CheckOut_Upload.value=="") {
themessage = themessage + " -  Check out Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form8.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify9a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form9.ID9.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form9.Health_Upload.value=="") {
themessage = themessage + " -  Health Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form9.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

<!-- Begin
function verify10a() {
var answer = confirm ("Are you sure you would like upload/replace the file?")
if (!answer)
return false;
else
var themessage = "You are required to complete the following fields: ";
if (document.form10.ID10.value=="") {
themessage = themessage + " - Student ID #";
}
if (document.form10.Guidelines_Upload.value=="") {
themessage = themessage + " -  Guidelines Form File";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form10.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=430,height=350,left = 395,top = 234.5');");
}
