$().ready(function(){
var msn=window.location.search; //location.search是从当前URL的?号开始的字符串 a=1&b=1
var args=msn.split("?");
var strs=args[1];
var str=strs.split("&");
var parms=new Array();
for(var i=0;i<str.length;i++){
var args=str[i].split("=");
parms[i]=args[1];
}
var date=new Date();
var year="";
var month="";
var day="";
year=date.getFullYear();
month=date.getMonth()+1;
day=date.getDate()+1;
var custName = parms[0];
custName =decodeURI(custName);
//alert("custName ="+parms[0]);
document.getElementById("name").innerHTML=custName;
//alert(document.getElementById("name").innerHTML);
var gender=parms[1];
if(gender==1){
document.getElementById("gender").innerHTML="男";
}else{
document.getElementById("gender").innerHTML="女";
}
//alert("gender ="+parms[1]);
var birthday=parms[2];
document.getElementById("birthday").innerHTML=birthday;
//alert("birthday ="+parms[2]);
var idNo=parms[3];
document.getElementById("idNo").innerHTML=idNo;
//alert("idNo ="+parms[3]);
var mobile=parms[4];
document.getElementById("mobile").innerHTML=mobile;
//alert("mobile ="+parms[4]);
var address=parms[5];
address =decodeURI(address);
document.getElementById("address").innerHTML=address;
//address =decodeURI(address);
//alert("address ="+parms[5]);
var email=parms[6];
document.getElementById("email").innerHTML=email;
//alert("email ="+parms[6]);
var rHolderInst=parms[7];
if(rHolderInst==5){
$("#jjj").hide();
document.getElementById("rHolderInst").innerHTML="本人";
}else if(rHolderInst==1){
document.getElementById("rHolderInst").innerHTML="配偶";
}else if(rHolderInst==2){
document.getElementById("rHolderInst").innerHTML="子女";
}else if(rHolderInst==3){
document.getElementById("rHolderInst").innerHTML="父母";
}else{
document.getElementById("rHolderInst").innerHTML="其它";
}
//alert("rHolderInst ="+parms[7]);
var beneficiaryType=parms[8];
document.getElementById("beneficiaryType").innerHTML="同被保险人";
//alert("beneficiaryType ="+parms[8]);
var validateDate=parms[9];//保险期间
//document.getElementById("startDate").innerHTML=year+"-"+month+"-"+day;
document.getElementById("startDate").innerHTML=validateDate;
//alert("startDate ="+parms[9]);
var expirationDate=parms[10];
document.getElementById("endDate").innerHTML=expirationDate;
//alert("endDate ="+parms[10]);
var chargeType=parms[11];//1,‘年交‘,2,‘半年交‘,3,‘‘,4,‘月交‘,5,‘趸交‘
if(chargeType==1){
document.getElementById("chargeType").innerHTML="年交";
}else if(chargeType==2){
document.getElementById("chargeType").innerHTML="半年交";
}else if(chargeType==3){
document.getElementById("chargeType").innerHTML="";
}else if(chargeType==4){
document.getElementById("chargeType").innerHTML="月交";
}else if(chargeType==5){
document.getElementById("chargeType").innerHTML="趸交";
}
// alert("chargeType ="+parms[11]);
var chargeYear=parms[12];
document.getElementById("chargeYear").innerHTML=chargeYear;
// alert("chargeYear ="+parms[12]);
var amount=parms[13];
document.getElementById("amount").innerHTML=amount+".00";
// alert("amount ="+parms[13]);
var premium=parms[14];
document.getElementById("premium").innerHTML=premium+".00";
// alert("premium ="+parms[14]);
var checkFlag=parms[15];
if(checkFlag==1){
$("#button").addClass("send_btn_dis");
$("#button").attr("disabled",true);
}
// alert("checkFlag ="+parms[15]);
var blueInnerName=parms[16];
//blueInnerName =decodeURI(blueInnerName);
//document.getElementById("blueInnerName").innerHTML=blueInnerName;
// alert("blueInnerName ="+parms[16]);
var applyId=parms[17];
// alert("applyId ="+parms[17]);
if(rHolderInst!=5){
//被保人信息
var custName2 = parms[18];
custName2 =decodeURI(custName2);
//alert("custName ="+parms[0]);
document.getElementById("name2").innerHTML=custName2;
//alert(document.getElementById("name").innerHTML);
var gender2=parms[19];
if(gender2==1){
document.getElementById("gender2").innerHTML="男";
}else{
document.getElementById("gender2").innerHTML="女";
}
//alert("gender2 ="+parms[19]);
var birthday2=parms[20];
document.getElementById("birthday2").innerHTML=birthday2;
//alert("birthday ="+parms[20]);
var idNo2=parms[21];
document.getElementById("idNo2").innerHTML=idNo2;
//alert("idNo2 ="+parms[21]);
}
//验证投保声明
/* var b=$("#shengming").text().trim();
$("textarea").click(function(){
var a=$("#shengming2").find("textarea").val().trim();
if(a=="请抄录上方红色字体表示的投保声明文字内容。"){
$("textarea").val("");
}
});
$(‘textarea‘).blur(function () {
var a=$("#shengming2").find("textarea").val().trim();
if($("textarea").val()==""){
$("textarea").val("请抄录上方红色字体表示的投保声明文字内容。");
}else if(a!=b){
alert("请正确输入投保声明的内容。");
$(‘textarea‘).focus();
}
}); */
});
function check(){
var msn=window.location.search; //location.search是从当前URL的?号开始的字符串 a=1&b=1
var args=msn.split("?");
var strs=args[1];
var str=strs.split("&");
var parms=new Array();
for(var i=0;i<str.length;i++){
//var args=str[i].split("=");
// parms[i]=args[1];
var args=str[i].indexOf("=");
parms[i]=str[i].substring(args+1);
}
var applyId=parms[17];
var checkFlag=parms[15];
var hf1 = "http://baoxian.cntaiping.com/shop/updatecheckflag.action?applyId=" + applyId;
var actionUrl=hf1;
var a=$("#shengming2").find("textarea").val().trim();
var b=$("#shengming").text().trim();
if(a!=b){
alert("请正确输入投保声明的内容。");
$(‘textarea‘).focus();
return false;
}else if($("input[name=‘haha‘]").attr("checked")==undefined){
alert("请先阅读投保的相关信息,选择已阅读,再确认投保。");
$("input[name=‘haha‘]").focus();
return false;
}else{
$.ajax({
type:"post",
url:actionUrl,
async :false,
success:function(data){
if(data=="success"){
$("#button").addClass("send_btn_dis");
alert("感谢您投保太平保险产品,稍后会有客服与您联系,帮助您完成投保。欢迎访问太平网上商城了解更多网销产品baoxian.cntaiping.com");
$("#button").attr("disabled",true);
}else{
alert("确认失败!");
}
}
});
}
};
</script>
<script type="text/javascript">
function item_open(o){
/* var pop_h=document.body.scrollHeight+"px";
$(".item_black").css("height",pop_h);
$(".item_black").show(); */
$("#item_"+o).show();
}
function item_close(o){
/* $(".item_black").hide(); */
$("#item_"+o).hide();
}
</script>