//type 0 carte, 1 theme, 2 destination
var type = 0;
var active;

function rollover(t,n) {
	//si type actif 1, cacher le texte et la photo centrale
	//si type actif 2, remonter le rollover du bouton, cacher la carte
	if(type==1) {
		document.getElementById("th-text"+active).style.visibility = "hidden";
		document.getElementById("th-photo"+active).style.display = "none";
	}
	if(type==2) {
		document.getElementById("ds-btn"+active).style.top = "0";
		document.getElementById("ds-carte"+active).style.display = "none";
	}
	//si theme afficher le nouveau texte et la photo
	if(t==1) {
		document.getElementById("th-text"+n).style.visibility = "visible";
		document.getElementById("th-photo"+n).style.display = "block";
	} else {
		document.getElementById("ds-btn"+n).style.top = "-65px";
		document.getElementById("ds-carte"+n).style.display = "block";
	}
	//fin de l'anim
	type = t;
	active = n;
}

function reset() {
	if(type==1) {
		document.getElementById("th-text"+active).style.visibility = "hidden";
		document.getElementById("th-photo"+active).style.display = "none";
	}
	if(type==2) {
		document.getElementById("ds-btn"+active).style.top = "0";
		document.getElementById("ds-carte"+active).style.display = "none";
	}
	type = 0;
}

var carte;
function rolloverCarte(n) {
	document.getElementById(n).style.display = "block";
	carte = n;
}

function rolloutCarte() {
	document.getElementById(carte).style.display = "none";
}

//Affichage carte
function affichecarte(carte){
	document.getElementById(carte).style.display = 'block';
}

//actionner vers la page liste
function gotolistesformulesindex(frml,idth,idloc,txt,pATraversISAPIRewrite){
	//document.frmindex.Formules.value = frml;
	//document.frmindex.IdTheme.value = idth;
	//document.frmindex.IdLocalite.value = idloc;
	
	if (txt.length>0)
	{
		if (pATraversISAPIRewrite==0)
			document.frmindex.action = document.frmindex.action + '?pUrl=' + txt;
		else
			document.frmindex.action = 'voyages-' + txt + '.html';
	}
	document.frmindex.submit();
}
//actionner vers la page texte
function gototexteindex(idtxt){
		document.frmtexte.IdCahier.value = idtxt;
		document.frmtexte.submit();
	}
//Actionner vers la page produit
function gotoproduitindex(txtProdUrl,txtLocUrl,pATraversISAPIRewrite){
	if (pATraversISAPIRewrite==0)
	{
		if (txtLocUrl.length>0)
			document.frmdetail.action=document.frmdetail.action +  '?pUrl1=' + txtLocUrl + '&pUrl2=' + txtProdUrl;
		else
			document.frmdetail.action=document.frmdetail.action +  '?pUrl=' + txtProdUrl;
	}
	else
	{
		if (txtLocUrl.length>0)
			document.frmdetail.action='voyage-' + txtLocUrl + '-' + txtProdUrl + '.html';
		else
			document.frmdetail.action='voyage-' + txtProdUrl + '.html';
	}	
	document.frmdetail.submit();
}