function imagezoom(w,h,url) {
w+=18;
h+=15;
   var Fensteroptionen = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
   var popupWindow = window.open(url, 'Imagezoom', Fensteroptionen + ',width=' + w + ',height=' + h);
   var focus = popupWindow.focus();
}

function ValideHeb() {
	for (i=0; i<document.search.Param1.length;i++){
	if (document.search.Param1[i].checked)
	{var1=document.search.Param1[i].value}
	}
	for (j=0; j<document.search.Param2.length;j++){
	if (document.search.Param2[j].checked)
	{var2=document.search.Param2[j].value}
	}
	//var adresse = '/hebergement/recherche?type=' + var1 + '&lieu=' + var2;
	var adresse = '/hebergement/recherche/(type)/' + var1 + '/(lieu)/' + var2;
	self.location.href=adresse;
}

function ValideRes() {
	for (j=0; j<document.search.Param2.length;j++){
	if (document.search.Param2[j].checked)
	{var2=document.search.Param2[j].value}
	}
	var adresse = '/restaurants/recherche/(lieu)/' + var2;
	self.location.href=adresse;
}

function ValidePat() {
	for (j=0; j<document.search.Param2.length;j++){
	if (document.search.Param2[j].checked)
	{var2=document.search.Param2[j].value}
	}
	
	var adresse = '/pays_de_laon/recherche/(type)/' + var2;
	self.location.href=adresse;
}

function ValideLoi() {
	for (i=0; i<document.search.Param1.length;i++){
	if (document.search.Param1[i].checked)
	{var1=document.search.Param1[i].value}
	}
	for (j=0; j<document.search.Param2.length;j++){
	if (document.search.Param2[j].checked)
	{var2=document.search.Param2[j].value}
	}
	var adresse = '/loisirs/recherche/(type)/' + var1 + '/(lieu)/' + var2;
	self.location.href=adresse;
}

function ValideVis() {
	for (i=0; i<document.search.Param1.length;i++){
	if (document.search.Param1[i].checked)
	{var1=document.search.Param1[i].value}
	}
	for (j=0; j<document.search.Param2.length;j++){
	if (document.search.Param2[j].checked)
	{var2=document.search.Param2[j].value}
	}
	var adresse = '/visites/recherche/(type)/' + var1 + '/(lieu)/' + var2;
	self.location.href=adresse;
}

function changeLocation2(Combo) {
	var URL=document.getElementById(Combo).value;
	if(URL!="") {
		if(document.location.href.indexOf(URL)<0) {
			window.location = '/' + URL;
		}
	}
	else {
		switch (Combo) {
			case 'type':
				URL="";
				break;
				case 'type2':
				URL="";
				break;
				case 'type3':
				URL="";
				break;
			case 'marque':
				URL=document.getElementById("type").value;
				break;
			case 'modele':
				URL=document.getElementById("marque").value;
				break;
		}
		window.location = '/formulaire_pass_sejour?type=' + URL;
	}
}

function changeLocation3(Combo){
	var URL = document.getElementById(Combo).value;
	alert("1");
	var liv =    document.getElementById("loop"); 
    liv.innerHTML = "{def $listing=fetch('tourinsoft', 'sejour1', hash('code'," + URL + " ))} ";
	//window.location = '/formulaire_pass_sejour?type=' + URL;
	return URL;
	
}


// GoogleMaps
/*
function load($xpos, $ypos) {
    if (GBrowserIsCompatible()) {
		//création de la map:
        var map = new GMap2(document.getElementById("map"));
		
		//control :
		map.addControl(new GLargeMapControl());
		map.addControl(new GOverviewMapControl());
		map.addControl(new GOverviewMapControl())
		map.enableDoubleClickZoom();
		map.enableContinuousZoom();
		GEvent.addDomListener(document.getElementById("map"), "DOMMouseScroll", wheelZoom); // Firefox
		GEvent.addDomListener(document.getElementById("map"), "mousewheel",     wheelZoom); // IE
		
		//centrage carte:
        map.setCenter(new GLatLng($xpos, $ypos), 10);
		
		//marker:
		var point = new GLatLng(parseFloat($xpos), parseFloat($ypos));
		map.addOverlay(createMarker(point, 0));
	}
}
	
function wheelZoom(a) {
  if (a.detail) // Firefox
  {
    if (a.detail < 0)
    { map.zoomIn(); }
    else if (a.detail > 0)
    { map.zoomOut(); }
  }

  else if (a.wheelDelta) // IE
  {
    if (a.wheelDelta > 0)
    { map.zoomIn(); }
    else if (a.wheelDelta < 0)
    { map.zoomOut(); }
  }
}

function createMarker(point, tabbed) {
  var marker = new GMarker(point);
  return marker;
}*/