";
}
function Deplieur(keldiv) {
document.getElementById(keldiv).style.visibility='visible';
}
function PopUp(ledoc,larg,haut) {
window.open(ledoc,'','width='+larg+' ,height='+haut);
}
// FONCTIONS POUR L'API GOOGLE MAP
var map;
var i;
function initialiser(ladiv,x,y,z) {
if (GBrowserIsCompatible()) {
this.i=1;
var map = new GMap2(document.getElementById(ladiv),{ size: new GSize(500,400) } );
map.addControl(new GLargeMapControl());
map.removeMapType(G_HYBRID_MAP);
map.addControl(new GMapTypeControl());
map.enableScrollWheelZoom();
map.enableGoogleBar();
map.disableDoubleClickZoom();
map.setCenter(new GLatLng(x,y),z);
this.map=map;
}
}
function recentrer(x,y,z) {
map=this.map;
map.setCenter(new GLatLng(x,y),z);
}
function glissesur(oux,ouy) {
map=this.map;
map.panTo(new GLatLng(oux,ouy));
}
function metpoint(oux,ouy,contenu,option) {
optage=0;
if(option!='') {
optage=1;
var icone = new GIcon();
if(option=="bien") {
icone.image = "themes/bleu/images/icones/bien.png";
icone.iconSize = new GSize(30,28);
icone.iconAnchor = new GPoint(15,27);
icone.infoWindowAnchor = new GPoint(15,1);
}
if(option=="programme") {
icone.image = "themes/bleu/images/icones/programme.png";
icone.iconSize = new GSize(30,31);
icone.iconAnchor = new GPoint(15,30);
icone.infoWindowAnchor = new GPoint(15,1);
}
}
map=this.map;
point=new GLatLng(oux,ouy);
if(option!='') {
var marker=new GMarker(point,icone);
} else {
var marker=new GMarker(point);
}
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(contenu);
});
map.addOverlay(marker);
}
function metpointdraggable() {
map=this.map;
var point = map.getCenter();
marker = new GMarker(point,{draggable:true});
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Point mobile");
});
GEvent.addListener(marker, "dragstart", function() {
marker.closeInfoWindow();
});
map.addOverlay(marker);
}
function retaille() {
if(this.i==1) {
map=this.map;
if (document.body)
{
var larg = (document.body.clientWidth);
var haut = (document.body.clientHeight);
} else {
var larg = (window.innerWidth);
var haut = (window.innerHeight);
}
document.getElementById('carte').style.width=larg;
document.getElementById('carte').style.height=haut;
map.checkResize();
}
}
function itineraire(div) {
document.getElementById(div).innerHTML='';
map=this.map;
directionsPanel = document.getElementById(div);
directions = new GDirections(map, directionsPanel);
directions.load("from: "+document.getElementById('adresse').value+" "+document.getElementById('ville').value+" "+document.getElementById('cp').value+" France to: 21, rue de Lyon 29200 Brest France");
}
function itineraireload() {
alert('chargez');
}
function itineraireerreur() {
alert('');
}
// FIN DES FONCTIONS POUR L'API GOOGLE MAP
// DEBUT DES FONCTIONS D'AJAX
var req = createXMLHttpRequest();
function createXMLHttpRequest() {
var ua;
if(window.XMLHttpRequest) {
try {
ua = new XMLHttpRequest();
} catch(e) {
ua = false;
}
} else if(window.ActiveXObject) {
try {
ua = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
ua = false;
}
}
return ua;
}
function getDescro(id) {
req.open('get', './ajx/ajx_getdescro.php?id='+id);
req.onreadystatechange = getDescroRes;
req.send(null);
}
function getDescroRes() {
if(req.readyState == 4){
var response = req.responseText;
document.getElementById('AHdescription').innerHTML=response;
}
}
// FIN DES FONCTIONS D'AJAX