/* window.onload = loadEvents;
function loadEvents() {
//gestion layer commander par telephone
    var myAccesClient = document.getElementById("acces_client");
    var boutonFermer = document.getElementById("bouton_fermer");
    var myAccesClientImgs = myAccesClient.getElementsByTagName("img");
    myAccesClientImgs[0].style.cursor='hand';
    myAccesClientImgs[0].style.cursor='pointer';
    // Gestion du div contenant l'iframe
    var myAccesIframe = document.createElement("div");
    myAccesIframe.setAttribute("id","myForm");
    myAccesIframe.style.right='20px';
    myAccesIframe.style.top='10px';
    myAccesIframe.style.position='absolute';
    myAccesIframe.style.left='auto';
    myAccesIframe.style.zIndex=10000;
    myAccesIframe.style.padding=0;
    myAccesIframe.style.display='none';
    document.body.appendChild(myAccesIframe);
    // Gestion de l'iframe
    var myIframe  = document.createElement("iframe");
    myIframe.style.width='536px';
    myIframe.style.height='850px';
    myIframe.style.backgroundColor='transparent';
    myIframe.frameBorder=0;
    myIframe.allowTransparency='true';
    myIframe.scrolling='no';
    myIframe.src='';
    myIframe.src='http://blog.nrj-mobile.fr/nrjformulaire/index.php';
    myAccesIframe.appendChild(myIframe);
    //Evenements
    myAccesClient.onclick = function() { 
        myIframe.src='http://blog.nrj-mobile.fr/nrjformulaire/index.php';
        myAccesIframe.style.display='block';
        document.getElementById("bouton_fermer").style.display='block';
    }
} */

function BoxIt(Id) {
	
	B = ['box-logo', 'box-portabilite', 'box-paiement', 'box-livraison', 'box-contact', 'box-cga', 'box-tarifs', 'box-cgv', 'box-telephones'];
	for(var i in B) {
		if(document.getElementById(B[i])) {
			document.getElementById(B[i]).style.display = 'none';
		}
	}
	
	O = document.getElementById(Id);
	O.style.display = 'block';
	
	if(Id == 'box-telephones') {
		/*W = O.getElementsByTagName("table")[0].offsetWidth;
		O.style.width = (W + 26) +"px";*/
	}
	
	C = O.getElementsByTagName('img')[0];
	C.onclick = function () {
		P = this.parentNode;
		while(P.parentNode) {
			if(P.parentNode.className == "box") {
				P.parentNode.style.display = 'none';	
				break;
			}
			P = P.parentNode;
		}
	}
	
	D = O.getElementsByTagName('span')[0];
	D.onclick = function () {
		Q = this.parentNode;
		while(Q.parentNode) {
			if(Q.parentNode.className == "box") {
				Q.parentNode.style.display = 'none';	
				break;
			}
			Q = Q.parentNode;
		}
	}
	
	
}

function BoxClose(O) {
	P = O.parentNode;
	while(P.parentNode) {
		if(P.parentNode.className == "box") {
			P.parentNode.style.display = 'none';	
			break;
		}
		P = P.parentNode;
	}
}