var LDMapBase=function(){};LDMapBase.prototype.getUrl=function(path){return["http://",window.location.host,path].join("");};LDMapBase.prototype.getUrlParam=function(key){var regex=new RegExp("&?"+key+"=([a-zA-Z0-9.,-_%]+)(?:&|#)?");var res=regex.exec(window.location.search.replace("?",""));return(res&&res.length&&res[1].length)?res[1]:"";};LDMapBase.prototype.objectify=function(el){var o=[];for(var i=0;i<el.length;i++)o.push($(el[i]));return o;};LDMapBase.prototype.getCoordParams=function(opt){var mm=this.mm;var params=[];if(opt.center){var cCenter=mm.getCenterLatLng();params.push("lng="+cCenter.x);params.push("lat="+cCenter.y);}if(opt.bounds){var cBounds=mm.getBoundsLatLng();params.push("min_lng="+cBounds.minX);params.push("min_lat="+cBounds.minY);params.push("max_lng="+cBounds.maxX);params.push("max_lat="+cBounds.maxY);}if(opt.zoom){params.push("zoom="+mm.getZoomLevel());}return params;};LDMapBase.prototype.setCookie=function(key,value,expDays,path){if(!path)path="/";if(expDays==undefined)expDays=1;var d=new Date();d.setDate(d.getDate()+expDays);document.cookie=[[key,value].join("="),["expires",d.toGMTString()].join("="),["path",path].join("="),["domain",location.host].join("="),].join(";")+";";};LDMapBase.prototype.getCookie=function(key){var res=document.cookie.match('(?:^|;)?'+key+'=([^;]+)(?:;|$)');return res&&res[1]?unescape(res[1]):"";};LDMapBase.prototype.removeCookie=function(key,path){this.setCookie(key,"",-1,path);};LDMapBase.prototype.genMIcon=function(p){var mIcon=new MIcon();mIcon.width=p.width,mIcon.height=p.height,mIcon.image=p.image,mIcon.iconAnchor=new MPoint(p.aLng,p.aLat);return mIcon;};