function ouvresousmenu(nom){
	var sm = document.getElementById('smenuWUCBandoUp1_'+nom);
	var sm1=document.getElementById('smenuWUCBandoUp1_metier');
	var sm2=document.getElementById('smenuWUCBandoUp1_legislation');
	var sm3=document.getElementById('smenuWUCBandoUp1_programmes');
	var sm4=document.getElementById('smenuWUCBandoUp1_parrainage');
	var sm5=document.getElementById('smenuWUCBandoUp1_recrutement');
	var a = new Array(sm1, sm2, sm3, sm4, sm5)
	for(var i=0; i<a.length; i++){	
		a[i].style.display = 'none';
	}
	sm.style.display = 'block';
}		

window.onresize = function(){
	placemenus();
}

window.onload = function(){
	placemenus();
}


function placemenus(){	
	var m1=document.getElementById('WUCBandoUp1_metier');
	var m2=document.getElementById('WUCBandoUp1_legislation');
	var m3=document.getElementById('WUCBandoUp1_programmes');
	var m4=document.getElementById('WUCBandoUp1_parrainage');
	var m5=document.getElementById('WUCBandoUp1_recrutement');
	var a = new Array(m1, m2, m3, m4, m5)
	for(var i=0; i<a.length; i++){	
	place(a[i]);
	}
}

function place(m){
	var sm = document.getElementById('smenu'+m.id);
	var posx = getLeft(m);
	var posy = getTop(m);
	sm.style.left = posx + (-20) + 'px';
	sm.style.top = posy + 26 + 'px';
	}

function getLeft(l){
  if (l.offsetParent) return (l.offsetLeft + getLeft(l.offsetParent));
  else return (l.offsetLeft);
}
function getTop(l){
  if (l.offsetParent) return (l.offsetTop + getTop(l.offsetParent));
  else return (l.offsetTop);
}




function afficheMaxi(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};
	
	function valign(c){
c.style.marginTop = ((c.height/2) *-1)  + 'px'
}

// ANIMATION FLASH
function CreateFlash(id, chemin, width, height, vars){
	
    //id : id de l'element dans lequel on va ecrire le flash
    var d = document.getElementById(id);
    var flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">' +
    '<param name="movie" value="' + chemin + '" />' +
    '<param name="quality" value="high" />' +
    '<param name="wmode" value="transparent" />' +
    '<param name="flashvars" value="' + vars + '">' +
    '<embed src="' + chemin + '" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="' + vars + '" width="' + width + '" height="' + height + '"></embed></object>'
    d.innerHTML = flash
}

function AfficheInfo(contenu,e){
	var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	
	var d = document.getElementById('divinfo');
	var c = document.getElementById('cinfo');  
	d.style.left = posx  - 410 + 'px';
	d.style.top = posy + 15 + 'px';
	d.style.display = 'block';
	
	//c.innerHTML = contenu	
}