var Popup= Class.create(); Popup.prototype = { initialize: function(id,map) { this.A0=map; this.A1=null; this.A2=id; this.A3=null; this.A4=null; this.A5=25; this.A6=10; this.A7=this.A12.bindAsEventListener(this); this.A8=this.A11.bindAsEventListener(this); Event.observe($('closePopup'),"click",this.A8); }, A10: function(marker){ this.A3=marker; var pos=new Array(); this.A1=this.A3.A4;pos= this.A0.A79(this.A1); var larg = parseFloat($(this.A0.A1).getWidth()/2); var haut = parseFloat($(this.A0.A1).getHeight()/2); var left,top; if (this.A4)$("corner").removeClassName(this.A4); if (pos[0]>=larg && pos[1]<=haut) { left = pos[0]-$(this.A2).getWidth()+this.A6;top = pos[1]; this.A4="corner-tr"; } else if ((pos[0]>=larg) && (pos[1]>=haut)) { left = pos[0]-$(this.A2).getWidth()+this.A6;top = pos[1]-$(this.A2).getHeight()-this.A5;this.A4="corner-br"; } else if ((pos[0]<=larg) && (pos[1]<=haut)) { left = pos[0]-this.A6;top = pos[1]; this.A4="corner-tl"; } else if ((pos[0]<=larg) && (pos[1]>=haut)) { left= pos[0]-this.A6;top=(pos[1]-$(this.A2).getHeight())-this.A5;this.A4="corner-bl"; } $("corner").writeAttribute("style",""); $(this.A2).style.left= left+"px"; $(this.A2).style.top=top+"px"; $(this.A2).show(); $("corner").addClassName(this.A4); }, A11: function(){ $(this.A2).hide(); }, A12: function(){ $(this.A2).show(); }, A13: function(Marker){ this.A3=Marker; var html=''; html='<table border="0" cellspacing="0" width="100%">'+ '<tr>'+ '<td colspan="2" class="nom" style="text-align:center;font-weight:bold;font-size:10px;color:blue" >'+this.A3.A2.name+'</td>'+ '</tr>'+ '<tr>'+ '<td>Adresse:</td>'+ '<td class="adresse">'+this.A3.A2.adresse+'</td>'+ '</tr>'+ '<tr>'+ '<td>T&eacute;l:</td>'+ '<td class="tel">'+this.A3.A2.tel+'</td>'+ '</tr>'+ '<tr>'+ '<td>Fax:</td>'+ '<td class="tel">'+this.A3.A2.fax+'</td>'+ '</tr>'+ '<tr>'+ '<td>Mail:</td>'+ '<td class="mailPopup"><a href="mailto:'+this.A3.A2.mail+'">'+this.A3.A2.mail+'</a></td>'+ '</tr>'+ '<tr>'+ '<td>Site Web: </td>'+ '<td class="siteWebPopup"><a href="http://'+this.A3.A2.site+'" target="_blank">'+this.A3.A2.site+'</a></td>'+ '</tr>'+ '</table>'; $("Popup-body").update(html); } } 
