//initialisation de la carte google maps
function googlemaps_initialize() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"))
    map.setCenter(new GLatLng(45.112845,2.864943), 4);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    
        // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        
    map.addOverlay(new GMarker(new GLatLng(45.112845,2.864943)));
    
    var map = new GMap2(document.getElementById("map_canvas_petit"))
    map.setCenter(new GLatLng(45.112845,2.864943), 9);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    
        // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        
    map.addOverlay(new GMarker(new GLatLng(45.112845,2.864943)));
  }
}


//Lance au chargement
function muraloc_init()
{
	/*Nifty("div#menu a","small transparent top");
	Nifty("ul#intro li","same-height");
	Nifty("div.date");
	Nifty("div#content,div#side","same-height");
	Nifty("div.comments div");
	Nifty("div#footer");
	Nifty("div#container","bottom tl");*/
	setupZoom();
	googlemaps_initialize();
	
	//document.getElementById('map_canvas').replace('<span>Do/(.)*/</span>','<span></span>');
	
}



//Lance au dechargement
function muraloc_unload()
{
	GUnload();
}

//verification du contenu des champs
function verif_champs(mail, nom, question, antispam)
{
	var probleme_detecte = false;
	var message = '';
	
	if (mail == "")
	{
		probleme_detecte = true;
		message = 'Le champ courriel est vide !';
	}
	else
	{
		indexAroba = mail.indexOf('@');
		indexPoint = mail.indexOf('.');
		if ((indexAroba < 0) || (indexPoint < 0))
		{
			probleme_detecte = true;
			message = 'L\'adresse courriel n\'est pas valide !';
		}
	}
	
	if (nom == "")
	{
		probleme_detecte = true;
		message = 'Le champ nom est vide !';
	}
	
	if (antispam == "")
	{
		probleme_detecte = true;
		message = 'Le champ antispam est vide !';
	}
	
	if ((question == "") || ( question=="Tapez ici votre requ&ecirc;te, question, demande d'information&hellip;"))
	{
		probleme_detecte = true;
		message = 'Le champ message est vide !';
	}	
	
	if (probleme_detecte)
	{
		alert(message);
		probleme_detecte = true;
		message = '';
		return false;
	}
	else
	{
		return true;
	}
}
