function LocInfoWindow() 
{
	this._point = new GLatLng(50.7225468336323, -3.71337890625);
}

LocInfoWindow.prototype = new GOverlay();

LocInfoWindow.prototype.initialize = function(map) 
{
	var div = document.createElement('div');
	div.id = 'iw';
	div.style.position = 'absolute';
	div.style.zIndex = 9999;
	
	div.onclick = function() { this.style.display = 'none'; }

	map.getPane(G_MAP_FLOAT_PANE).appendChild(div);

	this._map = map;
	this._div = div;
	
	this._div.style.display = 'none';
}

LocInfoWindow.prototype.remove = function() 
{
	this._div.parentNode.removeChild(this._div);
}

LocInfoWindow.prototype.copy = function() 
{
	return new LocInfoWindow();
}

LocInfoWindow.prototype.redraw = function(force) 
{
	if(!force) return;
	
	var p = this._map.fromLatLngToDivPixel(this._point);
	
    this._div.style.left = (p.x + 8) + "px";
    this._div.style.top = ((p.y - (this._div.offsetHeight / 2)) - 15) + "px"; 
}

LocInfoWindow.prototype.set = function(content, point) 
{
	// Could replace this with DOM methods but this is faster
	this._point = point;
	this._div.innerHTML = '<div>' + content + '</div>';
	this._div.style.display = 'block';
	
	// Force redraw
	this.redraw(true);
}

var iw = new LocInfoWindow();
var markers = new Array();

// For some reason if we don't explicitly set this all the markers
// are opaque rather than PNG's ??
var icon = null;

var m = new Array();

function mi(isrc)
{
	var i = new Image();
	i.src = isrc;
	return i;
}

m['shadow'] = mi('images/map/shadow.png');
//m['marker'] = mi('images/map/marker.png');
//m['blue'] = mi('images/map/markerblue.png');
//m['brown'] = mi('images/map/markerbrown.png');
//m['green'] = mi('images/map/markergreen.png');
//m['pink'] = mi('images/map/markerpink.png');
//m['orange'] = mi('images/map/markerorange.png');
//m['white'] = mi('images/map/markerwhite.png');
//m['yellow'] = mi('images/map/markeryellow.png');
m['red'] = mi('images/map/markerred.png');

function Loc(id, divisionID, lname, lat, lng, colour)
{
	this.ID = id;
	this.DivisionID = divisionID;
	this.LocName = lname;
	this.Latitude = lat;
	this.Longitude = lng;
	this.IconColour = colour;
	this.Marker = null;
}