// JavaScript Document
<!-- 
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
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());
}

function deleteCookie(name){
    if(getCookie(name)){
        setCookie(name, '', -30);
    }
} 

function remCookie(name) {
    var theCookies = document.cookie.split(/[; ]+/);
    for (var i = 0 ; i < theCookies.length; i++) {
        var ckName = theCookies[i].substring(0,theCookies[i].indexOf('='));
        if (ckName.indexOf(name) != -1) {
			setCookie(theCookies[i],'',-10)
         }
    }
}
function getCooky(croot,cid)
{	cid=cid+'';
	c1=getCookie(croot);
	if (c1!=null && c1!='')
	{ c_start=c1.indexOf(cid+':');
		if (c_start!=-1)
			{ 
			c_start=c_start + cid.length+1; 
			c_end=c1.indexOf("|",c_start);
			if (c_end==-1) c_end=c1.length;
			return unescape(c1.substring(c_start,c_end));
		} 
	} 
	return "";
}

function setCooky(croot,cid,value,expiredays)
{	cid=cid+'';
	cv=cid+':'+value; chead='';
	c1=getCookie(croot);
	if (c1!=null && c1!='')
	{ c_start=c1.indexOf(cid+':');
		if (c_start!=-1)
			{ if (c_start > 0) { chead=unescape(c1.substring(0,c_start));} 
			c_start=c_start + cid.length+1; 
			c_end=c1.indexOf("|",c_start);
			if (c_end==-1) {ctail='';} else {ctail=unescape(c1.substring(c_end));} 
			cv=chead+cv+ctail;
		} else {
			cv=c1+'|'+cv;
		} 
	} 
setCookie(croot, cv, expiredays);
}

function deleteCooky(croot,cid){
    if(getCooky(croot,cid)){
        setCooky(croot,cid, '', -30);
    }
} 
//-->