// Timer pour le menu
var Timer;
var bTimer = false;

function stop(id)
{
	cache(id);
	ClearTimer();
	bTimer = false;	
}

function BeginTimer(id)
{
	if ( !bTimer )
	{
		Timer = setTimeout("stop('" + id + "')", 1000);
		bTimer = true;
	}
}

function ClearTimer()
{
	if (bTimer)
	{
		bTimer = false;
		clearTimeout(Timer);
	}
}

// Fonction d'affichage d'un menu
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

// Fonction de masquage d'un menu
function cache(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='none';}
}

// Fonction qui ne fait rien (appelé sur clic sur un titre de mnu)
function ClicMenu()
{
}

var delay	=2000 
var fwidth	=140
var fheight	=80

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0

if (DOM2)
	faderdelay=1000

function changecontent(){
	if (index>=parseInt(document.getElementById("nbnews").innerHTML))
	index=0
	if (DOM2){
		document.getElementById("fscroller").style.color="rgb(255,255,255)"
		document.getElementById("fscroller").innerHTML=document.getElementById("news" + index).innerHTML
		colorfade()
	}
	else if (ie4)
		document.all.fscroller.innerHTML=document.getElementById("news" + index).innerHTML
	else if (ns4){
		document.fscrollerns.document.fscrollerns_sub.document.write(document.getElementById("news" + index).innerHTML)
		document.fscrollerns.document.fscrollerns_sub.document.close()
	}

	index++
	setTimeout("changecontent()",delay+faderdelay)
}

frame=20;
hex=255  

function colorfade() 
{	         	
	if(frame>0) {	
		hex-=12; 
		document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; 
		frame--;
		setTimeout("colorfade()",20);	
	}
	else{
		document.getElementById("fscroller").style.color="rgb(0,0,0)";
		frame=20;
		hex=255
	}   
}
function FicheEntreprise(id)
{
	window.open("annuaire_fiche.asp?id=" + id,"Fiche","toolbar=no,scrollbars=yes,width=650,height=550");
}

function Arcus()
{
	url = "login_arcus.asp";
	window.open(url,"Arcus", "height=600,width=800,location=1,menubar=1,toolbar=1,resizable=1,scrollbars=yes,statusbar=1");
}

function AfficheOffres(strRubrique)
{
	window.location.href="bourse-emploi-offres.asp?rubrique=" + strRubrique;
}

function AfficheCandidatures(strRubrique)
{
	window.location.href = "bourse-emploi-candidatures.asp?rubrique=" + strRubrique;
}

function AfficheInformations(strRubrique)
{
	window.location.href = "informations-documents.asp?rubrique=" + strRubrique;
}



