function getCookie(name) {
    var cookie = " " + document.cookie;
    var search = " " + name + "=";
    var setStr = null;
    var offset = 0;
    var end = 0;
    if (cookie.length > 0) {
        offset = cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = cookie.indexOf(";", offset)
            if (end == -1) {
                end = cookie.length;
            }
        setStr = unescape(cookie.substring(offset, end));
        }
    }

    return(setStr);
}


function setCookie(name, value) {
    var expdate = new Date()
    expdate.setTime (expdate.getTime() + 365 * (24 * 60 * 60 * 1000)) //+1 day
	var cookieValue = name + "=" + escape(value) + "; expires=" + expdate.toGMTString() + "; domain=.loonstart.com";
	document.cookie = cookieValue;
}


function delCookie(name) {
	document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; domain=.loonstart.com";
}

  
