function check_email()
{
var check_email = $("#reg_mail").val();
var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((/.[a-zA-Z0-9_-]{2,3}){1,2})$/;
flag = reg.test(check_email);
if(flag)
{
var email_value = $('#reg_mail').val();
$.get("[var.base_url]register.php",{check_name:"email",check_value:email_value,async:false},function(json){
//$('#res_mail').html(json);
if(json == "ok")
{
$('#res_mail').html("<font color='green' font-size='12'><b>此email可以注册!</b></font>");
tamp_email = true;
$.data("tamp_email",tamp_email);
//$('#sub_reg').attr("disabled", false);
}else{
$('#res_mail').html("<font color='red' font-size='12'><b>此email已被注册!</b></font>");
tamp_email = false;
$.data("tamp_email",tamp_email);
//$('#sub_reg').attr("disabled", true);
}
});
return tamp_email;
}else{
$("#res_mail").html("<font color='red' font-size='12'><b>请输入正确的邮箱地址!</b></font>");
return false;
}
}