
var PMmarkerExtList=[];function PMmarkerAddToExtList(_1){PMmarkerExtList.push(_1);}
function PMmarkerRemoveFromExtList(id){for(var i=0;i<PMmarkerExtList.length;i++){if(PMmarkerExtList[i].internalId==id){PMmarkerExtList.splice(i,1);}}}
function PMmarkerFindInExtList(id){for(var i=0;i<PMmarkerExtList.length;i++){if(PMmarkerExtList[i].internalId==id){return PMmarkerExtList[i];}}}
function PMmarkerClose(id){windowOpen=false;for(var i=0;i<PMmarkerExtList.length;i++){if(PMmarkerExtList[i].internalId==id){PMmarkerExtList[i].closeDetailWin();PMmarkerExtList.splice(i,1);}}}
function PMmarkerCloseOthers(id){windowOpen=false;for(var i=0;i<PMmarkerExtList.length;i++){if(PMmarkerExtList[i].internalId!=id){PMmarkerExtList[i].closeDetailWin();PMmarkerExtList.slice(i,i);}}}
function PMmarkerNamespace(){var _a=navigator.userAgent.toLowerCase();var n4=(document.layers);var n6=(document.getElementById&&!document.all);var ie=(document.all);var o6=(_a.indexOf("opera")!=-1);var _f=(_a.indexOf("safari")!=-1);var _10=(_a.indexOf("msie")!=-1)&&(_a.indexOf("opera")==-1);var _11=false;if(_10){_11=_a.substr(_a.indexOf("msie")+5,2)<7;}
var _12=10;var _13=true;function PMmarker(a,b,_16){this.inheritFrom=GMarker;this.inheritFrom(a,b);this.internalId=_12;_12+=1;this.orgImagePath=b.image;this.oldImagePath=b.image;this.mouseOutEnabled=true;this.setImageOn=true;this.detailOpen=false;this.baseColor=b.baseColor;this.id=null;}
PMmarker.prototype=new GMarker(new GLatLng(1,1));PMmarker.prototype.initialize=function(a){addMarkerToMapList(a,this);try{GMarker.prototype.initialize.call(this,a);this.isMarker=true;this.map=a;GEvent.bind(this,"mouseover",this,this.onMouseOver);GEvent.bind(this,"mouseout",this,this.onMouseOut);GEvent.bind(this.map,"zoomend",this,this.reZoom);}
catch(e){alert("initialize error: "+e);}};PMmarker.prototype.getId=function(){return this.internalId;};function addMarkerToMapList(map,_19){try{if(map.PMmarkers.length){}}
catch(e){map.PMmarkers=new Array();}
map.PMmarkers.push(_19);}
function removeMarkerFromMapList(map,_1b){var id=_1b.internalId;for(var i=0;i<map.PMmarkers.length;i++){if(map.PMmarkers[i].internalId==id){map.PMmarkers.splice(i,1);return;}}}
PMmarker.prototype.reZoom=function(){var _1e=false;if(this.tooltipObject){if(this.tooltipObject.style.display=="block"){setTTPosition(this);_1e=true;}}
if(this.detailObject){if(!_1e){setWinPosition(this);}
this.detailObject.style.top=this.winTop+"px";this.detailObject.style.left=this.winLeft+"px";}};PMmarker.prototype.setImage=function(a){GMarker.prototype.setImage.call(this,a);};PMmarker.prototype.restoreImage=function(){if(this.mouseOutEnabled&&this.setImageOn&&this.oldImagePath.length>0){this.setImage(this.oldImagePath);}};PMmarker.prototype.setHoverImage=function(a){this.hoverImage=a;};PMmarker.prototype.onMouseOver=function(){if(this.hoverImage){if(document.getElementById("prop_"+this.id)){document.getElementById("prop_"+this.id).style.backgroundColor="#f6f4cc";}
this.setImage(this.hoverImage);}
if(!this.detailOpen){this.showTooltip();}};PMmarker.prototype.onMouseOut=function(){if(this.hoverImage){if(document.getElementById("prop_"+this.id)){document.getElementById("prop_"+this.id).style.backgroundColor="#fff";}}
this.restoreImage();if(!this.detailOpen){if(this.mouseOutEnabled){this.hideTooltip();}}};PMmarker.prototype.setTooltip=function(a){var _22="markerTooltip";this.tooltipText="<div class=\""+_22+"\">"+a+"</div>";if(this.tooltipObject){this.tooltipObject.innerHTML=this.tooltipText;}};PMmarker.prototype.showTooltip=function(){if(this.tooltipText){if(!this.tooltipObject){initTooltip(this);}
setTTPosition(this);this.tooltipObject.style.visibility="visible";}};PMmarker.prototype.hideTooltip=function(){if(this.tooltipObject){this.tooltipObject.style.visibility="hidden";}};PMmarker.prototype.showDetailWin=function(_23,_24){PMmarkerCloseOthers(this.internalId);if(this.detailOpen){PMmarkerClose(this.internalId);return;}
if(this.detailOpen){this.closeDetailWin();return;}
this.hideTooltip();this.setMouseOutEnabled(false);var _25=_23+"<div class=\"markerDetailClose\"><a href=\"javascript:PMmarkerClose("+this.internalId+")\"><img src=\"/images/bubble/close.gif\" width=\"17\" height=\"17\"></a></div>";this.detailOpen=true;this.winWidth=200;this.winHeight=135;setWinPosition(this,_24);initDetailWin(this,this.winTop,this.winLeft,_25);PMmarkerAddToExtList(this);windowOpen=true;};PMmarker.prototype.closeDetailWin=function(){GEvent.trigger(PMwindow,"closeclick");this.detailOpen=false;if(this.detailObject){this.setMouseOutEnabled(true);this.onMouseOut();this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.detailObject);this.detailObject=null;}};PMmarker.prototype.deleteObjects=function(){if(this.tooltipObject){this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.tooltipObject);this.tooltipObject=null;}
if(this.detailObject){this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.detailObject);this.detailObject=null;}};PMmarker.prototype.remove=function(){removeMarkerFromMapList(this.map,this);PMmarkerRemoveFromExtList(this.getId());GMarker.prototype.remove.call(this);this.deleteObjects();};PMmarker.prototype.setMouseOutEnabled=function(a){this.mouseOutEnabled=a;};PMmarker.prototype.getMouseOutEnabled=function(){return this.mouseOutEnabled;};function setObjOpacity(_27,b){if(b<0){b=0;}
if(b>=100){b=100;}
var c=b/100;var d=document.getElementById(_27);if(d){if(typeof(d.style.filter)=="string"){d.style.filter="alpha(opacity:"+b+")";}
if(typeof(d.style.KHTMLOpacity)=="string"){d.style.KHTMLOpacity=c;}
if(typeof(d.style.MozOpacity)=="string"){d.style.MozOpacity=c;}
if(typeof(d.style.opacity)=="string"){d.style.opacity=c;}}}
function idToElemId(id){return"ttobj"+id;}
function initTooltip(_2c){_2c.objId=idToElemId(_2c.internalId);_2c.anchorLatLng=_2c.point;var b=document.createElement("span");_2c.tooltipObject=b;b.setAttribute("id",_2c.objId);b.innerHTML=_2c.tooltipText;var c=document.body;var d=document.getElementById("pmmarkerwork");if(d){c=d;}
c.appendChild(b);b.style.visibility="hidden";b.style.position="absolute";b.style.bottom="5px";b.style.left="5px";b.style.zIndex=1;var _30=document.getElementById(_2c.objId);_2c.ttWidth=_30.offsetWidth;_2c.ttHeight=_30.offsetHeight;c.removeChild(b);b.style.zIndex=600000;b.style.bottom="";b.style.left="";_2c.map.getPane(G_MAP_FLOAT_PANE).appendChild(b);}
function initDetailWin(_31,top,_33,_34){_31.objId=idToElemId(_31.internalId);_31.detailId="detail"+_31.internalId;var b=document.createElement("span");_31.detailObject=b;b.setAttribute("id",_31.objId);b.innerHTML=_34;var c=document.body;var d=document.getElementById("pmmarkerwork");if(d){c=d;}
c.appendChild(b);b.style.position="absolute";b.style.top=top+"px";b.style.left=_33+"px";_31.objId=idToElemId(_31.internalId);var _38=document.getElementById(_31.objId);_31.winWidth=_38.offsetWidth;_31.winHeight=_38.offsetHeight;b.style.display="block";c.removeChild(b);b.style.zIndex=600001;map=_31.map;map.getPane(G_MAP_FLOAT_PANE).appendChild(b);}
function latLongToPixel(map,_3a,_3b){return map.fromLatLngToDivPixel(_3a);}
function setTTPosition(_3c){var gap=5;var map=_3c.map;var pt=_3c.getPoint();var _40=latLongToPixel(map,pt,map.getZoom());var _41=_3c.getIcon();_40.y-=Math.floor(_41.iconAnchor.y/2);var _42=true;var _43=map.getBounds();var _44=_43.toSpan();var _45=_44.lng();var _46=map.getSize().width;var _47=(_3c.ttWidth+_41.iconSize.width+6)/_46*_45;if(pt.lng()+_47>_43.getNorthEast().lng()){_42=false;}
if(_42){_40.y-=Math.floor(_3c.ttHeight/2);_40.x+=(_41.iconSize.width-_41.iconAnchor.x)+gap;}else{_40.y-=Math.floor(_3c.ttHeight/2);_40.x-=(_41.iconAnchor.x+_3c.ttWidth)+gap;}
if(_3c.tooltipObject){_3c.tooltipObject.style.left=_40.x+"px";_3c.tooltipObject.style.top=_40.y+"px";}}
function setWinPosition(_48,_49){var map=_48.map;var pt=_48.getPoint();var _4c=latLongToPixel(map,pt,map.getZoom());var _4d=_48.getIcon();_4c.y-=Math.floor(_4d.iconAnchor.y/2);_4c.x-=Math.floor(_4d.iconAnchor.x/2);_48.winLeft=_4c.x-83;_48.winTop=_4c.y-_49;if(_48.detailObject){_48.detailObject.style.left=_4c.x+"px";_48.detailObject.style.top=_4c.y+"px";}}
function dummyCallback(){alert(1);return false;}
function makeInterface(a){var b=a||window;b.PMmarker=PMmarker;}
makeInterface();}
PMmarkerNamespace();