// JavaScript Document

function nextCheminee(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_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 nextFoyer(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_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 nextPoele(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_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 nextBarbecue(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_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 nextFours(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_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 nextAccessoires(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante6",
			async: false,
			data:"urlImg="+chemPhoto
			}).responseText;
	$('#screenphoto2').html(txthtml);
}

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

function nextServices(chemPhoto){
	$('#texte_diapo').css("display","none");
	$('#titre_diapo').css("display","none");
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=suivante8",
			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 getTitre($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=titrepoele",  
			async: false,
			data:"code="+$codePhoto }).responseText;
	$("#titre_diapo").html(txthtml);
}

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

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

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

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

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

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

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

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

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

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

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

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

function getTexteBarbecue($codePhoto){
	var txthtml = $.ajax({  
			type: "POST",
			url: "ajax_requete.php?action=texteBarbecue",  
			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));
}
