// déclarations des fonctions utilisées pour la page index

// cross navigator functions

var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isDyn = (isDOM || isIE4 || isNS4);

function getTag(id) {
  if (isDOM) return document.getElementById(id);
  if (isIE4) return document.all[id];
  if (isNS4) return document.layers[id];
}

function getTagStyle(id) {
  return (isNS4 ? getTag(id) : getTag(id).style);
}


//*************************************************************	
// pour afficher les artistes
//*************************************************************

var a_l_ecran_actuellement = 0;

function efface() {

    if (a_l_ecran_actuellement == 1) {
		getTagStyle("artistes").display = "none";
	}
	
    if (a_l_ecran_actuellement == 2) {
		getTagStyle("id").display = "none";
	}
	
	a_l_ecran_actuellement == 0;

}

function affiche(qui) {
	
	if (qui == 0) {
	    efface();
		return;
  	}

    if (qui == 1 && getTagStyle("artistes").display != "block") {
	    efface();
    	getTagStyle("artistes").display = "block";
    	a_l_ecran_actuellement = 1;
		return;
	}
  
  	if (qui == 2 && getTagStyle("id").display != "block") {
	    efface();
    	getTagStyle("id").display = "block";
    	a_l_ecran_actuellement = 2;
		return;
  	}

  return;
}

//*************************************************************


//*************************************************************	
// photo différente suivant l'heure
//*************************************************************

LaDate = new Date;
heure = LaDate.getHours();
function PhotoParTranche()
{
  
	if (heure>=23 || heure<9)
		{
		document.images[0].src = "pix/ensemble.jpg";
		}
return;
}

//*************************************************************	
// roll over
//*************************************************************

im01off= new Image(9,9);
im01off.src="pix/closeoff.png";

im01on= new Image(9,9);
im01on.src="pix/closeon.png";

//******************************************************************


//*************************************************************	
// pop up
//*************************************************************

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
	if (windowFeatures.search(/scrollbars/) == -1) {
		windowFeatures = windowFeatures + ",scrollbars=0";
	}
	if (windowFeatures.search(/toolbar/) == -1) {
		windowFeatures = windowFeatures + ",toolbar=0";
	}
	if (windowFeatures.search(/titlebar/) == -1) {
		windowFeatures = windowFeatures + ",titlebar=0";
	}
	if (windowFeatures.search(/status/) == -1) {
		windowFeatures = windowFeatures + ",status=0";
	}
	if (windowFeatures.search(/resizable/) == -1) {
		windowFeatures = windowFeatures + ",resizable=0";
	}
	if (windowFeatures.search(/location/) == -1) {
		windowFeatures = windowFeatures + ",location=0";
	}
	if (windowFeatures.search(/left/) == -1) {
		windowFeatures = windowFeatures + ",left=0";
	}
	if (windowFeatures.search(/top/) == -1) {
		windowFeatures = windowFeatures + ",top=0";
	}
	window.open(URLtoOpen, windowName, windowFeatures); 
}

//******************************************************************
