// Procédures globales du projet
function go(chPrixMin,chPrixMax,chActiv,chRegion,chMots)
{


//alert(chRegion.value);

var sMot = chMots.value;
sMot = sMot.replace(/é/g,'e');
sMot = sMot.replace(/è/g,'e');
sMot = sMot.replace(/ê/g,'e');
sMot = sMot.replace(/î/g,'i');
sMot = sMot.replace(/ô/g,'o');
sMot = sMot.replace(/à/g,'a');
sMot = sMot.replace(/â/g,'a');



	if (chRegion.value != '-') {
	

		var varPrixMini = chPrixMin.value
		if (varPrixMini == 'Prix mini') {
		varPrixMini='';
		}
				
		var varPrixMaxi = chPrixMax.value
		if (varPrixMaxi == 'Prix maxi') {
		varPrixMaxi='';
		}
		
		if (sMot == 'Mots cles') {
		sMot='';
		}
		
		window.top.location.href ="rech_"+varPrixMini+"_"+varPrixMaxi+"_"+chActiv.value+"_"+chRegion.value+"_"+sMot+"_1";
		
		}
	else {
	
		alert("Merci de choisir une région")
		
		}
	
}



function go_combo(chPrixMin,chPrixMax,chActiv)
{
		
	if (chActiv.value != '') {
	
		
		var varPrixMini = chPrixMin.value
		if (varPrixMini == 'Prix mini') {
			varPrixMini='';
			}
		
		var varPrixMaxi = chPrixMax.value
		if (varPrixMaxi == 'Prix maxi') {
			varPrixMaxi='';
			}
		
		
		
		window.top.location.href ="rech_"+varPrixMini+"_"+varPrixMaxi+"_"+chActiv.value+"___1";
		}
	else {
		alert("Merci de choisir une activité")
	}
	
}



function go_combo1(chActiv)
{

	if (chActiv.value != '') {
	
		window.top.location.href = chActiv.value ;
		
		}
		
	else {
	
		alert("Merci de choisir une activité")
		
	}
	
}



function numComboActiv(numCombo,idCombo)
{


document.getElementById(""+idCombo+"").selectedIndex = numCombo;

}
	


function tri_activ(chActiv)

{


	if (chActiv.value != '') {
			
		window.top.location.href = chActiv.value+".htm";
		
		}
		
	else {
		alert("Vous devez faire une sélection !")
	}
	
}




function change_affichage(chActiv)

{

	var LesRadios = document.getElementsByName("radioAffichage");
	
	for (i=0; i<LesRadios.length; i++)
	if (LesRadios[i].checked)
	
	var la_valeur = LesRadios[i].value;

	window.top.location.href = la_valeur+".htm";
	
}




function createMarker(point, infos,ico) {
	//var marker = new GMarker(point);

	var icon = new GIcon();
	icon.image = ico;
	//icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.shadow = "http://www.adrenactive.com/adrenactive_web/FR/GicoAdreOmbre.png";
	//icon.iconSize = new GSize(30, 34);
	icon.iconSize = new GSize(34, 34);
	icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	
	
	var marker = new GMarker(point, icon)
	
	GEvent.addListener(marker, "click", function() {
		
		marker.openInfoWindowHtml(infos);

		});
	return marker;
}


function AppelBouton(psBouton,psRegion)
{

location=sNomPage+"_"+psRegion+"__.htm";

}


function display(sNomDiv)
{

	
//	document.getElementById("topdeck").style.visibility='visible';
	document.getElementById(sNomDiv).style.visibility='visible';
}

function divOver(idDivInfos,pos,largeur)

{

	var nava = (document.layers);
	var dom = (document.getElementById);
	var iex = (document.all);
		
	var nomDiv = "btn_"+idDivInfos
		
	if (nava) {skn = document.topdeck }
	else if (dom) { skn = document.getElementById(nomDiv).style }
	else if (iex) {skn = topdeck.style }
			
	skn.top = 45;
	skn.left = pos;
	a=true
	
	
	for (i=1; i<=5; i++){
	
		if (i != idDivInfos){
			document.getElementById("btn_"+i).style.visibility = "hidden";
		}
	}
	
	
	
	if (nava)
	{
		skn.visibility = "visible";
		}
	else if (dom)
	{
		skn.visibility = "visible";
		}
	else if (iex)
	{
		skn.visibility = "visible";
		}
}
function hide(sNomDiv)
{

	
	document.getElementById(sNomDiv).style.visibility="hidden";
}
function changeCouleurFond(nomChamp,sCouleur)
{

document.getElementById(""+nomChamp+"").style.backgroundColor = sCouleur ;

}
	


function changeImageFond(nomChamp,sNomimg)

{

document.getElementById(""+nomChamp+"").background = sNomimg ;
	
}
	


function changeInfosSaisie(nomChamp,sValeur)
{

document.getElementById(""+nomChamp+"").value = sValeur ;

	
}
	


function changeHauteurDiv(sNomDiv,nHauteur)
{

	var maDiv = document.getElementById(sNomDiv);
	maDiv.style.height = nHauteur+"px";

}


function pTest()
{
alert("coucou je suis pTest");
}

function AfficheImage(sensNav)
{

if (sensNav == 'next'){
		if (numImg == nNbImg ){
			numImg = 1;
		}else{
			numImg++;
		}
}else{
		if (numImg == 1){
			numImg = nNbImg;
			}else{
			numImg--;
			}
	}


switch (numImg) {
	case 1:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_1;
	break;
	
	case 2:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_2;
	break;
	
	case 3:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_3;
	break;
	
	case 4:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_4;
	break;
		
	case 5:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_5;
	break;
		
	case 6:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_6;
	break;
	
	case 7:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_7;
	break;
	
	case 8:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_8;
	break;
	
	case 9:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_9;
	break;
	
	case 10:
	document.getElementById("Img_Coffret_Cadeau").src=sChemin+sNomImage_10;
	break;
		
}



}
function AfficheInfo(recupTxt,zone)
{


document.getElementById(zone).innerHTML = recupTxt ;

document.getElementById("map").innerHTML  = "";
document.getElementById("map").style.backgroundColor = "#FFFFFF";

}



function ggMap(sLat,sLong){


	if (GBrowserIsCompatible()) {
	
		document.getElementById("idinfos").innerHTML  = "";
		//document.getElementById("map").innerHTML = "";

		var map = new GMap2(document.getElementById("idinfos"));
		
		map.setCenter(new GLatLng(sLat, sLong), 8);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var point = new GLatLng(sLat,sLong);
		map.addOverlay(new GMarker(point));
		
		}

}


function load(){


	if (GBrowserIsCompatible()) {
	
		var map = new GMap2(document.getElementById("map2"));
		
		map.setCenter(new GLatLng(sLat, sLong), 8);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var point = new GLatLng(sLat,sLong);
		map.addOverlay(new GMarker(point));
		
		}

}

function favoris()
{


	sTitre = document.title;
	sUrl = location.href;


	if ( navigator.appName != 'Microsoft Internet Explorer' ){
	
		window.sidebar.addPanel(sTitre,sUrl,"");
		
	}else{
	
		window.external.AddFavorite(sUrl,sTitre);
		
	} 
	
}



