var win = '';
function initEventPopup(){
	/* Gestion des boutons (mouseover, mouseout et click)  */
	var champs = $A( $('result').getElementsByTagName('input') );
		champs.each( function( ele ) {
				var name = ele.id;
				var tdID = 'td_' + name;
				$(ele).observe('mouseover', function(e) {
						Event.stop(e);
						$(ele).src = 'img/bt_form_ajout_terme_hover.gif';
						$( tdID ).className = 'td_over';
					});
				$(ele).observe('mouseout', function(e) {
						Event.stop(e);
						$(ele).src = 'img/bt_form_ajout_terme.gif';
						$( tdID ).className = 'selected';
					});
				$(ele).observe('click', function(e) {
						Event.stop(e);
						affPopup( name, tdID );
					});
			}
		);
}
function affPopup( nomPopup, tdID ){
	win =	new Window( {
		url: "http://www.zicanotes.com/popup/"+ nomPopup +".php",
		className: "spread",
		minWidth:420,
		minHeight:arrHeight[nomPopup],
		maxHeight:arrHeight[nomPopup],
		width:440,
		height:arrHeight[nomPopup],
		title: arrTitle[nomPopup],
		effectOptions: {duration:0.5},
		destroyOnClose:"true"		
		}
	);
	win.showCenter();	
}
function closeWin(){
	win.close();
}
function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
var arrTitle = new Array;
arrTitle["type"] 	= "Type de l'évènement";
arrTitle["date"] 	= "Votre évènement se déroule : ";
arrTitle["salle"] = "Salle";
arrTitle["lieu"] 	= "Lieu de l'évènement";
arrTitle["heure"] = "Heure d'ouverture";
arrTitle["style"] = "Genre musical";
arrTitle["prix"] 	= "Tarification";
arrTitle["site"] 	= "Adresse d'un site Internet";
arrTitle["phone"] = "Numéro de téléphone";
arrTitle["email"] = "Email";
arrTitle["artiste"] = "Artiste(s)";
arrTitle["extrait"] = "Extrait musical";
arrTitle["fly"] = "Affiche de l'évènement";
arrTitle["nom"] = "Nom de l'évènement";

var arrHeight = new Array;
arrHeight["nom"]		= 150;
arrHeight["type"]		= 100;
arrHeight["date"] 	= 430;
arrHeight["salle"]	= 350;
arrHeight["lieu"] 	= 200;
arrHeight["heure"] 	= 100;
arrHeight["style"] 	= 100;
arrHeight["prix"] 	= 200;
arrHeight["site"] 	= 100;
arrHeight["phone"] 	= 150;
arrHeight["email"] 	= 100;
arrHeight["artiste"] = 280;
arrHeight["extrait"] = 100;
arrHeight["fly"] = 450;

/** On lance le gestionnaire d'evenement quand le DOM est ready */
//Event.observe(window ,'load', initEvent);