function getAnXmlHttpRequest()
{
    var xmlhttpObjet = false;
    if(navigator.appName=='Microsoft Internet Explorer')
	{
		if(parseFloat(navigator.appVersion)>=5)
		{
			xmlhttpObject = new ActiveXObject('Msxml2.XMLHTTP');
        }
        else{
			try {
                xmlhttpObject = new ActiveXObject('Microsoft.XMLHTTP');
				}
			catch(error){
				xmlhttpObject = false;
			}
		}
    }
    else {
		try {
			xmlhttpObject = new XMLHttpRequest();
		    //alert("Mozilla");
            }
        catch(error){
			xmlhttpObject = false;
			alert("erreur creation : " + error );
        }
    }
    return xmlhttpObject;
}

function ExecuteScriptAsp(xmlhttp,script_asp_path,data){
	if(xmlhttp){
		try{
			xmlhttp.open("POST", script_asp_path , false );
			xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
			//alert("bonjour");
			xmlhttp.send(data);
		}
		catch(err){			
		alert("erreur lecture : " + err);
		}	
	}
}


var xmlhttp;



var paysGen=false;
var portGen=false;
function ExecuteScriptAspLoading(xmlhttp,script_asp_path,data,idModif,ajaxLoading){
	
	
	xmlhttp.onreadystatechange = function(){
		if ( xmlhttp.readyState == 4 ){//Actions executées une fois le chargement fini
			if(xmlhttp.status  != 200){//Message si il se preoduit une erreur
				document.getElementById(idModif).innerHTML ="Error code " + xmlhttp.status;
			} else {//On met le contenu du fichier externe dans la div "content"
				//alert ("Arrive ici")
				//alert (xmlhttp.responseText)
				document.getElementById(idModif).innerHTML = xmlhttp.responseText;
			}
		} else {//Message affiché pendant le chargement
			document.getElementById(idModif).innerHTML = ajaxLoading;
		}
	}
	
	pathAppel=script_asp_path+"?"+data
	xmlhttp.open("GET", pathAppel, true);//Appel du fichier externe
	xmlhttp.send(null);
}



var xmlhttp;




function gen_galerie_accent(currentpict,nextPrevious)
{
	ajaxLoading="<table width='310'><tr valign='top'><td align='center'><br><br><br><img src='deco/ajax-loader.gif' align='center'><br><span class='txtBlanc' align='center'>&nbsp;&nbsp;Chargement des images ......<br><br><br><br></span><br><img src='deco/spacer.gif' width='200' height='20'></td></tr><tr><td width='50%'><img src='/deco/spacer.gif' align='right' border='0'></td><td width='50%'><img src='/deco/spacer.gif' align='left' border='0'></td></tr></table>";
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieAccent.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_harmony(currentpict,nextPrevious)
{
	ajaxLoading="<table width='310'><tr valign='top'><td align='center'><br><br><br><img src='deco/ajax-loader.gif' align='center'><br><span class='txtBlanc' align='center'>&nbsp;&nbsp;Chargement des images ......<br><br><br><br></span><br><img src='deco/spacer.gif' width='200' height='20'></td></tr><tr><td width='50%'><img src='/deco/spacer.gif' align='right' border='0'></td><td width='50%'><img src='/deco/spacer.gif' align='left' border='0'></td></tr></table>";
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieHarmony.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_soprano(currentpict,nextPrevious)
{
	ajaxLoading="<table width='310'><tr valign='top'><td align='center'><br><br><br><img src='deco/ajax-loader.gif' align='center'><br><span class='txtBlanc' align='center'>&nbsp;&nbsp;Chargement des images ......<br><br><br><br></span><br><img src='deco/spacer.gif' width='200' height='20'></td></tr><tr><td width='50%'><img src='/deco/spacer.gif' align='right' border='0'></td><td width='50%'><img src='/deco/spacer.gif' align='left' border='0'></td></tr></table>";
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieSoprano.asp",data,'galerie',ajaxLoading)
	
}


var ajaxLoadingTable="<table height=\"276\" width=\"575\" border=\"0\"><tr valign='middle' align='center'><td align='center' height='276' width='570'><img src='deco/ajax-loader2.gif' align='center'></td></tr></table>";;
	

function gen_galerie_galLaser(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieEpilationLaser.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galRajeunissement(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieRajeunissement.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galAcne(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieAcneCicatrices.asp",data,'galerie',ajaxLoading)
	
}


function gen_galerie_galDetatouage(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieDetatouage.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galCouperose(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieCouperose.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galTaches(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieTaches.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galVaricosites(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieVaricosites.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galGreffesCheveux(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieGreffesCheveux.asp",data,'galerie',ajaxLoading)
	
}

function gen_galerie_galLiposculture(currentpict,nextPrevious)
{
	ajaxLoading=ajaxLoadingTable;
	xmlhttp = getAnXmlHttpRequest();
	var data ="currentpict="+currentpict+"&nextPrevious="+nextPrevious;
	ExecuteScriptAspLoading(xmlhttp,"ajax/gen_galerieLiposcuplture.asp",data,'galerie',ajaxLoading)
	
}





