function getUsername()
{
    return getCookie("passport_91_cn_utfname");
}
function getCookie(sName) 
{
	  var aCookie = document.cookie.split("; ");
	  
	  for (var i=0; i < aCookie.length; i++)
	  {
	        var aCrumb = aCookie[i].split("=");
	        
	       if (sName.toLowerCase() == aCrumb[0].toLowerCase()) 
	        {
				if(sName=="passport_91_cn_utfname")
					return unescape(aCrumb[1].replace(/%25/g,'%'));
				else
					return unescape(aCrumb[1]);
	        }
	  }
	  return null;		
}
function userIsLogined()
{
	var auth = getCookie("passport_91_cn_utfname");
	var key  = getCookie("passport_91_cn_code");
	//alert(auth);
	if((null == auth)||(null == key)||(key.length!=32))
		return false;
	return true;
}

function showLoginArea()
{
	if(userIsLogined())//已经登录
	{
		document.writeln("<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>");
		document.writeln("<FORM action=\"http:\/\/91.cn\/passport\/index.php?act=login&amp;ope=save\" method=post target=_blank ID=\"Form1\">");
		document.writeln("<TR><td align=right class=top_menu>");
		document.writeln("<a href=\"http:\/\/91.cn\/passport\/\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/top_09.jpg\" width=\"63\" height=\"11\" hspace=\"5\" border=\"0\"><\/a>");
		document.writeln("你好," + getUsername().replace(" ","") + " ");
		document.writeln("<a href=\"http:\/\/91.cn\/passport\/login.aspx?ope=logout\" target=\"_blank\" title=\"注销登录\">注销<\/a>&nbsp;");		
		document.writeln("<a href=\"http:\/\/member.91.cn\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/icon_help.gif\" width=\"66\" height=\"17\" hspace=\"3\" border=\"0\"><\/a><a href=\"#\" class=\"top_menu\"><\/a>");
		document.writeln("        <FJTIGNOREURL>");
		document.writeln("        <td width=\"277\" align=\"right\" valign=\"bottom\">-<a href=\"http:\/\/www.91.cn\" target=\"_blank\" class=\"top_style\">首页<\/a> -<a href=\"http:\/\/ask.91.cn\" target=\"_blank\" class=\"top_style\">咨询<\/a> -<a href=\"http:\/\/blog.91.cn\" target=\"_blank\" class=\"top_style\">博客<\/a> -<a href=\"http:\/\/bbs.91.cn\" target=\"_blank\" class=\"top_style\">社区<\/a> -<a href=\"http:\/\/so.91.cn\" target=\"_blank\" class=\"top_style\">医搜<\/a> -<a href=\"http:\/\/member.91.cn\/help_money_01.htm\" target=\"_blank\" class=\"top_style\">网络银子<\/a>-<a href=\"http:\/\/big5.91.cn:81\/\" class=\"top_style\">繁体<\/a><\/td>");
		document.writeln("        <\/FJTIGNOREURL>     ");
		document.writeln("<\/td><\/TR>");
		document.writeln("<\/FORM>");
		document.writeln("<\/table>");
	}
	else//未登录 
	{
		document.writeln("<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>");
		document.writeln("<FORM action=http:\/\/91.cn\/passport\/index.php?act=login&amp;ope=save method=post target=_blank ID=\"Form1\">");
		document.writeln("<tr><td height=\"30\" background=\"http:\/\/www.91.cn\/images\/top_01.jpg\">");
		document.writeln("<a href=\"http:\/\/91.cn\/passport\/\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/top_09.jpg\" width=\"63\" height=\"11\" hspace=\"5\" border=\"0\"><\/a>");
		document.writeln("用户名： <INPUT class=\"login_k\" onmouseover=this.focus() onfocus=this.select() size=8 name=username>&nbsp;");
		document.writeln("密码： <INPUT class=\"login_k\" onmouseover=this.focus() onfocus=this.select() type=password size=8 name=password> ");
		document.writeln("<input type=\"image\" src=\"http:\/\/www.91.cn\/images\/icon_login.gif\" width=\"36\" height=\"17\" hspace=\"3\" align=\"absmiddle\" title=\"点击登录\"> ");
		document.writeln("<a href=\"http:\/\/91.cn\/passport\/index.php?act=register\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/icon_reg.gif\" width=\"36\" height=\"17\" hspace=\"3\" border=\"0\" align=\"absmiddle\" title=\"点击注册\"><\/a>");
		document.writeln("<a href=\"http:\/\/member.91.cn\/\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/icon_help.gif\" width=\"66\" height=\"17\" hspace=\"3\" border=\"0\"><\/a><a href=\"#\" class=\"top_menu\"><\/a>");
		document.writeln("        <FJTIGNOREURL>");
		document.writeln("        <td width=\"277\" align=\"right\" valign=\"bottom\">-<a href=\"http:\/\/www.91.cn\" target=\"_blank\" class=\"top_style\">首页<\/a> -<a href=\"http:\/\/ask.91.cn\" target=\"_blank\" class=\"top_style\">咨询<\/a> -<a href=\"http:\/\/blog.91.cn\" target=\"_blank\" class=\"top_style\">博客<\/a> -<a href=\"http:\/\/bbs.91.cn\" target=\"_blank\" class=\"top_style\">社区<\/a> -<a href=\"http:\/\/so.91.cn\" target=\"_blank\" class=\"top_style\">医搜<\/a> -<a href=\"http:\/\/member.91.cn\/help_money_01.htm\" target=\"_blank\" class=\"top_style\">网络银子<\/a>-<a href=\"http:\/\/big5.91.cn:81\/\" class=\"top_style\">繁体<\/a><\/td>");
		document.writeln("        <\/FJTIGNOREURL>     ");
		document.writeln("<\/td><\/TR>");
		document.writeln("<\/FORM>");
		document.writeln("<\/table>");
	}
}

document.writeln("<style>");
document.writeln("a.top_head:visited {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #000000;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_head:link {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #000000;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_head:hover {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #479904;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_head:active {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #479904;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_style:visited {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #949494;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_style:link {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #949494;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_style:hover {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #479904;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln("a.top_style:active {");
document.writeln("	font-size: 12px;");
document.writeln("	color: #479904;");
document.writeln("	text-decoration: none;");
document.writeln("}");
document.writeln(".login_k {");
document.writeln("	font-size: 12px;");
document.writeln("	height: 16px;");
document.writeln("	color: #949494;");
document.writeln("	border: 1px solid #949494;");
document.writeln("}");
document.writeln("#top_2 td{font-size: 12px; line-height:150%;}");
document.writeln("<\/style>");
document.writeln("<body topmargin=\"0\"><div id=top_2>");
document.writeln("<table width=\"770\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("  <tr>");
document.writeln("    <td height=\"30\" background=\"http:\/\/www.91.cn\/images\/top_01.jpg\">");
showLoginArea();

document.writeln("  <\/td><\/tr>");
document.writeln("<\/table>");
document.writeln("<table width=\"770\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">");
document.writeln("  <tr>");
document.writeln("    <td width=\"132\" height=\"4\"><\/td>");
document.writeln("    <td><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td><a href=\"http:\/\/www.91.cn\" target=\"_blank\"><img src=\"http:\/\/www.91.cn\/images\/logo.jpg\" width=\"120\" height=\"46\" hspace=\"6\" border=\"0\"><\/a><\/td>");
document.writeln("    <td><table width=\"99%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("      <tr>");
document.writeln("        <td height=\"22\" align=\"right\"><a href=\"http:\/\/news.91.cn\" target=\"_blank\" class=\"top_head\">新闻<\/a> | <a href=\"http:\/\/zj.91.cn\" target=\"_blank\" class=\"top_head\">自诊<\/a> | <a href=\"http:\/\/jb.91.cn\" target=\"_blank\" class=\"top_head\">疾病<\/a> | <a href=\"http:\/\/ill.91.cn\" target=\"_blank\" class=\"top_head\">专题<\/a> | <a href=\"http:\/\/check.91.cn\" target=\"_blank\" class=\"top_head\">检查<\/a> | <a href=\"http:\/\/eye.91.cn\" target=\"_blank\" class=\"top_head\">眼科<\/a> | <a href=\"http:\/\/kq.91.cn\" target=\"_blank\" class=\"top_head\">口腔<\/a> | <a href=\"http:\/\/mr.91.cn\" target=\"_blank\" class=\"top_head\">美容<\/a> | <a href=\"http:\/\/fc.91.cn\" target=\"_blank\" class=\"top_head\">妇科<\/a> | <a href=\"http:\/\/nxk.91.cn\" target=\"_blank\" class=\"top_head\">男科<\/a> | <a href=\"http:\/\/jf.91.cn\" target=\"_blank\" class=\"top_head\">减肥<\/a> | <a href=\"http:\/\/cancer.91.cn/\" target=\"_blank\" class=\"top_head\">肿瘤<\/a> | <a href=\"http:\/\/gb.91.cn\" target=\"_blank\" class=\"top_head\">肝病<\/a> | <a href=\"http:\/\/gc.91.cn\" target=\"_blank\" class=\"top_head\">肛肠<\/a> | <a href=\"http:\/\/ebh.91.cn\" target=\"_blank\" class=\"top_head\">耳鼻喉<\/a><\/td>");
document.writeln("      <\/tr>");
document.writeln("      <tr>");
document.writeln("        <td height=\"22\" align=\"right\"><a href=\"http:\/\/ask.91.cn\" target=\"_blank\" class=\"top_head\">咨询<\/a> | <a href=\"http:\/\/tj.91.cn\" target=\"_blank\" class=\"top_head\"><font color=ff0000>体检</font><\/a> | <a href=\"http:\/\/yy.91.cn\" target=\"_blank\" class=\"top_head\">医院<\/a> | <a href=\"http:\/\/tv.91.cn\" target=\"_blank\" class=\"top_head\">访谈<\/a> | <a href=\"http:\/\/drug.91.cn\" target=\"_blank\" class=\"top_head\">药品<\/a> | <a href=\"http:\/\/ask.91.cn\" target=\"_blank\" class=\"top_head\">商城<\/a> | <a href=\"http:\/\/man.91.cn\" target=\"_blank\" class=\"top_head\">男人<\/a> | <a href=\"http:\/\/lady.91.cn\" target=\"_blank\" class=\"top_head\">女人<\/a> | <a href=\"http:\/\/xjk.91.cn\" target=\"_blank\" class=\"top_head\">两性<\/a> | <a href=\"http:\/\/baby.91.cn\" target=\"_blank\" class=\"top_head\">亲子<\/a> | <a href=\"http:\/\/health.91.cn\/bjzl\/\" target=\"_blank\" class=\"top_head\">保健<\/a> | <a href=\"http:\/\/health.91.cn\/yyys\/\" target=\"_blank\" class=\"top_head\">营养<\/a> | <a href=\"http:\/\/health.91.cn\/xljk\/\" target=\"_blank\" class=\"top_head\">心理<\/a> | <a href=\"http:\/\/server.91.cn\/tuku\/\" target=\"_blank\" class=\"top_head\">图库<\/a> | <a href=\"http:\/\/bbs.91.cn\/91help\/money_help.htm\" target=\"_blank\" class=\"top_head\">优惠券<\/a><\/td>");
document.writeln("      <\/tr>");
document.writeln("    <\/table><\/td>");
document.writeln("  <\/tr>");
document.writeln("<\/table>");
document.writeln("<table width=769 height=\"46\" border=\"0\" align=center cellPadding=0 cellSpacing=0 bgcolor=\"#FFFFFF\" class=thin>");
document.writeln("<tr><td height=\"1\" bgcolor=\"#CCCCCC\"><\/td>");
document.writeln("<\/tr><tr><td height=\"8\" bgcolor=\"#FFFFFF\"><\/td><\/tr>");
document.writeln("    <tr>");
document.writeln("      <td>");
document.writeln("<OBJECT codeBase=http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=5,0,0,0 height=56 width=770 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>");
document.writeln("  <PARAM NAME=\"_cx\" VALUE=\"20373\"><PARAM NAME=\"_cy\" VALUE=\"1191\"><PARAM NAME=\"FlashVars\" VALUE=\"\"><PARAM NAME=\"Movie\" VALUE=\"http:\/\/www.91.cn\/top\/images\/menu.swf\"><PARAM NAME=\"Src\" VALUE=\"http:\/\/www.91.cn\/top\/images\/menu.swf\"><PARAM NAME=\"WMode\" VALUE=\"Window\"><PARAM NAME=\"Play\" VALUE=\"-1\"><PARAM NAME=\"Loop\" VALUE=\"-1\"><PARAM NAME=\"Quality\" VALUE=\"High\"><PARAM NAME=\"SAlign\" VALUE=\"\"><PARAM NAME=\"Menu\" VALUE=\"-1\"><PARAM NAME=\"Base\" VALUE=\"\"><PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"><PARAM NAME=\"Scale\" VALUE=\"ShowAll\"><PARAM NAME=\"DeviceFont\" VALUE=\"0\"><PARAM NAME=\"EmbedMovie\" VALUE=\"0\"><PARAM NAME=\"BGColor\" VALUE=\"\"><PARAM NAME=\"SWRemote\" VALUE=\"\"><PARAM NAME=\"MovieData\" VALUE=\"\"><PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\"><PARAM NAME=\"Profile\" VALUE=\"0\"><PARAM NAME=\"ProfileAddress\" VALUE=\"\"><PARAM NAME=\"ProfilePort\" VALUE=\"0\"><PARAM NAME=\"AllowNetworking\" VALUE=\"all\"><PARAM NAME=\"AllowFullScreen\" VALUE=\"false\">");
document.writeln("        <embed src=\"http:\/\/www.91.cn\/top\/images\/menu.swf\" quality=high pluginspage=\"http:\/\/www.macromedia.com\/shockwave\/download\/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application\/x-shockwave-flash\" width=\"770\" height=\"56\"> <\/embed>");
document.writeln("        <\/OBJECT><\/td>");
document.writeln("    <\/tr>");
document.writeln("  <\/table><\/div><\/body>");
