// JavaScript Document
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;
}


function setFooter() {
        var windowHeight=getWindowHeight();
        if (windowHeight>0) {
		
            var contentHeight=document.getElementById('container').offsetHeight;
            var footerElement=document.getElementById('basdepage');
			var containerElement=document.getElementById('container');

			var containerHeight=containerElement.offsetHeight;
            var footerHeight=footerElement.offsetHeight;
			
			containerElement.style.height= (windowHeight-footerHeight)+'px';
			
			
        if (windowHeight-(contentHeight+footerHeight)>=0) {
         	footerElement.style.position='relative';
            footerElement.style.top=(windowHeight-(contentHeight+footerHeight))+'px';
        }
        else {
            footerElement.style.position='static';
        }
       }
}
sfHover = function() {
    var sfEls = document.getElementById("menu_navigation").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function submitPanier(e) {	
	if(!document.getElementById('cgv').checked) {
		alert("Vous devez accepter les Conditions Générales de Vente.");
		return false;
	}
	else {
		return confirm("Etes-vous sur de vouloir valider votre Commande ?");
	}
}