function check(checkbox) {
	try {
		if (checkbox.checked) {
			$('div_' + checkbox.name).show();
		}
		else {
			$('div_' + checkbox.name).hide();
		}
	}
	catch(e) {
		alert('Erreur dans la fonction \'check\' dans stylis2.js :\n'+e.message);
	}
}

function initialize() {
	var address = $F('googlemap-adresse');
	var geocoder = new google.maps.Geocoder();
	
	geocoder.geocode( { 'address': address }, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK && status != google.maps.GeocoderStatus.ZERO_RESULTS) {
			var map = new google.maps.Map($('map_canvas'), {
				zoom: 15,
				center: results[0].geometry.location,
				mapTypeId: google.maps.MapTypeId.ROADMAP,
				mapTypeControl: true,
				mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
				navigationControl: true,
				navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}
			});
			
			var infowindow = new google.maps.InfoWindow({
				content: $F('googlemap-infobulle')
			});
			
			var marker = new google.maps.Marker({
				position: results[0].geometry.location, 
				map: map,
				title: address
			});
			
			infowindow.open(map, marker);
		}
		else {
			alert(address + ' : adresse introuvable');
		}
	});
}

