
/*
document.getelementbyid is supported in
- IE 5 and upwards
- all Gecko-based browsers
- Safari
- Konqueror
- Opera 
*/

//for nav

function NavHideAll(Exception) {
	if(Exception != 'accueil'){
		document.getElementById('accueil').style.visibility = 'hidden';
	}
	if(Exception != 'classique'){
		document.getElementById('classique').style.visibility = 'hidden';
	}
	if(Exception != 'jazz'){
		document.getElementById('jazz').style.visibility = 'hidden';
	}
	if(Exception != 'informations'){
		document.getElementById('informations').style.visibility = 'hidden';
	}
	if(Exception != 'centremusical'){
		document.getElementById('centremusical').style.visibility = 'hidden';
	}
}

function NavShowDiv(Element, Exception) {
	NavHideAll(Exception);
	document.getElementById(Element).style.visibility = 'visible';
}

//for rest of website

function HideDiv(Element) {
	if (document.getElementById) { // DOM3 = IE5, NS6
	document.getElementById(Element).style.visibility = 'hidden';
	}else {
		if (document.layers) { // Netscape 4
			document.Element.visibility = 'hidden';
		}else { // IE 4
		document.all.Element.style.visibility = 'hidden';
		}
	}
}

function ShowDiv(Element) {
	if (document.getElementById) { // DOM3 = IE5, NS6
	document.getElementById(Element).style.visibility = 'visible';
	}else{
		if (document.layers) { // Netscape 4
		document.Element.visibility = 'visible';
		}else{ // IE 4
		document.all.Element.style.visibility = 'visible';
		}
	}
}

function Toggle(Element, Fonds) {
	if(document.getElementById(Element).style.display == 'block'){
		document.getElementById(Element).style.display = 'none';
		//for caravan mp3 display in Jazz > Cours
		if(Element == '145'){
			document.getElementById('JazzCoursCaravan').style.display = 'none';
			document.getElementById('player').style.visibility = 'hidden';
		}
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/open_transparent_a.png';
	}else{
		document.getElementById(Element).style.display = 'block';
		//for caravan mp3 display in Jazz > Cours
		if(Element == '145'){
			document.getElementById('JazzCoursCaravan').style.display = 'block';
			document.getElementById('player').style.visibility = 'visible';
		}
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/close_transparent_a.png';
	}
}

function GroupeOnMouseOver(Element, Fonds) {
	if(document.getElementById(Element).style.display == 'block'){
		//shows actif image
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/close_transparent_a.png';
		//shows groupe titre in colour
		document.getElementById('Titre'+Element).style.color = '#16c0f3';
	}else{
		//shows actif image
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/open_transparent_a.png';
		//shows groupe titre in colour
		document.getElementById('Titre'+Element).style.color = '#16c0f3';
	}
}

function GroupeOnMouseOut(Element, Fonds) {
	if(document.getElementById(Element).style.display == 'block'){
		//shows actif image
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/close_transparent_i.png';
		//shows groupe titre in colour
		if(Fonds == 'transparent'){
			document.getElementById('Titre'+Element).style.color = '#ffffff';
		}else{
			document.getElementById('Titre'+Element).style.color = '#000000';
		}
	}else{
		//shows actif image
		document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/open_transparent_i.png';
		//shows groupe titre in colour
		if(Fonds == 'transparent'){
			document.getElementById('Titre'+Element).style.color = '#ffffff';
		}else{
			document.getElementById('Titre'+Element).style.color = '#000000';
		}
	}
} 

function LienAvecSymboleOnMouseOver(Element, Fonds) {
	//shows actif image
	document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/link_transparent_a.png';
	//shows groupe titre in colour
	document.getElementById('Titre'+Element).style.color = '#16c0f3';
}

function LienAvecSymboleOnMouseOut(Element, Fonds) {
	//shows actif image
	document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/link_transparent_i.png';
	//shows groupe titre in colour
	if(Fonds == 'transparent'){
		document.getElementById('Titre'+Element).style.color = '#ffffff';
	}else{
		document.getElementById('Titre'+Element).style.color = '#000000';
	}
}

function LienSansSymboleOnMouseOver(Element, Fonds) {
	//shows groupe titre in colour
	document.getElementById('Titre'+Element).style.color = '#16c0f3';
}

function LienSansSymboleOnMouseOut(Element, Fonds) {
	//shows groupe titre in colour
	if(Fonds == 'transparent'){
		document.getElementById('Titre'+Element).style.color = '#ffffff';
	}else{
		document.getElementById('Titre'+Element).style.color = '#000000';
	}
}

function DownloadAvecSymboleOnMouseOver(Element, Fonds) {
	//shows actif image
	document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/download_transparent_a.png';
	//shows groupe titre in colour
	document.getElementById('Titre'+Element).style.color = '#16c0f3';
}

function DownloadAvecSymboleOnMouseOut(Element, Fonds) {
	//shows actif image
	document.getElementById('Img'+Element).src = 'http://www.conservatoire.ch/includes/images/download_transparent_i.png';
	//shows groupe titre in colour
	if(Fonds == 'transparent'){
		document.getElementById('Titre'+Element).style.color = '#ffffff';
	}else{
		document.getElementById('Titre'+Element).style.color = '#000000';
	}
}

function DownloadSansSymboleOnMouseOver(Element, Fonds) {
	//shows groupe titre in colour
	document.getElementById('Titre'+Element).style.color = '#16c0f3';
}

function DownloadSansSymboleOnMouseOut(Element, Fonds) {
	//shows groupe titre in colour
	if(Fonds == 'transparent'){
		document.getElementById('Titre'+Element).style.color = '#ffffff';
	}else{
		document.getElementById('Titre'+Element).style.color = '#000000';
	}
} 
