function showProps(theInput) {
	for (var i in theInput) {
		theMsg += theInput.name + "." + i + " = " + theInput[i] + "<br>";
	}
	//document.write(theMsg);
	return theMsg;
}

// Gère l'affichage des éléments du menu Plus d'infos
function dynamicMenu(whichMenu, whichClass) {
	lienParcours.className = whichClass;
	lienDates.className = whichClass;
	lienPresse.className = whichClass;
	lienExemples.className = whichClass;
	if (lienParcours.innerHTML.charAt(0) == "«") {
		lienParcours.innerHTML = lienParcours.innerHTML.substr(1, lienParcours.innerHTML.length + 1);
	}
	if (lienDates.innerHTML.charAt(0) == "«") {
		lienDates.innerHTML = lienDates.innerHTML.substr(1, lienDates.innerHTML.length + 1);
	}
	if (lienPresse.innerHTML.charAt(0) == "«") {
		lienPresse.innerHTML = lienPresse.innerHTML.substr(1, lienPresse.innerHTML.length + 1);
	}
	if (lienExemples.innerHTML.charAt(0) == "«") {
		lienExemples.innerHTML = lienExemples.innerHTML.substr(1, lienExemples.innerHTML.length + 1);
	}
	whichMenu.innerHTML = "&laquo;" + whichMenu.innerHTML;
	whichMenu.className = "menu_clique";
	whichMenu.blur();
}

// Fonctions de changements d'images de la bande de négatif
filmImgsOff = new Array();
filmImgsOff[0] = new Image();
filmImgsOff[0].src =  "../images/img01pos.jpg";
filmImgsOff[1]= new Image();
filmImgsOff[1].src = "../images/img02pos.jpg";
filmImgsOff[2] = new Image();
filmImgsOff[2].src = "../images/img03pos.jpg";
filmImgsOff[3] = new Image();
filmImgsOff[3].src = "../images/img04pos.jpg";

filmImgsOn = new Array();
filmImgsOn[0] = new Image();
filmImgsOn[0].src =  "../images/img01neg.jpg";
filmImgsOn[1]= new Image();
filmImgsOn[1].src = "../images/img02neg.jpg";
filmImgsOn[2] = new Image();
filmImgsOn[2].src = "../images/img03neg.jpg";
filmImgsOn[3] = new Image();
filmImgsOn[3].src = "../images/img04neg.jpg";

function changeImage(nomImage, imgNbr){
	document.images[nomImage].src = filmImgsOn[imgNbr].src;
}

function restoreImage(nomImage, imgNbr){
	document.images[nomImage].src = filmImgsOff[imgNbr].src;
}

// Affiche un article du dossier de presse
function viewArticle(whichArticle) {
	self.name = "AtoutArt";
	theLeft = 100;
	theTop = 100;
	theWidth = screen.width - 200;
	theHeight = screen.height - 200;
	features = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+theWidth+",height="+theHeight+",left="+theLeft+",top="+theTop;
	//popup = open("press.php?article=" + whichArticle, "Article", features);
	//popup.close();
	popup = open("press.php?article=" + whichArticle, "Article", features);
}

// Ouverture du zoom des oeuvres
function viewPic(theImage, theTitle, theArtist, theWidth, theHeight, theStyle){
	self.name = "AtoutArt";
	if (theWidth < 500) theWidth = 500;
	else if (theWidth >= 500 && theWidth < (screen.width - 40)) theWidth = eval(theWidth) + 30;
	if (theWidth > (screen.width - 20)) theWidth = screen.width - 20;
	if (theHeight < 440) theHeight = 500;
	else if (theHeight >= 440 && theHeight < (screen.height - 20)) theHeight = eval(theHeight) + 60;
	if (theHeight > (screen.height - 50)) theHeight = screen.height - 60;
	theLeft = (screen.width - theWidth)/2;
	theTop = (screen.height - theHeight - 108)/2;
	features = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+theWidth+",height="+theHeight+",left="+theLeft+",top="+theTop;
	//popup = open("", "ViewPic", features);
	//popup.close();
	popup = open("", "ViewPic", features);
	popup.document.write("<html>\n<head>\n<title>" + theArtist + "</title>\n<link rel=\"stylesheet\" href=\"../atoutart.css\">\n</head>\n");
	popup.document.write("<body>\n<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
	popup.document.write("<tr class=\"standard\" valign=\"top\">\n<td align=\"left\">\n&nbsp;<b><span class=\"" + theStyle + "\">" + theArtist + "</span></b><br>&nbsp;" + theTitle + "<br>&nbsp;\n<td align=\"right\">\n<a href=\"#\" onClick=\"javascript:self.close();self.opener.focus();return false;\">Fermer</a>&nbsp;\n</td>\n</tr>\n");
	popup.document.write("<tr>\n<td colspan=\"2\" align=\"center\" valign=\"middle\">\n<img src=\"../medias/" + theImage + "\">\n</td>\n</tr>\n");
	popup.document.write("</table>\n</body>\n</html>");
	popup.focus();
}

// Ouverture du zoom des photos du parcours
function viewPhoto(theImage, theTitle, theArtist, theWidth, theHeight, theStyle){
	self.name = "AtoutArt";
	if (theWidth < 500) theWidth = 500;
	else if (theWidth >= 500 && theWidth < (screen.width - 40)) theWidth = eval(theWidth) + 30;
	if (theWidth > (screen.width - 20)) theWidth = screen.width - 20;
	if (theHeight < 440) theHeight = 500;
	else if (theHeight > 440 && theHeight < (screen.height- 20)) theHeight = eval(theHeight) + 60;
	if (theHeight > (screen.height- 20)) theHeight = screen.height - 20;
	theLeft = (screen.width - theWidth)/2;
	theTop = (screen.height - theHeight)/2;
	features = "toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = yes, resizable = yes, width = " + theWidth + ", height = " + theHeight + ", left = " + theLeft + ", top = " + theTop;
	//popup = open("", "ViewPhoto", features);
	//popup.close();
	popup = open("", "ViewPhoto", features);
	popup.document.write("<html>\n<head>\n<title>" + theArtist + "</title>\n<link rel=\"stylesheet\" href=\"../atoutart.css\">\n</head>\n");
	popup.document.write("<body>\n<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
	popup.document.write("<tr class=\"standard\" valign=\"top\">\n<td align=\"left\">\n&nbsp;<b><span class=\"" + theStyle + "\">" + theArtist + "</span></b><br>&nbsp;" + theTitle + "<br>&nbsp;\n</td>\n<td align=\"right\">\n<a href=\"#\" onClick=\"javascript:self.close();self.opener.focus();return false;\">Fermer</a>&nbsp;\n</td>\n</tr>\n");
	popup.document.write("<tr>\n<td colspan=\"2\" align=\"center\" valign=\"middle\">\n<img src=\"../photos/" + theImage + "\">\n</td>\n</tr>\n");
	popup.document.write("</table>\n</body>\n</html>");
	popup.focus();
}

// Affiche un texte de la liste d'oeuvres
function viewText(whichText) {
	self.name = "AtoutArt";
	theLeft = 100;
	theTop = 100;
	theWidth = screen.width - 200;
	theHeight = screen.height - 200;
	features = "toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = yes, resizable = no, width = " + theWidth + ", height = " + theHeight + ", left = " + theLeft + ", top = " + theTop;
	//popup = open("text.php?text=" + whichText, "Article", features);
	//popup.close();
	popup = open("text.php?text=" + whichText, "Article", features);
}

//Lecture des exemples d'oeuvres sonores
function playSample(theFile) {
	if(navigator.appName == "Netscape") {
		document.getElementById('sample').innerHTML = "<embed src=../medias/" + theFile + " autostart=\"true\" hidden=\"false\" loop=\"false\">";
	} else {
		sample.innerHTML = "<embed src=../medias/" + theFile + " autostart=\"true\" hidden=\"false\" loop=\"false\">";
	}
}


// Gestion du son
var mute = 0;

function playHome(theFile) {
	if (mute == 0) {
		if(navigator.appName == "Netscape") {
			document.getElementById('sound').innerHTML = "<embed src=../sounds/" + theFile + " autostart=\"true\" hidden=\"false\"  loop=\"false\">";
		} else {
			sound.innerHTML = "<embed src=../sounds/" + theFile + " autostart=\"true\" hidden=\"false\" loop=\"false\">";
		}
	}
}

function muteAll() {
	if(navigator.appName == "Netscape") {
		document.getElementById('sound').innerHTML = "";
	} else {
		sound.innerHTML = "";
	}
}

// Ouverture du zoom de la bande de négatif
/*
function zoom(theImage, theTitle, theSound, theLegend){
	self.name = "AtoutArt";
	theLeft = (screen.width - 420)/2;
	theTop = (screen.height - 450)/2;
	features = "toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = no, width = 420, height = 450, left = " + theLeft + ", top = " + theTop;
	popup = open("", "Zoom", features);
	popup.close();
	popup = open("", "Zoom", features);
	popup.document.write("<html>\n<head>\n<title>" + theTitle + "</title>\n<link rel=\"stylesheet\" href=\"../atoutart.css\">\n<script src=\"script.js\"></script>\n</head>\n");
	popup.document.write("<body>\n<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
	popup.document.write("<tr class=\"standard\">\n<td align=\"left\">\n&nbsp;<b>" + theTitle + "</b>\n<td align=\"right\">\n<a href=\"#\" onClick=\"javascript:self.close();self.opener.focus();return false;\">Fermer</a>&nbsp;\n</td>\n</tr>\n");
	popup.document.write("<tr class=\"standard\">\n<td align=\"left\">" + theLegend + "\n&nbsp;\n</td>\n</tr>\n");
	
	popup.document.write("<tr>\n<td colspan=\"2\" align=\"center\" valign=\"middle\">\n");
	popup.document.write("<a href=\"#\" onClick=\"playHome('" + theSound + "')\">");
	popup.document.write("<img src=\"../images/" + theImage + "\"></a>\n</td>\n</tr>\n");
	popup.document.write("</table>\n")
	popup.document.write("<div id=\"sound\" style=\"overflow: hidden; width: 0; height: 0; clip:rect(0 0 0 0);\"></div>");
	popup.document.write("\n</body>\n</html>");
	popup.focus();
}
*/

function zoom(theImage, theTitle, theSound, theLegend){
	self.name = "AtoutArt";
	theLeft = (screen.width - 420)/2;
	theTop = (screen.height - 500)/2;
	features = "toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = no, width = 420, height = 500, left = " + theLeft + ", top = " + theTop;
	//popup = open("photos.php?image=" + theImage + "&title=" + theTitle + "&sound=" + theSound + "&legend=" + theLegend, "Zoom", features);
	//popup.close();
	popup = open("photos.php?image=" + theImage + "&title=" + theTitle + "&sound=" + theSound + "&legend=" + theLegend, "Zoom", features);
}

// Défilement de la bande de négatif
// Largeur de la bande
var swidth = 480;

// Hauteur de la bande
var sheight = 100;

// Vitesse de défilement
var sspeed = 10;

var nega = new Array();
nega[0] = '<img src="../images/neg_mus.gif" width="120" height="14">';
nega[1] = '<img src="../images/neg_writ.gif" width="120" height="14">';
nega[2] = '<img src="../images/neg_phot.gif" width="120" height="14">';
nega[3] = '<img src="../images/neg_vid.gif" width="120" height="14">';
nega[4] = '<img src="../images/neg_scul.gif" width="120" height="14">';
nega[5] = '<img src="../images/neg_pnt.gif" width="120" height="14">';
nega[6] = '<img src="../images/neg_draw.gif" width="120" height="14">';
nega[7] = '<img src="../images/neg_graf.gif" width="120" height="14">';
nega[8] = '<img src="../images/neg_web.gif" width="120" height="14">';

var singletext = new Array();
	
function defineLayer(i) {
	singletext[0] = '<div id="image01" style=" background-color: #000000; border-color: #000000; position: relative; top:0px; left: 0px; width: 480; height: 100; visibility: visible">';
	singletext[0] += '<table width="480" border="0" cellpadding="0" cellspacing="0"><tr height="16" align="center" valign="middle"><td>' + nega[i] + '</td><td>' + nega[i] + '</td><td>' + nega[i] + '</td><td>' + nega[i] + '</td></tr><tr height="68" align="center" valign="middle">';
	singletext[0] += '<td><a href="#" onmouseover="changeImage(' + "'img01', '0'" + ');" onmouseout="restoreImage(' + "'img01', '0'" + ');" onclick="zoom(' + "'img01.jpg', 'Puissance Nord (Photographie &copy; F. L&ecirc;)', 'pn.mp3', 'Vous &eacute;coutez un extrait de &laquo;Esprits D&eacute;rang&eacute;s&raquo; par le groupe Puissance Nord'" + ');return false;"><img src="../images/img01pos.jpg" alt="Cliquez pour agrandir la photo et &eacute;couter un extrait de &laquo;Esprits D&eacute;rang&eacute;s&raquo; par le groupe Puissance Nord" width="102" height="68" border="0" name="img01"></a></td>';
	singletext[0] += '<td><a href="#" onmouseover="changeImage(' + "'img02', '1'" + ');" onmouseout="restoreImage(' + "'img02', '1'" + ');" onclick="zoom(' + "'img02.jpg', 'Le savoir phallique, par Joseph Terramagra', 'booya.mp3', 'Vous &eacute;coutez un extrait musical compos&eacute; et interpr&eacute;t&eacute; par Booya Bass'" + ');return false;"><img src="../images/img02pos.jpg" width="102" height="68" border="0" name="img02" alt="Cliquez pour agrandir la photo"></a></td>';
	singletext[0] += '<td><a href="#" onmouseover="changeImage(' + "'img03', '2'" + ');" onmouseout="restoreImage(' + "'img03', '2'" + ');" onclick="zoom(' + "'img03.jpg', 'Palais (Infographie &copy; Ren&eacute; Giullo)', 'rene.mp3', 'Vous &eacute;coutez un extrait musical compos&eacute; et interpr&eacute;t&eacute; par Ren&eacute; Giullo'" + ');return false;"><img src="../images/img03pos.jpg" width="102" height="68" border="0" name="img03" alt="Cliquez pour agrandir la photo et &eacute;couter un extrait musical compos&eacute; et interpr&eacute;t&eacute; par Ren&eacute; Giullo"></a></td>';
	singletext[0] += '<td><a href="#" onmouseover="changeImage(' + "'img04', '3'" + ');" onmouseout="restoreImage(' + "'img04', '3'" + ');" onclick="zoom(' + "'img04.jpg', 'Blue One, tableau par Nicolas Vergnaud', 'richard.mp3', 'Vous &eacute;coutez un extrait musical compos&eacute; par Richard Peter' " + ');return false;"><img src="../images/img04pos.jpg" width="102" height="68" border="0" name="img04" alt="Cliquez pour agrandir la photo"></a></td>';
	singletext[0] += '</tr><tr height="16" align="center" valign="middle"><td>' + nega[i] + '</td><td>' + nega[i] + '</td><td>' + nega[i] + '</td><td>' + nega[i] + '</td></tr></table></div>';
	document.writeln(singletext[0]);
}
	
function start() {
	// Contenu de la bande
	if (singletext.length > 1) i=1;
	else i = 0;
	
	if (document.all) {
		ieslider1.style.left = swidth;
		iemarquee(ieslider1);
	}
	else if (document.layers) {
		document.ns4slider.document.ns4slider1.left = swidth;
		document.ns4slider.document.ns4slider1.visibility = 'show';
		ns4marquee(document.ns4slider.document.ns4slider1);
	}
	else if (document.getElementById && !document.all) {
		document.getElementById('ns6slider1').style.left = swidth;
		ns6marquee(document.getElementById('ns6slider1'));
	}
}

function stop() {
	if (singletext.length > 1) i=1;
	else i = 0;
	
	if (document.all) {
		ieslider1.style.left = 0;
		iemarquee(ieslider1);
	}
	else if (document.layers) {
		document.ns4slider.document.ns4slider1.left = 0;
		document.ns4slider.document.ns4slider1.visibility = 'show';
		ns4marquee(document.ns4slider.document.ns4slider1);
	}
	else if (document.getElementById && !document.all) {
		document.getElementById('ns6slider1').style.left = 0;
		ns6marquee(document.getElementById('ns6slider1'));
	}
}

function iemarquee(whichdiv) {
	iediv = eval(whichdiv);
	if (iediv.style.pixelLeft > 0 && iediv.style.pixelLeft <= sspeed) {
		iediv.style.pixelLeft = 0;
		setTimeout("iemarquee(iediv)", 100);
	}
	if (iediv.style.pixelLeft >= swidth * -1) {
		//document.FormName.textfieldName.value = iediv.style.pixelLeft + " - " + sspeed;
		iediv.style.pixelLeft -= sspeed;
		setTimeout("iemarquee(iediv)", 100);
	}
	else {
		iediv.style.pixelLeft = swidth;
		iediv.innerHTML = singletext[i];
		if (i == singletext.length - 1) i = 0;
		else i++;
	}
	/*
	if (iediv.style.pixelLeft > 0 && iediv.style.pixelLeft <= sspeed) {
		iediv.style.pixelLeft = 0;
		setTimeout("iemarquee(iediv)", 100);
	}
	if (iediv.style.pixelLeft >= swidth * -1) {
		iediv.style.pixelLeft -= sspeed;
		setTimeout("iemarquee(iediv)", 100);
	}
	else {
		iediv.style.pixelLeft = swidth;
		iediv.innerHTML = singletext[i];
		if (i == singletext.length - 1) i = 0;
		else i++;
	}
	*/
}

function ns4marquee(whichlayer) {
	ns4layer = eval(whichlayer);
	if (ns4layer.left > 0 && ns4layer.left <= sspeed) {
		ns4layer.left = 0;
		setTimeout("ns4marquee(ns4layer)",100);
	}
	if (ns4layer.left >= swidth * -1) {
		ns4layer.left -= sspeed;
		setTimeout("ns4marquee(ns4layer)",100);
	}
	else {
		ns4layer.left = swidth;
		ns4layer.document.write(singletext[i]);
		ns4layer.document.close();
		if (i == singletext.length - 1) i = 0;
		else i++;
	}
}

function ns6marquee(whichdiv) {
	ns6div = eval(whichdiv);
	if (parseInt(ns6div.style.left) > 0 && parseInt(ns6div.style.left) <= sspeed) {
		ns6div.style.left = 0;
		setTimeout("ns6marquee(ns6div)",100);
	}
	if (parseInt(ns6div.style.left) >= swidth * -1) {
		ns6div.style.left = parseInt(ns6div.style.left) - sspeed;
		setTimeout("ns6marquee(ns6div)",100);
	}
	else {
		ns6div.style.left = swidth;
		ns6div.innerHTML = singletext[i];
		if (i == singletext.length - 1) i = 0;
		else i++;
	}
}
