function Navover(obj)	
{
	if(obj.src.indexOf("png",0)>0)
		{obj.src = obj.src.replace(/_up.png/, '_dn.png');}
	else if(obj.src.indexOf("gif",0)>0)
		{obj.src = obj.src.replace(/_up.gif/, '_dn.gif');}
		
}

function Navout(obj) 
{
	if(obj.src.indexOf(page.toLowerCase(),0)<0 || obj.src.indexOf("hamilton",0)>0)
	{
		if(obj.src.indexOf("png",0)>0)
			{obj.src = obj.src.replace(/_dn.png/, '_up.png');}
		else if(obj.src.indexOf("gif",0)>0)
			{obj.src = obj.src.replace(/_dn.gif/, '_up.gif');}
	}
}

function checkForm(form)
	{
		alert(form.attr('id'))
	if (form.attr('id') == 'resForm')	
		{ 
			// loop through every element in the form
			for (var x = 0; x<form.length; x++)
			{
			//check input elements of type TEXT and TEXTAREA
			if (form.elements[x].type == "text" || form.elements[x].type == "textarea")
				{
				// if "odometer" is in the field id	
				if (form.elements[x].id.indexOf("name") >1&& form.elements[x].value=='')
					{
					alert('Pelase enter a name');	//alert
					form.elements[x].focus();	//focus on the invalid field
					return false;
					}
				if (form.elements[x].id.indexOf("email") >1&& form.elements[x].value=='')
					{
					alert('Pelase enter a valid email address');
					form.elements[x].focus();
					return false;
					}
				}
			}
		}
	return false;
	}

