
					function getCookie(name) {
						var search;

						search = name + "="
						offset = document.cookie.indexOf(search) 
						if (offset != -1) {
							offset += search.length ;
							end = document.cookie.indexOf(";", offset) ;
							if (end == -1)
								end = document.cookie.length;
							return document.cookie.substring(offset, end);
						}
						else
							return "";
					}

					function unipro_clearCookie(name ) {
						document.cookie=name+"=; " + "domain=sina.com.cn; path=/; ";     
						//bites = document.cookie.split("; ");
					} 

					function getMobileNum(ckName){
					var userInfo = getCookie(ckName).split(":");
						return userInfo[2];
					}

					function unipro_UniProLogout() {
						unipro_clearCookie("SINAPRO");
						unipro_clearCookie("SINA-AVATAR");
						unipro_clearCookie("SINAPROC");
						unipro_clearCookie("nick");
						unipro_clearCookie("SINA_NU");      
						unipro_clearCookie("SINA_OU");
						unipro_clearCookie("appmask");
						unipro_clearCookie("gender");
						unipro_clearCookie("UNIPROTM");
						unipro_clearCookie("UNIPROU");
						unipro_clearCookie("SINA_USER");
						unipro_clearCookie("SMS_COOKIE");
						return true;
					}

					function getUniproUrl_stand(){
					//	window.location='http://unipro.sina.com.cn/cgi-bin/regist0.cgi?url1=&url2=&id1=1&id2=0&entry=mall&mcheck=2d8f7d6510609ae70a6f4015f56f3066';
						var s = window.parent.location.href;
						window.top.location = 'http://mall.sina.com.cn/sp/login.aspx?rtnUrl='+s;
						return false;
					}

					function getUniproUrl_welcome(){
						unipro_UniProLogout();
					//	window.location='http://unipro.sina.com.cn';
						window.top.location = 'http://mall.sina.com.cn/csm/quit.aspx';
						return false;	
					}

					function print_stand_unipro_head()
					{
						document.write("<img src=\"http://mall.sina.com.cn/Navigate/images/tou_0-2.gif\" width=\"4\" height=\"4\"> <a class=\"touzi\" href=# onClick='return getUniproUrl_stand()'>通行证登录</a>&nbsp;&nbsp;");
						//document.write("<table height=16 border=0 cellpadding=0 cellspacing=0>");	
						//document.write("<tr><td><td align=right> <a href=# onClick='return getUniproUrl_stand()'>通行证登录</td></tr>");	
						//document.write("</table>");	
						
					}
				
					function DecodeCookie(str)
					{
					　var strRtn = "";
					  var index = str.indexOf("%u");
					  if (index == -1)	
						return str;
					  var start=0;
					  while(index != -1)
					  {
						strRtn += str.substring(start,index);
						var s = str.substr(index+2,4);
						strRtn += String.fromCharCode(parseInt(s,16));
						start = index + 6;
						index = str.indexOf("%u",start);
					  }
					  strRtn += str.substr(start);
					　
					　return strRtn;
					}

					function print_stand_unipro_welcome()
					{
						var unipro_login_nickname = getCookie( "nick" );
							
						var unipro_login_pos = unipro_login_nickname.indexOf( "(" );
						if ( unipro_login_pos != -1 )
						{
							unipro_login_nickname = unipro_login_nickname.substr( 0, unipro_login_pos );
						}
						unipro_login_nickname = DecodeCookie(unipro_login_nickname);
						//window.alert(unipro_login_nickname);
						
						/*
						document.write("<table border=0 cellpadding=0 cellspacing=0>");
						document.write("<tr>");

						if ( unipro_login_nickname!="" && unipro_login_nickname!="null" && unipro_login_nickname!=null && unipro_login_nickname!="undefined" ) {
							document.write("<td align=left><font color=blue>"+unipro_login_nickname+"</font>&nbsp;&nbsp;</td><td> <a href=# onClick='return getUniproUrl_welcome()'>安全退出</a>");
						} else {
							document.write( "<td align=right> 新浪过客" +"</td><td> <a href=# onClick='return getUniproUrl_welcome()'>安全退出</a>");
						}
						document.write("</td></tr>");
						document.write("</table>");
						*/										
						if ( unipro_login_nickname!="" && unipro_login_nickname!="null" && unipro_login_nickname!=null && unipro_login_nickname!="undefined" ) {
							document.write("<img src=\"http://mall.sina.com.cn/Navigate/images/tou_0-2.gif\" width=\"4\" height=\"4\"> <a class=\"touzi\" href=\"#\"> "+unipro_login_nickname+"</a>&nbsp;&nbsp;<img src=\"http://mall.sina.com.cn/Navigate/images/tou_0-2.gif\" width=\"4\" height=\"4\"><a class=\"touzi\" href=# onClick='return getUniproUrl_welcome()'>安全退出</a>");
						} else {
							document.write( "<img src=\"http://mall.sina.com.cn/Navigate/images/tou_0-2.gif\" width=\"4\" height=\"4\"><a href=\"#\" class=\"touzi\"> 新浪过客" +"</a>&nbsp;&nbsp;<img src=\"http://mall.sina.com.cn/Navigate/images/tou_0-2.gif\" width=\"4\" height=\"4\"><a  class=\"touzi\" href=# onClick='return getUniproUrl_welcome()'>安全退出</a>");
						}					
					}
