// Set cookie with national initials.

function setCookie(name, value) {document.cookie = name + "=" + value;}

// Get cookie with national initials.

function getCookie(name)
{
   var search = name + "=";
   if (document.cookie.length > 0)
    { // there are cookies
      offset = document.cookie.indexOf(search); 
      if (offset != -1)
       { // cookie exists 
         offset += search.length;
         // set index of beginning of value
         end = document.cookie.indexOf(";", offset); 
         // set index of end of cookie value
         if (end == -1) 
            end = document.cookie.length;
         return document.cookie.substring(offset, end);
       } 
    }
    else return "";
}

