function DeleteCookie(sName)
{
  if (sName.length <= 0)
    return "";
  var sValue = "";
  var theCookie=document.cookie;
  iP1 = theCookie.indexOf(escape(sName));
  if (iP1 != -1)
  {
      iP2 = theCookie.indexOf(';',iP1);
      if (iP2 == -1)
        iP2 = theCookie.length;
      if (iP2 != -1)
        sValue = unescape(theCookie.substring(iP1+escape(sName).length+1,iP2));

      dExires = new Date();
      dExires.setTime(dExires.getTime() - (24*60*60*1000));
      var sExires = dExires.toGMTString();
      document.cookie = escape(sName)+"=;expires="+sExires;
  }
  return sValue;
}

