function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  	var arr = document.cookie.split(";");
	for(i=0;i<arr.length;i++){
            		c_start=arr[i].indexOf(c_name + "=");
		if(c_start>=0){
                    return arr[i].substring(c_name.length+1,arr[i].length).replace("=","");
                    }
		}
  }
return ""
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/;domain=loooe.com";
}
function checkCookie()
{
username=getCookie('username')
if (username!=null && username!="")
  {alert('Welcome again '+username+'!')}
else
  {
  username=prompt('Please enter your name:',"")
  if (username!=null && username!="")
    {
    setCookie('username',username,365)
    }
  }
}
function delCookie(name)
{
var exp = new Date();
exp.setTime(exp.getDate() - 30);
var cval=getCookie(name);
if(cval!=null) documents.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
function cls(){
	setCookie("lu","");setCookie("lv","");setCookie("uid","");setCookie("sid","");setCookie("vip","");
	return true;
}
