﻿// JavaScript Document

function getCookie(name)        
{
   var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
   if(arr != null) return decodeURI(arr[2]); return null;
}		
var cookiename="UserName";
var strcookie=getCookie(cookiename);
var cookiename1="UserId";
var strcookie1=getCookie(cookiename1);
var url=top.location.href
if (strcookie1 != null)					
{									
    document.write('<font color="#999999">您好，'+strcookie+'！欢迎光临新龙医药商务网！<a href="User/" title="点击我进入后台"><font color="#FF6600">[进入后台]</font></a><a href="Loguot.aspx?urlstr='+url+'" title="点击我退出系统"><font color="#FF6600">[退出]</font></a></font>');
}
else
{
	if(strcookie != null)
	{
    document.write('<font color="#999999">'+strcookie+'！欢迎光临新龙医药商务网！<a href="Login.aspx?urlstr='+url+'" title="点击我进行登录"><font color="#FF6600">[请登录]</font></a>，新用户？<a href="Reg.aspx"><font color="#FF6600" title="点击进行注册">[请注册]</font></a></font>');
	}
	else
	{
		document.write('<font color="#999999">您好，欢迎光临新龙医药商务网！<a href="Login.aspx?urlstr='+url+'" title="点击我进行登录"><font color="#FF6600">[请登录]</font></a>，新用户？<a href="Reg.aspx" title="点击进行注册"><font color="#FF6600">[请注册]</a></font></font>');
	}
}
