// JavaScript Document

function rollover(lien) {
   if (lien.getElementsByTagName("div")[0].style.visibility != "visible") lien.getElementsByTagName("div")[0].style.visibility = "visible";
   else lien.getElementsByTagName("div")[0].style.visibility = "hidden";
}

// JavaScript Document
/**************************************************
	APPEL DES FONCTIONS - INITIALISATION DE PAGE
**************************************************/

window.onload = init;

function init() {
	if ( document.getElementById("menuprivate") ) initMenuPrivate();
}

/**************************************************
	MENU
**************************************************/
function initMenuPrivate() {
	for ( var i=0; i<document.getElementById("menuprivate").getElementsByTagName("strong").length; i++ ) {
		document.getElementById("menuprivate").getElementsByTagName("strong")[i].onclick = function() { voletsMenuPrivate(this); }
	}
}
function voletsMenuPrivate(titreRub) {
	for ( var i=0; i<document.getElementById("menuprivate").getElementsByTagName("strong").length; i++ ) {
		sousMenu = document.getElementById("menuprivate").getElementsByTagName("strong")[i].parentNode.getElementsByTagName("ul")[0];
		if ( titreRub != document.getElementById("menuprivate").getElementsByTagName("strong")[i] ) {
			sousMenu.style.display = "none";
			document.getElementById("menuprivate").getElementsByTagName("strong")[i].style.background = "url(img/picto-plus.png) no-repeat 5px 8px;";
		}
		else {
			if ( sousMenu.style.display != "block" ) {
					sousMenu.style.display = "block";
					document.getElementById("menuprivate").getElementsByTagName("strong")[i].style.background = "url(img/picto-moins.png) no-repeat 5px 8px;";
				}
			else {
				sousMenu.style.display = "none";
				document.getElementById("menuprivate").getElementsByTagName("strong")[i].style.background = "url(img/picto-plus.png) no-repeat 5px 8px;";
			}
		}
	}
}


function writeSwf(urlSwf, L, H, varFlash) {
	codeSwf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+L+'" height="'+H+'">';
	codeSwf += '<param name="movie" value="'+urlSwf+'" />';
	codeSwf += '<param name="quality" value="high" />';
	codeSwf += '<param name="wmode" value="transparent" />';
	codeSwf += '<param name="FlashVars" value="'+varFlash+'" />';
	codeSwf += '<embed wmode="transparent" FlashVars="'+varFlash+'" src="'+urlSwf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+L+'" height="'+H+'">';
	codeSwf += '</embed></object>';
	document.write(codeSwf);	
}


