function AccoMarker(name, title, lat, lng,im,issmallmap,accotitle)
{
this.accotitle = accotitle;
this.name = name;
this.title = title;
this.tabs=[];
this.location = new google.maps.LatLng(lat, lng);
this.letteredIcon = new google.maps.Icon(baseIcon);
this.issmallmap=issmallmap;
if(issmallmap) im=im+'&zoom=0.7'
if(im)this.letteredIcon.image = im;
else this.letteredIcon.image = "http://www.google.com/mapfiles/markerA.png";
for (var i=0;i<accomarkers.length;i++) {
var pt = accomarkers[i];
if(pt.location && pt.location.lat()==lat && pt.location.lng()==lng){
if(pt.tabs.length==0)
pt.tabs.push(new GInfoWindowTab(pt.tabs.length+1, pt.title));
pt.tabs.push(new GInfoWindowTab(pt.tabs.length+1, this.title))
return;
}
}
map.addOverlay(this.createMarker());
bounds.extend(this.location);
this.info = document.getElementById(name);
this.infoMax = document.getElementById(name + "-max");
}
AccoMarker.prototype.showInfo = function()
{
if(this.issmallmap){
var infowindow = document.getElementById('infowindow');
if(infowindow){
var pos = map.fromLatLngToDivPixel(this.marker.getPoint());
pos.x += map.getContainer().offsetLeft;
pos.y += map.getContainer().offsetTop;
pos.y -= parseInt(infowindow.style.height);
pos.y -= 10;
if(pos.y<0)
pos.y=0;
infowindow.style.left = pos.x + 'px';
infowindow.style.top = pos.y + 'px';
infowindow.style.display="";
document.getElementById('infowindowdata').innerHTML=this.title;}
}else{
if(this.tabs.length>0) /*THE TAB FUNCTION*/
this.marker.openInfoWindowTabs(this.tabs);
else
this.marker.openInfoWindow(this.title);
}
}
AccoMarker.prototype.createMarker = function()
{
var marker = new google.maps.Marker(this.location, { icon:this.letteredIcon, title:this.name+" "+this.accotitle});
var project = this;
if(parseInt(this.name)>1)
google.maps.Event.addListener( marker, "click", function() {
map.setCenter( marker.getPoint(), map.getZoom() + 1 );
});
else
google.maps.Event.addListener(marker, "click",
function() { project.showInfo(); }
);
this.marker = marker;
gmarkers.push(marker);
accomarkers.push(this);
return marker;
}
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curleft,curtop];
}/*3876->2294*/
