// JavaScript Document

function nextmonuments(chemPhoto){
	$('#texte_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}

function nextentretien(chemPhoto){
	$('#texte_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante2",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}

function nextcaveaux(chemPhoto){
	$('#texte_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante3",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}

function nextgravures(chemPhoto){
	$('#texte_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante4",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}

function nextaccessoires(chemPhoto){
	$('#texte_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante5",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}


function posi(w,h) {
	var p = 'resizable=0,scrollbars=no,width=' + w + ',height=' + h + ',left=' + (screen.width-w)/2 + ',top=' + (screen.height-h)/2;
	return (p)
}
function posia(w,h) {
	var p = 'resizable=1,scrollbars=yes,width=' + w + ',height=' + h + ',left=' + (screen.width-w)/2 + ',top=' + (screen.height-h)/2;
	return (p)
}

function PopUpDesc($code) {		
	f=window.open('popup_detail.php','popup0',posi(426,491));
}


function getPhoto($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photo",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

/////////////////////////////////////
function getPhotoNet($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoentretien_nettoyage",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}
/////////////////////////////////////
function getTitre($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreentretien_nettoyage",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexte($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteentretien_nettoyage",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

//////////////////////////////////////////////////////

function getPhotoMonuments($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoMonuments",  
			async: false,
			data:"code="+$codePhoto }).responseText;
			
			$("#screenphoto2").empty();
			if($("#screenphoto2").html(txthtml)){
				$('#screenphoto2').fadeIn("slow");
			}
}

function getTitreMonuments($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreMonuments",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteMonuments($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteMonuments",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

///////////////////////////////////////////////////////

function getPhotoCaveaux($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoCaveaux",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreCaveaux($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreCaveaux",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteCaveaux($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteCaveaux",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

///////////////////////////////////////////////////////

function getPhotoGravures($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoGravures",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreGravures($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreGravures",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteGravures($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteGravures",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

/////////////////////////////////////////////////////


function getPhotoFours($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoFours",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreFours($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreFours",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteFours($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteFours",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

///////////////////////////////////////////////////////
function getPhotoAccessoires($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoAccessoires",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreAccessoires($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreAccessoires",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteAccessoires($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteAccessoires",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}
///////////////////////////////////////////////////////
function getPhotoMetiers($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoMetiers",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreMetiers($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreMetiers",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteMetiers($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteMetiers",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}
//////////////////////////////////////////////////////
function getPhotoServices($codePhoto){
	$('#screenphoto2').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=photoServices",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if($("#screenphoto2").html(txthtml)){
		$('#screenphoto2').fadeIn("slow");
	}
}

function getTitreServices($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titreServices",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

function getTexteServices($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteServices",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	if(txthtml == ''){
		$('#texte_diapo').css("display","none");
	}else{
		$('#texte_diapo').css("display","block");
	}
	$("#texte_diapo").html(txthtml);
}

function deplier(table,tablemarque,code){
	f=window.open('popup_detail.php?c='+code+'&ts='+table+'&tm='+tablemarque,'popup0',posi(500,250));
}

function deplier2(table,code){
	f=window.open('popup_detail.php?c='+code+'&ts='+table,'popup0',posi(500,250));
}
