//********************* Beginning of Pop-Up (right Click) ******************************//

PopUpURL    = "fwd.html";
PopUpLeft   =  300;
PopUpTop    =  400;
PopUpWidth  =  200;
PopUpHeight =  200;

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
popO='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight

if (isIE||isNN){
document.oncontextmenu=checkV;
}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;}

function checkV(e){{
dPUW=window.open(PopUpURL,'nrc',popO);
return false;}}

function popUpOther(){
popWin = open("Other.html","myWin","width=300,height=600, left=300, top=100, resizable=no")
popWin.focus() 
} 

//********************* End of Pop-Up (right Click) ******************************//

// *********************       Preload link Images       *******************//

if (document.images){
image1 = new Image(); image1.src = "media/hhome.jpg";
image2 = new Image(); image2.src = "media/habout.jpg";
image3 = new Image(); image3.src = "media/hmenu.jpg";
image4 = new Image(); image4.src = "media/hfranchises.jpg";
image5 = new Image(); image5.src = "media/heducation.jpg";
image6 = new Image(); image6.src = "media/hcampaign.jpg";
image7 = new Image(); image7.src = "media/hcontact.jpg";
image8 = new Image(); image8.src = "media/hlinks.jpg";
image9 = new Image(); image9.src = "media/hfoodforthought.jpg";
}

// *********************   End Preload link Images       *******************//

// *******************      Begin Form Validation       ******************

function  validateLinksForm(infoForm)
{
var url = /^\w{3,4}\:\/\/([\w\-\_]+\.){1}([\w\-\_]+(\.[\w\-\_]+|[\w\-\_]+))+(\/[\w\-\_\$]*)*(\.[\w\-\_]+)*$/i;

if (LINKS.link.value == "")
	{
		alert("You must enter a link")
		infoForm.link.focus()
		return false
	}
	if (LINKS.link.value.match(url) == null)
	{
		alert("The URL you entered does not appear to be valid. To submit, the URL must be in the format of 'http://' followed by 'www.webaddress.com'. Please try again.")
		infoForm.link.focus()
		return false
	}
}

function  validateForm(infoForm)
{
var email = /[\w\-]+\@[\w\-]+\.\w{2,3}/; 
var phone = /\d{3}\-\d{3}\-\d{4}/;
	if ((!FEEDBACK.phone.value=="") && (FEEDBACK.phone.value.match(phone) == null))
	{
		alert("It appears the phone number you've entered is incorrect. Please enter in the format of '555-555-5555'.")
		infoForm.phone.focus()
		return false
	}
	if ((!FEEDBACK.email.value=="") && (FEEDBACK.email.value.match(email) == null))
	{
		alert("It appears that the email address you have entered is invalid. Please check it and try again.")
		infoForm.email.focus()
		return false
	}
	if (FEEDBACK.comments.value=="") 
	{
		alert("Please take a moment to fill in the comments field before submitting.")
		infoForm.comments.focus()
		return false
	}
	
	location.href="tellthem.html";
	return true;
}



// *******************       End Form Validation        ******************




