//DISJOINTED ROLLOVERS USING BUTTON NAVIGATION AND IMAGES FADING IN AND OUT

$(document).ready(function(){
//disjointed rollover function starting point
$("div#button li").hover(function(){
	//make a variable and assign the hovered id to it
	var elid = $(this).attr('id');
	//hide the image currently there
	$("div#images div").hide();
	//fade in the image with the same id as the selected buttom
	$("div#images div#" + elid + "").show();

	});

});

function validateForm()
{

	// reset error text
	document.getElementById('email_error').innerHTML = '';

	// reset input field backgrounds to white
	document.getElementById('con_email').style.bkColor = '#ffffff';
	document.getElementById('con_email').style.backgroundColor = '#ffffff';

	// validate mandatory fields
	// set focus to offending field (if any)
	// set background color & focus of offending fields
	// (return false to prevent the form from being submitted, or true to allow it)

	if(document.forms.contact_form.con_email.value.indexOf("@") <= 0)
	{
		document.getElementById('email_error').innerHTML = "Please enter a valid email address.";
		document.forms.contact_form.con_email.focus();
		document.getElementById('con_email').style.bkColor = '#ffe8e8';
		document.getElementById('con_email').style.backgroundColor = '#ffe8e8';
		return false;
	}

	// if we get here, the form is valid
	return true;
}


