function checkVal() {
	if(document.contact.contactName.value==''){
	document.getElementById('errors').innerHTML="Please fill your name";
	document.getElementById('errors1').innerHTML="";
	document.getElementById('contactName').style.borderColor="red";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";
	document.contact.contactName.focus();
	return (false);	
	}	  if(document.contact.contactEmail.value!=''){
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.contactEmail.value))){
    document.getElementById('errors1').innerHTML="Please fill the right e-mail";
	document.getElementById('errors').innerHTML="";
	document.getElementById('contactEmail').style.borderColor="red";
	document.getElementById('contactName').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";	
	document.contact.contactEmail.focus();
	return (false);
	}
	
	}
	if(document.contact.contactMassege.value==''){
	document.getElementById('errors2').innerHTML="Please give your feedback";
	document.getElementById('contactMassege').style.borderColor="red";
	document.getElementById('contactName').style.borderColor="#cccccc";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.contact.contactMassege.focus();
	return (false);		
	} return (true);	
}
function restrictToNumbers(myfield, e) {
	var key;
	var keychar;
	if (window.event) {
		key = window.event.keyCode;
	} else if (e) {
		key = e.which;
	} else {
		return true;
	}
	keychar = String.fromCharCode(key);
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) {
		return true;
	} else if ((("0123456789").indexOf(keychar) > -1)) {
		return true;
	} else {
		return false;
	}
}
function show(){
	document.getElementById('msg').style.display="none";
}
function checkVal1() {
	if(document.contact.contactpos.value==''){
	document.getElementById('errors5').innerHTML="Please fill your Position";
	document.getElementById('errors1').innerHTML="";
	document.getElementById('contactpos').style.borderColor="red";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";
	document.contact.contactpos.focus();
	return (false);	
	}if(document.contact.contactsub.value==''){
	document.getElementById('errors6').innerHTML="Please fill your Subject";
	document.getElementById('errors5').innerHTML="";
	document.getElementById('contactsub').style.borderColor="red";
	document.getElementById('contactpos').style.borderColor="#cccccc";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";
	document.contact.contactsub.focus();
	return (false);	
	}if(document.contact.contactName.value==''){
	document.getElementById('errors').innerHTML="Please fill your name";
	document.getElementById('errors1').innerHTML="";
	document.getElementById('errors5').innerHTML="";
	document.getElementById('errors6').innerHTML="";
	document.getElementById('contactpos').style.borderColor="#cccccc";
	document.getElementById('contactsub').style.borderColor="#cccccc";
	document.getElementById('contactName').style.borderColor="red";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";
	document.contact.contactName.focus();
	return (false);	
	}	if(document.contact.contactEmail.value==''){
	document.getElementById('errors1').innerHTML="Please fill the e-mail";
	document.getElementById('errors').innerHTML="";
	document.getElementById('contactEmail').style.borderColor="red";
	document.getElementById('contactName').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";
	document.contact.contactEmail.focus();
	return (false);	
	}  if(document.contact.contactEmail.value!=''){
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.contactEmail.value))){
    document.getElementById('errors1').innerHTML="Please fill the right e-mail";
	document.getElementById('errors').innerHTML="";
	document.getElementById('contactEmail').style.borderColor="red";
	document.getElementById('contactName').style.borderColor="#cccccc";
	document.getElementById('contactMassege').style.borderColor="#cccccc";	
	document.contact.contactEmail.focus();
	return (false);
	}
	
	}
	if(document.contact.contactMassege.value==''){
	document.getElementById('errors2').innerHTML="Please give your Comments";
	document.getElementById('errors').innerHTML="";
	document.getElementById('errors1').innerHTML="";
	document.getElementById('contactMassege').style.borderColor="red";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
    document.getElementById('contactName').style.borderColor="#cccccc";
	document.getElementById('contactEmail').style.borderColor="#cccccc";
	document.contact.contactMassege.focus();
	return (false);		
	} return (true);	
}
