function externalLinks() {
	if (!document.getElementsByTagName) return;
	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";
	}
}

function validate_email(field,alerttxt) {
	with (field) {
		apos = value.indexOf("@")
		dotpos = value.lastIndexOf(".")
		if (apos < 1 || dotpos-apos < 2) {
			alert(alerttxt);
			return false
		}
		else {
			return true
		}
	}
}

function validate_form(thisform) {
  with (thisform) {
		if (validate_email(email,"Please enter a valid e-mail address") == false) {
			email.focus();
			return false
		}
	}
}
