function isEmail(s){
 	var p = /^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.){1,4}[a-z]{2,3}$/i; 
 	return p.test(s);
}



function Contact(){

	var contact_type=$('#c_realname').val();
	if(contact_type==""){
		$('#c_realname_error').html("姓名不能为空！");
		return false;
	}else{
		$('#c_realname_error').html("");
	}

	var contact_type=$('#c_address').val();
	if(contact_type==""){
		$('#c_address_error').html("地址不能为空！");
		return false;
	}else{
		$('#c_address_error').html("");
	}

	var c_email_error=$('#c_email').val();
	if(c_email_error==""){
		$('#c_email_error').html("电子邮件不能为空！");
		return false;
	}else if(!isEmail(c_email_error)){
		$('#c_email_error').html("电子邮件格式不正确！");
		return false;
	}else{
		$('#c_email_error').html("");	
	}

	var contact_tel=$('#c_tel').val();
	if(contact_tel==""){
		$('#c_tel_error').html("电话号码不能为空！");
		return false;
	}else{
		$('#c_tel_error').html("");
	}

	var contact_name=$('#c_con').val();
	if(contact_name==""){
		$('#c_con_error').html("咨询内容不能为空！");
		return false;
	}else{
		$('#c_con_error').html("");
	}

	return true;

}