if(screen.width<480)
	{ window.location="http://m.tourisme-aveyron.com"; }

nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1);

//detection de navigateur

var detect = navigator.userAgent.toLowerCase();
var OS,navigateur,versionNavigateur,total,thestring;

if (checkIt('konqueror'))
{
	navigateur = "Konqueror";
	OS = "Linux";
}
else if (checkIt('chrome')) navigateur = "Chrome"
else if (checkIt('firefox')) navigateur = "Firefox"
else if (checkIt('omniweb')) navigateur = "OmniWeb"
else if (checkIt('opera')) navigateur = "Opera"
else if (checkIt('webtv')) navigateur = "WebTV";
else if (checkIt('icab')) navigateur = "iCab"
else if (checkIt('msie')) navigateur = "Internet Explorer"
else if (checkIt('safari')) navigateur = "Safari"
else if (!checkIt('compatible'))
{
	navigateur = "Netscape Navigator"
	versionNavigateur = detect.charAt(8);
}
else navigateur = "An unknown navigateur";

if (!versionNavigateur) 
{
	if(navigateur=="Safari")
	{
		checkIt('version');
		versionNavigateur = detect.charAt(place + thestring.length);
	}
	else
	{
		versionNavigateur = detect.charAt(place + thestring.length);
	}
}

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

// fonctions dreamweaver

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

if (window==parent) //si page racine
{
window.self.name="principal";
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_openBrWindow(theURL,winName,features) { //v2.0
  win=window.open(theURL,winName,features);
	win.opener = self;
	win.focus();
}

// fonction laetis
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1);

function printAll()
	{
	if (navigator.platform.substring(0,3)=="Win")
		{
		window.self.print();
		}
	else
		{
		window.alert("Appuyez sur Pomme + P, pour imprimer cette page");
		}
	}

function ajouterFavoris()
{
if (nav == "Mic" && ver >= 4 && navigator.platform.substring(0,3)=="Win")
{
url_site=window.self.location.href;
titre_site = window.document.title;
window.external.AddFavorite(url_site, titre_site);
}
else
{
if (navigator.platform.substring(0,3)=="Win")
{
window.alert("Appuyez sur Ctrl + D, pour ajouter ce site à vos favoris");
}
else
{
window.alert("Appuyez sur Pomme + D, pour ajouter ce site à vos favoris");
}

}
}


function lancerRecherche(motCle)
	{
	if ((motCle!='')&&(motCle!='Recherche'))
		{
		document.forms['recherche'].submit();
		return false;
		}
	else
		{
		alert('Veuillez entrer votre recherche.');
		}		
	}


function envoyerPageAmiFr()
{
	lienHrefAmi="/fr/popup/envoi_ami.php?titreAmi=" + unescape(window.document.title) + "&urlAmi=" + window.document.location.href;
	MM_openBrWindow(lienHrefAmi,'envoiAmi','scrollbars=yes,resizable=yes,status=yes,width=568,height=450');
	
}

function envoyerPageAmiUk()
{
	lienHrefAmi="/uk/popup/envoi_ami.php?titreAmi=" + unescape(window.document.title) + "&urlAmi=" + window.document.location.href;
	MM_openBrWindow(lienHrefAmi,'envoiAmi','scrollbars=yes,resizable=yes,status=yes,width=568,height=450');
}

function envoyerPageAmiEs()
{
	lienHrefAmi="/es/popup/envoi_ami.php?titreAmi=" + unescape(window.document.title) + "&urlAmi=" + window.document.location.href;
	MM_openBrWindow(lienHrefAmi,'envoiAmi','scrollbars=yes,resizable=yes,status=yes,width=568,height=450');
}

function envoyerPageAmiDe()
{
	lienHrefAmi="/de/popup/envoi_ami.php?titreAmi=" + unescape(window.document.title) + "&urlAmi=" + window.document.location.href;
	MM_openBrWindow(lienHrefAmi,'envoiAmi','scrollbars=yes,resizable=yes,status=yes,width=568,height=450');
}

	
function openVisiteFr()
	{
	winVisite=window.open('/visite_virtuelle/index_fr.htm','visite','height=692,width=990,toolbar=0,menubar=no,scrollbars=no,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}
	
function openVisiteUk()
	{
	winVisite=window.open('/visite_virtuelle/index_uk.htm','visite','height=692,width=990,toolbar=0,menubar=no,scrollbars=no,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}
	
function openVisiteEs()
	{
	winVisite=window.open('/visite_virtuelle/index_es.htm','visite','height=692,width=990,toolbar=0,menubar=no,scrollbars=no,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}
	
function openVisiteDe()
	{
	winVisite=window.open('/visite_virtuelle/index_de.htm','visite','height=692,width=990,toolbar=0,menubar=no,scrollbars=no,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openOffrePromoDe()
	{
	winVisite=window.open('/de/popup/offres_promo.php','offrePromo','height=680,width=568,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openOffrePromoEs()
	{
	winVisite=window.open('/es/popup/offres_promo.php','offrePromo','height=680,width=568,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openOffrePromoFr()
	{
	winVisite=window.open('/fr/popup/offres_promo.php','offrePromo','height=680,width=568,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openOffrePromoUk()
	{
	winVisite=window.open('/uk/popup/offres_promo.php','offrePromo','height=680,width=568,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openDerniereMinuteDe()
	{
	window.location.href = "/de/sejours/derniere_minute.php";
	}

function openDerniereMinuteEs()
	{
	window.location.href = "/es/sejours/derniere_minute.php";
	}

function openDerniereMinuteFr()
	{
	window.location.href = "/fr/sejours/derniere_minute.php";
	}

function openDerniereMinuteUk()
	{
	window.location.href = "/uk/sejours/derniere_minute.php";
	}

function openVideoViaducFr()
	{
	winVisite=window.open('/fr/aveyron/decouverte/pop-video-gouter-aveyron.php?nomvideo=gouter-aveyron.flv','video','height=600,width=800,toolbar=0,menubar=no,scrollbars=no,Status=yes');
	winVisite.opener = self; winVisite.focus();
	winVisite.focus();
	}

function openVotreAvis(ID_enquete, cle, ID_utilisateur, ID_panel)
	{
	winAvis=window.open('http://www.interview.laetis.fr/fr/sondes/enquete_permanente.php?ID_enquete='+ID_enquete+'&cle='+cle+'&ID_utilisateur='+ID_utilisateur+'&ID_panel='+ID_panel,'VotreAvis','height=692,width=650,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
	winAvis.opener = self; winAvis.focus();
	winAvis.focus();
	}

function openpopup(urlx,namex,hx,wx)
	{
	win=window.open(urlx,namex,'height=' + hx+ ',width=' + wx +',toolbar=0');
	win.opener = self ;win.focus();
	win.focus();
	}

/* TOUS EN AVEYRON */
function openEspacePro(theURL,nomPop)
	{
	//MM_openBrWindow(theURL,nomPop,'status=yes,menubar=yes,scrollbars=yes,width=520,height=600');
	//window.location.href = theURL;
	//window.location.href = "/fr/aveyron/contact/espace_professionnel.php";
	window.location.href = "http://pro.tourisme-aveyron.com";
	}
function openContactBrochure(theURL,nomPop)
	{
	//MM_openBrWindow(theURL,nomPop,'status=yes,menubar=yes,scrollbars=yes,width=520,height=600');
	window.location.href = theURL;
	}
function openAvis(theURL,nomPop)
	{
	//MM_openBrWindow(theURL,nomPop,'status=yes,menubar=yes,scrollbars=yes,width=520,height=600');
	window.location.href = theURL;
	}
function openResa(theURL,nomPop)
	{
	//MM_openBrWindow(theURL,nomPop,'status=yes,menubar=yes,scrollbars=yes,width=520,height=600');
	window.location.href = theURL;
	}
/* TOUS EN AVEYRON */

function lanceFormulaireBrochuresDepuisBandeau()
	{
	window.location.href = '/fr/aveyron/contact/index.php';
	}
function lanceFormulaireVotreAvisDepuisBandeau()
	{
	window.location.href = '/fr/aveyron/contact/votre-avis.php';
	}
function lanceLienResaDepuisBandeau()
	{
	window.location.href = '/fr/aveyron/contact/reservations.php';
	}
	
/*
Fonction "Contenus illicites"
Appel: <a href="http://www.laetis.fr/contenus-illicites/index.htm" onClick="lsjs_popupIllicite(); return false;"> D&eacute;clarer un contenu illicite </a>
Ouvre la page "contenus illicites" sur laetis.fr
*/
function lsjs_popupIllicite()
{
winIllicite=window.open('http://www.laetis.fr/contenus-illicites/index.htm','contenu illicite','height=692,width=730,toolbar=0,menubar=no,scrollbars=yes,Status=yes');
winIllicite.opener = self; 
winIllicite.focus();
} // FIN function lsjs_popupMentions(siteInternet)


//**********************
//fonctions carte flash interactive
//**********************

// Fonctions de gestion des calques gauche
// Fonctions de gestion des calques gauche
function afficherCalque(calque)
	{
	obj = document.getElementById(calque);
	if (obj.style.display=='block')
		{
		obj.style.display='none'; 
		obj.style.visibility='hidden'; 
		} 
	else
		{
		obj.style.display='block'; 
		obj.style.visibility='visible'; 
		} 
	}
	
	var historyVar="vide";
	var requeteGlobal="";
	
	
	

	function ouvreCarte(extLangueCarte,extIdGroupe,extIdCategorie,extCodeInsee,extIdentifiantObjectData,extZoomConvention,extLabelEtiquette)
	{
		
		divPage= document.getElementById("page");
		divPiedPage=document.getElementById("piedPage");
		divCarte= document.getElementById("carteInteractive");
		var tempRequete="/cartographie/carte-"+extLangueCarte+".php?extLangueCarte="+extLangueCarte;
		//pour préconfigurer un groupe
		if(extIdGroupe)
		{
			tempRequete+="&extIdGroupe=" + extIdGroupe;
			
			if(extIdCategorie)
			{
				tempRequete+="&extIdCategorie=" + extIdCategorie;
			}
			
			if(extCodeInsee)
			{
				tempRequete+="&extCodeInsee=" + extCodeInsee;
			}
			
			if(extZoomConvention)
			{
				tempRequete+="&extZoomConvention=" + extZoomConvention;
			}
			
			if(extIdentifiantObjectData)
			{
				tempRequete+="&extIdentifiantObjectData=" + extIdentifiantObjectData;
			}
			
			if(extLabelEtiquette)
			{
				tempRequete+="&extLabelEtiquette=" + extLabelEtiquette;
			}


		}
	
		//alert(versionNavigateur);
		//alert(tempRequete);
		
		if(navigateur=="Internet Explorer" && versionNavigateur<7)
		{
			//alert(navigateur);
			//functionReveille="reveilleDiv("+tempRequete+");";
			requeteGlobal=tempRequete;
			//interval = setTimeout("reveilleDiv()",1500);
			divCarte.style.position="absolute";	
			window.self.frames['frameCarte'].location.href=tempRequete;

			
		}
		else
		{
			window.self.frames['frameCarte'].location.href=tempRequete;
			divCarte.style.display="block";
			divPage.style.display="none";
			divCarte.style.left="0px";
		}
		window.onbeforeunload=function()
		{
			confirm("Si vous voulez quitter le site tourisme en Aveyron, cliquez sur ok. \nSi vous souhaitez juste quitter la carte cliquez sur annuler sur les 2 fenêtres qui suivent. \nUtilisez ensuite le bouton rouge retour au site en haut à droite de la carte.");
			return false; 
		}
	}
	
	function reveilleDiv()
	{
		if(navigateur=="Internet Explorer" && versionNavigateur<7)
		{
			divCarte= document.getElementById("carteInteractive");
			
			divCarte.style.display="block";
			divCarte.style.left="0px";
			//window.self.frames['frameCarte'].location.href=requeteGlobal;
			//alert("reveilleDiv");
		}

	}
	
	function fermeCarte()
	{
			//forcer le back
			window.history.back();
	}
	
	function fermeCarteDiv()
	{
			divPage= document.getElementById("page");
			divPiedPage=document.getElementById("piedPage");
			divCarte= document.getElementById("carteInteractive");
			if(navigateur=="Internet Explorer" && versionNavigateur<7)
			{
				divCarte.style.position="absolute";
			}
			divCarte.style.left="-150000px";
			divPage.style.display="block";
			if(divPiedPage){
				divPiedPage.style.display="block";
			}
			window.focus();
			window.onbeforeunload=null;
	}

//**********************
//fin fonction carte flash interactive
//**********************