function checkEmail(email) {
	if(email.indexOf("@") == -1 || email.indexOf(".") == -1){
		return false;
	}
	else{ 
		var first=email.split("@");
		var user=first[0];
		var second=first[1].split(".");
		var domain=second[0];
		var ending=second[1];
		if(user.length<2||domain.length<2||ending.length<2){
			return false;
		}
		else{
			return true;
		}
	}
}

function validateContact(){
	var submited;
	submited=checkEmail(document.getElementById("from").value)
	if(document.getElementById('topic').value.length==0)
		submited=false;
	if(document.getElementById('message').value.length==0)
		submited=false;
	return submited;
}
