var infostr;
var topinfo1;
var topinfo2;
if(pstate==0||pstate==null|| pstate=="" ||pstate=="undefined")
{
 
 infostr="<FORM id=\"loginform\" name=\"loginform\" action=\"/club/login.aspx\" method=\"post\"><label>用户名:</label><input type=text class=text name=userid><label>密　码:</label><input type=password class=text name=userpassword><span class=check><input type=checkbox name=saveuserpassword value=30 checked/>记住密码 ";
 infostr = infostr +"   <INPUT type=\"submit\" class=\"submit\" name=\"submit1\" value=\"登 录\"> </span> 	<p class=reg><A href=\"/job/personadd.aspx\">会员注册</A> | <A href=\"/club/getpass.aspx\">忘记密码</A></p></form>";
 
 topinfo1=" <a href='javascript:' onclick=\"return floatlogin('',1);\">登陆</a> | <A href=/job/personadd.aspx>注册</A>";
 topinfo2="<A onmouseover=\"MM_swapImage('Image4','','/job/images1/title1_3.gif',1)\" onmouseout=\"MM_swapImgRestore()\" href=\"/job/login.aspx?p=2\"  title=\"请先登陆\"><IMG height=\"26\" src=\"/job/images1/title2_3.gif\" width=\"101\" border=\"0\" name=\"Image4\"></A>";
}
if(pstate==1)
{   
	 infostr="<table height=100 cellSpacing=0 cellPadding=2 width=200 border=0><tr><td width=\"155\"><table cellSpacing=\"0\" cellPadding=\"0\" width=100% border=\"0\"><tr><td class=\"text\" height=\"24\"><div align=center>"+login_uname+",欢迎回来！</div></td></tr><tr><td class=\"text\" height=\"24\"><div align=center><a href=/job/person/reg.aspx class=A2>发布简历</a>&nbsp;&nbsp;</div></td></tr></table></td><td><div align=center><A href=\"/job/logout.aspx\"><IMG  src=\"/job/images1/back.gif\" border=\"0\"></A></div></td></tr></table>";
topinfo1= "<font class=FF00>" +login_uname+"</font>,欢迎回来！<br> <a href=/job/person/index.aspx>进入个人中心</a>&nbsp; <a href=/job/logout.aspx>退出</a>";
topinfo2="<A onmouseover=\"MM_swapImage('Image4','','/job/images1/title1_3.gif',1)\" onmouseout=\"MM_swapImgRestore()\" href=\"/job/company/index.aspx\" ><IMG height=\"26\" src=\"/job/images1/title2_3.gif\" width=\"101\" border=\"0\" name=\"Image4\"></A>";  
hideTab("tabnav2");
}

if(pstate==2)
{
infostr="<table cellSpacing=0 cellPadding=2 width=200 align=center border=0><tr><td width=155> "+login_uname+",欢迎回来！ <br> <a href=/job/person/reg.aspx>我的简历>></a> <br> <a href=/job/person/ApplyHistory.aspx>我申请的职位</a>";
if(login_apply!=null && login_apply!="0") infostr+="(<font class=FF00>"+ login_apply+ "</font>)"
infostr+=" <br><a href=/job/person/inviteme.aspx>我的面试邀请</a>";
if(login_invite!=null && login_invite!="0") infostr+="(<font class=FF00>"+ login_invite+ "新</font>)"
infostr+=" </td><td align=center><A href=\"/job/logout.aspx\"><IMG  src=\"/job/images1/back.gif\" border=\"0\"></A></td></tr><tr><td colspan=2><a href=/job/person/index.aspx>进入个人中心</a></td></tr></table>";
topinfo1="<font class=FF00>" + login_uname+"</font>,欢迎回来！<br> <a href=/job/person/index.aspx>进入个人中心</a> &nbsp; <a href=/job/logout.aspx>退出</a>";
topinfo2="<A onmouseover=\"MM_swapImage('Image4','','/job/images1/title1_3.gif',1)\" onmouseout=\"MM_swapImgRestore()\" href=\"/job/company/index.aspx\" ><IMG height=\"26\" src=\"/job/images1/title2_3.gif\" width=\"101\" border=\"0\" name=\"Image4\"></A>";
hideTab("tabnav2");
}
if(pstate==3)
{
infostr="<table align=center cellSpacing=0 cellPadding=2 width=200 border=0><tr><td width=\"155\">"+login_uname+",欢迎回来！ <br> <a href=/job/company/ApplyResume.aspx>收到的简历</a>";
 if(login_apply!=null && login_apply!="0") infostr+="(<font class=FF00>" + login_apply+ "新</font>)";
 infostr +=" <br> <a href=/job/company/AdminDept.aspx>发布新职位>></a> <br>  <a href=/job/company/adminjobs.aspx>职位管理>></a> <br> <a href=/job/company/seacher.aspx>查找人才>></a>   </td><td align=center><A href=\"/job/logout.aspx\"><IMG  src=\"/job/images1/back.gif\" border=\"0\"></A></td></tr><tr><td colspan=2 align=center><a href=/job/company/index.aspx>进入企业中心</a></td></tr></table>";								
topinfo1="<font class=FF00>" +login_uname+"</font>,欢迎回来！ <br> <a href=/job/company/index.aspx>进入企业中心</a>&nbsp; <a href=/job/logout.aspx>退出</a>";
topinfo2="<A onmouseover=\"MM_swapImage('Image4','','/job/images1/title1_3.gif',1)\" onmouseout=\"MM_swapImgRestore()\" href=\"/job/company/index.aspx\" ><IMG height=\"26\" src=\"/job/images1/title2_3.gif\" width=\"101\" border=\"0\" name=\"Image4\"></A>";
hideTab("tabnav1");  //首页用的
}

  function hideTab(tname)
  {
  		if(document.getElementById(tname)) 
  		 { document.getElementById(tname).style.display="none"; }
  		 
  }
  
  
	//弹出登陆层	
document.write("<div id='FloatLoginLayer' style='POSITION:absolute;LEFT:350px;TOP:250px;z-index:9; visibility:hidden; background-color:#efeffe '></div>");    
    
function floatlogin(comeurl, isreturn)
{ // alert(login_uname);
	if(login_uname=="")
   {    
    // alert(FloatLoginLayer.style.visibility);	
    var floginstr="<form name=loginform1 id=loginform1 onsubmit=\"return fastcheck(document.loginform1);\" action=/club/login.aspx?home=1 method=post target=\"_parent\"> 	<table cellSpacing=6 cellPadding=0 width=320 height=240 align=center border=0 bgcolor=#999999> 		<tr> 		  <td> 		  <table width=100% height=36 cellSpacing=8 cellPadding=0 bgcolor=#E9F6EF>  		  <td> 	       <font style=font-size:14px>&nbsp;登录联商网</font>  <font size=2>(<a target=_blank href=/job/personadd.aspx><font color=#0076a3>还没有注册?</font></a>)</font>  	    </td> 	    <td>  	    	<a title='关闭' href='javascript:void(0)' onclick=FloatLoginLayer.style.visibility='hidden'><font style='font-family:Tahoma;Color:#666666; font-size:14px'>x</font></a></td> </tr> 	 </table>"; 
     floginstr += "	 <table width=100% cellSpacing=0 cellPadding=0 height=196 bgcolor=#ffffff> 	   <tr><td Height=16 colspan=2> </td></tr> 	   <tr><td Height=36 width=72><font style=font-size:14px>&nbsp; 用户名：</font></td><td> <input type=text name=userid size=25 style='width:160px; height:24px;  text-align:left;	 border:1px #999999 solid;'></td></tr> 	   <tr><td Height=36 width=72><font style=font-size:14px>&nbsp; 密&nbsp; 码：</font></td><td> <input type=password name=userpassword size=25 style='width:160px; height:24px;  text-align:left;	 border:1px #999999 solid;'></td></tr> 	    <tr><td Height=30>  </td> 	    <td>  	    <input id=saveuserpassword type=checkbox value=30 name=saveuserpassword checked> <font color=#666666 size=2>记住我</font> | <A style=CURSOR: help onclick=window.open('getpass.aspx','getpass','width=500,height=400')	href=#> <font color=#0076a3 size=2>忘记密码了</font></A> 	     </td></tr>  	   <tr><td Height=36> </td><td>  	     <input id=submit1 type=image src=/club/images/loginbt.jpg value=登 录 name=submit1> <input type=hidden name=comeurl value="+comeurl+">  </td></tr>  	  </table>  	  </td></tr>  	  </table> 	 </form>";
 //  alert(document.body.clientWidth + "," +document.body.clientHeight +document.body.scrollTop);
	  FloatLoginLayer.style.left = document.body.clientWidth/2-200;
	  if(document.documentElement.clientHeight==0)
	  {	  FloatLoginLayer.style.top = document.body.clientHeight/2+document.body.scrollTop-180; }
	  else
	  {	  FloatLoginLayer.style.top = document.documentElement.clientHeight/2+document.body.scrollTop-180; }
	  
	  FloatLoginLayer.style.width=320;
	  FloatLoginLayer.style.height=160;
		FloatLoginLayer.style.visibility='visible';	
	  
     FloatLoginLayer.innerHTML=floginstr; 
  	 document.loginform1.userid.focus();
     if(isreturn==1)   return false;
  }
	else
	 {  if(isreturn==0)
	 		{ //  window.location.href=comeurl; 		
				FloatLoginLayer.style.visibility='visible';	
	 			FloatLoginLayer.innerHTML = "<form action='" +comeurl +"' method=post name=goform1></form>";	
	 			document.goform1.submit();
		}
			else 
			{ return true;  }
  }	
} 



function fastcheck(f){
			if (f.userid.value == ""){
				alert("请输入用户名！！");
				f.userid.focus();
				return false;}
			else if (f.userpassword.value == ""){
				alert("请输入密码！！");
				f.userpassword.focus();
				return false;}
			return true;
		}   
		

	function changeNav(obj, isNav)
	{
		var p = obj.parentNode.parentNode.id;
		var plist = obj.parentNode.getElementsByTagName("li");
		var subnav = p+"list";
		//   alert(subnav);
		var Nav = document.getElementById(subnav).getElementsByTagName("span");
 
		for(i=0;i<plist.length;i++)
		{ 
			if(obj == plist[i])
			{
				plist[i].className = "bg";
				//alert(Nav[i]);
				if(isNav==1)	Nav[i].className = "dis";
			}
			else
			{
				plist[i].className = "";
				if(isNav==1 && Nav[i]!=null)  Nav[i].className = "undis";
			}
		}
	}
