

function callGIS(){

	var i
	
//	typeId
	var sLocation = "typeid=";
	if (document.SelectionForm.typeid[0].checked == true){
		sLocation += "2";
	}
	if (document.SelectionForm.typeid[1].checked == true){
		sLocation += "3";
	}
	if (document.SelectionForm.typeid[2].checked == true){
		sLocation += "1";
	}
//	typePrix
	sLocation += "&typeprix=";
	if (document.SelectionForm.TypePrix[0].checked == true){
		sLocation += "location";
	} else {
		sLocation += "achat";
	}
//	superficie
	sLocation = sLocation + "&superficiemin=" + document.SelectionForm.superficiemin.value;
	sLocation = sLocation + "&superficiemax=" + document.SelectionForm.superficiemax.value;
//	nouveau
	if (document.SelectionForm.Nouveau.checked == true){
		sLocation += "&Nouveau=vrai";
	}
//	commune
	for (i=0; i<25; i++) {
			if (document.SelectionForm.commune.options[i].selected == true) {
			sLocation = sLocation + "&commune=" + document.SelectionForm.commune[i].value;
		}			
	}
//	langue
	sLocation = sLocation + "&PageLanguage=" + pageLanguage;
	
//	alert(sLocation);	
//	window.open(sLocation,"GIS","toolbar=no,width=790,height=580,directories=no,status=no,resize=yes,menubar=no,location=no,scrollbars=yes");	
	callGIS2(sLocation);
}

function callGIS2(sQuery){
	var url = window.location.href;
	var sLocation = "http://www2.sdrb.be/gis/content/inventBrowserCheck.asp?selection=multiple&" + sQuery;
	if ((url.indexOf("127.0.0.1",1) > 0) || (url.indexOf(":48000",1) > 0)){
		sLocation = "http://www2.sdrb.be:48000/gis/content/inventBrowserCheck.asp?selection=multiple&" + sQuery;
	}
//	alert(sLocation);	
//sLocation = "noGis.htm"
	window.open(sLocation,"GIS","toolbar=no,width=726,height=510,directories=no,status=no,resize=yes,menubar=no,location=no,scrollbars=yes");	
}
