﻿if(ROQ === undefined) {
	var ROQ = {};
}
ROQ.listes = function(){
	if(document.getElementById("filtersList")){
		var lyr = document.getElementById("filtersList");
		lyr.style.left = Math.round((572 - lyr.offsetWidth) / 2) + "px";
	}
	if(document.getElementById("pagiTop")){
		var lyr = document.getElementById("pagiTop");
		lyr.style.left = Math.round((572 - lyr.offsetWidth) / 2) + "px";
	}
	if(document.getElementById("pagiBottom")){
		var lyr = document.getElementById("pagiBottom");
		lyr.style.left = Math.round((572 - lyr.offsetWidth) / 2) + "px";
	}
}
//rollOver par style
ROQ.rollStyle = function(that){
	if(that.className.indexOf("_on") >= 0){
		that.className = that.className.replace("_on", "");
	}
	else{
		that.className = that.className + "_on";
	}
}

//rollOver par src
ROQ.rollImg= function(that){
	if(that.src.indexOf("_on") >= 0){
		that.src = that.src.replace("_on", "_off");
	}
	else{
		that.src = that.src.replace("_off", "_on");
	}
}

//affichage textes links listes
ROQ.listLinksRoll = function(that){
	var divroll = that.getElementsByTagName("div")[0];
	// test IE
	if(document.all != null && window.opera == null){
		// test IE 6
		if(window.XMLHttpRequest == null && document.implementation != null && document.compatMode != null){
			var parentFirstLi = that.parentNode.getElementsByTagName("li")[0];
			var pox = parentFirstLi.offsetLeft;
			divroll.style.left = - pox;
		}
	}
	if(divroll.style.display == "block"){
		divroll.style.display = "none";
	}
	else {
		divroll.style.display = "block";
	}
}

ROQ.addListener(window, 'load', function(){
	ROQ.showLists.init("liste-criteria1");
	ROQ.showLists.init("liste-criteria2");
	ROQ.showLists.init("liste-sitename");
	ROQ.showLists.init("liste-langage");
	ROQ.showLists.init("liste-page");
	ROQ.listes();
});