//fonction de lancement des scripts
function addEvent(el,eventName,fction,returnVal) {
	if (el.addEventListener){
		el.addEventListener(eventName,fction,false);
	} else if (el.attachEvent) {
		el.attachEvent('on'+eventName,fction);
	}
}

var tab_list = new Array();
var tab_sslist = new Array();
function show_list() {
	tab_list = document.getElementsByTagName("dd");
	for(var i = 0;i<tab_list.length;i++){
		if(tab_list[i].className == "list") {
			if (navigator.appVersion.indexOf("MSIE") != -1) linkObj = 0; // Internet Explorer
			else linkObj = 1; // Tous les navigateurs
			tab_list[i].childNodes[linkObj].onclick = function() {
				tab_sslist = this.parentNode.getElementsByTagName("ul");
				if(tab_sslist[0].style.display == "block"){
					tab_sslist[0].style.display = "none";
				}else{
					tab_sslist[0].style.display = "block";
				}
			}
		}
	} 
}

/*function ConfirmPrintCoupon(){
	var blocBonReduction = document.getElementById("blocBonReduction");
	 
	if (blocBonReduction){
		tab_link = blocBonReduction.getElementsByTagName("a");
		for(var i = 0;i<tab_link.length;i++){
			tab_link[i].onclick = function(){
				var linkPrintPage = this.href;
				scroll(0,0);
				document.getElementById("warningPrint").style.display = "block";
				if (typeof document.body.style.maxHeight === "undefined") { 
					$("#pied select").css("visibility","hidden");
				}
				var viewportHeight = getWindowHeight();
				viwportHeight = (viewportHeight-200)/2;
				$("#warningPrint .warningPrintContent").css("margin-top",viwportHeight);
				
				document.getElementById("btOuiPrint").onclick =function(){
			    window.location.href = linkPrintPage;
			    
				document.getElementById("warningPrint").style.display = "none";
				if (typeof document.body.style.maxHeight === "undefined") { 
					$("#pied select").css("visibility","visible");
				}
				return false;
				}
				return false;
			}
		}
	}
}

function closePopupPrint(){
	document.getElementById("warningPrint").style.display = "none";
	if (typeof document.body.style.maxHeight === "undefined") { 
					$("#pied select").css("visibility","visible");
				}
}

function getWindowHeight() {
    var windowHeight=0;
    if (typeof(window.innerHeight)=='number') {
        windowHeight=window.innerHeight;
    }
    else {
     if (document.documentElement&&
       document.documentElement.clientHeight) {
         windowHeight = document.documentElement.clientHeight;
    }
    else {
     if (document.body&&document.body.clientHeight) {
         windowHeight=document.body.clientHeight;
      }
     }
    }
    return windowHeight;
}*/

//lancement des scripts
addEvent(window,'load',show_list,false);
//addEvent(window,'load',ConfirmPrintCoupon,false);
