document.write('<script src="/label/script/intf_label.js"></script>');
function checkmsg(id,tishixinxi,settodo){
	$.get("/passport/informationcall.php",{act:"userisinfo",id:id,tishixinxi:tishixinxi,settodo:settodo},function ( data ){
		if(data==0){
			alert("请选登陆");
			window.location.href='/passport/index.php?act=login&redirect='+window.location.href;
		}else{
			showHtml(data)
		}
	})
}
function showHtml(data){
	var html=friendgetHtml(data);
	$("body").append(html);
	$("#Temp").height(getHeight());
	$("#Temp1").css("top",document.documentElement.scrollTop+180);
	if (window.navigator.userAgent.indexOf("MSIE")>=1)
	$("#Temp1").css("left",document.body.clientWidth/2-200);
    
}
function friendgetHtml(html){
	return html;
}
function addpost(id,thiss,setstr,settodo){

	if(Validator.Validate(thiss,2)){
    postfrom(thiss,setstr,id,settodo);
	    return false;
	}else{
		return false;
	}
	
}

function postfrom(thiss,setstr,id,settodo){
		
    var menttruename = setstr.split("truename");
	if(menttruename[1] != null){
        $.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"truename",name:thiss.truename.value},function ( data ){
	    })
	}
	
    var mentcompany = setstr.split("company");
	if(mentcompany[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"company",name:thiss.company.value,id:thiss.workid.value},function ( data ){
		})
	}
	
    var mentmobile = setstr.split("mobile");
	if(mentmobile[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"mobile",name:thiss.mobile.value},function ( data ){
		})
	}
	
    var mentphone = setstr.split("phone");
	if(mentphone[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"phone",name:thiss.phone.value},function ( data ){
		})
	}

    var mentaddress = setstr.split("address");
	if(mentaddress[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"address",name:thiss.address.value},function ( data ){
		})
	}
	
    var mentduty = setstr.split("duty");
	if(mentduty[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"duty",name:thiss.duty.value,id:thiss.workdutyid.value},function ( data ){
		})
	}

    var mentpostalcode = setstr.split("postalcode");
	if(mentpostalcode[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"postalcode",name:thiss.postalcode.value},function ( data ){
		})
	}

    var mentfax = setstr.split("fax");
	if(mentfax[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"fax",name:thiss.fax.value},function ( data ){
		})
	}


    var mentjobhonor = setstr.split("jobhonor");
	if(mentjobhonor[1] != null){
		jobhonorstr = thiss.jobhonor_1.value;
		var jobhonor_2=document.getElementById('jobhonor_2');
		if(jobhonor_2!=null){
		jobhonorstr = jobhonorstr + ","+thiss.jobhonor_2.value;
		}
		var jobhonor_3=document.getElementById('jobhonor_3');
		if(jobhonor_3!=null){
		jobhonorstr = jobhonorstr + ","+thiss.jobhonor_3.value;
		}
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"jobhonor",name:jobhonorstr,id:thiss.jobhonorid.value},function ( data ){
		})
	}

    var mentindustry = setstr.split("industry");
	if(mentindustry[1] != null){
		industrystr = thiss.industry_1.value;
		var industry_2=document.getElementById('industry_2');
		if(industry_2!=null){
		industrystr = industrystr + ","+thiss.industry_2.value;
		}
		var industry_3=document.getElementById('industry_3');
		if(industry_3!=null){
		industrystr = industrystr + ","+thiss.industry_3.value;
		}
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"industry",name:industrystr,id:thiss.industryid.value},function ( data ){
		})
	}
	
	
    var mentstreet = setstr.split("street");
	if(mentstreet[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"street",name:thiss.street.value,id:thiss.streetid.value},function ( data ){
		})
	}
	
	
    var mentcompho = setstr.split("compho");
	if(mentcompho[1] != null){
		$.get("/passport/informationcall.php",{act:"updateisinfo",typedata:"compho",name:thiss.compho.value,id:thiss.comphoid.value},function ( data ){
		})
	}
	
	closehtml();
	settodostr = settodo+'("'+id+'");';
	setTimeout(settodostr,600);//延时3秒 
	
}

function closehtml(){
	$("#htmldiv").empty();
	$("#htmldiv").remove();
}

function getHeight(){

    var yScroll;

    if (window.innerHeight && window.scrollMaxY) {
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
        yScroll = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
        yScroll = document.body.offsetHeight;
    }
    var windowHeight;
    if (self.innerHeight) { // all except Explorer
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
    // Explorer 6 Strict Mode
       windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
       windowHeight = document.body.clientHeight;
    }

    // for small pages with total height less then height of the viewport
    if(yScroll < windowHeight){
        pageHeight = windowHeight;
    } else {
        pageHeight = yScroll;
    }
      return pageHeight;
}

