//
// LowLevel - Cookie-Handling 
//

function setCookie(name, value, verfall) {
   /* Schreibe cookie, mit name und value , verfall sind Tage */
   path = ""
   verfall = verfall * 24 * 60 * 60 * 1000
   var now = new Date();
   end = new Date(now.getTime() + verfall);
   document.cookie = name + "=" + escape(value) + ";expires=" + end.toGMTString() + ";path=" + escape(path);

}

function getCookie(name) {
   /* auslesen des cookies */
   wert = ""
   if (document.cookie) {
      index = document.cookie.indexOf(name);
      if (index != -1) {
            countbegin = (document.cookie.indexOf("=", index) + 1);
            countend = document.cookie.indexOf(";", index);
            if (countend == -1) { countend = document.cookie.length; }
            wert = unescape(document.cookie.substring(countbegin,countend));
      }
    }
    return wert
}

function cleanKekse(name) {
   /*Cookie wird zurueckgesetzt*/
   path = ""
   var now = new Date();
   end = new Date(now.getTime());
   document.cookie = name + "=" + escape(" ") + ";expires=" + end.toGMTString() + ";path=" + escape(path);
}


