//弹出窗倒计时自动关闭
var cTime = 3;//应该是0就可以了
function timeClose()
{
var countDown = window.setTimeout('timeClose()',1000);
$("#tancengTitle").html("提示");
$("#tancengText").html("<font style='font-size: 20px;' color='red'>邮件已经发送成功</font><br /><font style='font-size:14px;'>窗口将在三秒后关闭</font>  <font style='color:red;'><b>"+cTime+"</b></font>");
opentanceng();
if(cTime <= 0)
{
hideMes();
clearTimeout(countDown);
return false;
}
cTime--;
}
function timeClose()
{
var countDown = window.setTimeout('timeClose()',1000);
$("#tancengTitle").html("提示");
$("#tancengText").html("<font style='font-size: 20px;' color='red'>邮件已经发送成功</font><br /><font style='font-size:14px;'>窗口将在三秒后关闭</font>  <font style='color:red;'><b>"+cTime+"</b></font>");
opentanceng();
if(cTime <= 0)
{
hideMes();
clearTimeout(countDown);
return false;
}
cTime--;
}
function sendEmail(){
cTime = 3;
cTime = 3;
$.ajax({
type: "POST",
url: "/ecenter/servicesModule/memberNew/sendReferrerEmail",
data: "entryName="+entryName+"&EmailTF="+emailInput,
contentType:'application/x-www-form-urlencoded;charset=utf-8',
success: function(data){
if(data=="false"){
$("#EmailTF").val("");
$("#tancengTitle").html("");
$("#tancengText").html("邮件发送失败");
opentanceng();
}else{
$("#EmailTF").val("");
timeClose();
// closeWindow();
}
}
});
}
type: "POST",
url: "/ecenter/servicesModule/memberNew/sendReferrerEmail",
data: "entryName="+entryName+"&EmailTF="+emailInput,
contentType:'application/x-www-form-urlencoded;charset=utf-8',
success: function(data){
if(data=="false"){
$("#EmailTF").val("");
$("#tancengTitle").html("");
$("#tancengText").html("邮件发送失败");
opentanceng();
}else{
$("#EmailTF").val("");
timeClose();
// closeWindow();
}
}
});
}