// menu déroulant
window.onload=montre;

function montre(id) {
var d = document.getElementById(id);
	for (var i = 0; i<=7; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
// onglets article--------------------------------------------------
function tabs(c1,c2,c3) {
document.getElementById('iframe').width='100%';
document.getElementById('iframe').height='1000';
document.getElementById('dazibaoueb').style.display='none';
document.getElementById('source').style.display='block';
document.getElementById('s').style.backgroundColor=c1;
document.getElementById('d').style.backgroundColor=c2;
document.getElementById('s').style.borderBottomColor=c1;
document.getElementById('d').style.borderBottomColor=c3;
} 

function tabd(c1,c2,c3) {
document.getElementById('iframe').width='0';
document.getElementById('iframe').height='0';
document.getElementById('iframe').frameborder='0';
document.getElementById('source').style.display='none';
document.getElementById('dazibaoueb').style.display='block';
document.getElementById('d').style.backgroundColor=c1;
document.getElementById('s').style.backgroundColor=c2;
document.getElementById('d').style.borderBottomColor=c1;
document.getElementById('s').style.borderBottomColor=c3;
}
//---------------------------------------------------------------------
// redimensionnement fenêtre: adaptation auto taille colonne articles (ne marche pas dans IE)
function adapttaille(largcol,maxipage) {
var ll = (document.body.clientWidth);
var col= 264;
if (document.getElementById('3col')) {col = 424;}
col = col + (largcol*2);
if (ll > maxipage) {ll = maxipage;}
var larg = (ll - col);
var elt=document.getElementsByName('adapt');
for (var i=0; i<elt.length; i++){ 
	elt[i].style.width= larg+'px';
	}
}

function popup(larg) {
if (document.getElementById('popup')) {
pos=(((document.body.clientWidth) - larg)/2);
// document.write(pos+', '+larg);
elt=document.getElementById('popup');
elt.style.left=pos+'px';
elt.style.width=larg+'px';
elt.style.display='block';
}
}

function popclose() {
if (document.getElementById('popup')) {
elt.style.display='none';
}
}


