function setupFeedback()
{//$('feedbackButton').addEvent( 'click', function() { popForm(); });
}
function popForm(){$('feedbackForm').style.display = 'block';}
function changeOptionModel(image,year){$('optionModel').src = 'floorplans/'+year+'/300/'+image+'.gif';}
function startGallery() {
	if($('gallery')) {
		var myGallery = new gallery($('gallery'), {
			timed: false
		});
	}
}

function FValidateControl(control, prompt) {
	if (control.value=="") {
		alert("The " + prompt +" field is a required field, and it must be filled in before your form can be sent to our server.");
		control.focus();
		return false;
	}
	return true;
}
  
function validateFeeback(form) {
	if (!FValidateControl(form.name,'Full Name')) return false;
	if (!FValidateControl(form.email,'Email')) return false;
	if (!FValidateControl(form.comments,'Comment/Suggestions')) return false;
	
	console.log(form.agree[0].checked);
	console.log(form.agree[1].checked);

	if(form.agree[1].checked == true) return false;

	return true;
}

window.onDomReady(startGallery);
window.onDomReady(setupFeedback);