//controle de la barre de menu
function barIn(Xpos){
	var monswf = window.document.bar;
	monswf.SetVariable("end",Xpos-1000);
  	monswf.TGotoLabel("/","goOn");
}

function barOut(id){
	document.styleSheets[1].disabled=true;
	var monswf = window.document.bar;
	monswf.TGotoLabel("/","goOut");
}

var isLoading=false;
var current='';
//controle de l'image à afficher en roll over
function rollOver(image){
	var swfImage=window.document.imageRoll;
	if(swfImage.PercentLoaded()==100){
		if(current==image){return;};
		current=image;
		isLoad(image);
	}
	else if (isLoading==false) {
		isLoading=true;
		loader = window.setInterval("loading('"+image+"');", 1000);
	}
	else{
		return;
	}
}

function loading(ref) {
	var swfImage=window.document.imageRoll;
	if(swfImage.PercentLoaded()==100){
		window.clearInterval(loader);
		isLoad(ref);
	}
	else {
		document.getElementById('load').style.display='block';
	}
}

function isLoad(image){
	var swfImage=window.document.imageRoll;
	document.getElementById('load').style.display='none';
	swfImage.TGotoLabel("/","vide");
	swfImage.SetVariable("photo",image);
	swfImage.TGotoLabel("/","affiche");
}


function rollOut(){
	var swfImage=window.document.imageRoll;
	swfImage.TGotoLabel("/","vide");
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function bar_DoFSCommand(commande,id){
	var barObj = isInternetExplorer ? document.all.bar : document.bar;
	if(commande=="menuPuce"){
		document.styleSheets[1].disabled=false;
	}
}

// Hook pour 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 bar_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call bar_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->
/*

$("#activ").change(function(){

	alert($("#formCoord .activ").val());
}



function autre(f){
	check=f.elements['activ'].selectedIndex;
	if(check==7){
		document.getElementById('activite_autre_commande').style.visibility='visible';
		document.getElementById('activite_autre_commande').focus();
	}

	else{
		document.getElementById('activite_autre_commande').style.visibility='hidden';
	}
}*/
