﻿    var xmlHttp;
    function createXMLHttpRequest()
    {
        if(window.ActiveXObject)
        {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        else if(window.XMLHttpRequest)
        {
            xmlHttp = new XMLHttpRequest();
        }
    }

        
    function startRequest()
    {
        createXMLHttpRequest();
        try
        {     
            xmlHttp.onreadystatechange = handleStateChange;
            xmlHttp.open("GET", "Default1.aspx?ct=1", true);
            xmlHttp.send(null);
        }
        catch(exception )
        {
            alert(exception);
            alert("请稍候再试!");
        }
    }
    function handleStateChange()
    {    
        if(xmlHttp.readyState == 4)
        {        
            if (xmlHttp.status == 200 || xmlHttp.status == 0)
            {   
                var param = xmlHttp.responseText;   
                $("#divlist").append(param);
                alert(param);
            }
        }
    }
    
    function popPlaceList(){
    $('#divdialogplace').fadeIn('fast');
    $('#popplace').css({'width': '100%','height': '800px','display': 'inline'});
    startRequest();
    }
    
    function showc(obj,objname){
    if($("#divct"+obj).text() == ""){
    }else{
      var pos = $("#aproc"+obj).position();   //父元素位置   
      var left = pos.left+40+ "px"; //偏移量
      var top = pos.top+15+ "px";
      $("#divct"+obj).css({
        "top": top,
        "left":left,
        "background":"#f0fccd",
        "color":"#666600"
    }).show();
     setTimeout(hidect2(obj),4000);//4秒定时关闭
    }   
    }
    
    function hidect(obj){
    $("#divct"+obj).hide();
    }
    
    function hidect2(obj){
    return function(){hidect(obj);}
    }
    
    function valuect(){
    var cc='';
    var num=1;
    $("input[name='ct']:checked").each(function(){cc+=$(this).val();if(num<$("input[name='ct']:checked").length){cc+=','};num++;});
    $('#UC_Head1_txt_place').val(cc);}
    
    function clearct(){
    $("input[name='ct']").each(function(){
    $(this).attr("checked",false);});
    }
    
    function selectct(objd){
    if($("input[name='ct']:checked").length<=5){
    }else{$(objd).attr("checked",false);alert("不能超过5项");}
    }
    
    function closect(){debugger;
    $("#divdialogplace").hide();
    $('#popplace').css({'width': '0','height': '0','display': 'none'});
    }
    
    function popPositionList(){
    $('#divdialogposition').fadeIn('fast');
    $('#popposition').css({'width': '100%','height': '800px','display': 'inline'});
    startRequest();
    }
    
    function showp(obj){
    if($("#divpt"+obj).text() == ""){
    }else{
      var pos = $("#aprop"+obj).position();   //父元素位置   
      var left = pos.left+40+ "px"; //偏移量
      var top = pos.top+15+ "px";
      $("#divpt"+obj).css({
        "top": top,
        "left":left,
        "background":"f0fccd",
        "color":"#666600"
    }).show();
     setTimeout(hidept2(obj),4000);//4秒定时关闭
    }   
    }
    
    function hidept(obj){
    $("#divpt"+obj).hide();
    }
    
    function hidept2(obj){
    return function(){hidept(obj);}
    }
    
    function valuept(){
    var pt='';
    var num=1;
    $("input[name='cp']:checked").each(function(){pt+=$(this).val();if(num<$("input[name='cp']:checked").length){pt+=','};num++;});
    $('#UC_Head1_txt_position').val(pt);}
    
    function clearpt(){
    $("input[name='cp']").each(function(){
    $(this).attr("checked",false);});
    }
    
    function selectpt(objd){
    if($("input[name='cp']:checked").length<=5){
    }else{$(objd).attr("checked",false);alert("不能超过5项");}
    }
    
    function closept(){
    $("#divdialogposition").hide();
    $('#popposition').css({'width': '0','height': '0','display': 'none'});
    }
    
    function popCompanyList(){
    $('#divdialogcompany').fadeIn('fast');
    $('#popcompany').css({'width': '100%','height': '200%','display': 'inline'});
    startRequest();
    }
    
    function clearcl(){
    $("input[name='cl']").each(function(){
    $(this).attr("checked",false);});
    }
    
    function closecl(){
    $("#divdialogcompany").hide();
    $('#popcompany').css({'width': '0','height': '0','display': 'none'});
    }
   
   function popPhoneList(){
    $('#divdialogphone').fadeIn('fast');
    $('#popphone').css({'width': '100%','height': '200%','display': 'inline'});
    startRequest();
    }
    
    function closepl(){
    $("#divdialogphone").hide();
    $('#popphone').css({'width': '0','height': '0','display': 'none'});
    }
    
    function popResumeList(){
    var h = document.documentElement.scrollHeight+"px";
    $("#divdialogresume").fadeIn('fast');
    $('#popresume').css({'width': '100%','height': h,'display': 'inline'});
    startRequest();
    }
    function clearrl(){
    $(".cbjob>input").each(function(){
    $(this).attr("checked",false);});
    }
    function closerl()
    {
    $("#divdialogresume").hide();
    $('#popresume').css({'width': '0','height': '0','display': 'none'});
    }
    
  
    
   
