var Map= Class.create(); Map.prototype = { initialize: function(id_div) { var that1=null; this.A0=null; this.A1=id_div; if ($('entete')) this.A111(); this.A2=null; this.A3=false; this.A4=200; this.A5=this.A85.bindAsEventListener(this); this.A6=this.A86.bindAsEventListener(this); this.A7=this.A87.bindAsEventListener(this); this.A8=this.A77.bindAsEventListener(this); this.A9=this.A110.bindAsEventListener(this); this.A10=null; this.A11=null; this.A12=null; this.A14=this.A13=0; this.A1=id_div; this.A15=new Array(); this.A16=0; this.A17=7; this.A19=this.A18=4; this.A20=2; this.A21=new Array(); this.A22=256; this.A23=256; this.A24=this.A99($(this.A1)).width; this.A25=this.A99($(this.A1)).height; this.A26=parseInt(this.A24/this.A23); this.A27=parseInt(this.A25/this.A22); this.A29=this.A28=0; this.A31=this.A30=0; this.A33=this.A32=0; this.A35=this.A34=0; this.A36=256; this.A37=256; this.A38=new Array(); this.A39=new Array(); this.A40=new Array(); this.A41=new Array(); this.A42=new Array(); this.A43=new Array(); this.A38[0]=3; this.A39[0]=2; this.A44=6.33024010658267; this.A45=7.14387383460997; this.A46=36.0626602172852; this.A47=36.6050827026367; this.A48=this.A45-this.A44;this.A49=this.A47-this.A46;this.A51=this.A50=6.609496311657138; this.A53=this.A52=36.36194606125355; this.A40[0]=this.A48/this.A38[0]; this.A41[0]=this.A49/this.A39[0]; this.A42[0]=this.A40[0]/this.A23;for(var i=1;i<=this.A17;i++) { this.A38[i]=Math.ceil(this.A38[i-1]*this.A20); this.A39[i]=Math.ceil(this.A39[i-1]*this.A20); this.A40[i]=(this.A45-this.A44)/this.A38[i]; this.A41[i]=(this.A47-this.A46)/this.A39[i]; this.A42[i]=this.A48/(this.A38[i]*this.A23); } this.A54="carte_contenaire"; this.A55="image_plan"; this.A56="image_satellite"; this.A57=true; this.A58=false; this.A59="DivSearch"; this.A60="carte_contenaire"; var carte_container = '<div id ="'+this.A54+'" style="position:absolute;background-color:#e9e9e9;"></div>'; var image_container = '<div id ="'+this.A55+'" style="position:absolute; z-index:20;" ></div>'; var image_satellite = '<div id ="'+this.A56+'" style="position:absolute;z-index:10; " ></div>'; var div_selection='<div id="div_selection"' +'style="position:absolute;' +'top:10px;right:10px;' +'z-index:100;">' +'<input type="button" id="boutton_plan" value="plan" />' +'<input type="button" id="boutton_satellite" value="satellite"/>' +'<input type="button" id="boutton_mixte" value="mixte"/>' +'</div>'; new Insertion.Bottom($(this.A1),div_selection); $('boutton_plan').disable(); new Insertion.Bottom($(this.A1),carte_container); new Insertion.Bottom($(this.A54),image_container); new Insertion.Bottom($(this.A54),image_satellite); $(this.A55).style.width=$(this.A54).style.width=this.A38[this.A17]*this.A23+'px'; $(this.A55).style.height=$(this.A54).style.height=this.A39[this.A17]*this.A22+'px'; this.A61=this.A68.bindAsEventListener(this); this.A62=this.A69.bindAsEventListener(this); this.A63=this.A70.bindAsEventListener(this); $(this.A1).oncontextmenu = this.A67;Event.observe($("boutton_satellite"),'click',this.A66.bindAsEventListener(this)); Event.observe($("boutton_mixte"),'click',this.A66.bindAsEventListener(this)); Event.observe($("boutton_satellite"),'mouseout',this.A65.bindAsEventListener(this)); Event.observe($("boutton_mixte"),'mouseout',this.A65.bindAsEventListener(this)); }, A65:function() { $('Infos').update(""); $('Infos').hide(); }, A66:function() { $('Infos').update("Bientôt ..."); $('Infos').show(); }, A67:function() { return(false); }, A68:function(){ this.A57=true; this.A58=false; $(this.A55).show(); $(this.A56).hide(); if(this.A11!=null && this.A11.A4){ $(this.A11.A45).show(); $(this.A11.A46).hide(); } this.A82(this.A19,this.A51,this.A53); }, A69:function(){ this.A57=false; this.A58=true; $(this.A55).hide(); $(this.A56).show(); if(this.A11!=null && this.A11.A4){ $(this.A11.A45).hide(); $(this.A11.A46).show(); } this.A82(this.A19,3.18482478,36.716277115); }, A70:function(){ this.A57=true; this.A58=true; $(this.A55).show(); $(this.A56).show(); if(this.A11!=null && this.A11.A4){ $(this.A11.A45).show(); $(this.A11.A46).show(); } this.A82(this.A19,3.18482478,36.716277115); }, A71:function(){ return (this.A19); }, A72:function(zoom){ this.A19=zoom; }, A73:function() { var aff_extent=new Array(); aff_extent[0]=this.A51-this.A42[this.A19]*this.A24/2; aff_extent[1]=this.A53-this.A42[this.A19]*this.A25/2; aff_extent[2]=this.A51+this.A42[this.A19]*this.A24/2; aff_extent[3]=this.A53+this.A42[this.A19]*this.A25/2; return aff_extent; }, A74:function(newCenterX,newCenterY) { this.A75(newCenterX,newCenterY,newCenterX+1,newCenterY); this.A75(newCenterX+1,newCenterY-1,newCenterX+1,newCenterY-1); this.A75(newCenterX-1,newCenterY-1,newCenterX,newCenterY-1); this.A75(newCenterX-1,newCenterY,newCenterX-1,newCenterY); this.A75(newCenterX-1,newCenterY+1,newCenterX+1,newCenterY+1); var xx=1; this.min_img_x=this.max_img_x=newCenterX; var nbre_x=parseInt(this.A26/2); while (xx<=nbre_x) { this.min_img_x=newCenterX-1-xx; this.max_img_x=newCenterX+1+xx; this.A75(this.max_img_x,newCenterY-1,this.max_img_x,newCenterY+1); this.A75(this.min_img_x,newCenterY-1,this.min_img_x,newCenterY+1); xx++; } if(this.A26%2==1) { if(this.A28==1) { this.max_img_x=newCenterX+1+xx; this.A75(this.max_img_x,newCenterY-1,this.max_img_x,newCenterY+1); } else { this.min_img_x=newCenterX-1-xx; this.A75(this.min_img_x,newCenterY-1,this.min_img_x,newCenterY+1); } } var yy=1; this.min_img_y=newCenterY-1; this.max_img_y=newCenterY+1; var nbre_y=parseInt(this.A27/2); while (yy<=nbre_y) { this.min_img_y=newCenterY-1-yy; this.max_img_y=newCenterY+1+yy; this.A75(this.min_img_x,this.min_img_y,this.max_img_x,this.min_img_y); this.A75(this.min_img_x,this.max_img_y,this.max_img_x,this.max_img_y); yy++; } if(this.A27%2==1) { if(this.A29==4) { this.min_img_y=newCenterY-1-yy; this.A75(this.min_img_x,this.min_img_y,this.max_img_x,this.min_img_y); } else { this.max_img_y=newCenterY+1+yy; this.A75(this.min_img_x,this.max_img_y,this.max_img_x,this.max_img_y); } } }, A75:function (i_debut,j_debut,i_fin,j_fin) { for(var i=i_debut;i<=i_fin;i++) for(var j=j_debut;j<=j_fin;j++) { if (this.A57){ if(!$('plan_'+i+'_'+j)) { var html ='<img id="plan_'+i+'_'+j+'" onerror="this.src=\'images/erreur.png\';" ' +'src="plan.php?x='+i+'&y='+j +'&zoom='+(this.A19)+'"' +'width="'+this.A23+'"' +'height="'+this.A22+'"' +'style="position: absolute;' +'left:'+((i)*this.A23)+'px;' +'top:'+((this.A39[this.A17]-j-1)*this.A22)+'px;' +'"' +'/>'; new Insertion.Bottom($(this.A55),html); } else { $('plan_'+i+'_'+j).src='plan.php?x='+i+'&y='+j +'&zoom='+this.A19;} } if (this.A58){ if(!$('satellite_'+i+'_'+j)) { var html ='<img id="satellite_'+i+'_'+j+'" onerror="this.src=\'images/erreur.png\';"' +'src="satellite.py?x='+i+'&y='+j +'&zoom='+(this.A19)+'&stepX='+this.A40[this.A19]+'&stepY='+this.A41[this.A19]+'"' +'width="'+this.A23+'"' +'height="'+this.A22+'"' +'style="position: absolute;' +'left:'+((i)*this.A23)+'px;' +'top:'+((this.A39[this.A17]-j-1)*this.A22)+'px;' +'"' +'/>'; new Insertion.Bottom($(this.A56),html); } else { $('satellite_'+i+'_'+j).src='satellite.py?x='+i+'&y='+j +'&zoom='+this.A19+'&stepX='+this.A40[this.A19]+'&stepY='+this.A41[this.A19]; } } } }, A76:function(extX,extY) { var dX=extX-this.A44;var dY=extY-this.A46;var coord=new Array(); coord[0]=parseInt(dX/this.A40[this.A19]); coord[1]=parseInt(dY/this.A41[this.A19]); var difhorizontal=dX%this.A40[this.A19]; var difvertical=dY%this.A41[this.A19]; if (difhorizontal<this.A40[this.A19]/2) this.A28=0; else this.A28=1; if( difvertical<this.A41[this.A19]/2) this.A29=4; else this.A29=7; return coord; }, A77:function (evt) { var IE=Event.element(evt).up('div', 0).id; var FF=Event.element(evt).id; var iconeactive=$('toolBar_tool').getElementsByClassName('iconeActive').length; if ((IE==this.A55|| FF==this.A59)&&(iconeactive==0)) { var x = Event.pointerX(evt)-Position.page($(this.A1))[0]-Position.realOffset($(this.A1))[0]; var y = Event.pointerY(evt)-Position.page($(this.A1))[1]-Position.realOffset($(this.A1))[1]; var new_extent=this.A78(x,y); new_zoom=this.A19+1; this.A82(new_zoom,new_extent[0],new_extent[1]); } }, A78:function(pixelX,pixelY){ var new_ext=new Array(); new_ext[0]=this.A51-((this.A24/2-pixelX)*this.A42[this.A19]); new_ext[1]=this.A53+((this.A25/2-pixelY)*this.A42[this.A19]); return(new_ext) }, A79:function(ext){ var pos=new Array; var ext_aff=this.A73(); pos[0]=(ext[0]-ext_aff[0])/this.A42[this.A19]; pos[1]=(ext_aff[3]-ext[1])/this.A42[this.A19]; return pos; }, A80:function(){ var new_zoom=this.A19+1; this.A82(new_zoom,this.A51,this.A53); }, A81:function(){ var new_zoom=this.A19-1; this.A82(new_zoom,this.A51,this.A53)}, A82:function (zoomLevel,pointx,pointy) { if ((zoomLevel>=this.A16)&&(zoomLevel<=this.A17)) { var dif_viewx=this.A51-pointx; var dif_viewy=this.A53-pointy; this.A72(zoomLevel); var min_pointx=this.A44+this.A42[zoomLevel]*this.A99(this.A1).width/2; var max_pointx=this.A45-this.A42[zoomLevel]*this.A99(this.A1).width/2; if (pointx>max_pointx) { dif_viewx=pointx-max_pointx; pointx=max_pointx; } else if (pointx<min_pointx) { dif_viewx=pointx-min_pointx; pointx=min_pointx; } var min_pointy=this.A46+this.A42[zoomLevel]*this.A99(this.A1).height/2; var max_pointy=this.A47-this.A42[zoomLevel]*this.A99(this.A1).height/2; if (pointy>max_pointy) { dif_viewy=pointy-max_pointy; pointy=max_pointy; } else if (pointy<min_pointy) { dif_viewy=pointy-min_pointy; pointy=min_pointy; } this.stop_panx=this.stop_pany=0; var taille_x=this.A38[this.A19]*this.A23;var taille_y=this.A39[this.A19]*this.A22;if(taille_x <this.A99(this.A1).width) { this.stop_panx=1; dif_viewx+=pointx-(this.A44+this.A45)/2; pointx=(this.A44+this.A45)/2; } if(taille_y <this.A99(this.A1).height) { this.stop_pany=1; dif_viewy+=pointy-(this.A46+this.A47)/2; pointy=(this.A46+this.A47)/2; } this.A43=this.A76(pointx,pointy); this.A51=pointx; this.A53=pointy; this.A90(pointx,pointy); this.A109(); if(this.A11!=null && this.A11.A4)this.A11.A61(); if (zoomLevel!=this.A18)this.A83(this.min_img_x,this.max_img_x,this.min_img_y,this.max_img_y); this.A74(this.A43[0],this.A43[1]); if(this.A10!=null) this.A10.A15(this.A10.A10-(zoomLevel)*this.A10.A9); if(this.A12!=null) { var deplpixelx=dif_viewx/this.A42[this.A19]; var deplpixely=dif_viewy/this.A42[this.A19]; this.A12.A60(this.A19,deplpixelx,deplpixely); } if ($('urlText')){ $('urlText').value=$('serverName').value+'/?z='+this.A19+'&x='+this.A51+'&y='+this.A53;$('urlText').select(); } if (this.A2)this.A2.A25(); } }, A83:function(min_img_x,max_img_x,min_img_y,max_img_y){ for(var k=min_img_x;k<=max_img_x;k++) for(var l=min_img_y;l<=max_img_y;l++) { if($('plan_'+k+'_'+l)) $('plan_'+k+'_'+l).src="images/transparent.png"; if($('satellite_'+k+'_'+l)) $('satellite_'+k+'_'+l).src="images/transparent.png"; } }, A84:function (pointx,pointy) { this.A43=this.A76(pointx,pointy); var difx=this.A51-pointx; var dify=this.A53-pointy; this.A51=pointx; this.A53=pointy; this.A90(pointx,pointy); this.A74(this.A43[0],this.A43[1]); this.A11.A61(); if(this.A12){ var deplx=difx/this.A42[this.A19]; var deply=-dify/this.A42[this.A19]; this.A12.A66(deplx,deply); } }, A85:function(evt) { this.A3=false; this.A35=this.A34=0; this.A31=Event.pointerX(evt); this.A30=Event.pointerY(evt); Event.stop(evt); Event.observe($(this.A1),'mousemove',this.A6); Event.observe(document,'mouseup',this.A7); this.A91(); this.A13=this.min_removex=this.max_removex=this.A43[0]; this.A14=this.min_removey=this.max_removey=this.A43[1]; this.A33=parseFloat(this.A100($(this.A54)).left); this.A32=parseFloat(this.A100($(this.A54)).top); if(this.A11!=null && this.A11.A4){ this.A11.min_x = this.A100($(this.A11.A47)).left; this.A11.min_y = this.A100($(this.A11.A47)).top; } }, A86:function(evt) { this.A3=true; if(!this.stop_panx) { this.A35=(Event.pointerX(evt)-this.A31); if (this.A35>0 && this.A15[0] <Math.abs(this.A35)) this.A35=Math.ceil(this.A15[0]); if (this.A35<0 && this.A15[2] <Math.abs(this.A35)) this.A35=-Math.ceil(this.A15[2]); } if(!this.stop_pany) { this.A34=(Event.pointerY(evt)-this.A30); if (this.A34<0 && this.A15[1] <Math.abs(this.A34)) this.A34=-Math.ceil(this.A15[1]); if (this.A34>0 && this.A15[3] <Math.abs(this.A34)) this.A34=Math.ceil(this.A15[3]); } $(this.A54).style.left=(this.A33+this.A35)+'px'; $(this.A54).style.top= (this.A32+this.A34)+'px'; var extX=this.A51-this.A35*this.A42[this.A19]; var extY=this.A53+this.A34*this.A42[this.A19]; var coord_pan=this.A76(extX,extY); if(coord_pan[0]!=this.A13|| coord_pan[1]!=this.A14){ this.A74(coord_pan[0],coord_pan[1]); this.A13=coord_pan[0]; this.A14=coord_pan[1]; if(this.min_img_x<this.min_removex)this.min_removex=this.min_img_x; if(this.max_img_x>this.max_removex)this.max_removex=this.max_img_x; if(this.min_img_y<this.min_removey)this.min_removey=this.min_img_y; if(this.max_img_y>this.max_removey)this.max_removey=this.max_img_y; } if(this.A11!=null && this.A11.A4){ this.A11.A26=-this.A35*this.A11.A76(this.A11.A47).width/this.A99(this.A1).width; this.A11.A25=-this.A34*this.A11.A76(this.A11.A47).height/this.A99(this.A1).height; this.A11.A64(this.A11.min_x,this.A11.min_y); } Event.stop(evt); }, A87:function() { this.A3=false; Event.stopObserving($(this.A1),'mousemove',this.A6); Event.stopObserving(document,'mouseup',this.A7); if (this.A35!=0 || this.A34!=0) { this.A51-=this.A35*this.A42[this.A19]; this.A53+=this.A34*this.A42[this.A19]; this.A43=this.A76(this.A51,this.A53); if(this.A12!=null) this.A12.A66(this.A35,this.A34); if(this.A11!=null && this.A11.A4)this.A11.A61(); if ($('urlText')){ $('urlText').value=$('serverName').value+'/?z='+this.A19+'&x='+this.A51+'&y='+this.A53;$('urlText').select(); } } }, A88:function(deplx,deply){ this.depl_slidex=deplx; this.depl_slidey=deply; this.A91(); if (this.A15[0] < deplx) this.depl_slidex= this.A15[0]; else if (this.A15[2] < Math.abs(deplx)) this.depl_slidex=-Math.ceil(this.A15[2]); if (this.A15[3] < deply) this.depl_slidey=this.A15[3]; else if (this.A15[1] < Math.abs(deply)) this.depl_slidey= -Math.ceil(this.A15[1]); var dis_extx=this.depl_slidex*this.A42[this.A19]; var dis_exty=this.depl_slidey*this.A42[this.A19]; this.A51=this.A51-dis_extx; this.A53=this.A53+dis_exty; this.pas_slide=2; that1=this; this.slide_id = setInterval ("that1.A89()",20); },A89:function() { var fin_slide=false; var left = Position.positionedOffset($(this.A54))[0]; var top = Position.positionedOffset($(this.A54))[1]; if (this.depl_slidex>this.pas_slide) { this.depl_slidex-=this.pas_slide; $(this.A54).style.left =(left+this.pas_slide)+'px'; } else if (this.depl_slidex<0) { this.depl_slidex+=this.pas_slide; $(this.A54).style.left =(left-this.pas_slide)+'px'; } else fin_slide=true; if (this.depl_slidey>this.pas_slide) { this.depl_slidey-=this.pas_slide; $(this.A54).style.top =(top+this.pas_slide)+'px'; } else if (this.depl_slidey<0) { this.depl_slidey+=this.pas_slide; $(this.A54).style.top =(top-this.pas_slide)+'px'; } else if (fin_slide) { clearInterval(this.slide_id); this.A43=this.A76(this.A51,this.A53); this.A74(this.A43[0],this.A43[1]); } }, A90:function(extX,extY) { var extaff=this.A73(); var dif1=extaff[2]-extaff[0]; var dif2=extaff[0]-this.A44;var pos_x=-this.A24*dif2/dif1; dif1=extaff[3]-extaff[1]; dif2=extaff[1]-this.A46;var pos_y=this.A25*dif2/dif1; pos_y+=this.A25;pos_y=-(this.A99($(this.A54)).height-pos_y); $(this.A54).setStyle({left: pos_x+"px",top:pos_y+"px"}); }, A91:function() { this.A15[0]=(this.A51-this.A44)/this.A42[this.A19]-this.A24/2; this.A15[1]=(this.A53-this.A46)/this.A42[this.A19]-this.A25/2; this.A15[2]=(this.A45-this.A51)/this.A42[this.A19]-this.A24/2; this.A15[3]=(this.A47-this.A53)/this.A42[this.A19]-this.A25/2; }, A92:function(deplx,deply,i,j){ this.A91(); var deplacementx=deplx; var deplacementy=deply; if(i==0)if (this.A15[i] <Math.abs(deplx)) deplacementx= Math.ceil(this.A15[i]); if(i==2)if (this.A15[i] <Math.abs(deplx)) deplacementx=-Math.ceil(this.A15[i]); if(j==1)if (this.A15[j] < Math.abs(deply)) deplacementy=-Math.ceil(this.A15[j]); if(j==3)if (this.A15[j] < Math.abs(deply)) deplacementy= Math.ceil(this.A15[j]); var left=this.A100($(this.A54)).left; var top=this.A100($(this.A54)).top; $(this.A54).style.left=(left+deplacementx)+'px'; $(this.A54).style.top=(top+deplacementy)+'px'; var dis_extx=deplacementx*this.A42[this.A19]; var dis_exty=deplacementy*this.A42[this.A19]; this.A51=this.A51-dis_extx; this.A53=this.A53+dis_exty; if(this.A12!=null) this.A12.A66(deplacementx,deplacementy); if(this.A11!=null && this.A11.A4)this.A11.A61(); }, A93:function (direction) { switch (direction) { case 'left': { this.A92(this.A36,0,0,5); } break; case 'right': { this.A92(-this.A36,0,2,5); } break; case 'down': { this.A92(0,-this.A37,5,1); } break; case 'up': { this.A92(0,this.A37,5,3); } break; default:break; } this.A43=this.A76(this.A51,this.A53); this.A94(direction); }, A94:function(direction){ if (direction=='left'){ this.min_img_x--; this.A75(this.min_img_x,this.min_img_y,this.min_img_x,this.max_img_y); this.A95(this.max_img_x,this.min_img_y,this.max_img_x,this.max_img_y); this.max_img_x--; } if (direction=='right'){ this.max_img_x++; this.A75(this.max_img_x,this.min_img_y,this.max_img_x,this.max_img_y); this.A95(this.min_img_x,this.min_img_y,this.min_img_x,this.max_img_y); this.min_img_x++; } if (direction=='up'){ this.max_img_y++; this.A75(this.min_img_x,this.max_img_y,this.max_img_x,this.max_img_y); this.A95(this.min_img_x,this.min_img_y,this.max_img_x,this.min_img_y); this.min_img_y++; } if (direction=='down'){ this.min_img_y--; this.A75(this.min_img_x,this.min_img_y,this.max_img_x,this.min_img_y); this.A95(this.min_img_x,this.max_img_y,this.max_img_x,this.max_img_y); this.max_img_y--; } }, A95:function (i_debut,j_debut,i_fin,j_fin) { for(var i=i_debut;i<=i_fin;i++) for(var j=j_debut;j<=j_fin;j++) { if($('plan_'+i+'_'+j)) $('plan_'+i+'_'+j).src="images/transparent.png"; if($('satellite_'+i+'_'+j)) $('satellite_'+i+'_'+j).src="images/transparent.png"; } }, A96:function(){ for(var k=this.min_removex;k<=this.max_removex;k++) for(var l=this.min_removey;l<=this.max_removey;l++) { if (!(k>=this.min_img_x && k<=this.max_img_x && l>=this.min_img_y && l<=this.max_img_y) ) { if($('plan_'+k+'_'+l)) $('plan_'+k+'_'+l).src="images/transparent.png"; if($('satellite_'+k+'_'+l)) $('satellite_'+k+'_'+l).src="images/transparent.png"; } } }, A97:function(l,t,div) { $(div).setStyle({left:l+'px',top:t+'px'}); }, A98:function(w,h,div) { $(div).setStyle({height:h+'px',width:w+'px'}); }, A99:function(div) { var dimension = $(div).getDimensions(); return(dimension); }, A100:function(div) { var position={}; position.left = Position.positionedOffset($(div))[0]; position.top = Position.positionedOffset($(div))[1]; return(position); }, A101:function(refe){ this.A11=refe; }, A102:function(nav){ this.A10=nav; this.A17=nav.nbre_bar-1; }, A103:function(){ this.A82(this.A18,this.A50,this.A52); if(this.A11!=null && this.A11.A4)this.A11.A61(); }, A104:function(minextx,minexty,maxextx,maxexty){ var new_zoom=this.A105(minextx,minexty,maxextx,maxexty); var extx=minextx+(maxextx-minextx)/2; var exty=minexty+(maxexty-minexty)/2; this.A82(new_zoom,extx,exty); }, A105:function(minExtX,minExtY,maxExtX,maxExtY) { var difX=maxExtX-minExtX; var difY=maxExtY-minExtY; for(var i=0;i<=this.A17;i++) { var diffVisibleExtX=this.A42[i]*this.A24;var diffVisibleExtY=this.A42[i]*this.A25;if((diffVisibleExtX<difX)||(diffVisibleExtY<difY)) if (i==0) return i; else return (i-1); } return (this.A17); }, A106: function() { return parseFloat(this.A42[this.A19]); }, A107: function () { var uni; if (this.A19<4) uni="km"; else uni="m"; return uni; }, A108: function (pos) { var new_ext=new Array(); new_ext[0]= pos[0]-parseFloat($(this.A54).getStyle('left')); new_ext[1]= pos[1]-parseFloat($(this.A54).getStyle('top')); return new_ext; }, A109: function () { var ScaleMeter1= parseInt(this.A106()*this.A4*4374754/39.3701); var u=''; if (ScaleMeter1%10>0 && ScaleMeter1>10 ) ScaleMeter2=ScaleMeter1-(ScaleMeter1%10); else {ScaleMeter2=ScaleMeter1} if (ScaleMeter2<1000){ ScalePixel= parseInt(ScaleMeter2*this.A4/ScaleMeter1); u='m'; } else { ScaleMeter2=Math.round(ScaleMeter2/1000); ScalePixel= parseInt((ScaleMeter2*1000)*this.A4/ScaleMeter1); u='km'; } if ((ScalePixel%2)!=0) ScalePixel+=1; $("scale").setStyle({width: ScalePixel+"px"}); $("unit").update(ScaleMeter2+" "+u); $("unit").setStyle({left: ($("scale").getWidth()-$("unit").getWidth())/2+"px"}); }, A110:function() { this.A111(); this.A24=this.A99($(this.A1)).width; this.A25=this.A99($(this.A1)).height; this.A26=parseInt(this.A24/this.A23); this.A27=parseInt(this.A25/this.A22); this.A82(this.A19,this.A51,this.A53); if(this.A11!=null && this.A11.A4)this.A11.A61(); }, A111: function() { var h=document.viewport.getHeight(); var min_height=380; if (h <min_height) h=min_height; $(this.A1).up().setStyle({height:h+"px"}); var height_carte=h-$("entete").getHeight(); $(this.A1).setStyle({height:height_carte+"px"}); var copyright_left=$(this.A1).getWidth()/2-$("copyright").getWidth()/2; $('copyright').setStyle({left:copyright_left+"px"}); if ($("menu"))$("menu").setStyle({height:height_carte+"px"}); }, A112:function(id) { this.A0=new Popup(id,this); }, A113:function() { Event.observe($(this.A1),'mousedown',this.A5); Event.observe($(this.A1),'dblclick',this.A8); Event.observe(window,'resize',this.A9); } }; 
