// JavaScript Document

// Generic JavaScript interactions library

// image definitions

homeon			=	new Image(200,30);
homeon.src 		=	"images/nav/home_on.gif";
homeoff			=	new Image(200,30);
homeoff.src		=	"images/nav/home_off.gif";

consultationon			=	new Image(200,30);
consultationon.src 		=	"images/nav/consultation_on.gif";
consultationoff			=	new Image(200,30);
consultationoff.src		=	"images/nav/consultation_off.gif";

contacton			=	new Image(200,30);
contacton.src 		=	"images/nav/contact_on.gif";
contactoff			=	new Image(200,30);
contactoff.src		=	"images/nav/contact_off.gif";

meeton			=	new Image(200,30);
meeton.src 		=	"images/nav/meet_on.gif";
meetoff			=	new Image(200,30);
meetoff.src		=	"images/nav/meet_off.gif";

linkson			=	new Image(200,30);
linkson.src 		=	"images/nav/links_on.gif";
linksoff			=	new Image(200,30);
linksoff.src		=	"images/nav/links_off.gif";

function rollover(imgName){
	document.getElementById(imgName).src = eval(imgName + "on.src");	
}

function rolloff(imgName){
	document.getElementById(imgName).src = eval(imgName + "off.src");	
}

function not_blank(el){
	return el != '';	
}

function is_email(el){
	if((el.value != '')&&((el.value.indexOf('@') < 0) || (el.value.indexOf('.') < 0))){
		el.focus(); el.select();
		//result = alert ("This email address is not correct\nPlease update it");
	}
}

function validate(frmName){
	frm = document.getElementById(frmName);
	if(!frm.policy.checked){
		alert("Please read and agree to our\nPrivacy Policy.");
		return false;
	} else { 
		if((frm.name != '')&&(frm.email != '')){
			frm.submit(); 
				} else { alert ("Please fill in your contact details\nto sign up to our newsletter"); }			
	}
}