function makeDate() {
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(lmonth + " ");
document.write(date + ", " + year);
}

function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain; 
	window.location = locationstring; 
}

function emailVal(theValue) {
	mailPattern = /^([\w-]+\.?)*\w+@([\da-zA-z-]+\.)+[a-zA-z]{2,4}$/;
	if (mailPattern.test(theValue)) {
		return true;
      }
	else {
		return false;
      }
}

function simpleform() {		

    var returnState = true;
    var themessage = "Please double check the following fields: ";
	
    if (document.contactform.Name.value=="") {
        themessage = themessage + "\n - Your name";
        returnState = false;
    }
    if (!emailVal(document.contactform.Email.value)) {
        themessage = themessage + "\n - Your email address";
        returnState = false;
    }	
    if (document.contactform.comments.value=="") {
        themessage = themessage + "\n - Your comments or questions";
        returnState = false;
    }	
   if (document.contactform.imgverify.value=="") {
        themessage = themessage + "\n - The anti-spam verification text";
        returnState = false;
    }	
    if (!returnState) {
        alert(themessage)
    }
    return returnState;
}


function menuFix() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
		this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onMouseDown=function() {
		this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onMouseUp=function() {
		this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
		}
	}
}
window.onload=menuFix;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);