var Then = new Date();
if (WM_readCookie("guid")=="")
{
	Then.setTime(Then.getTime()+60*1000*60*24*365); //20??
	var s_guid=parseInt(9000000*Math.random(),10); 
	document.cookie = "guid=" + s_guid + ";expires=" + Then.toGMTString() + ";path="+ "/" + ";domain="+"elong.com";
}
function WM_readCookie(name)
{
	if(document.cookie == "")
		return "";
	else
		return WM_getCookieValue(name);
}
function WM_getCookieValue(name)
{
	var firstChar,lastChar;
	var theBigCookie = document.cookie;
	firstChar = theBigCookie.indexOf(name);
	if(firstChar != -1)
	{
		firstChar +=name.length + 1;
		lastChar = theBigCookie.indexOf(';', firstChar);
		if(lastChar == -1) lastChar = theBigCookie.length;
			return theBigCookie.substring(firstChar, lastChar);
	}
	else
	{
		return "";
	}
}
function getCookie(name)
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr !=null) return unescape(arr[2]); return null;
}
function DecodeCookie(str)
{
	var strArr;
	var strRtn="";
	strArr=str.split("a");
	for (var i=strArr.length-1;i>=0;i--) 
		strRtn+=String.fromCharCode(eval(strArr[i]));
	return strRtn;
}
/*
var t1;
var t2;
var t3;
var t4;
//t1= WM_readCookie("member");
t1 = getCookie("member");
t4 = getCookie("mem_name");
t3 = WM_readCookie("agent");
if (t4!="")
{
	t2=unescape(t4)
	t2 = t2.replace(/\+/g, " ");
}
var login1='<div id="login">'
+' <div id="login1"><a href="http://www.elong.com/myelong/login.aspx" class="white_link">登录</a>　　<a href="http://www.elong.com/myelong/userReg.aspx" class="white_link">注册</a></div>'
+' <div id="login2"><a href="http://www.elong.com/sitemap.html" class="white_link">网站地图</a> | <a href="http://www.elong.com/myelong/index.aspx" class="white_link">我的e龙</a> | <a href="http://www.elong.com/myelong/userregcard.aspx" class="white_link">持卡注册</a> | <a href="http://www.elong.com/member/elstraser.asp" class="white_link">客户服务</a> | <a href="http://card.elong.com/unicard/" class="white_link">联名卡</a></div>'
+'</div>';
var login2='<div id="loginin">'
+' <div id="login3">欢迎您，<span>'+t2+'</span> [<a href="http://www.elong.com/member/login_Out.asp" class="white_link">退出</a>]</div>'
+' <div id="login2"><a href="http://www.elong.com/sitemap.html" class="white_link">网站地图</a> | <a href="http://www.elong.com/myelong/index.aspx" class="white_link">我的e龙</a> | <a href="http://www.elong.com/myelong/userregcard.aspx" class="white_link">持卡注册</a> | <a href="http://www.elong.com/member/elstraser.asp" class="white_link">客户服务</a> | <a href="http://card.elong.com/unicard/" class="white_link">联名卡</a></div>'
+'</div>';
if ( t1 == "" || t1 == null)
document.write(login1)
else
document.write(login2);
*/
//-->