function PageHeader(module){

	if(GetCookie("txz_account") ) //已登录	
	{
document.writeln("<table width=\"700\" height=\"31\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("");
document.writeln("      <tr>");
document.writeln("        <td width=\"150\">欢迎您："+GetCookie("txz_account")+"<\/td>");
document.writeln("");
document.writeln("       <td width=\"550\" align=\"right\"><span class=\"STYLE1\"><a href=\"http:\/\/pass.521g.com\/user_manage\" class=\"Link_e\" target=\"_blank\">通行证管理<\/a> | <a href=\"http:\/\/pass.521g.com\/pay\" class=\"Link_e\" target=\"_blank\">通行证充值<\/a> | <a href=\"http:\/\/wybbs.521g.com\" class=\"Link_e\" target=\"_blank\">进入论坛<\/a> |  <a href=\"http:\/\/pass.521g.com\/login.aspx?action=bbsloginout&forward=http%3A%2F%2Fwww.521g.com\" class=\"Link_e\">退出<\/a> <a href=\"http:\/\/pass.521g.com\/kf.htm\" class=\"Link_e\" target=\"_blank\">在线客服<\/a><\/span> <a href=\"#\"><img src=\"images\/rss.gif\" width=\"14\" height=\"14\" border=\"0\" \/><\/a> <a href=\"#\"><img src=\"images\/lp.gif\" width=\"16\" height=\"14\" border=\"0\" \/><\/a><\/td>");
document.writeln("      <\/tr>");
document.writeln("	");
document.writeln("    <\/table>");
	}
	else

	{
document.writeln("<table width=\"700\" height=\"31\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("<form id=\"loginfrm\" name=\"loginfrm\" action=\"http:\/\/pass.521g.com\/login.aspx?loginaction=bbslogin&forward=http:\/\/www.521g.com\" method=\"post\" onSubmit=\"return VerifySubmit();\">");
document.writeln("      <tr>");
document.writeln("        <td width=\"318\">通行证：");
document.writeln("          <input name=\"wyusername\" type=\"text\" style=\"border:#FEBF5C 1px solid; background-color:#FFF7B4\" size=\"12\" height=\"20\" maxlength=\"16\"  class=\"TXZinput\" \/>");
document.writeln("          &nbsp;密码：");
document.writeln("          <input name=\"wypassword\" type=\"password\" style=\"border:#FEBF5C 1px solid; background-color:#FFF7B4\" size=\"12\" height=\"20\" maxlength=\"16\"\  class=\"TXZinput\" />");
document.writeln("&nbsp;<\/td>");
document.writeln("        <td width=\"138\"><input name=\"imageField\" type=\"image\" src=\"http:\/\/wy.521g.com\/templets\/wyimages\/button_dl.gif\" align=\"middle\" class=\"InputImg\"\/>");
document.writeln("         <a href=\"http:\/\/pass.521g.com\/reg.htm\" class=\"Link_e\" target=\"_blank\" border=\"0\"><img src=\"http:\/\/wy.521g.com\/templets\/wyimages\/button_zc.gif\" width=\"80\" height=\"19\" border=\"0\" align=\"absmiddle\" \/></a><\/td>");
document.writeln("       <td width=\"244\"><span class=\"STYLE1\"><a href=\"http:\/\/pass.521g.com\/getpass.aspx\" class=\"Link_e\" target=\"_blank\">密码找回<\/a> | <a href=\"http:\/\/pass.521g.com\/pay\" class=\"Link_e\" target=\"_blank\">充值<\/a> | <a href=\"http:\/\/wybbs.521g.com\" class=\"Link_e\" target=\"_blank\">进入论坛<\/a> | <a href=\"http:\/\/pass.521g.com\/kf.htm\" class=\"Link_e\" target=\"_blank\">客服<\/a><\/span> <a href=\"#\"><img src=\"http:\/\/wy.521g.com\/templets\/wyimages\/rss.gif\" width=\"14\" height=\"14\" border=\"0\" \/><\/a> <a href=\"#\"><img src=\"http:\/\/wy.521g.com\/templets\/wyimages\/lp.gif\" width=\"16\" height=\"14\" border=\"0\" \/><\/a><\/td>");
document.writeln("      <\/tr>");
document.writeln("	  <\/form>");
document.writeln("    <\/table>");
	}

	}

/**
* 获取cookie的值
*/
function GetCookie(cookie_name){
    var allcookies = document.cookie;
    var cookie_pos = allcookies.indexOf(cookie_name);
    // 如果找到了索引，就代表cookie存在，
    // 反之，就说明不存在。
    if (cookie_pos != -1){
        // 把cookie_pos放在值的开始，只要给值加1即可。
        cookie_pos += cookie_name.length + 1;
        var cookie_end = allcookies.indexOf(";", cookie_pos);
        if (cookie_end == -1){
            cookie_end = allcookies.length;
        }
        var value = unescape(allcookies.substring(cookie_pos, cookie_end));
    }
    return value;
}





//--------------cookie相关-----------------------------
function GetCookie2(name)
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while(i < clen)
	{
		var j = i + alen;
		//alert(document.cookie.substring(i,j)+"|"+arg)
		if(document.cookie.substring(i,j) == arg)
			return getCookieVal(j);
			i = document.cookie.indexOf(" ",i) + 1;
		if( i == 0 ) break;
	}
	return null;
}

function getCookieVal(offset)
{
	var endstr = document.cookie.indexOf(";",offset);
	{
		if(endstr == -1)
			endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset,endstr));
	}
}


function changeRegImg()
{

	document.getElementById("iRegcode").src ='/common/Code.aspx'; 
}
