//-----------------------------------------------------------------------------//sets target of external links to _blank//-----------------------------------------------------------------------------function externalLinks() {  var anchors = document.getElementsByTagName("a");  for (var i=0; i<anchors.length; i++) {    var anchor = anchors[i];    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")      anchor.target = "_blank";			    }}//----------------------//check the contact form//----------------------function validateForm(){ var x = document.forms[0].elements; var hasErrors = false; var already_set_focus = false; var error = "The following fields were not entered or are invalid...\n"; for (var i=0;i<x.length;i++) {  if (x[i].className.indexOf('required_field') != -1 && !x[i].value) {		hasErrors = true;		//append field to error message    error += "\""+x[i].id+"\"\n";		//set focus unless its already been done    if(!already_set_focus) {  		  x[i].focus();			already_set_focus = true;		}		//add onchange trigger		x[i].onchange = removeError;		//change the form field to have a red border		x[i].className += ' error';	}	 }  //if errors, alert if(hasErrors) alert(error);   return !hasErrors;}function removeError() {  this.className = this.className.substring(0,this.className.lastIndexOf(' '));	this.onchange = null;}//-----------------------------------------------------------------------------// Function to allow multiple onload functions to be called//-----------------------------------------------------------------------------window.onload = function (){  if (!document.getElementsByTagName) return;  externalLinks();}
