var images = new Array();

images[0] = new Image();
//images[0].src = "http://www.teneodesign.com/clients/bedstuy/images/home5.jpg";
images[0].src = "images/cpd_09.jpg";

images[1] = new Image();
images[1].src = "images/home2.jpg";

images[2] = new Image();
images[2].src = "http://www.teneodesign.com/clients/bedstuy/images/home4.jpg";

function mouseSwap(element1, index){
	if(element1.src != images[index].src){
		crossfade(element1, images[index].src, '1', '');
		//swapfade(element1, images[index].src, '1', '');
		//crosswipe(element1, images[index].src, '1', 'che', '')
	}
	//element1.src = images[index].src;
}

function mailingValidate(form){
	
	// VALIDATE EMAIL
	if(form.email.value == ""){
		alert("Please supply an email address to continue.");
		return(false);
	}
	
	// VALIDATE FIRST NAME
	if(form.firstname.value == ""){
		alert("Please supply a first name to continue.");
		return(false);
	}
	
	return(true);
	
}

function applicationValidate(form){
	
	// VALIDATE INFORMATION TRUE
	if(!document.form.information_true.checked){
		alert("You must agree that information you provided is true and complete to continue.");
		return(false);
	}
}

function footSoldiersValidate(form){
	
	// VALIDATE BIRTH PLACE
	if(form.birthplace.value == ""){
		alert("Please specify your place of birth to continue.");
		return(false);	
	}
	
	// VALIDATE EMAIL
	if(form.email.value == ""){
		alert("Please specify an email address to continue.");
		return(false);	
	}
	
	// VALIDATE DATE OF BIRTH
	if(form.dob.value == ""){
		alert("Please specify your date of birth to continue.");
		return(false);	
	}
	
	// VALIDATE FIRST NAME
	if(form.firstname.value == ""){
		alert("Please specify your first name to continue.");
		return(false);	
	}
	
	// VALIDATE LAST NAME
	if(form.lastname.value == ""){
		alert("Please specify your last name to continue.");
		return(false);	
	}
	
	// VALIDATE AGE
	if(form.age.value == ""){
		alert("Please specify your age to continue.");
		return(false);	
	}
	
	// VALIDATE CURRENT NEIGHBORHOOW
	if(form.hood.value == ""){
		alert("Please specify your current neighborhood to continue.");
		return(false);	
	}
	
	// VALIDATE STREET NUMBER
	if(form.addressnumber.value == ""){
		alert("Please specify your address number to continue.");
		return(false);	
	}
	
	// VALIDATE ADDRESS
	if(form.addressstreet.value == ""){
		alert("Please specify your street address to continue.");
		return(false);	
	}
	
	// VALIDATE APARTMENT
	if(form.addressapartment.value == ""){
		alert("Please specify your apartment # to continue.");
		return(false);	
	}
	
	// VALIDATE CITY
	if(form.addresscity.value == ""){
		alert("Please specify your city to continue.");
		return(false);	
	}
	
	// VALIDATE STATE
	if(form.addressstate.value == ""){
		alert("Please specify your state to continue.");
		return(false);	
	}
	
	// VALIDATE ZIP
	if(form.addresszip.value == ""){
		alert("Please specify your zip code to continue.");
		return(false);	
	}
	
	// VALIDATE HOME PHONE
	if(form.homephone.value == ""){
		alert("Please specify your home phone # to continue.");
		return(false);	
	}
	
	// VALIDATE SEX
	if(form.sex.options[form.sex.selectedIndex].value == ""){
		alert("Please specify your sex to continue.");
		return(false);	
	}
	
	// VALIDATE HOW THEY HEARD
	if(form.hear.value == ""){
		alert("Please specify how you heard about pr-g to continue.");
		return(false);	
	}
	
	// VALIDATE GAURDIENS FULL NAME
	if(form.emergencyname.value == ""){
		alert("Please specify your gaurdian's full name to continue.");
		return(false);	
	}
	
	// VALIDATE GAURDIENS NUMBER
	if(form.emergencynumber.value == ""){
		alert("Please specify your gaurdian's contact number to continue.");
		return(false);	
	}
	
	// VALIDATE GAURDIENS RELATIONSHIP
	if(form.emergencyrelationship.value == ""){
		alert("Please specify your gaurdian's relationship to continue.");
		return(false);	
	}
	
	// VALIDATE HIGH SCHOOL
	if(form.school.options[form.school.selectedIndex].value == ""){
		alert("Please specify if you are in high school to continue.");
		return(false);	
	}
	
	// VALIDATE COLLEGE
	if(form.college.options[form.college.selectedIndex].value == ""){
		alert("Please specify if you are in college to continue.");
		return(false);	
	}
	
	// VALIDATE SCHOOL NAME
	if(form.schoolname.value == ""){
		alert("Please specify your school's name to continue.");
		return(false);	
	}
	
	// VALIDATE REPORT CARD
	if(form.reportcard.options[form.reportcard.selectedIndex].value == ""){
		alert("Please specify if you can obtain a copy of your report card to continue.");
		return(false);	
	}
	
	// VALIDATE TRANSCRIPT
	if(form.transcriptcard.options[form.transcriptcard.selectedIndex].value == ""){
		alert("Please specify if you can obtain a copy of your transcript to continue.");
		return(false);	
	}
	
	// VALIDATE WORK HOURS
	if(form.commit.options[form.commit.selectedIndex].value == ""){
		alert("Please specify if you are available to work between Sunday – Saturday 4:00p.m. to 7:00p.m. to continue.");
		return(false);	
	}
	
	// VALIDATE COMMUTE
	if(form.commute.options[form.commute.selectedIndex].value == ""){
		alert("Please specify if you often commute to continue.");
		return(false);	
	}
	
	// VALIDATE FINANCIAL
	if(form.willing.options[form.willing.selectedIndex].value == ""){
		alert("Please specify if you are willing to perform random community service projects to continue.");
		return(false);	
	}
	
	// VALIDATE FINANCIAL
	if(form.exercise.options[form.exercise.selectedIndex].value == ""){
		alert("Please specify if you are willing to learn financial literacy to continue.");
		return(false);	
	}
	
	return(true);
		
}

function checkMeetingForm() {
	var cb1 = document.getElementById('meetingconf').checked;
	var cb2 = document.getElementById('bangmember').checked;
	alert(cb1 + " " + cb2);
	if(cb1=="" || cb2=="") {
		alert("Please confirm you are a member of 1000 people who bang \r\n and that you understand where the appointment will be held\r\n by checking the appropriate boxes.");
		return false;
	}
	return true;
}
