function previewPhotograph(id){
	if(texte = file('inc/previewphotographe.php?nom_photographe='+id)){
		writediv(texte,'photographe');
	}
	if(texte = file('inc/previewphotographe.php?photo_photographe='+id)){
		writediv(texte,'details_photographe');
	}
}


function switchLogo(etat){
	
		/*On affiche les liens back et contact*/
	if(texte = file('inc/actions.inc.php?logo='+etat)){
		writediv(texte,'logo');
		//Un petit coup pour réactualiser la fonction FancyBox
		$(".photo").fancybox({
			'padding'			: 0,
			'autoScale'			: true
		});
	}
}


function blogin(action){
	var texte="";
	if(action=="afficher"){
				texte = '<div id=\"login\"><h3>Authentification</h3><form method="post"><div class="close" onClick="blogin();"></div><table><tr><td>Login : </td><td><input class="saisie" type="text" id="username" name="username" /></td></tr><tr><td>Password : </td><td><input class="saisie" type="password" name="password" id="password" /></td></tr></table><p><input type="submit" value="Connexion" /></p></form></div>';
				writediv(texte,'blogin');
			$('#blogin').fadeIn('normal', function(){
				
				
			} );
		}else{
			$('#blogin').fadeOut('fast', function(){
				$('#form_filtres').animate({
				 'marginRight': '0px',
				 'marginTop': '0px'
					},500);
				writediv(texte,'blogin');	
			} );
		}
	
	
}


function writediv(texte,id){
	document.getElementById(id).innerHTML = texte;
}

function file(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);
}

/**************fin AJAX*********************************************************/

