// JavaScript Document
function getCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  {
    offsetNum = document.cookie.indexOf(search);
    if (offsetNum != -1)
    {	
      offsetNum += search.length;
      end = document.cookie.indexOf(";", offsetNum);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offsetNum, end))
    }
  }
  return cookieValue;
}

function setCookie(cookieName,cookieValue,DayValue)
{
	var expire = "";
	var day_value=1;
	if(DayValue!=null)
	{
		day_value=DayValue;
	}
    expire = new Date((new Date()).getTime() + day_value);
    expire = "; expires=" + expire.toGMTString();
	document.cookie = cookieName + "=" + escape(cookieValue) +";path=/"+ expire;
}

function delCookie(cookieName)
{
	var expire = "";
    expire = new Date((new Date()).getTime() - 1 );
    expire = "; expires=" + expire.toGMTString();
	document.cookie = cookieName + "=" + escape("") +";path=/"+ expire;
	//path=/
}

function setShoppingUrl(){
    setCookie("ShoppingBackUrl",location.href,30*86400000);//ÉèÖÃ·µ»ØÒ³Ãæ
}

function backShoppingUrl()
{
    var Url=getCookie("ShoppingBackUrl");
    if(Url=="")Url="/";
    location.href=Url;
}
function goTop(){
	document.body.scrollTop = 0;
	document.documentElement.scrollTop = 0;
}
function setCloseLive800()
{
    setCookie("HasCloseLive800",1,600000);//Ãë
}
function getCloseLive800(){
    return getCookie("HasCloseLive800");
}
function closeLive800(){
    setCloseLive800();
    document.getElementById("live800msg").style.display = "none";
}