(function(){function g(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else a.x&&(b+=a.x);return b}function h(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else a.y&&(b+=a.y);return b}function f(a){var b=a.globals.elementId.replace("#","");this.root=document.getElementById(b);this.root.innerHTML="";b=Raphael(b,a.globals.width,a.globals.height);this.shadow=b.image(a.globals.shadow,a.globals.shadowSize.left,
a.globals.shadowSize.top,a.globals.shadowSize.width,a.globals.shadowSize.height);this.state=b.path(a.globals.shape);this.state.attr({fill:a.globals.color,"stroke-width":a.globals.strokeWidth});for(var d=this,c=0;c<a.regions.length;c++){b.text(a.regions[c].textPos.x,a.regions[c].textPos.y,a.regions[c].inner).attr({"font-family":a.globals.fontFamily,"font-size":parseInt(a.globals.fontSize)});var e={},e=b.path(a.regions[c].shape);e.attr({fill:a.regions[c].color,"fill-opacity":0,stroke:a.globals.stroke,
"stroke-width":a.globals.strokeWidth,cursor:"pointer"});var f=a.regions[c].label,i=a.regions[c].url;(function(){var a=f,b=i;e.mousemove(function(a){if(a.pageX==null&&a.clientX!=null){var b=document.documentElement,c=document.body;a.pageX=a.clientX+(b&&b.scrollLeft||c.scrollLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||c.scrollTop||0)}b=a.pageX-g(d.root)-parseInt(d.label.style.width)/2;a=a.pageY-h(d.root)-parseInt(d.label.style.height)-8;Raphael.vml&&(b-=5);d.label.style.left=b+"px";d.label.style.top=
a+"px"});e.mouseover(function(b){if(b.pageX==null&&b.clientX!=null){var c=document.documentElement,e=document.body;b.pageX=b.clientX+(c&&c.scrollLeft||e.scrollLeft||0);b.pageY=b.clientY+(c&&c.scrollTop||e.scrollTop||0)}c=b.pageX-g(d.root)-parseInt(d.label.style.width)/2;b=b.pageY-h(d.root)-parseInt(d.label.style.height)-8;Raphael.vml&&(c-=5);d.label.style.left=c+"px";d.label.style.top=b+"px";this.attr({"fill-opacity":1});d.label.style.display="block";d.label.innerHTML=a});e.mouseout(function(){this.attr({"fill-opacity":0});
d.label.style.display="none"});e.click(function(){window.location.href=b})})()}this.label=document.createElement("div");this.label.style.position="absolute";this.label.style.top="80px";this.label.style.left=0;this.label.style.fontFamily=a.globals.fontFamily;this.label.style.fontSize=a.globals.fontSize;this.label.style.border="1px solid white";this.label.style.width="100px";this.label.style.height="18px";this.label.style.lineHeight="18px";this.label.style.textAlign="center";Raphael.vml?(this.label.style.background=
"rgb(230, 230, 230)",this.label.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=70)"):this.label.style.background="rgba(230, 230, 230, 0.5)";this.label.style.display="none";this.label.innerHTML="";this.root.style.position="relative";this.root.appendChild(this.label)}f.prototype={label:null,root:null,shadow:null,state:null};window.InitMap=function(){new f(map)}})(window);
