// JScript File
function getCookie(name){
    
      var strArg=name+"=";
var nArgLen=strArg.length;
var nCookieLen=document.cookie.length;
var nEnd;
var i=0;
var j;
while (i<nCookieLen) 
{
j=i+nArgLen;
if (document.cookie.substring(i,j)==strArg)
{
nEnd=document.cookie.indexOf (";",j);
if (nEnd==-1) nEnd=document.cookie.length;
var nr=document.cookie.substring(j,nEnd)
return decodeURIComponent(nr);
//return (URLDecode_vb(nr));
}
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;
}
return null;
    }


function getUserId(){
//得到当前用户ID.
        
        return getCookie("user:id");
}
function getUserName(){
//得到当前用户姓名.
        
        return getCookie("user:name");
}
