function newimage (imagename,filename) {        
     document.images[imagename].src = filename;}
	 
	 
function jumpPage(newLoc) {
			newPage = newLoc.options[newLoc.selectedIndex].value
	
			if (newPage != "") {
				window.location.href = newPage
			}
		}
		
<!-- contact us -->

//function to reject comments that include HTML in <> brackets 
function ValidComment(item) {
var htmlspec = /<(.|\n)+?>/; //regular expression defining HTML code <something> 
	if (item.search(htmlspec) != -1) return false;
	return true;
}

//function to reject submissions that include address with 'East 161st Street' 
function ValidAddress(item) {
var addrspec = /East 161st Street/; //regular expression including East 161st Street 
	if (item.search(addrspec) != -1) return false;
	return true;
}

	
//global variable for error flag
var errfound = false;
//function to validate by length
function ValidLength(item, len) {
   return (item.length >= len);
}
//function to validate an email address
function ValidEmail(item) {
   if (!ValidLength(item, 5)) return false;
   if (item.indexOf ('@', 0) == -1) return false;
   return true;
}
// display an error alert
function error(elem, text) {
// abort if we already found an error
   if (errfound) return;
   window.alert(text);
   elem.select();
   elem.focus();
   errfound = true;
}
// main validation function
function Validatecontact() {
   errfound = false;
   if (!ValidEmail(document.form.email.value))
      error(document.form.email,"Please enter your email address [ex. you@aol.com]");
   if (!ValidLength(document.form.name.value,1))
      error(document.form.name,"Please enter your name");
   if (!ValidLength(document.form.address1.value,1))
      error(document.form.address1,"Please enter your address");
   if (!ValidAddress(document.form.address1.value))
      error(document.form.address1,"Please enter a real address");
   if (!ValidLength(document.form.country.value,1))     
      error(document.form.country,"Please enter your country");
   if (!ValidComment(document.form.comments.value))
      error(document.form.comments,"HTML code is not allowed in the comment");
   return !errfound; /* true if there are no errors */
}

