var strurl = GetCookie("id");
document.writeln("<div id=\"top\">");
document.writeln("	<div class=\"top_w\">");
document.writeln("		<div id=\"logo\"><A href=\"http:\/\/www.9158.com\/\" target=\"_top\"><\/A><\/div>");
document.writeln("		<div id=\"topr\">");
document.writeln("			<div id=\"menu\">");
document.writeln("				<div class=\"me\">");
document.writeln("					<div class=\"mhc\" id=\"do\"><A href=\"http:\/\/m.9158.com\/\">个人管理中心<\/A><\/div>");
document.writeln("					<div class=\"mg\"><A href=\"http:\/\/room.9158.com\/\">多人视频区<\/A><\/div>");
document.writeln("					<div class=\"mg\"><A href=\"http:\/\/friend.9158.com\/\">在线交友<\/A><\/div>");
document.writeln("					<div class=\"mg\"><A href=\"http:\/\/qun.9158.com\/\">群组<\/A><\/div>");
document.writeln("					<div id=\"exit\">"+strurl+"<\/div>");
document.writeln("				<\/div>");
document.writeln("			<\/div>");
document.writeln("		<\/div>");
document.writeln("	<\/div>");
document.writeln("	<div class=\"top_blue\">");
document.writeln("		<div class=\"top_blue_w\">");
document.writeln("			<ul>");
document.writeln("				<li class=\"top_blue_bluebg\"><\/li>");
document.writeln("				<li class=\"help\">");
document.writeln("					<img src=\"http:\/\/m.9158.com\/Common\/img\/four\/new.GIF\" align=\"absMiddle\"> <a href=\"http:\/\/horse.9158.com\"  target=\"_blank\">赛马游戏<\/a>");
document.writeln("					<img src=\"http:\/\/m.9158.com\/Common\/img\/four\/top_blue_b1.GIF\" align=\"absMiddle\"> <a href=\"http:/\/\www.9158.com\/\help.html\"  target=\"_blank\">帮助中心<\/a>");
document.writeln("					<img src=\"http:\/\/m.9158.com\/Common\/img\/four\/top_blue_b2.GIF\" align=\"absMiddle\"> <a href=\"http:/\/\www.9158.com\/\about20.html\"  target=\"_blank\">新增功能<\/a>");
document.writeln("				<\/li>");
document.writeln("			<\/ul>");
document.writeln("		<\/div>");
document.writeln("	<\/div>");
document.writeln("<\/div>")

function   GetCookie(sName)   
{   
    var   aCookie   =   document.cookie.split("mycookies=");
    if(aCookie.length>1)
   {
    	var   bCookie   =  aCookie[1].split("&");    
   	 for   (var   i=0;   i   <   bCookie.length;   i++)   
    	{   
    	    var   aCrumb   =   bCookie[i].split("=");   
    	    if   (sName   ==   aCrumb[0]) 
    	    {    
    	        var goUrl = "http://"+unescape(aCrumb[1])+".9158.com";
    			var str = "<A href=\""+goUrl+"\" target=\"_blank\">我的主页<\/A> ｜ <A href=\"#\" onclick=\"logout()\">安全退出<\/A>";
    	        return  str;   
    	    }
   	 }  
   }
   else{return "";} 

    return   "";   
} 
function logout()
{
     if(confirm("\n如果您是暂时离开，我们建议您继续保持在线！\n\n一旦退出，您的好友将无法联系上您！\n\n您确认要离开9158吗？"))
     {location.href="http://m.9158.com/logout.aspx";}
     else
     {}
}