function EInsert(b,f,d,a,c){this.point=b;this.image=f;this.size=d;this.basezoom=a;this.zindex=c||0;var e=navigator.userAgent.toLowerCase();if((e.indexOf("msie")>-1)&&(e.indexOf("opera")<1)){this.ie=true}else{this.ie=false}this.hidden=false}EInsert.prototype=new GOverlay();EInsert.prototype.initialize=function(a){var b=document.createElement("div");b.style.position="absolute";b.style.zIndex=this.zindex;if(this.zindex<0){a.getPane(G_MAP_MAP_PANE).appendChild(b)}else{a.getPane(1).appendChild(b)}this.map_=a;this.div_=b};EInsert.prototype.makeDraggable=function(){this.dragZoom_=this.map_.getZoom();this.dragObject=new GDraggableObject(this.div_);this.dragObject.parent=this;GEvent.addListener(this.dragObject,"dragstart",function(){this.parent.left=this.left;this.parent.top=this.top});GEvent.addListener(this.dragObject,"dragend",function(){var b=this.parent.map_.fromLatLngToDivPixel(this.parent.point);var a=new GPoint(b.x+this.left-this.parent.left,b.y+this.top-this.parent.top);this.parent.point=this.parent.map_.fromDivPixelToLatLng(a);this.parent.redraw(true);GEvent.trigger(this.parent,"dragend",this.parent.point)})};EInsert.prototype.remove=function(){this.div_.parentNode.removeChild(this.div_)};EInsert.prototype.copy=function(){return new EInsert(this.point,this.image,this.size,this.basezoom)};EInsert.prototype.redraw=function(d){if(d){var e=this.map_.fromLatLngToDivPixel(this.point);var g=this.map_.getZoom();var f=Math.pow(2,(g-this.basezoom));var c=this.size.height*f;var b=this.size.width*f;this.div_.style.left=(e.x-b/2)+"px";this.div_.style.top=(e.y-c/2)+"px";if(this.ie){var a="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.image+"', sizingMethod='scale');";this.div_.innerHTML='<div style="height:'+c+"px; width:"+b+"px; "+a+'" ></div>'}else{this.div_.innerHTML='<img src="'+this.image+'"  width='+b+" height="+c+" >"}if(this.dragObject){if(g!=this.dragZoom_){this.dragObject.disable()}}}};EInsert.prototype.show=function(){this.div_.style.display="";this.hidden=false};EInsert.prototype.hide=function(){this.div_.style.display="none";this.hidden=true};EInsert.prototype.getPoint=function(){return this.point};EInsert.prototype.supportsHide=function(){return true};EInsert.prototype.isHidden=function(){return this.hidden};EInsert.prototype.setPoint=function(b){this.point=b;this.redraw(true)};EInsert.prototype.setImage=function(b){this.image=b;this.redraw(true)};EInsert.prototype.setZindex=function(b){this.div_.style.zIndex=b};EInsert.prototype.setSize=function(b){this.size=b;this.redraw(true)};EInsert.groundOverlay=function(b,a,i,f,h){var f=f||G_NORMAL_MAP.getProjection();var h=h||17;var j=f.fromLatLngToPixel(a.getSouthWest(),h);var e=f.fromLatLngToPixel(a.getNorthEast(),h);var d=new GPoint((j.x+e.x)/2,(j.y+e.y)/2);var g=f.fromPixelToLatLng(d,h);var k=new GSize(e.x-j.x,j.y-e.y);return new EInsert(g,b,k,h,i)};