// JavaScript Document
//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
function hidestatus(){
window.defaultStatus='ImmoGratuit';
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN | Event.ONCLICK | Event.ONKEYDOWN | Event.ONKEYPRESS | Event.ONLOAD | Event.ONSELECT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onmousedown=hidestatus
document.onclick=hidestatus
document.onkeydown=hidestatus
document.onkeypress=hidestatus
document.onload=hidestatus
document.onselect=hidestatus
document.onselect=hidestatus

function openBrWindow(URL,winName,features) { 
  window.open(URL,winName,features);
}

function imgchange(id,caption,description){	if(document.images){document.getElementById('main').src = id;document.getElementById('main').alt = caption; 
		document.getElementById('main_image_description').innerHTML = description;}else{document.getElementById('main').src = "images/nophoto.jpg";document.getElementById('main_image_description').innerHTML = '';}}

//------------------
 function clearmap( mk )
 {
 document.getElementById("message").innerHTML = "" ;
 map.clearOverlays() ;
 lastclick = "" ;
 }

// Check for a double click...

 function checkclick ( point )
 {
 if ( lastclick != point )
 {
 lastclick = point ;
 
 var zoomlvl = map.getZoomLevel();

 fc( point, zoomlvl) ;
 }
 }

 
 function fc( point, zoomlvl )
 {
	var html = "";

	map.centerAndZoom( point, zoomlvl) ;

	html += html + "Longitude , Latitude " + map.getCenterLatLng(point);
	
	var marker = new createMarker(point, html);
		
 map.addOverlay(marker);

 }


function createMarker(point,text) 
{
	  var marker = new GMarker(point);
	  GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(text);});
	  return marker; //fonction qui affiche l\'info bulle légende sur le marqueur
}

function load1() 
{
	if (GBrowserIsCompatible()) 
	{
			var Lat=48.84275// rentrez ici votre longitude
			var Lng=2.347712  // rentrez ici votre lattitude
			var Zoom=16 // rentrez ici le zoom désiré entre 1 et 16
			var TextAffiche="<center>ImmoGratuit<br><center>L'immobilier facile<br>"; // rentrez ici votre texte qui sera affiche sur le point marqueur
			//var image="images/P1000112.jpg";

			var map = new GMap2(document.getElementById("map")); // affiche le module
			map.setCenter(new GLatLng(Lat,Lng ),Zoom ); //affiche la carte au lieu précisé
			map.addControl(new GLargeMapControl()); // affiche le curseur de zoom
			map.addControl(new GMapTypeControl()); // affiche le curseur de déplacement
	 		map.addControl(new GScaleControl()) ;
			var point = new GLatLng(Lat,Lng);
			var marker = createMarker(point,TextAffiche);
			map.addOverlay(marker); // ces 3 lignes définissent le point et sa légende
            marker.openInfoWindowHtml(TextAffiche);			
            //marker.openInfoWindowHtml(image);					
	}
}
//-------------------maps.js

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("googlemap"));
		// Ajout du contrôle de déplacement et de zoom
		map.addControl(new GLargeMapControl());
		// Ajout du contrôle de type de carte (carte / satellite / mixte)
		map.addControl(new GMapTypeControl());
        geocoder = new GClientGeocoder();
      }
    }

    function showAddress(address) 
    {
    	if (geocoder) 
	{
        	geocoder.getLatLng(address,
	        function(point) 
		{
            		if (!point) 
				{
              			alert("L'adresse n'est pas reconnue par Google Map.");
            			} 
			else 
				{
				map.setCenter(point, 13, G_NORMAL_MAP);
              			var marker = new GMarker(point);
              			map.addOverlay(marker);			 
              			marker.openInfoWindowHtml(info);
            			}
          	}
 		);
      	}
    }    
    //]]>
function limite(zone,max)
{
	if(zone.value.length>=max){zone.value=zone.value.substring(0,max);}
}
$(document).ready(function(){
	$('#TranslatorContainer').mouseover(function () {
		$("#Translator").css({
			display: "block",
			zIndex: 9999999
		})
		$('body').stopTime('hideTranslator');		
	});

	$('#TranslatorContainer').children().mouseout(function () {
		$("#Translator").css("zIndex", "100");
		$('body').oneTime(500, 'hideTranslator', function() {
			$("#Translator").css("display", "none");
		});		
	});

	$('#AddThisButton').mouseover(function () {
		$("#Translator").css("display", "none");
	});
});
function OuvrirFenetre(URL,fenetre,param) { 
  window.open(URL,fenetre,param);
}
