function pageLinkMouseOver(argLink)
{
    argLink.style.color='#CB0133';
}
function pageLinkMouseOut(argLink)
{
    argLink.style.color='#231F20';
}
/* function to get the correct content for the clicked link */
function getContent(index) {
	/*
	document.all.title_div.innerHTML = theArray[index].title;
	document.all.content_div.innerHTML = theArray[index].content;
	document.all.mainImage.src = theArray[index].mp;
	
	for (var i=0; i<document.all.link_div.length; i++) {
		if (i == index - 1) {
			document.all.link_div[i].innerHTML = theArray[index].selButton;
		} else {
			document.all.link_div[i].innerHTML = theArray[i + 1].regButton;
		}
	}
	*/
	if (index == 3) {
		var listingsWindow = window.open('http://www.greaterprincetonliving.com/listings.htm','listingsWindow');
	} 
	else if (index == 4) {
		var princetonWindow = window.open('http://www.realtor.com/FindNeig/NeigDetail.asp?detzp=08540','princetonWindow');
	} 
    else if (index == 5) {
		var princetonWindow = window.open('http://www.glorianilson.com','princetonWindow');
	}
	else if (index == 6) {
		var princetonWindow = window.open('http://MaureenProvenzano.myglorianilsonagent.com','princetonWindow');
	} 
		
}
function openTownshipSite(index) {

	var townWindow;	

	if(index == 1) {
		townWindow = window.open('http://www.princetontwp.org/','townWindow');
	}
	else if (index == 2) {
		townWindow = window.open('http://www.westwindsornj.org/','townWindow');
	} 
        else if (index == 3) {
		townWindow = window.open('http://www.cranburytownship.org/','townWindow');
	}
	else if (index == 4) {
		townWindow = window.open('http://www.hopewelltwp.org/','townWindow');
	} 
        else if (index == 5) {
		townWindow = window.open('http://www.montgomery.nj.us/','townWindow');
	}
	else if (index == 6) {
		townWindow = window.open('http://www.lawrencetwp.com/','townWindow');
	}
}

/* function to change the windows status msg */
function changeWindowStatus(newMsg) {
	self.status = newMsg;
}

function defaultWindowStatus() {
	var defaultMsg="Call Maureen Provenzano at (609) 452-1887 or Email: maureenthepro@aol.com";
	self.status = defaultMsg;
}

/* function to validate form data */
function validateForm() {
	
	if (document.forms[0].Name) {
		if (document.forms[0].Name.value == '') {
			alert("Please enter your name.");
			document.forms[0].Name.focus();
			return false;
		}
	}
	
	if (document.forms[0].UserEmail) {
		if (document.forms[0].UserEmail.value == '') {
			alert("Please enter your email address.");
			document.forms[0].UserEmail.focus();
			return false;
		}
	}

	if (document.forms[0].Phone) {
		if (document.forms[0].Phone.value == '') {
			alert("Please enter your phone number.");
			document.forms[0].Phone.focus();
			return false;
		}
	}
	
	return true;
}
