function validate_form()
{
	frm = document.request_info;

	if( frm.first_name.value == "" ) {
		alert( "Please enter your first name." );
		frm.first_name.focus();
		return false;
	}

	if( frm.last_name.value == "" ) {
		alert( "Please enter your last name." );
		frm.last_name.focus();
		return false;
	}

	if( frm.address_line_1.value == "" ) {
		alert( "Please enter your address." );
		frm.address_line_1.focus();
		return false;
	}

	if( frm.city.value == "" ) {
		alert( "Please enter the name of your city." );
		frm.city.focus();
		return false;
	}

	if( frm.state.value == "" ) {
		alert( "Please enter the state in which you reside." );
		frm.state.focus();
		return false;
	}

	if( frm.zip.value == "" ) {
		alert( "Please enter your zip code." );
		frm.zip.focus();
		return false;
	}

	if( frm.country.value == "tst" ) {
		alert( "Please enter the country in which you reside." );
		frm.country.focus();
		return false;
	}

	if( frm.country.value == "other" ) {
		if( frm.other_country.value.length < 4 ) {
			alert( "Please specify at least 4 letters for other country." );
			frm.other_country.focus();
			return false;
		}
	}
	


	if( frm.intl_telephone.value == "" && frm.intl_cell_telephone.value == "" && frm.usa_telephone.value == "" && frm.usa_cell_telephone.value == "" ) {
		alert( "Please enter at least one phone number." );
		frm.intl_telephone.focus();
		return false;
	}

	if( !(/^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})$/.test(frm.email.value)) ) {
		alert( "Please provide a valid email address." );
		frm.email.focus();
		return false;
	}

	if( frm.program_interest.value == "tst" ) {
		alert( "Please enter your program of interest." );
		frm.program_interest.focus();
		return false;
	}

	if( frm.years_of_playing.value == "" ) {
		alert( "Please enter the number of years you have been playing." );
		frm.years_of_playing.focus();
		return false;

	}


	if( frm.source_from_which_you_heard_about_the_school.value == "tst" ) {
		alert( "Please enter the source from which you heard about the school." );
		frm.source_from_which_you_heard_about_the_school.focus();
		return false;
	}

	if( frm.source_from_which_you_heard_about_the_school.value == "other" ) {
		if( frm.other_source_from_which_you_heard_about_the_school.value.length < 4 ) {
			alert( "Please specify at least 4 letters for other source." );
			frm.other_source_from_which_you_heard_about_the_school.focus();
			return false;
		}
	}

	if( frm.verCode.value == "" ) {
		alert( "Please enter the displayed number." );
		frm.verCode.focus();
		return false;
	}

	return true;
}
function findArray(ary, element){
    for(var i=0; i<ary.length; i++){
        if(ary[i] == element){
            return i;
        }
    }
    return -1;
}
function updateCountryCode() {
	var chosencountry = document.getElementById('country').options[document.getElementById('country').selectedIndex].value;
	var chosencountrycode = ccodes[findArray(cnames, chosencountry)];
	if(chosencountrycode >= 0) {
		if(chosencountrycode.length == 1) {
			chosencountrycode = "00" + chosencountrycode;
		} else if(chosencountrycode.length == 2) {
			chosencountrycode = "0" + chosencountrycode;
		}
		if(document.getElementById('intl_country_code').value == "") document.getElementById('intl_country_code').value = chosencountrycode;
		if(document.getElementById('intl_cell_country_code').value == "") document.getElementById('intl_cell_country_code').value = chosencountrycode;
	}
}
  var cnames = new Array("Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Ascension","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo, Democratic Republic of the","Congo, Republic of the","Cook Islands","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","Gabon","Gambia","Gaza","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iraq","Iran","Ireland (Eire)","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Liechtenstein","Lithuania","Luxembourg","Libya","Macau","Macedonia, Republic of","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia, Federated States of","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Netherlands","Netherlands Antilles","Nepal","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","Northern Ireland","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands","Wallis and Futuna","West Bank","Yemen","Zambia","Zimbabwe"); 
  
  var ccodes = new Array("93","355","213","684","376","244","1264","6721","1268","54","374","297","247","61","43","994","1242","973","880","1246","375","32","501","229","1441","975","951","387","267","55","246","1284","673","359","226","257","855","237","1","238","1345","236","235","56","86","57","269","243","242","682","506","225","385","53","357","420","45","253","1767","1809","670","593","20","503","240","291","372","251","500","298","679","358","33","594","689","241","220","970","995","49","233","350","30","299","1473","590","1671","502","224","245","592","509","504","852","36","354","91","62","964","98","353","972","39","1876","81","962","7","254","686","965","996","856","371","961","226","231","423","370","352","218","853","389","261","265","60","960","223","356","692","596","222","230","2696","52","691","373","377","976","382","1664","212","258","95","264","674","31","599","977","687","64","505","227","234","683","6723","850","44","1670","47","968","92","680","507","675","595","51","63","48","351","1787/1939","974","262","40","7","250","290","1869","1758","508","1784","685","239","966","221","381","248","232","65","421","386","677","252","27","82","34","94","249","597","268","46","41","963","886","992","255","66","228","690","676","1868","216","90","993","1649","688","256","380","971","44","1","598","998","678","58","84","1340","681","970","967","260","263");