function valCont(){

	if(document.contact.email.value.length==0) { alert('Please enter your email id.'); document.contact.email.focus(); return false;}

if(echeck(document.contact.email.value)==false){ document.contact.email.value=""; document.contact.email.focus(); return false;}



//-------------------------------------------------------------------------------------------------------------------

var check_status=0;

if(document.getElementById('chk1').checked) { check_status=check_status+1;}

if(document.getElementById('chk2').checked) { check_status=check_status+1;}

if(document.getElementById('chk3').checked) { check_status=check_status+1;}

if(document.getElementById('chk4').checked) { check_status=check_status+1;}

if(document.getElementById('chk5').checked) { check_status=check_status+1;}

if(document.getElementById('chk6').checked) { check_status=check_status+1;}

if(document.getElementById('chk7').checked) { check_status=check_status+1;}

if(document.getElementById('chk8').checked) { check_status=check_status+1;}

if(document.getElementById('chk9').checked) { check_status=check_status+1;}

if(document.getElementById('chk10').checked) { check_status=check_status+1;}

if(document.getElementById('chk11').checked) { check_status=check_status+1;}

if(document.getElementById('chk12').checked) { check_status=check_status+1;}

if(document.getElementById('chk13').checked) { check_status=check_status+1;}

if(document.getElementById('chk14').checked) { check_status=check_status+1;}

if(document.getElementById('chk15').checked) { check_status=check_status+1;}

if(document.getElementById('chk16').checked) { check_status=check_status+1;}

if(document.getElementById('chk17').checked) { check_status=check_status+1;}

if(document.getElementById('chk18').checked) { check_status=check_status+1;}

if(document.getElementById('chk19').checked) { check_status=check_status+1;}

if(document.getElementById('chk20').checked) { check_status=check_status+1;}







 

if((document.contact.staff.value == "")&&(check_status==0)) { alert('Please select checkbox or name from drop down list.'); document.contact.staff.focus(); return false;}



if((document.contact.staff.value != "")&&(check_status!=0)) { alert('You have selected both check box and drop down, please select one'); document.contact.staff.focus(); return false;}



//--------------------------------------------------





if(document.contact.Question.value.length==0) { alert('Please enter your comments.'); document.contact.Question.focus(); return false;}

}



function echeck(str) {

	var at="@"

	var dot="."

	var lat=str.indexOf(at)

	var lstr=str.length

	var ldot=str.indexOf(dot)

	if (str.indexOf(at)==-1){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.indexOf(at,(lat+1))!=-1){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.indexOf(dot,(lat+2))==-1){

		alert("Invalid E-mail ID")

		return false

	}

	if (str.indexOf(" ")!=-1){

		alert("Invalid E-mail ID")

		return false

	}

	return true					

}

