// JavaScript Document 

function mouseOver(obj) {
	var temp=obj.src.split("lang");
	var temp2=temp[1].split(".");
	var fn=temp[0]+"lang"+temp2[0]+"_hi."+temp2[1];
	obj.src=fn;
}

function mouseOut(obj) {
	var temp=obj.src.split("_hi");
	var fn=temp[0]+temp[1];
	obj.src=fn;
}

function checkAndSubmit() {
	var valid=true;
	var bn=document.getElementById('bname').value;
	var cn=document.getElementById('cname').value;
	var em=document.getElementById('email').value;
	if (bn=="" || bn.length<3) {
		valid=false;
		document.getElementById('bname').style.backgroundColor="#ffeeee";
		document.getElementById('bname').style.borderColor="#ff0000";
	} else {
		document.getElementById('bname').style.backgroundColor="";
		document.getElementById('bname').style.borderColor="";
	}
	if (cn=="" || cn.length<3) {
		valid=false;
		document.getElementById('cname').style.backgroundColor="#ffeeee";
		document.getElementById('cname').style.borderColor="#ff0000";
	} else {
		document.getElementById('cname').style.backgroundColor="";
		document.getElementById('cname').style.borderColor="";
	}
	if (em=="") {
		valid=false;
		document.getElementById('email').style.backgroundColor="#ffeeee";
		document.getElementById('email').style.borderColor="#ff0000";
	} else {
		document.getElementById('email').style.backgroundColor="";
		document.getElementById('email').style.borderColor="";
		if (em.indexOf('@')==-1 || em.indexOf('.')==-1) {
			valid=false;
			document.getElementById('email').style.backgroundColor="#ffeeee";
			document.getElementById('email').style.borderColor="#ff0000";
		}
	}
	if (valid==true) {
		document.getElementById('cform').submit();
	}
}
