<!--


// Popup window
function openWindow(name, url, width, height, scrollbar, statusbar, toolbar, menubar, resizable, left, top) {
	if (typeof width == 'undefined' ) width = screen.availWidth;
	if (typeof height == 'undefined' ) height = screen.availHeight;
	if (typeof scrollbar == 'undefined' ) scrollbar = 1;
	if (typeof statusbar == 'undefined' ) statusbar = 0;
	if (typeof toolbar == 'undefined' ) toolbar = 0;
	if (typeof menubar == 'undefined' ) menubar = 0;
	if (typeof resizable == 'undefined' ) resizable = 1;
  var toolbar_str = toolbar ? 'yes' : 'no';
  var menubar_str = menubar ? 'yes' : 'no';
  var statusbar_str = statusbar ? 'yes' : 'no';
  var scrollbar_str = scrollbar ? 'yes' : 'no';
  var resizable_str = resizable ? 'yes' : 'no';
	
	// Center the window if no left and top coordinates supplied
	var xy = getCenteredXY (width, height);
	if (typeof left == 'undefined' ) left = xy[0];
	if (typeof top == 'undefined' ) top = xy[1];

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_end    = cookie_str.indexOf('=', pos_start);

  cookie_name = cookie_str.substring(pos_start, pos_end);

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_name == name && cookie_val  == "done")
	return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function getScreenRes () {
	var x = screen.availWidth;
	var y = screen.availHeight;
	var res = new Array (x, y);
	return res;	
}
function getCenteredXY (width, height) {
	if (typeof height == 'undefined' ) height = screen.availHeight;
	var res = getScreenRes ();
	var x = (res[0] - width) / 2;
	var y = (res[1] - (height+60)) / 2;
	var pos = new Array (x, y);
	return pos;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// Empêche l'affichage de la bordure en pointillé quand on clique sur un lien
function blurLinks() {
	if (!document.getElementById) return;
	theLinks = document.getElementsByTagName("A");
	theAreas = document.getElementsByTagName("AREA");
	for(i=0; i<theLinks.length; i++) {theLinks[i].onfocus = unblur;}
	for(i=0; i<theAreas.length; i++) {theAreas[i].onfocus = unblur;}
  } 
function unblur() 
	{
	this.blur();
}


//  ********************* General Cookie handling *********************
//  Cookie Functions - Second Helping  (21-Jan-96)
//  Written by:  Bill Dortch, hIdaho Design <bdortch@netw.com>
//  The following functions are released to the public domain.
function getCookieVal (offset) {  
   var endstr = document.cookie.indexOf (";", offset);  
   if (endstr == -1)    
      endstr = document.cookie.length;  
   return unescape(document.cookie.substring(offset, endstr));
}
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 SetCookie (name, value) {  
   var argv = SetCookie.arguments;  
   var argc = SetCookie.arguments.length;  
   var expires = (argc > 2) ? argv[2] : null;  
   var path = (argc > 3) ? argv[3] : null;  
   var domain = (argc > 4) ? argv[4] : null;  
   var secure = (argc > 5) ? argv[5] : false;  
   document.cookie = name + "=" + escape (value) + 
      ((expires == null) ? "" : ("; expires=" + expires)) + 
      ((path == null) ? "" : ("; path=" + path)) +  
      ((domain == null) ? "" : ("; domain=" + domain)) +    
      ((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
   var exp = new Date();  
   exp.setTime (exp.getTime() - 1);  
   // This cookie is history  
   var value = GetCookie (name);  
   document.cookie = name + "=" + value + "; expires=" + exp.toGMTString();
}

-->