function openWinContact() {
	posX=(screen.width/2)-280;
	posY=(screen.height/2)-280;
	WinContact=window.open('formulaire_contact.php','FormulaireContact','scrollbars=no,toolbar=no,titlebar=no,status=no,width=450,height=453,resizable=no,left='+posX+',screenX='+posX+',top='+posY+',screenY='+posY);
	if(WinContact.focus){WinContact.focus();}
}
function change_photo_background(parm_id_type_image, parm_id) {
	newImage = "url("+tab_photo[parm_id]+")";
	var my_layer1=eval('document.getElementById(\'t_'+parm_id_type_image+'_img_grande\')');
	var my_layer2=eval('document.getElementById(\''+parm_id_type_image+'_legende\')');
  my_layer1.style.backgroundImage = newImage;
  my_layer2.innerHTML = tab_legende[parm_id];
}
function cache_affiche_vignette(parm_div_cache, parm_div_affiche) {
	document.getElementById(parm_div_affiche).style.display="block";
	document.getElementById(parm_div_cache).style.display="none";
}
function closeLayer() {
	document.getElementById('l_illustration').style.display="none";
	document.getElementById('l_peinture').style.display="none";
	document.getElementById('l_dessin').style.display="none";
	document.getElementById('l_graphisme').style.display="none";
	document.getElementById('l_actualite').style.display="none";
	document.getElementById('l_illustration_edition').style.display="none";
}
function openIllustration() {
	closeLayer();
	document.getElementById('l_illustration').style.display="block";
}
function openIllustrationEdition() {
	closeLayer();
	document.getElementById('l_illustration_edition').style.display="block";
}
function openPeinture() {
	closeLayer();
	document.getElementById('l_peinture').style.display="block";
}
function openDessin() {
	closeLayer();
	document.getElementById('l_dessin').style.display="block";
}
function openGraphisme() {
	closeLayer();
	document.getElementById('l_graphisme').style.display="block";
}
function openActualites() {
	closeLayer();
	document.getElementById('l_actualite').style.display="block";
}
function openVide() {
	closeLayer();
}
function openContact() {
	closeLayer();
}
function openLien() {
	closeLayer();
}
function openAccueil() {
	closeLayer();
}

function file_ajax(fichier){
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
	xhr_object.open("GET", fichier, false);
	xhr_object.send(null);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
	else return(false);
}

function update_ajax_image(parm_type_image) {
	var time = new Date();
	var second = time.getTime();
	if( texte = file_ajax('ajax_image.php?timecache='+second+'&label_ajax='+parm_type_image) ){
		document.getElementById('l_image').innerHTML= texte;
	}
}
/*
function illustration_change_photo(parm_id) {
  document.getElementById('illustration_img_grande').src = tab_photo_illustration[parm_id];
  document.getElementById('illustration_img_grande').alt = tab_legende_illustration[parm_id];
  document.getElementById('illustration_legende').innerHTML = tab_legende_illustration[parm_id];
}
function illustration_change_photo_background(parm_id) {
	newImage = "url("+tab_photo_illustration[parm_id]+")";
  document.getElementById('t_illustration_img_grande').style.backgroundImage = newImage;
  document.getElementById('illustration_legende').innerHTML = tab_legende_illustration[parm_id];
}
function peinture_change_photo_background(parm_id) {
	newImage = "url("+tab_photo_peinture[parm_id]+")";
  document.getElementById('t_peinture_img_grande').style.backgroundImage = newImage;
  document.getElementById('peinture_legende').innerHTML = tab_legende_peinture[parm_id];
}
function dessin_change_photo_background(parm_id) {
	newImage = "url("+tab_photo_dessin[parm_id]+")";
  document.getElementById('t_dessin_img_grande').style.backgroundImage = newImage;
  document.getElementById('dessin_legende').innerHTML = tab_legende_dessin[parm_id];
}
function graphisme_change_photo_background(parm_id) {
	newImage = "url("+tab_photo_graphisme[parm_id]+")";
  document.getElementById('t_graphisme_img_grande').style.backgroundImage = newImage;
  document.getElementById('graphisme_legende').innerHTML = tab_legende_graphisme[parm_id];
}
*/

