//functions for rollovers

if (document.images) {
var img1_off= new Image(75,35); img1_off.src="images/home2_off.gif";
var img2_off= new Image(75,35); img2_off.src="images/dates2_off.gif";
var img3_off= new Image(75,35); img3_off.src="images/photos2_off.gif";
var img4_off= new Image(75,35); img4_off.src="images/contact2_off.gif";
var img1_on= new Image(75,35); img1_on.src="images/home2_on.gif";
var img2_on= new Image(75,35); img2_on.src="images/dates2_on.gif";
var img3_on= new Image(75,35); img3_on.src="images/photos2_on.gif";
var img4_on= new Image(75,35); img4_on.src="images/contact2_on.gif";
}
function imgOn(the_name) {
	if (document.images) {
	document.images[the_name].src=eval(the_name + "_on.src");
	}
}

function imgOff(the_name) {
	if (document.images) {
	document.images[the_name].src=eval(the_name + "_off.src");
	}
}
//----------------------
//this function places the cursor in the first box for contact form
function startFocus() 
{
	document.contactForm.Your_Name.focus();
}

//----------------

// this function checks input to "contact us" form

function check_it()
{
   var complete;
 
   var tomatchname=/[A-Za-z\'\-\s]/i;
   var formname=document.contactForm.Your_Name.value;

	if ((formname =="") ||(formname == null))
	{ window.alert("Your name is a required field.  Please enter with letters, no numbers");
	document.contactForm.Your_Name.focus();
	return false;}
	
		
      	if (tomatchname.test(formname))
      	{ 
	complete = true;}
      	else
      	{ window.alert("Your name must be letters only, no numbers.  Please check it.");
	document.contactForm.Your_Name.focus(); 
	return false;}

   var tomatchmail=/[A-Za-z0-9\-\.\_]{2,}@[A-Za-z0-9\-]{3,}\.[A-Za-z]{2,}/i;
   var formmail=document.contactForm.Your_eMail.value;
	if ((formmail =="") ||(formmail == null))
	{ window.alert("Your email address is a required field.  Please enter your email address.");
	complete = false;}
	
	if (tomatchmail.test(formmail))
	{ 
	complete = true;}
	else
	{ window.alert("Your email address does not seem valid. Please check it");
	document.contactForm.Your_eMail.focus();
	return false;}

   var tomatchphone=/[0-9\-\s]{12,}/;
   var formphone=document.contactForm.Phone.value;
	if (tomatchphone.test(formphone))
	{ 
	completee = true;}
	else
	{ window.alert("Your Phone number does not look right. It can be numbers and dashes only. Please double-check it.");
	document.contactForm.Phone.focus();
	return false;}

}
	






