//pour garder ce fic en UTF-8: Ã©Ã©Ã©Ã©Ã©
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
	
  var i,p,v,obj,args=MM_showHideLayers.arguments;  
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function openPopup(url){

	var xhr_object = null;
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
	else if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	
	// On ouvre la requete vers la page désirée
	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){	
		if ( xhr_object.readyState == 4 ) {
			var pressediv = document.getElementById("pressediv");
			
			if (pressediv.style.display=='none') pressediv.style.display='block';			
			pressediv.innerHTML = xhr_object.responseText;
		}
	}
	xhr_object.send(null);
} 


//  The W3C DOM Object
function dom_object(obj) {
	this.css2 = obj;
	this.name = obj.id;
	this.objGetLeft = domGetLeft;
	this.objSetLeft = domSetLeft;
	this.objMoveAbsolute = domMoveAbsolute;
	this.objMoveRelative = domMoveRelative;
}

// The IE 4.x, 5.x, and  6.x DOM Object
function ie_object(obj) {
	this.css2 = obj;
	this.name = obj.id;
	this.objGetLeft = domGetLeft;
	this.objSetLeft = domSetLeft;
	this.objMoveAbsolute = domMoveAbsolute;
	this.objMoveRelative = domMoveRelative;
}

// The Navigator DOM Object
function ns_object(obj) {
	this.css2 = obj;
	this.name = obj.name;
	this.objGetLeft = nsobjGetLeft;
	this.objSetLeft = nsobjSetLeft;
	this.objMoveAbsolute = domMoveAbsolute;
	this.objMoveRelative = domMoveRelative;
}

// The DOM Object Implementations
//
//*************************************************************************************

// element's left position
function domGetLeft() {
        var lt = parseInt(this.css2.style.left);
	return lt;
}
// set element's left position
function domSetLeft(left) {
	this.css2.style.left = left + "px";
}

// make absolute move
function domMoveAbsolute(newleft, newtop) {
   this.objSetLeft(newleft);
}
// move relative to current location
function domMoveRelative(left, top) {
   this.objSetLeft(left + this.objGetLeft());
}


// The Navigator 4.x Object Implementations
//
//*****************************************************************************

// element's left position
function nsobjGetLeft() {
	return this.css2.left;
}
// set element's left position
function nsobjSetLeft(left) {
	this.css2.left = left;
}

// For IE 4.x, pull all DIV blocks into object array
function create_ie_objects() {
   theelements = document.all.tags("DIV");
   theobjs = new Array();
   for (i = 0; i < theelements.length; i++){
      if (theelements[i].id != "") {
	   theobjs[theelements[i].id] = new ie_object(theelements[i]);
	   }
      }
}

// For Navigator 4.x, pull all DIV blocks into object array
function create_ns_objects(newarray) {
   theobjs = new Array();
   for (i = 0; i < document.layers.length; i++){
     if (document.layers[i].name != "")
   	 theobjs[document.layers[i].name] = new ns_object(document.layers[i]);
     }
}

// For W3C DOM (Navigator 6.x, Mozilla, IE 6.x), 
// pull all named DIV blocks into an array
function create_dom_objects() {
  theelements = document.getElementsByTagName("DIV");
  theobjs = new Array();
  for (i = 0; i < theelements.length; i++) {
      var obj = theelements[i];
      if (obj.id != "")
         theobjs[obj.id] = new dom_object(obj);
      }
}

function create_objects() {
    // Internet Explorer 4.x, 5.x, 6.x
    if (navigator.appName == "Microsoft Internet Explorer")
	   create_ie_objects();
    else // Navigator or Mozilla
        if (navigator.appName == "Mozilla" || navigator.appName == "Netscape")
           if (navigator.appVersion.indexOf("4.") == -1)
	      create_dom_objects();
           else 
  	      create_ns_objects();
}

function Is() {
    var agent   = navigator.userAgent.toLowerCase();
    this.major  = parseInt(navigator.appVersion);
    this.minor  = parseFloat(navigator.appVersion);
    this.ns     = ((agent.indexOf('mozilla')   != -1) &&
                  (agent.indexOf('spoofer')    == -1) &&
                  (agent.indexOf('compatible') == -1) &&
                  (agent.indexOf('opera')      == -1) &&
                  (agent.indexOf('webtv')      == -1));
    this.ns4    = (this.ns && (this.major      ==  4));
    this.ns6    = (this.ns && (this.major      >=  5));
    this.ie     = (agent.indexOf("msie")       != -1);
    this.ie3    = (this.ie && (this.major      <   4));
    this.ie4  	= (this.ie && (this.major >= 4));
    this.ie5    = (this.ie && (this.major      ==  4) &&
                  (agent.indexOf("msie 5.0")   != -1));
    this.ie6    = (this.ie && (this.major      ==  4) &&
                  (agent.indexOf("msie 6.0")   != -1));
    this.ieX    = (this.ie && !this.ie3 && !this.ie4);
}
// some vars
var is = new Is();
var selmenu;

function center() {
	if(is.ns4 ||is.ns6) {
		available_width=innerWidth; 
		theobjs["serv"].objMoveAbsolute (available_width-150, 29);
	}
	else if(is.ie4 || is.ie5) {
		available_width=document.body.clientWidth;
		if (available_width<777) {
		available_width=777;
		}
		theobjs["serv"].objMoveAbsolute (available_width-150, 29);
	}
}
function init() {
	create_objects();
	center();
}