//--> VALIDATE FORM
function validate_form(){

	var name = document.getElementById('name').value;
	var address = document.getElementById('address').value;
	var city = document.getElementById('city').value;
	var state = document.getElementById('state').value;
	var zip = document.getElementById('zip').value;

	if(name.length == 0 || address.length == 0 || city.length == 0 || state.length == 0 || zip.length == 0){
		alert('You must enter you name, address, city, state, and zip code');
		return false;
	}

}

//--> VALIDATE FORM Bottom of page
function validate_form_bot(){

	var name = document.getElementById('name-bot').value;
	var address = document.getElementById('address-bot').value;
	var city = document.getElementById('city-bot').value;
	var state = document.getElementById('state-bot').value;
	var zip = document.getElementById('zip-bot').value;

	if(name.length == 0 || address.length == 0 || city.length == 0 || state.length == 0 || zip.length == 0){
		alert('You must enter you name, address, city, state, and zip code');
		return false;
	}

}

/**
 *
 * Slideshow
 *
 */
var timing = [0,5,5,5,5,5,11];
function slide(num,name,fadedur){

	new Effect.Fade(name+num);
	setTimeout('new slide_next('+num+',\''+name+'\','+fadedur+')',100);

}

function slide_next(num,name,fadedur){

	var num = parseInt(num+1);
	if(num >= timing.length) num = 1;
	new Effect.Appear(name+num,{duration: fadedur});
	setTimeout('new slide('+num+',\''+name+'\','+fadedur+')', timing[num] * 1000);

}


