function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}

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}
}
}

<!-- Newsletter -->

function validate_newsletter(thisform)
{
with (thisform)
{
if (validate_email(email,"An Email Address is required!")==false)
{email.focus();return false}
}
}

<!-- Contact Form -->

function validate_contact(thisform)
{
with (thisform)
{
if (validate_required(name,"Your name is required!")==false)
{name.focus();return false}
if (validate_email(email,"An Email Address is required!")==false)
{email.focus();return false}
if (validate_required(homephone,"Phone Number is required!")==false)
{homephone.focus();return false}
if (validate_required(message,"A Message is required!")==false)
{message.focus();return false}
}
}

<!-- Rollover Images -->

<!-- <img src="imgs/map1.jpg" class="domroll imgs/map2.jpg" border="0" /> -->

function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();

<!-- Open Fixed Windows -->

<!-- Include the following within the page somewhere - <a href="" onclick="NewWindow(this.href,'name','width','height','yes');return false"> -->

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}