text: if(typeof(usig)=="undefined"){usig={}}if(typeof(usig.debug)=="undefined"){usig.debug=function(a){if(window.console&&window.console.log){window.console.log(a)}}}if(typeof(usig.isExtent)=="undefined"){usig.isExtent=function(a){return !isNaN(parseFloat(a.minx))&&!isNaN(parseFloat(a.miny))&&!isNaN(parseFloat(a.maxx))&&!isNaN(parseFloat(a.maxy))}}usig.MapaReferencia=function(c,h,d){if(typeof(c.img)!="undefined"&&!isNaN(parseInt(c.w))&&!isNaN(parseInt(c.h))&&typeof(c.extent)!="undefined"&&usig.isExtent(c.extent)){var e=document.createElement("div");e.style.position="relative";e.style.width=c.w+"px";e.style.height=c.h+"px";e.style.background="white url("+c.img+") no-repeat 50% 50%";if(d.cls){e.className=d.cls}}else{if(d.debug){usig.debug("Parametros incorrectos: imagenMapa")}return}if(!isNaN(parseFloat(h.x))&&!isNaN(parseFloat(h.y))){var g=usig.MapaReferencia.defaults.markerSize;if(typeof(d.markerSize)!="undefined"&&!isNaN(parseInt(d.markerSize.w))&&!isNaN(parseInt(d.markerSize.h))){g=d.markerSize}var a=Math.floor((h.x-c.extent.minx)/((c.extent.maxx-c.extent.minx)/c.w))-Math.floor(g.w/2);var f=c.h-Math.floor((h.y-c.extent.miny)/((c.extent.maxy-c.extent.miny)/c.h))-Math.floor(g.h/2)}else{if(d.debug){usig.debug("Parametros incorrectos: pos")}return}var b=document.createElement("div");b.style.position="absolute";b.style.width=g.w+"px";b.style.height=g.h+"px";b.style.top=f+"px";b.style.left=a+"px";if(d.markerBorder){b.style.border=d.markerBorder}else{b.style.border=usig.MapaReferencia.defaults.markerBorder}if(d.markerCls){b.className=d.markerCls}e.appendChild(b);return e};usig.MapaReferencia.defaults={markerSize:{w:4,h:4},markerBorder:"1px solid red"};