﻿    var _t; 
    var _h = 0; 
    var _m = 0; 
    var _s = 10; 
    var _v = formatTime('正在为您登陆...请稍后...!'); 
    var istimeout = true;
    function doTime() { 
        _s --; 
        if (_s == -1) { 
             _m --; 
             _s = 59; 
        } 
        if (_m == -1) { 
             _h --; 
             _m = 59; 
        } 
        var _b = ((_h == 0) && (_m == 0) && (_s == 0)); 
        if (_b && istimeout) { 
            _v = userLogOutStr; 
            clearTimeout(_t); 
        } else { 
            _v = formatTime("正在为您登陆...请稍后...!"); 
            _t = setTimeout('doTime()', 1000); 
        }  
        document.getElementById("td_UserLog").innerHTML=_v;
    } 
   
    function formatTime(_time) { 
        return _time;
    }
var divwait;
var divwait2;
function DoSearch()
{
	if(document.getElementById("input_search_text"))
    var search_text = document.getElementById("input_search_text").value;
    var pro_name="";
    if(search_text == "" || search_text == "请输入关键字")
    {
        alert('请输入关键字');
        return false;
    }
    else
    {        
        //var sel_proName=document.getElementById("hr_index_ddl_pro");
        //var pro_name="";       
        var pro_name=document.getElementById("dv_proName").innerHTML;
//        if(sel_proName.options[sel_proName.selectedIndex].value=="-1")
//        {
//            pro_name="";
//        }
//        else
//        {
//            pro_name=sel_proName.options[sel_proName.selectedIndex].text;
//        }
       if(pro_name=="选择地区" || pro_name=="不限")
       {
            pro_name="";
       }
       
       var search_type = document.getElementById("select_type1");
       UShow_MsgShow('正在为您搜索相关数据,请您稍后...!',0);
       if(search_type.checked)
       {
            location.href = "SearchResume.aspx?by=keyword&keyword="+escape(search_text)+"&page=1"+((pro_name=="")?"":("&Proname=" + escape(pro_name)));
            
        }                
       else
       {       
            location.href = "SearchJob.aspx?By=KeyWord&KeyWord="+escape(search_text)+"&page=1"+((pro_name=="")?"":("&Proname=" + escape(pro_name)));       
       }
	}
	
}

function openchat(u)	{
		window.open("../Go2Aspx.aspx?m=http://www.u1d1.com/Chat/&tourl=WebChatCust.aspx?OwnerId=" + u,"WebChatCust","width=650,height=470,fullscreen=0,toolbar=0,scrollbars=0,"+
			"location=0,directories=0,titlebar=0,status=0,menubar=0,resizable=1");
	}

function OpenSetupWindow(url, winName, w, h)
{		    
    window.open(url, winName, 'width='+w+',height='+h+',resizable=0,scrollbars=no,menubar=no,status=yes');
}

function HotKey_click(key)
{
    document.getElementById("input_search_text").value=key;
    DoSearch();
}

 //广告词显示
    document.write('<style type="text/css"><!--#div_AdMsg {width: 339px;margin: 0 auto;text-align: left;}');
    document.write('#adb1 {width: 339px;height: 43px;background-image: url(/img/guanggao_001.gif);background-repeat: no-repeat;}');
    document.write('.adb2 {background-image: url(/img//guanggao_002.gif);background-repeat: repeat-y;font-size: 12px;line-height: 19px;color: #000000;padding: 11px 22px 0 27px;}');
    document.write('#adb3 {width: 339px;height: 28px;background-image: url(/img/guanggao_003.gif);background-repeat: no-repeat;}--></style>');
        document.write("<div id='div_AdMsg' style='position: absolute;  display: none;'><div id='adb1'></div><div class='adb2' id='admsgInfo' >neirong</div><div id='adb3'></div></div>");


  //设置广告显示DIV
    function ShowMsg(msgStr)
    {   
        if(msgStr!=null && msgStr!="")
        {
            var dv=document.getElementById("div_AdMsg");
         
            if(dv.style.display=="none")
            {               
                document.getElementById("admsgInfo").innerHTML=msgStr;
                dv.style.left=window.screen.width/2-170;
                        
                dv.style.top=180;
                dv.style.display="";
            }
        }
    }
    
    //隐藏广告内容显示
    function hidAdMsg()
    {
        //Hid AdMsg
        document.getElementById("div_AdMsg").style.display="none";
    }

function UShow_DivHid()
{
    document.getElementById("UShow_div_Msg").style.display="none";
    document.getElementById("UShow_msg_Page").style.display="none";
}
	
    
function UShow_MsgShow(msgString,sTime)
{
    document.getElementById("UShow_msg_Page").style.width=document.body.clientWidth;
    document.getElementById("UShow_msg_Page").style.height=document.body.clientHeight;        
    document.getElementById("UShow_msg_Page").style.display="block";
                    
    document.getElementById("UShow_div_Msg").style.display="block";		        
    document.getElementById("UShow_div_Msg").innerHTML='<img src="/images/indicator.gif" />'+msgString;
    if(sTime!=0)
    {
        window.setTimeout("UShow_DivHid();",sTime);
    }
}

document.write('<div id="UShow_msg_Page" style="display: none; position: absolute; height: 100%;width: 100%; left: 0px; top: 0px; background-color: #6B6B6B; filter: alpha(Opacity=50);"></div>');
document.write('<div id="UShow_div_Msg" style="position: absolute; padding: 12px; width: 400px; height: 40px;border: #000000 1px solid; background-color: White; text-align: justify; display: none; left: 279px; top: 183px;"><div align="center">操作中请稍后!</div></div>');

function CleanText()
{
    if(document.getElementById("input_search_text").value=='请输入关键字')
    {
        document.getElementById("input_search_text").value = "";
    }
}

function txtkey_out()
{
	if(document.getElementById("input_search_text").value == "")
	{
		document.getElementById("input_search_text").value="请输入关键字";
	}
}
//function(key,evt) 
//{
//    alert(evt.keyCode);
//	if(event.keyCode==13)DoSearch();
//}

//document.onstop=function()
//{
//	divel.style.backgroundColor="white";
//	if(divwait)divwait.style.visibility="hidden";
//	if(divwait2)divwait2.style.visibility="hidden";
//}

/*Index UserLogin Ver 0.1 By JT*/
var userLogOutStr= "<table width='100%' border='0' align='right' cellpadding='0' cellspacing='0'>";
    userLogOutStr+="<tr align='left'>";
    userLogOutStr+="<td width='98' align='right' class='black_12_19'>";
    userLogOutStr+="用户ID：</td>";
    userLogOutStr+="<td width='72' align='left'>";
    userLogOutStr+="<input id='txt_UserId' type='text' size='11' /></td>";
    userLogOutStr+="<td width='45' align='right' class='black_12_19'>";
    userLogOutStr+="密码：</td>";
    userLogOutStr+="<td width='97' align='left'>";
    userLogOutStr+="<input id='txt_UserPass' type='password' onkeydown='JavaScript:index_UserLog_Enter(event);' size='11' /></td>";
    userLogOutStr+="<td width='60' align='left'>";
    userLogOutStr+="<a href='#'>";
    userLogOutStr+="<img src='img/1_022.gif' width='48' height='20' border='0' onclick='JavaScript:index_UserLog();' /></a></td>";
    userLogOutStr+="<td width='81' align='left'>";
    userLogOutStr+="<a href='MemberCenter/UserReg.aspx' target='_blank'>";
    userLogOutStr+="<img src='img/1_023.gif' width='71' height='20' border='0' /></a></td>";
    userLogOutStr+="<td width='82' align='left'><a href='#'><img src='img/1_024.gif' width='82' height='20' border='0' /></a></td>";
    userLogOutStr+="<td width='35' align='left'><img src='img/free.gif' width='23' height='12' /></td></tr></table>";
                
function openlogin()
{
    var userminilog=window.open('JudiciaryLogin.aspx', 'openScript', 'width=300px,height=200px;resizable=1,scrollbars=yes,menubar=no,status=yes');
}

function showUserInfo()
{
    index.userIsLogin(UserIsLog_callback);
}

function UserIsLog_callback(res)
{
    if(res)
    {
        document.getElementById("td_UserLog").innerHTML=res.value;
    }
}
showUserInfo();

function index_UserLog()
{
    var userId=document.getElementById("txt_UserId").value;    
    var UserPass = document.getElementById("txt_UserPass").value;
    
    if(userId=="")
        alert("用户ID 不能为空！");
    else if(UserPass=="")
        alert("密码不能为空！");
    else
    {
        index.UserLogin(userId,UserPass,UserLogin_callback);
        document.getElementById("td_UserLog").innerHTML=_v;
        _t = setTimeout('doTime()', 1000);
    }
}

function UserLogin_callback(res)
{
    var tr=document.getElementById("td_UserLog");
    if(res)
    {
        if(res.value=="logErro")
        {
            tr.innerHTML="登陆失败！请<a href='JavaScript:showUserInfo();' color='red'>重新登陆</a>";
            clearTimeout(_t);   
        }
        else
        {
            tr.innerHTML=res.value;
            clearTimeout(_t);   
            IsLogin=true;
        }            
    }
}

function LogOut()
{
    index.UserLogout(UserLogout_callback);
}

function UserLogout_callback(res)
{
    var tr=document.getElementById("td_UserLog");
    if(res && res.value=="ok")
    {
        tr.innerHTML=userLogOutStr;
        IsLogin=false;
    }

}

function index_UserLog_Enter(evt)
{
    if(evt.keyCode==13)index_UserLog();
}
function addHome()
{
    document.body.style.behavior='url(#default#homepage)';
    document.body.setHomePage('http://www.u1d1.com');
}

function SubmitKeyClick(button) 
{    
    if (event.keyCode == 13 && document.activeElement.id=="input_search_text") 
    {
        event.keyCode=9;
        event.returnValue = false;
        DoSearch();
    }
}
        var _city=new Array();
        _city.push("北京");
		_city.push("上海");
		_city.push("天津");
		_city.push("重庆");
		_city.push("黑龙江");
		_city.push("吉林");
		_city.push("辽宁");
		_city.push("内蒙");
        _city.push("新疆");
        _city.push("河北");
        _city.push("山西");
        _city.push("山东");
        _city.push("江苏");
        _city.push("浙江");
        _city.push("福建");
        _city.push("安徽");
        _city.push("河南");
        _city.push("陕西");
        _city.push("江西");
        _city.push("湖南");
        _city.push("湖北");
        _city.push("广东");
        _city.push("广西");
        _city.push("贵州");
        _city.push("云南");
        _city.push("四川");
        _city.push("西藏");
        _city.push("青海");
        _city.push("甘肃");
        _city.push("宁夏");
        _city.push("海南");
        
function set_Zone(objName,zoneName)
{
    var tmpHtml="";
    tmpHtml="<div><a href='/'>总站</a></div>";
    for(var i=0;i<_city.length;i++)
    {
        tmpHtml+="<div><a href='"+_city[i]+"'>"+_city[i]+"</a></div>";
    }    
    showMsgTip(objName,tmpHtml,70,100,0,20);
    
}
  function showi_lt(id)
        {        
            
            for(var i=1;i<=4;i++)
            {                            
                document.getElementById("dv_i_"+i).style.display="none";
                if(i==1)document.getElementById("dv_i_l_"+i).style.backgroundImage="url(/img/index_Right-11.gif)";
                else document.getElementById("dv_i_l_"+i).style.backgroundImage="url(/img/index_Right-22.gif)";
            }
            var bt=document.getElementById("dv_i_l_"+id);
            var msg=document.getElementById("dv_i_"+id);
            msg.style.display="block";
            if(id==1)
            {bt.style.backgroundImage="url(/img/index_Right-1.gif)";}
            else
            {bt.style.backgroundImage="url(/img/index_Right-2.gif)";}
            
        }
        //newInfo
         function showInfo_list(index)
        {        
            for(var i=1;i<=8;i++)
            {                      
                switch(i)
                {
                    case 1 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon33";
                        ShowInfo(c1,'dv_infoLeft_lst','dv_infoRight')
                    }
                    else if(index<5)
                    {
                        document.getElementById("td_info_"+i).className = "Levon3";
                    }
                    break;
                    case 2 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon5";
                        ShowInfo(c2,'dv_infoLeft_lst','dv_infoRight')
                    }
                    else if(index<5)
                    {
                        document.getElementById("td_info_"+i).className = "Levon4";
                        
                    }
                    break;
                    case 3 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon5";
                         ShowInfo(c3,'dv_infoLeft_lst','dv_infoRight')
                    }
                    else if(index<5)
                    {
                        document.getElementById("td_info_"+i).className = "Levon4";
                    }
                    break;
                    case 4 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon66";
                         ShowInfo(c4,'dv_infoLeft_lst','dv_infoRight')
                    }
                    else if(index<5)
                    {
                        document.getElementById("td_info_"+i).className = "Levon6";
                    }
                    break;
                    case 5 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon33";
                        ShowInfo2(c5,'dv_company')
                    }
                    else if(index>4)
                    {
                        document.getElementById("td_info_"+i).className = "Levon3";
                    }
                    break;
                    case 6 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon5";
                        ShowInfo2(c6,'dv_company')
                    }
                    else if(index>4)
                    {
                        document.getElementById("td_info_"+i).className = "Levon4";
                        
                    }
                    break;
                    case 7 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon5";
                         ShowInfo2(c7,'dv_company')
                    }
                    else if(index>4)
                    {
                        document.getElementById("td_info_"+i).className = "Levon4";
                    }
                    break;
                    case 8 :
                    if(i==index)
                    {
                        document.getElementById("td_info_"+i).className = "Levon66";
                         ShowInfo2(c8,'dv_company')
                    }
                    else if(index>4)
                    {
                        document.getElementById("td_info_"+i).className = "Levon6";
                    }
                    break;
                }      
            }
        }
        
        function ShowInfo(c,leftid,rightid)
        {
            var lefttest = "<ul>";
            var righttest = "<ul>";
            for(var i =0;i<c.length;i++)
            {
                if(i<11)
                {
                    lefttest += "<li class='blue-12-600c'><a href='" + c[i][1] + "' target='_blank' style='color: #093a82;'>" + c[i][0] + "</a></li>";
                }
                else
                {
                    righttest += "<li class='blue-12-600c'><a href='" + c[i][1] + "' target='_blank' style='color: #093a82;'>" + c[i][0] + "</a></li>";
                }
            }
            lefttest+="</ul>";
            righttest+="</ul>";
            document.getElementById(leftid).innerHTML = lefttest;
            document.getElementById(rightid).innerHTML = righttest;
        }
        
        function ShowInfo2(c,id)
        {
            var righttest = "<ul>";
            for(var i =0;i<c.length;i++)
            {
               righttest += "<li class='blue-12-6002c'><a href='" + c[i][1] + "' target='_blank' style='color: #093a82;'>" + c[i][0] + "</a></li>";
            }
            righttest+="</ul>";
            document.getElementById(id).innerHTML = righttest;
        }
       