if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && navigator.userAgent.toLowerCase().indexOf('opera') == -1) {
	var isIE = true;
	//get IE version
	if (navigator.userAgent.toLowerCase().indexOf("msie 5.5") != -1) {
		var isIE55 = true;
	} else if (navigator.userAgent.toLowerCase().indexOf("msie 6") != -1)  {
		var isIE6 = true;
	} else if (navigator.userAgent.toLowerCase().indexOf("msie 7") != -1)  {
		var isIE7 = true;
	}
} else if (navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
	var isOp = true;
} else if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1 || 
		  (navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && (navigator.userAgent.toLowerCase().indexOf('rv:1.7') != -1 || navigator.userAgent.toLowerCase().indexOf('rv:1.8') != -1))) {
	var isMoz = true;
}
/*nom de la fenetre : utilisée pour le retour de paiement de spplus */
self.name="sitecom";



/**
  * Get element by id
  * @param string id, the element id to get
  * @return wanted element or false if not founded
  */
function getE(id) {
	if (e = document.getElementById(id)) { 
		return e;
	} else {
		return false;
	}
}


//check if the next sibling node is an element node
function get_nextsibling(n)
  {
  var x=n.nextSibling;
  while (x.nodeType!=1)
   {
   x=x.nextSibling;
   }
  return x;
  }

/*add some events on menu for IE compatibility only*/
function startMenu() {
	if (isIE/* && !isIE7*/) {
		var liMenu = document.getElementById("menu").getElementsByTagName("LI");
		for (var i=0; i<liMenu.length; i++) {
		  	li = liMenu[i];
		  	if (li.nodeName=="LI"  && li.className=="CMS_lvl2" ) {
		  		li.onmouseenter=function() {
		  			this.className += " over";
		    	}
		  		li.onmouseleave=function() {
		  			this.className = this.className.replace(" over", "");
				}
			}
		}
	}
}


(function(){
	/* Add events on object*/
	if (typeof 'addEvent' != 'function') {
		function addEvent(obj, evType, fn)
		{
			if (obj.addEventListener) {
				obj.addEventListener(evType, fn, true);
				return true;
			} else if (obj.attachEvent) {
				var r = obj.attachEvent("on"+evType, fn);
				return r;
			} else {
				return false;
			}
			return true;
		}
	}
	/** 
	  * Add window.onload event
	  * launch some functions according to the current page
	  */
	addEvent(window, 'load', function(){
		startMenu();
	});
})();
