var curlight

// preload 
var pica = new Array();
var picb  = new Array();
for(i=1;i<=6;i++) {
	pica[i] = new Image();
	picb[i] = new Image();
	pica[i].src = "images/nav"+i+".gif";
	picb[i].src = "images/nav"+i+"on.gif";
}
	
function over(which) {
theImage = eval("document.nav" + which);
if (which!=curlight) theImage.src = "images/nav"+which+"on.gif";
}

function out(which) {
theImage = eval("document.nav" + which);
if (which!=curlight) theImage.src = "images/nav"+which+".gif";
else theImage.src = "images/nav"+which+"on.gif"; 
}

function light(which) {
theImage = eval("document.nav" + which);
theImage.src = "images/nav"+which+"on.gif";
curlight = which;
}




function validate_contact(Obj) { 
var x
var msg
var flag
msg="<img src='images/alert.gif' width=16 height=16 align=absmiddle> <b>Missing information:</b><br>"

x = new String (Obj.name.value);
if (x.length<1) {
	msg+="<li>Name<br>"
	flag="0"
}

x = new String (Obj.email.value);
if (x.length<1) {
	msg+="<li>Email<br>"
	flag="0"
}
else {
var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
var returnval=emailfilter.test(x)
if (returnval==false){
	msg+="<li>Email not valid<br>"
	flag="0"
	}
}

x = new String (Obj.strCAPTCHA.value);
if (x.length<1) {
	msg+="<li>Unti spam code<br>"
	flag="0"
}

x = new String (Obj.comments.value);
if (x.length<1) {
	msg+="<li>Message<br>"
	flag="0"
}

if (flag=="0") {
document.getElementById("errormsg1").style.display="block";
document.getElementById("errormsg1").innerHTML=msg;
return false
}
else {
return  true
}
}


function openVideo(which) {
window.open("videoPlayer.asp?file="+which,"videoPlayer","width=500,height=560,top=50,left=50,resizable=no");
}
