<!--
function pizza()
	{ 
	window.open('http://www.newvibepizza.com/menu.php');
	}

function kcbbq()
	{ 
	window.open('http://www.kcbbq.ca/index.php?menu=3&page=menu.php');
	}

function surfto(form) {
	var myindex=form.select1.selectedIndex
 	if (form.select1.options[myindex].value != "0") {
		window.top.location.href = form.select1.options[myindex].value;
	}
}

function league_check_submit()
{

  if(!league_reg.fname.value) {alert("Please input your First Name");league_reg.fname.focus(); return false;}
  if(!league_reg.lname.value) {alert("Please input your Last Name");league_reg.lname.focus(); return false;}
  if(!league_reg.email.value) {alert("Please input your Email Address");league_reg.email.focus(); return false;}
  if(!league_reg.phone1.value) {alert("Please input your Phone Number");league_reg.phone1.focus(); return false;}
  if(!league_reg.address.value) {alert("Please input your Address");league_reg.address.focus(); return false;}
  if(!league_reg.city.value) {alert("Please City");league_reg.city.focus(); return false;}
  if(!league_reg.postal.value) {alert("Please input Postal Code");league_reg.postal.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  if(league_reg.fname.value.length<2||league_reg.fname.value.length>30) {
    alert("Your First Name should be more than 2, less than 30 characters.");
    league_reg.fname.focus();
    return false;
  }
  if(league_reg.lname.value.length<2||league_reg.lname.value.length>30) {
    alert("Your Last Name should be more than 2, less than 30 characters.");
    league_reg.lname.focus();
    return false;
  }  
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = league_reg.fname.value.substring(0,1); 

// First name check
  for (var i=0; i<league_reg.fname.value.length; i++) { 
    temp = "" + league_reg.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your fist name cannot include other than English characters");
      league_reg.fname.value = ""; 
      league_reg.fname.focus(); 
      return false;
    }
  } 
//  Last name check
  var temp2;
  for (var i=0; i<league_reg.lname.value.length; i++) { 
    temp2 = "" + league_reg.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your last name cannot include other than English characters");
      league_reg.lname.value = ""; 
      league_reg.lname.focus(); 
      return false;
    }
  } 
  
  // Determines if string is a valid looking Email Address. This is comprised
  // of looking for the "@" and "." characters...

  if(league_reg.email.value.indexOf('@') == "-1" || league_reg.email.value.indexOf('.') == "-1") // || 
	{
        alert("Please input your email address correctly");
        league_reg.email.value = ""; 
        league_reg.email.focus(); 
		return false;
	}

  // Phone# Check
  if(league_reg.phone1.value.length<10||league_reg.phone1.value.length>13) {
    alert("Please follow the phone number input format (e.g.604-123-4567)");
    league_reg.phone1.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = league_reg.phone1.value.substring(0,1); 

  for (var i=0; i<league_reg.phone1.value.length; i++) { 
    temp3 = "" + league_reg.phone1.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (e.g.604-123-4567)");
      league_reg.phone1.value = ""; 
      league_reg.phone1.focus(); 
      return false;
    }
  } 

  var checked_yes=0;
  var checked_order=0;
  var comp_order="";
  var array_order = new Array();
  
  obj_league = league_reg.list_league;
  obj_order = league_reg.list_order;
  for (i=0; i < obj_league.length; i++) {
   	if (obj_league[i].checked) {
		checked_yes++;
		if (obj_order[i].value != "-") {
			checked_order++;
			array_order.push(obj_order[i].value);
		}	
	}	
  }
  
  if(checked_yes>0) {
	 if ((checked_yes>1) && (checked_order<=(checked_yes-1))){
  		alert("Please select Order of Interest Number"); 
		return false;
	 } else {
	 	if (checked_yes>1) {
			for (i=0; i < array_order.length; i++) {
				comp_order=array_order[i];
				for (j=i+1; j < array_order.length; j++) {
					if (array_order[j] == comp_order) {
						alert("Error - Duplicate!\nPlease check Order of Interest Number"); 
						return false;
					}
				}	
  			}
		}
	 }
  } else {
  	alert("Please check the League of Choice"); 
	return false;
  }
  
  // No error detected  
  return true;
}

function cust_check_submit()
{

   // Check Radio Button
   var checked=0;
   obj = custwrite.hear;
   for (i=0; i < obj.length; i++) {
       	if (obj[i].checked) checked++;
   }

   if (checked<1){
	    alert("Please select one item on the questionnaire how you learned about REVS.");
		return false;
	}

  if(!custwrite.fname.value) {alert("Please input your First Name");custwrite.fname.focus(); return false;}
  if(!custwrite.lname.value) {alert("Please input your Last Name");custwrite.lname.focus(); return false;}
  if(!custwrite.phone.value) {alert("Please input your Phone Number");custwrite.phone.focus(); return false;}
  if(!custwrite.emailaddress.value) {alert("Please input your Email Address");custwrite.emailaddress.focus(); return false;}
  if(!custwrite.emailaddress2.value) {alert("Please re-type your Email Address");custwrite.emailaddress2.focus(); return false;}
  if(!custwrite.numofpeople.value) {alert("Please input Number of People field");custwrite.numofpeople.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  if(custwrite.fname.value.length<2||custwrite.fname.value.length>30) {
    alert("Your First Name should be more than 2, less than 30 characters.");
    custwrite.fname.focus();
    return false;
  }
  if(custwrite.lname.value.length<2||custwrite.lname.value.length>30) {
    alert("Your Last Name should be more than 2, less than 30 characters.");
    custwrite.lname.focus();
    return false;
  }  
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = custwrite.fname.value.substring(0,1); 

// First name check
  for (var i=0; i<custwrite.fname.value.length; i++) { 
    temp = "" + custwrite.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your fist name cannot include other than English characters");
      custwrite.fname.value = ""; 
      custwrite.fname.focus(); 
      return false;
    }
  } 
//  Last name check
  var temp2;
  for (var i=0; i<custwrite.lname.value.length; i++) { 
    temp2 = "" + custwrite.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your last name cannot include other than English characters");
      custwrite.lname.value = ""; 
      custwrite.lname.focus(); 
      return false;
    }
  } 
  
  // Phone# Check
  if(custwrite.phone.value.length<10||custwrite.phone.value.length>13) {
    alert("Please follow the phone number input format (ex.604-123-4567)");
    custwrite.phone.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = custwrite.phone.value.substring(0,1); 

  for (var i=0; i<custwrite.phone.value.length; i++) { 
    temp3 = "" + custwrite.phone.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (ex.604-123-4567)");
      custwrite.phone.value = ""; 
      custwrite.phone.focus(); 
      return false;
    }
  } 

  // Determines if string is a valid looking Email Address. This is comprised
  // of looking for the "@" and "." characters...

  if(custwrite.emailaddress.value.indexOf('@') == "-1" || custwrite.emailaddress.value.indexOf('.') == "-1") // || 
//		spaceInField(custwrite.emailaddress.value) || chkInvalidEmailFormat(custwrite.emailaddress.value) || 
//		CheckForDupChar('@',custwrite.emailaddress.value)	)
	{
        alert("Please input your email address correctly");
        custwrite.emailaddress.value = ""; 
        custwrite.emailaddress.focus(); 
		return false;
	}

  if(custwrite.emailaddress2.value.indexOf('@') == "-1" || custwrite.emailaddress2.value.indexOf('.') == "-1") // || 
//		spaceInField(partywrite.emailaddress.value) || chkInvalidEmailFormat(partywrite.emailaddress.value) || 
//		CheckForDupChar('@',partywrite.emailaddress.value)	)
	{
        alert("Please re-type your email address correctly");
        custwrite.emailaddress2.value = ""; 
        custwrite.emailaddress2.focus(); 
		return false;
	}
	
// Verify email addresses
  if(custwrite.emailaddress.value != custwrite.emailaddress2.value) // || 
	{
        alert("Email addresses do not match.  Please check again.");
        custwrite.emailaddress.focus(); 
		return false;
	}

  // Possible Noumber of People Check
  if(custwrite.numofpeople.value<16 || custwrite.numofpeople.value>350) {
    alert("The Number of people should be 'From minimum of 16 to maximum of 350'.");
    custwrite.numofpeople.focus();
    return false;
  }
  	
  // No error detected  
  return true;
}

function party_check_submit()
{
   // Check Radio Button
   var checked=0;
   obj = partywrite.hear;
   for (i=0; i < obj.length; i++) {
       	if (obj[i].checked) checked++;
   }

   if (checked<1){
	    alert("Please select one item on the questionnaire how you learned about REVS.");
		return false;
	}

  if(!partywrite.fname.value) {alert("Please input Parent First Name");partywrite.fname.focus(); return false;}
  if(!partywrite.lname.value) {alert("Please input Parent Last Name");partywrite.lname.focus(); return false;}
  if(!partywrite.emailaddress.value) {alert("Please input your Email Address");partywrite.emailaddress.focus(); return false;}
  if(!partywrite.emailaddress2.value) {alert("Please re-type your Email Address");partywrite.emailaddress2.focus(); return false;}
  if(!partywrite.phone1.value) {alert("Please input your Phone Number");partywrite.phone1.focus(); return false;}
  if(!partywrite.cfname.value) {alert("Please input Child First Name");partywrite.cfname.focus(); return false;}
  if(!partywrite.clname.value) {alert("Please input Child Last Name");partywrite.clname.focus(); return false;}
  if(!partywrite.age.value) {alert("Please input Child Age");partywrite.age.focus(); return false;}
  if(!partywrite.numofchild.value) {alert("Please input Number of Children field");partywrite.numofchild.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  if(partywrite.fname.value.length<2||partywrite.fname.value.length>30) {
    alert("Your First Name should be more than 2, less than 30 characters.");
    partywrite.fname.focus();
    return false;
  }
  if(partywrite.lname.value.length<2||partywrite.lname.value.length>30) {
    alert("Your Last Name should be more than 2, less than 30 characters.");
    partywrite.lname.focus();
    return false;
  }  
  if(partywrite.cfname.value.length<2||partywrite.cfname.value.length>30) {
    alert("Your First Name should be more than 2, less than 30 characters.");
    partywrite.cfname.focus();
    return false;
  }
  if(partywrite.clname.value.length<2||partywrite.clname.value.length>30) {
    alert("Your Last Name should be more than 2, less than 30 characters.");
    partywrite.clname.focus();
    return false;
  }  
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = partywrite.fname.value.substring(0,1); 

// First name check
  for (var i=0; i<partywrite.fname.value.length; i++) { 
    temp = "" + partywrite.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your fist name cannot include other than English characters");
      partywrite.fname.value = ""; 
      partywrite.fname.focus(); 
      return false;
    }
  } 
//  Last name check
  var temp2;
  for (var i=0; i<partywrite.lname.value.length; i++) { 
    temp2 = "" + partywrite.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your last name cannot include other than English characters");
      partywrite.lname.value = ""; 
      partywrite.lname.focus(); 
      return false;
    }
  } 
  
  // Phone# Check
  if(partywrite.phone1.value.length<10||partywrite.phone1.value.length>13) {
    alert("Please follow the phone number input format (ex.604-123-4567)");
    partywrite.phone1.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = partywrite.phone1.value.substring(0,1); 

  for (var i=0; i<partywrite.phone1.value.length; i++) { 
    temp3 = "" + partywrite.phone1.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (ex.604-123-4567)");
      partywrite.phone1.value = ""; 
      partywrite.phone1.focus(); 
      return false;
    }
  } 

  // Determines if string is a valid looking Email Address. This is comprised
  // of looking for the "@" and "." characters...

  if(partywrite.emailaddress.value.indexOf('@') == "-1" || partywrite.emailaddress.value.indexOf('.') == "-1") // || 
//		spaceInField(partywrite.emailaddress.value) || chkInvalidEmailFormat(partywrite.emailaddress.value) || 
//		CheckForDupChar('@',partywrite.emailaddress.value)	)
	{
        alert("Please input your email address correctly");
        partywrite.emailaddress.value = ""; 
        partywrite.emailaddress.focus(); 
		return false;
	}

  if(partywrite.emailaddress2.value.indexOf('@') == "-1" || partywrite.emailaddress2.value.indexOf('.') == "-1") // || 
//		spaceInField(partywrite.emailaddress.value) || chkInvalidEmailFormat(partywrite.emailaddress.value) || 
//		CheckForDupChar('@',partywrite.emailaddress.value)	)
	{
        alert("Please re-type your email address correctly");
        partywrite.emailaddress2.value = ""; 
        partywrite.emailaddress2.focus(); 
		return false;
	}
	
// Verify email addresses
  if(partywrite.emailaddress.value != partywrite.emailaddress2.value) // || 
	{
        alert("Email addresses do not match.  Please check again.");
        partywrite.emailaddress.focus(); 
		return false;
	}
  	
  // No error detected  
  return true;
}

function survey_check_submit()
{

  if(!surveywrite.email.value) {alert("Please input your email address");surveywrite.email.focus(); return false;}
  if(!surveywrite.card_no.value) {alert("Please input the Serial No.");surveywrite.card_no.focus(); return false;}

  // Determines if string is a valid looking Email Address. This is comprised
  // of looking for the "@" and "." characters...

  if(surveywrite.email.value.indexOf('@') == "-1" || surveywrite.email.value.indexOf('.') == "-1") // || 
	{
        alert("Please input your email address correctly");
        surveywrite.email.value = ""; 
        surveywrite.email.focus(); 
		return false;
	}

  // No error detected  
  return true;
}


function survey_canceled()
{
  surveywrite.email.value = "";
  surveywrite.card_no.value = "";
  surveywrite.email.focus();
  
  return false;
	
}

function survey2_check_submit()
{

  if(!survey2write.fname.value) {alert("Please input your First Name");survey2write.fname.focus(); return false;}
  if(!survey2write.lname.value) {alert("Please input your Last Name");survey2write.lname.focus(); return false;}
  if(!survey2write.address.value) {alert("Please input your address");survey2write.address.focus(); return false;}
  if(!survey2write.city.value) {alert("Please input your city");survey2write.city.focus(); return false;}
  if(!survey2write.phone.value) {alert("Please input your Phone Number");survey2write.phone.focus(); return false;}
  if(!survey2write.server.value) {alert("Please input your Server Name");survey2write.server.focus(); return false;}
  if(!survey2write.cook.value) {alert("Please input Meal Prepared By");survey2write.cook.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = survey2write.lname.value.substring(0,1); 

// Customer's last name check
  for (var i=0; i<survey2write.lname.value.length; i++) { 
    temp = "" + survey2write.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your last name cannot include other than English characters");
      survey2write.lname.value = ""; 
      survey2write.lname.focus(); 
      return false;
    }
  } 
//  Customer's first name check
  var temp2;
  for (var i=0; i<survey2write.fname.value.length; i++) { 
    temp2 = "" + survey2write.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your first name cannot include other than English characters");
      survey2write.fname.value = ""; 
      survey2write.fname.focus(); 
      return false;
    }
  } 
  
  // Phone# Check
  if(survey2write.phone.value.length<10||survey2write.phone.value.length>13) {
    alert("Please follow the phone number input format (ex.604-123-4567)");
    survey2write.phone.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = survey2write.phone.value.substring(0,1); 

  for (var i=0; i<survey2write.phone.value.length; i++) { 
    temp3 = "" + survey2write.phone.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (ex.604-123-4567)");
      survey2write.phone.value = ""; 
      survey2write.phone.focus(); 
      return false;
    }
  } 

  // Check Radio Button
  var checked=0;
  for (j=1; j <= 6; j++) {
  		switch( j )  {
				case 1: obj = survey2write.qstn1; break;
				case 2: obj = survey2write.qstn2; break;
				case 3: obj = survey2write.qstn3; break;
				case 4: obj = survey2write.qstn4; break;
				case 5: obj = survey2write.qstn5; break;
				case 6: obj = survey2write.qstn6; break;
		}
		for (i=0; i < obj.length; i++) {
        	if (obj[i].checked) checked++;
    	}
   }	
   if (checked<6){
	    alert("Please select one item on the each radio button type questionnaire.");	
		return false;
	}
	
  // No error detected  
  return true;
}

function survey3_check_submit()
{

  if(!survey3write.fname.value) {alert("Please input your First Name");survey3write.fname.focus(); return false;}
  if(!survey3write.lname.value) {alert("Please input your Last Name");survey3write.lname.focus(); return false;}
  if(!survey3write.address.value) {alert("Please input your address");survey3write.address.focus(); return false;}
  if(!survey3write.city.value) {alert("Please input your city");survey3write.city.focus(); return false;}
  if(!survey3write.phone.value) {alert("Please input your Phone Number");survey3write.phone.focus(); return false;}
  if(!survey3write.people.value) {alert("Please input the number of people in your group");survey3write.people.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = survey3write.lname.value.substring(0,1); 

// Customer's last name check
  for (var i=0; i<survey3write.lname.value.length; i++) { 
    temp = "" + survey3write.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your last name cannot include other than English characters");
      survey3write.lname.value = ""; 
      survey3write.lname.focus(); 
      return false;
    }
  } 
//  Customer's first name check
  var temp2;
  for (var i=0; i<survey3write.fname.value.length; i++) { 
    temp2 = "" + survey3write.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your first name cannot include other than English characters");
      survey3write.fname.value = ""; 
      survey3write.fname.focus(); 
      return false;
    }
  } 
  
  // Phone# Check
  if(survey3write.phone.value.length<10||survey3write.phone.value.length>13) {
    alert("Please follow the phone number input format (ex.604-123-4567)");
    survey3write.phone.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = survey3write.phone.value.substring(0,1); 

  for (var i=0; i<survey3write.phone.value.length; i++) { 
    temp3 = "" + survey3write.phone.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (ex.604-123-4567)");
      survey3write.phone.value = ""; 
      survey3write.phone.focus(); 
      return false;
    }
  } 

  // Check Radio Button
  var checked=0;
  var sub_checked=0;
  for (j=1; j <= 11; j++) {
  		switch( j )  {
				case 1: obj = survey3write.qstn1; break;
				case 2: obj = survey3write.qstn2; break;
				case 3: obj = survey3write.qstn3; break;
				case 4: obj = survey3write.qstn4; break;
				case 5: obj = survey3write.qstn5; break;
				case 6: obj = survey3write.qstn6; break;
				case 7: obj = survey3write.qstn7; break;
				case 8: obj = survey3write.qstn8; break;
				case 9: obj = survey3write.qstn9; break;
				case 10: obj = survey3write.qstn10; break;
				case 11: obj = survey3write.qstn11; break;
		}
		for (i=0; i < obj.length; i++) {
        	if (obj[i].checked) {
				checked++;
				if(j==7 && i==0) {
					sub_checked=0;
					sub_obj = survey3write.qstn7_2;
					for (k=0; k < sub_obj.length; k++) {
						if (sub_obj[k].checked)	sub_checked++;
					}
					if (sub_checked<1){
						alert("Please answer to the 7th questionnaire (Were they helpful?).");	
						return false;
					}
				} else if(j==8 && i==0) {
					sub_checked=0;
					sub_obj = survey3write.qstn8_2;
					for (k=0; k < sub_obj.length; k++) {
						if (sub_obj[k].checked)	sub_checked++;
					}
					if (sub_checked<1){
						alert("Please answer to the 8th questionnaire (How was the quality/presentation of your food?).");	
						return false;
					}
				}
			}			
    	}
   }	
   if (checked<11){
	    alert("Please select one item on the each radio button type questionnaire.");	
		return false;
	}
	
  // No error detected  
  return true;
}

function survey4_check_submit()
{

  if(!survey4write.fname.value) {alert("Please input your First Name");survey4write.fname.focus(); return false;}
  if(!survey4write.lname.value) {alert("Please input your Last Name");survey4write.lname.focus(); return false;}
  if(!survey4write.address.value) {alert("Please input your address");survey4write.address.focus(); return false;}
  if(!survey4write.city.value) {alert("Please input your city");survey4write.city.focus(); return false;}
  if(!survey4write.phone.value) {alert("Please input your Phone Number");survey4write.phone.focus(); return false;}
  if(!survey4write.attendant.value) {alert("Please input party attendant name");survey4write.attendant.focus(); return false;}
  if(!survey4write.child.value) {alert("Please input child's name");survey4write.child.focus(); return false;}
  if(!survey4write.children.value) {alert("Please input number of children");survey4write.children.focus(); return false;}

  // -----------------------------
  // Information Validation Check
  // -----------------------------
    
  // Name Check
  var valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  var temp; 
  temp = survey4write.lname.value.substring(0,1); 

// Customer's last name check
  for (var i=0; i<survey4write.lname.value.length; i++) { 
    temp = "" + survey4write.lname.value.substring(i, i+1); 
    if (valid.indexOf(temp) == "-1") { 
      alert("Your last name cannot include other than English characters");
      survey4write.lname.value = ""; 
      survey4write.lname.focus(); 
      return false;
    }
  } 
//  Customer's first name check
  var temp2;
  for (var i=0; i<survey4write.fname.value.length; i++) { 
    temp2 = "" + survey4write.fname.value.substring(i, i+1); 
    if (valid.indexOf(temp2) == "-1") { 
      alert("Your first name cannot include other than English characters");
      survey4write.fname.value = ""; 
      survey4write.fname.focus(); 
      return false;
    }
  } 
  
  // Phone# Check
  if(survey4write.phone.value.length<10||survey4write.phone.value.length>13) {
    alert("Please follow the phone number input format (ex.604-123-4567)");
    survey4write.phone.focus();
    return false;
  }
  var pvalid = "0123456789-"; 
  var temp3; 
  temp3 = survey4write.phone.value.substring(0,1); 

  for (var i=0; i<survey4write.phone.value.length; i++) { 
    temp3 = "" + survey4write.phone.value.substring(i, i+1); 
    if (pvalid.indexOf(temp3) == "-1") { 
      alert("Please follow the phone number input format (ex.604-123-4567)");
      survey4write.phone.value = ""; 
      survey4write.phone.focus(); 
      return false;
    }
  } 

  // Check Radio Button
  var checked=0;
  for (j=1; j <= 6; j++) {
  		switch( j )  {
				case 1: obj = survey4write.qstn1; break;
				case 2: obj = survey4write.qstn2; break;
				case 3: obj = survey4write.qstn3; break;
				case 4: obj = survey4write.qstn4; break;
				case 5: obj = survey4write.qstn5; break;
				case 6: obj = survey4write.qstn6; break;
		}
		for (i=0; i < obj.length; i++) {
        	if (obj[i].checked) checked++;
    	}
   }	
   if (checked<6){
	    alert("Please select one item on the each radio button type questionnaire.");	
		return false;
	}
	
  // No error detected  
  return true;
}

function ErrHandler(ErrDesc)
    {
        alert(ErrDesc);
        return false;   
    }

function hasValue(obj,type)
    {
    if (type == "TEXT" || type == "PASSWORD")
        {
        if (obj.value.length == 0) 
                return false;
        else 
                return true;
        }
    else if (type == "SELECT")
        {
        for (i=0; i < obj.length; i++)
                {
                if (obj.options[i].selected && obj.options[i].value != "")
                        return true;
                }
        return false;   
        }
    else if (type == "SINGLE_VALUE_RADIO" || type == "SINGLE_VALUE_CHECKBOX")
        {
                if (obj.checked)
                        return true;
                else
                return false;   
        }
    else if (type == "RADIO" || type == "CHECKBOX")
        {

        for (i=0; i < obj.length; i++)
                {
                if (obj[i].checked)
                        return true;
                }

        return false;   
        }
        }

function  ValidateForm(frm)
{
    if  (!hasValue(frm.Subsubject, "SELECT" )) 
        {
              if  (!ErrHandler("Subject is a required field."))
              {
              frm.Subsubject.focus();
              return false; 
              }
        }
   if  (!hasValue(frm.FirstName, "TEXT" )) 
           {
        if  (!ErrHandler("First name is a required field."))
               {
               frm.FirstName.focus();
            return false; 
            }

        }


    if  (!hasValue(frm.LastName, "TEXT" )) 

        {
        if  (!ErrHandler("Last name is a required field."))
            {
                        frm.LastName.focus();
            return false; 
            }
        }

    if  (!hasValue(frm.Email, "TEXT" )) 
        {
        if  (!ErrHandler("E-mail is a required field."))
            {
            frm.Email.focus();
            return false; 
            }
        }
        if  (!hasValue(frm.StreetAddress, "TEXT" )) 
        {
        if  (!ErrHandler("StreetAddress is a required field."))
            {
                        frm.StreetAddress.focus();
            return false; 
            }
        }
    if  (!hasValue(frm.City, "TEXT" )) 
        {
        if  (!ErrHandler("City is a required field."))
            {
                        frm.City.focus();
            return false; 
            }
        }

    if  (!hasValue(frm.Zip, "TEXT" )) 
        {
        if  (!ErrHandler("Zip/Postal Code is a required field."))
            {
                        frm.Zip.focus();
            return false; 
            }
        }
		
    if  (!hasValue(frm.Phone, "TEXT" )) 
    {
    if  (!ErrHandler("Phone is a required field."))
        {
                frm.Phone.focus();
        return false; 
        }
    }
 return true;
    }

	// VARIABLE DECLARATIONS
	var digits				  = new String("0123456789");
	var phoneNumberDelimiters = new String("()-+ ");	// non-digit characters which are allowed in phone numbers
	var digitsInNAPhoneNumber = 10;						// North American Phone Number is 10 digits
	var today				  = new Date();
	var day					  = today.getDate()
	var month				  = today.getMonth()
	var year				  = y2k(today.getYear())
	var whichOne			  = 0;
	var browser				  = navigator.appName;
			
	function CheckPhoneNumber(sPhone)
	{
		if (!isPhoneNumber(sPhone.value) && sPhone.value != "")
		{
			sPhone.value = "";
			sPhone.focus();
			alert("Please enter a valid Phone Number.");
			return false;
		}	
	if (sPhone.value.length < 10 && sPhone.value != "")
		{
			sPhone.value = "";
			sPhone.focus();
			alert("Please enter a 10 Digit Phone Number.");
		}
		return true;
	}
		
	function isPhoneNumber(sfield)
	{  
		var inputStr = sfield.toString();
		var bErr	 = true;
					
		if (sfield != "")
		{
			for (var i = 0; i < inputStr.length; i++)
			{
				var oneChar = inputStr.charAt(i)			
					
				//If the character doesn't exist in the numeric string or the accepted characters.
				if (digits.indexOf(oneChar) == -1 &&
					phoneNumberDelimiters.indexOf(oneChar) == -1)
					bErr = false;
			}
		}
					
		return bErr;
	}

	function trim(strText) 
	{ 
		// this will get rid of leading spaces 
		//alert("This is trim");
		while (strText.substring(0,1) == ' ') 
			strText = strText.substring(1, strText.length);

		// this will get rid of trailing spaces 
		while (strText.substring(strText.length-1,strText.length) == ' ')
			strText = strText.substring(0, strText.length-1);

		return strText;
	} 

	function y2k(number)    { return (number < 1000) ? number + 1900 : number; }
	function padout(number) { return (number < 10) ? '0' + number : number; }

	function restart() 
	{
		if (browser == "Netscape")
			document.Content.document.frmMain.elements["txtDate" + whichOne].value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
		else
		    document.frmMain.elements["txtDate" + whichOne].value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
	    
	    mywindow.close();
	}

	function ShowCalendar(sfield) 
	{ 
		whichOne			   = sfield;
	    mywindow			   = open('PopupCalendar.htm','Calendar','resizable=no,width=350,height=270');
	    mywindow.location.href = '../Includes/PopupCalendar.htm';
				    
	    if (mywindow.opener == null) 
			mywindow.opener = self;
	}	

	function CheckEmail(sEmail)
	{
		if (!isEmail(sEmail.value) && sEmail.value != "")
		{
			sEmail.value = "";
			sEmail.focus();
			
			alert("Please enter a valid email address.");
		}
	}
		
	function isEmail(sEmail)
	{   var i		= 1;
		var j		= 0;
	    var sLength = sEmail.length;

		for(j=0; j< sLength; j++)
		{	
			if (sEmail.charAt(j) == " ")
				return false;
		}

	    while ((i < sLength) && (sEmail.charAt(i) != "@"))
			i++
					

	    if ((i >= sLength) || (sEmail.charAt(i) != "@")) 
			return false;
	    else 
			i += 2;

	    while ((i < sLength) && (sEmail.charAt(i) != "."))
			i++
			    
	    if ((i >= sLength - 1) || (sEmail.charAt(i) != ".")) 
			return false;
	    else 
			return true;
	}

	function IsNum(sfield)
	{
		//Checks if value enter is Numeric.  If not it clears the field.
				
		if (trim(sfield.value) != "" && isNaN(sfield.value))
		{
			sfield.value = 1;
			sfield.focus();
			alert("Please enter a numeric value.");	
			return false;
		}
		
		return true;
	}
			
	function isSSN(sField) 
	{
		var strMsg1 = "Please enter valid SSN Number."
		var re	  = /^[0-9]{3}-[0-9]{2}-[0-9]{4}$/
		
		if (sField.value != "")
		{
			if (!re.test(sField.value))
			{  
				alert(strMsg1);
				sField.focus();
				return false;
			}	
		}
				
		return true;	
	}

	function IsBlank(field)
	{
		if (field.value == "")
		{
			field.focus();
			alert("Please enter a value.");
		}
	}	
		
	function CheckDate(sField) 
	{
		if (sField.value == "")
			return true;

		if (IsDate(sField) == false)
		{
			sField.value = "";
			alert("Please enter a valid date.");
			sField.focus();
			return false;
		}
		else 
			return true;
	}
		
	function IsDate(sField)
	{
		var strDate  = sField.value;
		var intDay   = "";
		var intMonth = "";
		var intYear  = "";
		var pos;
		
		pos		 = strDate.indexOf("/");
		strMonth = strDate.substr(0, pos);
		strDate  = strDate.slice(pos + 1, strDate.length)
		pos		 = strDate.indexOf("/");
		strDay	 = strDate.substr(0, pos);
		strDate  = strDate.slice(pos + 1, strDate.length)
		strYear  = strDate;
		intDay	 = parseInt(strDay, 10);
		intMonth = parseInt(strMonth, 10);
		intYear  = parseInt(strYear, 10);		

		if (isNaN(intDay)) 
			return false;

		if (isNaN(intMonth)) 
			return false;

		if (isNaN(intYear)) 
			return false;

		if (intMonth > 12 || intMonth < 1) 
			return false;		
			
		if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || 
			intMonth == 10 || intMonth == 12) && (intDay > 31 || intDay < 1)) 
			return false;
			
		if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intDay > 30 || intDay < 1)) 
			return false;

		if (intMonth == 2) 
		{
			if (intDay < 1) 
				return false;
			
			if (LeapYear(intYear) == true) 
			{
				if (intDay > 29) 
					return false;
			}
			else 
			{
				if (intDay > 28) 
					return false;
			}
		}
		
		return true;
	}

	function LeapYear(intYear) 
	{
		if (intYear % 100 == 0) 
		{
			if (intYear % 400 == 0) 
				return true; 
		}
		else 
		{
			if ((intYear % 4) == 0)
				return true; 
		}
			
		return false;
	}
		
	function DateCheck(from, to) 
	{
		if (Date.parse(from) > Date.parse(to)) 
			return true;
		else 
			return false;
	}
	
	function popcentre(strURL)
	{ 
	window.open(strURL,'centre','width=560,height=360,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=yse,top=0,left=0'); 
	}
	function popracquetball()
	{ 
	window.open('pop-racquetball.html','racquetball','width=500,height=420,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yse,top=0,left=0'); 
	}
	function popcolorpin()
	{ 
	window.open('pop-colorpin.html','colorpin','width=600,height=776,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popontheball()
	{ 
	window.open('pop-ontheball.html','ontheball','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmuscle()
	{ 
	window.open('pop-muscle.html','muscle','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poptai()
	{ 
	window.open('pop-tai.html','tai','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function pophigh()
	{ 
	window.open('pop-high.html','high','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poptbc()
	{ 
	window.open('pop-tbc.html','tbc','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popstep()
	{ 
	window.open('pop-step.html','step','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popsaturday()
	{ 
	window.open('pop-saturday.html','saturday','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poptactical()
	{ 
	window.open('pop-tactical.html','tactical','width=320,height=230,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popipilates()
	{ 
	window.open('pop-ipilates.html','ipilates','width=320,height=410,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popm1pilates()
	{ 
	window.open('pop-m1pilates.html','m1pilates','width=320,height=320,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popm2pilates()
	{ 
	window.open('pop-m2pilates.html','m2pilates','width=320,height=320,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popppilates()
	{ 
	window.open('pop-ppilates.html','ppilates','width=320,height=240,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poppilatesprg()
	{ 
	window.open('pop-pilatesprg.html','pilatesprg','width=500,height=550,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yse,top=0,left=0'); 
	}
	function poprose()
	{ 
	window.open('pop-rose.html','rose','width=550,height=550,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popbrenda()
	{ 
	window.open('pop-brenda.html','brenda','width=550,height=550,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poplela()
	{ 
	window.open('pop-lela.html','lela','width=550,height=550,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function poppam()
	{ 
	window.open('pop-pam.html','pam','width=550,height=560,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmaureen()
	{ 
	window.open('pop-maureen.html','maureen','width=550,height=530,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popGoodieBag()
	{ 
	window.open('pop-GoodieBag.html','GoodieBag','width=620,height=550,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmap1()
	{ 
	window.open('pop-map1.html','map1','width=490,height=520,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmap2()
	{ 
	window.open('pop-map2.html','map2','width=540,height=520,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmap3()
	{ 
	window.open('pop-map3.html','map3','width=490,height=520,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0'); 
	}
	function popmapquest()
	{ 
	window.open('http://www.mapquest.com/directions/main.adp');
	}
	
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->