var ie = document.all ? true : false;
var ns = (document.getElementById && !document.all)? true : false;


function zoom(fiche){
	if(fiche!=""){
		window.open (racine+"annuaire/popup.php?ficCode="+ fiche ,"fiche","0,0,0,0,resizable=yes,scrollbars=yes,0,width=630,height=500,top=0,left=0");
	}
	else{
		alert("Aucune fiche sélectionnée");
	}
}
function zoomc(cnc){
	if(cnc!=""){
		window.open (racine+"concert/popup.php?cncCode="+ cnc,"cnc","0,0,0,0,resizable=yes,scrollbars=yes,0,width=630,height=500,top=0,left=0");
	}
	else{
		alert("Aucun concert sélectionné");
	}
}
function href(h){
	document.location.href=h;
}
function resizePopUp(monImage, monTitre, credit){
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+monTitre+"</title>\n" ); 
	w.document.write( "<script language='JavaScript'>\n"); 
	w.document.write( "IE5=NN4=NN6=false;\n"); 
	w.document.write( "if(document.all)IE5=true;\n"); 
	w.document.write( "else if(document.getElementById)NN6=true;\n"); 
	w.document.write( "else if(document.layers)NN4=true;\n"); 
	w.document.write( "function autoSize() {\n"); 
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+46)\n"); 
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+45)\n"); 
	w.document.write( "self.focus();\n"); 
	w.document.write( "}\n</scri");
	w.document.write( "pt>\n"); 
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<table cellpadding='0' cellspacing='0'><tr><td align=center><a href='javascript:window.close();'><img src='"+monImage+"' border=0 alt=\""+monTitre+"\"></a><br /><em><font face='Verdana, Arial, Helvetica, sans-serif' size=1>"+credit+"</font></em></table>" ); 
	w.document.write( "</body></html>" );
	w.document.close(); 
}




function positionnerLayerHN(couche, nb){
	cache_layer();
	if (ns) {
		var pos = document.anchors['position'+ nb];
		with (document.getElementById(couche).style) {
			top = (getTopHn(pos) - 20)+"px";
			left = "500px";
			visibility = 'visible';
		}
	}
	else if (ie) {
		var pos = document.all['position'+ nb];
		with (document.getElementById(couche).style) {
			posTop = getTopHn(pos) - 10;
			posLeft = 500;
			visibility = 'visible';
		}
	}
}
function getTopHn(l){
  if (l.offsetParent) return (l.offsetTop + getTopHn(l.offsetParent));
  else return (l.offsetTop);
}
function cache_layer() {
	var la,tabC=new Array ('abrevadr','abrevinstru','abrevfs','abrevunit', 'abrevmat', 'abrevduree');
	for (i=0; i<(tabC.length); i++) {
		if (GetE(tabC[i])){
			GetE(tabC[i]).style.visibility='hidden';
		}
	}
}