/* fonction pour le survol et le clic dans les menus */
var W3CDOM = (document.createElement && document.getElementsByTagName);
/*
var url = new Array();
var surl = new Array();

window.onload = init;

function init(){
	if (!W3CDOM) return;
	var items = getElementsByClass("btnH");
	//var items = document.getElementsByName('item');
	for (var i=0;i<items.length;i++){	
		items[i].onmouseover = mouseGoesOver;
		items[i].onmouseout = mouseGoesOut;
		items[i].onclick = mouseClick;
		url[i]= items[i].getElementsByTagName('a')[0].href;
		items[i].number = i;
	}
	var sitems = getElementsByClass("sitem3d");
	//var sitems = document.getElementsByName('sitem');
	for (var i=0;i<sitems.length;i++){	
		sitems[i].onmouseover = mouseGoesOver2;
		sitems[i].onmouseout = mouseGoesOut2;
		sitems[i].onclick = mouseClick2;
		surl[i]= sitems[i].getElementsByTagName('a')[0].href;
		sitems[i].number = i;
	}
}
function mouseClick(){
	document.location.href=url[this.number];
}
function mouseGoesOver(){
	this.style.background='url(images/bouton2.png) repeat-x';
}
function mouseGoesOut(){
	this.style.background='url(images/bouton.png) repeat-x';

}



function mouseClick2(){
	document.location.href=surl[this.number];
}

function mouseGoesOver2(id){
	this.style.background='url(images/bouton_s2.png) no-repeat';
}
function mouseGoesOut2(id){
	this.style.background='url(images/bouton_s.png) no-repeat';

}


// gère l'affichage du sous-menu 
function afficher(id,tabSousM) {
//affiche le sous-menu
	document.getElementById(id).style.background="url(images/boutonD.png)  no-repeat";
	for(i=0;i<tabSousM.length;i++){
		document.getElementById(tabSousM[i]).style.display = "block";
	}

}

//////////////////////////////////////////
function getElementsByClass(searchClass) {
  var classElements = new Array();
  var els = document.getElementsByTagName("div");
  var elsLen = els.length;
  //var pattern = new RegExp("\b"+searchClass+"\b");
  var pattern = new RegExp("(^|\\s)" + searchClass + "(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if ( pattern.test(els[i].className) ) {
      classElements[j] = els[i];
      j++;
	
    }
  }
return classElements;
}












// affiche l'image du bouton selectionné et raffraichi l'historique*

// Récupérer la valeur d'une propriété CSS d'un élément id

function getStyle(elt,pro){
	var element = document.getElementById(elt);
	if (window.getComputedStyle){ // Mozilla Firefox & cie
		var propriete = window.getComputedStyle(element,null).getPropertyValue(pro);
	}else if (element.currentStyle){ // Microsoft Internet Explorer
		// Formatage (IE) de la propriété CSS
		while (pro.indexOf('-') != -1) {
			var lettresuivtiret = pro.charAt(pro.indexOf('-')+1);
			pro = pro.replace(/-\S{1}/,lettresuivtiret.toUpperCase());
		}
		var propriete = eval('element.currentStyle.'+pro);
	}
	return propriete;
}
var boutonSelec="";
function pageSelect(id){
	boutonSelec=id;
	var imageSelect="images/bouton2.png"
	if(getStyle(id,'width')=='118px'){
		imageSelect="images/bouton_s2.png";		
	}
	document.getElementById(id).style.background="url("+imageSelect+") no-repeat";
}

function gererHistorique(texte){
	document.getElementById("historique").innerHTML = "<a href='index.php5?page="+texte+"'>"+texte+"</a>";
}


*/














var idMenuP="cv";











function afficheId(baliseId)
  {
  if (document.getElementById && document.getElementById(baliseId) != null)
    {
    document.getElementById(baliseId).style.visibility='visible';
    document.getElementById(baliseId).style.display='block';
	document.getElementById(baliseId).style.width='290px';

    }
  }
  

function cacheId(baliseId)
  {
  if (document.getElementById && document.getElementById(baliseId) != null)
    {
    document.getElementById(baliseId).style.visibility='hidden';
    document.getElementById(baliseId).style.display='none';
    }
  }

	var xmlhttp;
	var ide;
	var identifiant=0;
	var urlVideo="";
	
function afficheVideo(url,taille,id){
	urlVideo=url;
	url=url+'&taille='+taille;
	loadXMLDoc(url);
	ide=id;
}
	
	
function loadXMLDoc(url){
	/*alert(document.getElementById('lecteurVideo').offsetLeft);
	document.getElementById('boutonLecteur').style.left=235;
	alert(document.getElementById('boutonLecteur').style.left);*/
		//document.getElementById('boutonLecteur').style.left=document.getElementById('lecteurVideo').offsetLeft;
		
	
		if (window.XMLHttpRequest){ // code for Mozilla, etc.
			xmlhttp=new XMLHttpRequest();
		}else{
			if (window.ActiveXObject){ // code for IE.
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		if (xmlhttp) {
			xmlhttp.onreadystatechange=xmlhttpChange;
			xmlhttp.open("GET",url,true);
			xmlhttp.send('');
		}
		
		

}
function xmlhttpChange(){
				
	if (xmlhttp.readyState==4) {
		if (xmlhttp.status==200) {
			//insertion du resultat dans le div
			document.getElementById(ide).innerHTML = xmlhttp.responseText;
			/*if(identifiant==0){
				identifiant=ide;
			}else{
				document.getElementById(identifiant).innerHTML ="toto3";
							identifiant=ide;
			}*/

			
		} else {
			alert("Problem retrieving XML data");
		}
	}
}

/* interaction FLash */
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function lecteurOb_DoFSCommand(command, args) 
{
  var sampleFlaMovieObj =   InternetExplorer ? lecteurOb : document.lecteurOb;
  	if (command == "taille") {
		url=urlVideo+'&taille='+args;
		loadXMLDoc(url)
	}
}
// Hook for Internet Explorer
if (navigator.appName && 
  navigator.appName.indexOf("Microsoft") != -1 &&
  navigator.userAgent.indexOf("Windows") != -1 && 
  navigator.userAgent.indexOf("Windows 3.1") == -1) 
{
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write(
    'Sub lecteurOb_FSCommand(ByVal command, ByVal args)\n');
  document.write(
    ' call lecteurOb_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
}


