 <!--
    //******************************************************************************
    //  Cookie Functions -- "Night of the Living Cookie" Version (25-Jul-96)
    //  Written by:  Bill Dortch, hIdaho Design <bdortch@hidaho.com>


    //  "Internal" function to return the decoded value of a cookie
    function getCookieVal (offset) {
      var endstr = document.cookie.indexOf (";", offset);
      if (endstr == -1)
        endstr = document.cookie.length;
      return unescape(document.cookie.substring(offset, endstr));
    }


    //  Function to return the value of the cookie specified by "name".
    //    name -    String object containing the cookie name.
    //    returns - String object containing the cookie value,
    //              or null if the cookie does not exist.
    //
    function GetCookie (name) {
      var arg = name + "=";
      var alen = arg.length;
      var clen = document.cookie.length;
      var i = 0;
      while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
          return getCookieVal (j);
    	i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
      }
      return null;
    }


    //  Function to create or update a cookie.
    //    name - String object containing the cookie name.
    //    value - String object containing the cookie value.  May contain
    //         any valid string characters.
    //    [expires] - Date object containing the expiration data of the cookie.  If
    //         omitted or null, expires the cookie at the end of the current session.
    //    [path] - String object indicating the path for which the cookie is valid.
    //         If omitted or null, uses the path of the calling document.
    //    [domain] - String object indicating the domain for which the cookie is
    //         valid. If omitted or null, uses the domain of the calling document.
    //    [secure] - Boolean (true/false) value indicating whether cookie
    //         transmission requires a secure channel (HTTPS).
    //
    //  The first two parameters are required.  The others, if supplied, must
    //  be passed in the order listed above.  To omit an unused optional field,
    //  use null as a place holder.  For example, to call SetCookie using name,
    //  value and path, you would code:
    //
    //      SetCookie ("myCookieName", "myCookieValue", null, "/");
    //
    //  Note that trailing omitted parameters do not require a placeholder.
    //
    //  To set a secure cookie for path "/myPath", that expires after the
    //  current session, you might code:
    //
    //      SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
    //
    function SetCookie (name,value,expires,path,domain,secure) {
      document.cookie = name + "=" + escape (value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
    }


    //  Function to delete a cookie. (Sets expiration date to start of epoch)
    //    name -   String object containing the cookie name
    //    path -   String object containing the path of the cookie to delete.
    //             This MUST be the same as the path used to create the cookie, or
    //             null/omitted if no path was specified when creating the cookie.
    //    domain - String object containing the domain of the cookie to delete.
    //             This MUST be the same as the domain used to create the cookie, or
    //             null/omitted if no domain was specified when creating the cookie.
    //
    function DeleteCookie (name,path,domain) {
      if (GetCookie(name)) {
        document.cookie = name + "=" +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          "; expires=Thu, 01-Jan-70 00:00:01 GMT";
      }
    }

    //******************************************************************************
  // -->

 duree_cookie = 100;         // dur�e de vie du cookie en jours
    expiration = new Date();    // date et heure courante en format texte
    expiration.setTime(expiration.getTime() + (duree_cookie * 24*60*60*1000));
                                // => on peut utiliser la variable "expiration"
N = (document.all) ? 0 : 1;
var ob;
var over = false;
var var_x;
var var_y;
var var_iex;
var var_iey;

function init_drag(e){
if (N) {
ob = document.getElementById("nav");

var_x = GetCookie("x");
var_y = GetCookie("y");
if(ob) {
ob.style.top = var_y+"px";
ob.style.left = var_x+"px";
}
}
else {
ob = document.getElementById("nav");
var_iex = GetCookie("iex");
var_iey = GetCookie("iey");
ob = ob.style;
ob.pixelLeft = var_iex;
ob.pixelTop = var_iey;

  }
}
function reinit(e){
if (N) {
ob = document.getElementById("nav");

var_x = 0;
var_y = 232;
if(ob) {
ob.style.top = var_y+"px";
ob.style.left = var_x+"px";

duree = 10;  // Dur�e de vie du cookie en jours
      date_expire = new Date();
      date_expire.setTime(date_expire.getTime() + (duree*24*60*60*1000));
      SetCookie("y",var_y,date_expire);
ob.style.top = var_y+"px";

      SetCookie("x",var_x,date_expire);
ob.style.left = var_x+"px";
}
}
else {
ob = document.getElementById("nav");
var_iex = 0;
var_iey = 232;
ob = ob.style;
ob.pixelLeft = var_iex;
ob.pixelTop = var_iey;

duree = 10;  // Dur�e de vie du cookie en jours
      date_expire = new Date();
      date_expire.setTime(date_expire.getTime() + (duree*24*60*60*1000));
      SetCookie("iex",var_iex,date_expire);
ob.pixelLeft = var_iex;

	 SetCookie("iey",var_iey,date_expire);
ob.pixelTop = var_iey;

  }

MU();
return false;
}
function MD(e) {

if (over)
{
if (N) {
ob = document.getElementById("nav");

X=e.layerX;

Y=e.layerY;

return false;
}
else {
ob = document.getElementById("nav");
ob = ob.style;
X=event.offsetX;
Y=event.offsetY;


}
}
}

function MM(e) {

if (ob) {

if (N) {
var_y = e.pageY-Y;
duree = 10;  // Dur�e de vie du cookie en jours
      date_expire = new Date();
      date_expire.setTime(date_expire.getTime() + (duree*24*60*60*1000));
      SetCookie("y",var_y,date_expire);
ob.style.top = var_y+"px";
var_x = e.pageX-X;
      SetCookie("x",var_x,date_expire);
ob.style.left = var_x+"px";


}
else {
var_iex = event.clientX-X + document.body.scrollLeft;
duree = 10;  // Dur�e de vie du cookie en jours
      date_expire = new Date();
      date_expire.setTime(date_expire.getTime() + (duree*24*60*60*1000));
      SetCookie("iex",var_iex,date_expire);
ob.pixelLeft = var_iex;
var_iey = event.clientY-Y + document.body.scrollTop;
	 SetCookie("iey",var_iey,date_expire);
ob.pixelTop = var_iey;
return false;
      }
   }
}

function MU() {

ob = null;
}

if (N) {
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
}

document.onmousedown = MD;
document.onmousemove = MM;
document.onmouseup = MU;

