execScript('Function asc2str(ascasc) : asc2str = chr(ascasc) : End Function', 'VBScript'); 

function UrlDecode(str){ 
	var ret = ''; 
	for(var i=0;i <str.length;i++){ 
		var chr = str.charAt(i); 
		if(chr == '+'){ 
			ret += ' '; 
		}else if(chr=='%'){ 
			var asc = str.substring(i+1,i+3); 
			if(parseInt("0x"+asc)>0x7f){ 
				ret += asc2str(parseInt('0x'+ asc + str.substring(i+4, i+6))); 
				i += 5; 
			}else{ 
				ret += asc2str(parseInt('0x'+ asc)); 
				i += 2; 
			} 
		}else{ 
			ret += chr; 
		} 
	} 
	return ret; 
}

function getCookie(name){
	var reg = new RegExp(['(?:^| )', name, '=([^;]*)'].join(''),'i');
    arr = document.cookie.match(reg);
    return arr ? UrlDecode(arr[1]) : '';
}

var userid = getCookie('duserid');
var username = getCookie('dusername');
if(username!='' && userid!=''){
	document.write('ÄúºÃ£¡'+username + '<A href=" http://www.7p.com.cn/logout.asp" rel="nofollow">[ÍË³ö]</A>');
}else{
	document.write('<A href=" http://www.7p.com.cn/login.asp" rel="nofollow" >[ÇëµÇÂ¼]</A> <A href=" http://www.7p.com.cn/reg.asp" rel="nofollow">[Ãâ·Ñ×¢²á]</A>');
}
