function getCookie(cName)
{
	if (document.cookie.length>0)
  {
	  cStart=document.cookie.indexOf(cName + "=");
	  if (cStart!=-1)
    { 
	    cStart=cStart + cName.length+1; 
	    cEnd=document.cookie.indexOf(";",cStart);
	    if (cEnd==-1)
	    {
	    	cEnd=document.cookie.length;
	    }
	    return unescape(document.cookie.substring(cStart,cEnd));
    } 
  }
	return "";
}

function setCookie(cName,cValue,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=cName+ "=" +escape(cValue)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

