
	
function display(calque)
{
	var targetElement;
	targetElement = document.getElementById(calque) ;
	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "" ;
	} else {
		targetElement.style.display = "none" ;
	}
}

function display2(calque1, calque2)
{
	var targetElement;
	targetElement = document.getElementById(calque1) ;
	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "" ;
	} else {
		targetElement.style.display = "none" ;
	}
	
	var targetElement;
	targetElement = document.getElementById(calque2) ;
	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "" ;
	} else {
		targetElement.style.display = "none" ;
	}
}

function GotoUrl(URL){
window.location.href = URL;
}

function ColorOver(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TR")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}


function ColorAway(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}

function affichePlanche(cheminVignette,cheminMaxi, texteAlt)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=1 HEIGHT=230 WIDTH=170 ALT="'+texteAlt+'" TITLE="'+texteAlt+'"></A>');
	}
	
function afficheCouverture(cheminVignette,cheminMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=1 HEIGHT=230 WIDTH=170 ALT="cliquez ici pour voir en grand"></A>');
	}
	
function afficheCouvertureEdit(cheminVignette,cheminMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=1 HEIGHT=220 WIDTH=160 ALT="cliquez ici pour voir en grand"></A>');
	}
	
function affichePlancheEdit(cheminVignette,cheminMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=1 HEIGHT=64 WIDTH=48 ALT="cliquez ici pour voir en grand"></A>');
	}
	
function affichePhoto(cheminVignette,cheminMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=1 WIDTH=120 ALT="cliquez ici pour voir en grand"></A>');
	}
	
function afficheMaxi(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+18,document.imageTest.height+90)"></CENTER></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1,status=no');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	}
	
function AfficheSaisie(IdAlbum,largeur,hauteur) 
	{
  		var top=(screen.height-hauteur)/2;

  		var left=(screen.width-largeur)/2;
  		window.open("saisie_commentaire.php?IdAlbum="+IdAlbum,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=no,menubar=no,location=no,scrollbars=no");
		
	}
	
	
function LireAvis(IdAlbum,largeur,hauteur) 
	{
  		var top=(screen.height-hauteur)/2;
  		var left=(screen.width-largeur)/2;
  		window.open("lire_commentaire.php?IdAlbum="+IdAlbum,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=no,menubar=no,location=no,scrollbars=yes");
		
	}
	
function LireAide(largeur,hauteur) 
	{
  		var top=(screen.height-hauteur);
  		var left=(screen.width-largeur)-100;
  		window.open("aide.php","","top=0,left=0,width="+largeur+",height="+hauteur+",toolbar=no,menubar=no,location=no,scrollbars=yes");
		
	}

function Rechercher(){
	str1 = document.forms['frmRechercher'].AWhere.value;
	str2 = document.forms['frmRechercher'].AChamp.value;
	if (str1!="") location = "index.php?R=1&AWhere="+str1+"&AChamp="+str2;
}


function selectAll(state, frm) {
	for(i=0;i<document.forms[frm].elements.length;i++) {
		if(document.forms[frm].elements[i].type == "checkbox")
			document.forms[frm].elements[i].checked=state;
	}
}

function ValCote() {
	document.FormValideCote.action = 'index.php?Action=ValideCote';
	document.FormValideCote.submit;
}

function AnnCote() {
	document.FormValideCote.action = 'index.php?Action=AnnuleCote';
	document.FormValideCote.submit;
}

function ValMotCle() {
	document.FormValideMotCle.action = 'index.php?Action=ValideMotCle';
	document.FormValideMotCle.submit;
}

function AnnMotCle() {
	document.FormValideMotCle.action = 'index.php?Action=AnnuleMotCle';
	document.FormValideMotCle.submit;
}



function afficheMsg(adresse)
{
window.open(adresse,'','toolbar=no,menubar=no,location=no,scrollbars=yes,height=175,width=400');
}