/*
 PdMarker

 Purpose: extends Google Map API GMap and GMarker (hover effects, image swapping, moving)
 Details: http://www.pixeldevelopment.com/pdmarker.asp
 Updated: [see getPdMarkerRevisionInfo]
 Author:  Peter Jones
 Notes:   Relies on undocumented features of the Google Map API which may change.
	    Based on my own PJToolTip and ideas from GxMarker, TLabel and the Google Maps API forum.

 Contact http://www.pixeldevelopment.com for your custom Google Map needs
*/

function getPdMarkerRevisionInfo() {
var cr = "<br/>";
var s =
"2.03  10/02/07 - fixed zindex bug (setMarkerZIndex, topMarkerZIndex)" + cr + 
"2.02  05/22/07 - fixed minor issues (blink, initDetailWin)" + cr + 
"2.01  04/29/07 - improved left hand side detail window positioning, uses new Google setImage &amp; show " + 
"routines for added reliability, fixed zoomToMarkers for single marker case." + cr +
"2.00  04/22/07 - fix for setImage when using Explorer 7." + cr +
"1.99f 07/09/06 - zoomToMarkers now takes into account markers not displayed." + cr +
"1.99e 05/05/06 - fixed zoomed tooltip positioning &amp; non-centered marker graphics." + cr +
"1.99d 05/01/06 - fixed display &amp; blink when defining .transparent." + cr +
"1.99c 04/25/06 - added display and blink." + cr +
"1.99b 04/21/06 - added 'Powered By' version &amp; marker count display." + cr +
"1.99a 04/18/06 - revised for Google Maps API Version 2, GMap2 required." + cr +
"0.99c 01/30/06 - added setDetailWinClass and resetDetailWinClass." + cr +
"0.99a 10/12/05 - now handles maps in containers with undefined widths" + cr +
"define a div with id 'pdmarkerwork' to reduce flicker" + cr +
"0.99  10/03/05 - added setImageEnabled, allowLeftTooltips (global)" + cr +
"0.98  09/30/05 - fixed zoomToMarkers" + cr +
"0.97  09/24/05 - added setHoverImage, setShowDetailOnClick, setDetailWinHTML, showDetailWin, closeDetailWin" + cr +
"0.96  09/22/05 - added setTooltipHiding, getTooltipHiding" + cr +
"0.95  09/20/05 - handle zoom for lingering tooltips mouseOutEnabled(false) " +
		   "disables setImage and restoreImage" + cr +
"0.94  09/20/05 - added setTooltipClass and resetTooltipClass" + cr +
"0.93  09/19/05 - added slopPercentage [optional] parameter to zoomToMarkers" + cr +
"0.92  09/18/05 - added getMouseOutEnabled, setMouseOutEnabled" + cr +
"0.91  09/17/05 - fixed setOpacity";
return s;
}

function getPdMarkerVersion() {
	return getPdMarkerRevisionInfo().substring(0,15);
}

function getPdMarkerShortVersion() {
	return getPdMarkerRevisionInfo().substring(0,5);
}

var APIkey = "";

function getGoogleMapsVersion() {
	var i, a, b, c;
	var v = "unknown";

	if (document.getElementsByTagName)
		for(i=0; (a = document.getElementsByTagName("script")[i]); i++)
			if(a.getAttribute("src"))
			{
				b = a.getAttribute("src");
				c = b.indexOf("/mapfiles/maps"); // /mapfiles/maps
				d = b.indexOf("http://maps.google.com/maps?file=api");
				e = b.indexOf("key=");
				f = b.indexOf("/mapfiles/");
				g = b.indexOf("/maps");
				if (c > 0)
					v = parseFloat(b.substring(c+14));
				else if (f > 0)
					v = "2." + b.substring(f+10,g);
				if (d >= 0)
					if (e > 0)
						APIkey = b.substring(e+4);
			}
	return v;
}

function latLongToPixel(map,coord,zoom) {
    return map.fromLatLngToDivPixel(coord);
}


var pdMarkerExtList = [];

function PdMarkerAddToExtList(marker) {
	pdMarkerExtList.push(marker);
}

function PdMarkerRemoveFromExtList(id) {
	for (var i=0; i<pdMarkerExtList.length; i++)
		if (pdMarkerExtList[i].internalId == id)
			pdMarkerExtList.splice(i,1);
}

function PdMarkerFindInExtList(id) {
	for (var i=0; i<pdMarkerExtList.length; i++)
		if (pdMarkerExtList[i].internalId == id)
			return pdMarkerExtList[i];
}

function PdMarkerClose(id) {
	for (var i=0; i<pdMarkerExtList.length; i++)
		if (pdMarkerExtList[i].internalId == id)
			{
				pdMarkerExtList[i].closeDetailWin();
				pdMarkerExtList.splice(i,1);
			}
}

function PdMarkerBlinkOnOff(id) {
	var marker = PdMarkerFindInExtList(id);
	if (marker)
	{
		if (!marker.blinking) return;
		marker.blinkOn = !marker.blinkOn;
		marker.display(marker.blinkOn);
		setTimeout("PdMarkerBlinkOnOff(" + marker.getId() + ");", marker.blinkSpeed);
	}
}

// GMap extension for walking through PdMarker list
// Note: some overlays are not markers, some may not be PdMarkers

function isPdMarker(a) {
	if (a.isMarker)
		return true;		
	return false;
}

function getPdMarkerCount(a) {
	if (a.pdMarkers)
		return a.pdMarkers.length;
	return 0;
}

GMap2.prototype.getMarkerById = function(id) {
	var count = getPdMarkerCount(this);
	for (var i = 0; i < count; i++)
		if (isPdMarker(this.pdMarkers[i]))
			if (this.pdMarkers[i].internalId == id)
			{
				this.cursor = i;
				return this.pdMarkers[i];
			}
	return null;
}

GMap2.prototype.getFirstMarker = function() {
	var count = getPdMarkerCount(this);
	for (var i = 0; i < count; i++)
		if (isPdMarker(this.pdMarkers[i]))
		{
			this.cursor = i;
			return this.pdMarkers[i];
		}
	return null;
}

GMap2.prototype.getNextMarker = function() {
	var count = getPdMarkerCount(this);
	if (count > 0)
		if (this.cursor >= 0)
			for (var i = this.cursor+1; i < count; i++)
				if (isPdMarker(this.pdMarkers[i]))
				{
					this.cursor = i;
					return this.pdMarkers[i];
				}
	return null;
}

GMap2.prototype.getNthMarker = function(nTh) {
	var count = getPdMarkerCount(this);
	for (var i = 0; i < count; i++)
		if (isPdMarker(this.pdMarkers[i]))
		{
			nTh--;
			if (nTh == 0)
			{
				this.cursor = i;
				return this.pdMarkers[i];
			}
		}
	return null;
}

GMap2.prototype.getMarkerCount = function() {
	return getPdMarkerCount(this);
}

GMap2.prototype.boxMap = function(center, span) {
	var spec = this.spec;
	var zoom = spec.getLowestZoomLevel(center, span, this.viewSize);
	this.centerAndZoom(new GPoint(center.x, center.y), zoom);
}

GMap2.prototype.zoomToMarkers = function(slopPercentage, heightOffsetPct) {
	var count = 0;
	var thePoint, x, y, minX, maxX, minY, maxY, span;
	var marker = this.getFirstMarker();
	while (marker != null)
	{
		if (!marker.isHidden())
		{
			thePoint = marker.getPoint();
			// x = thePoint.x; y = thePoint.y;
			x = thePoint.lat(); y = thePoint.lng();
			if (count == 0)
			{
				minX = x; maxX = x; minY = y; maxY = y;
			}
			else
			{
				if (x < minX) minX = x;
				if (x > maxX) maxX = x;
				if (y < minY) minY = y;
				if (y > maxY) maxY = y;
			}
			count++;
		}
		marker = this.getNextMarker();
	}
	if (count == 1)
		this.setCenter(new GLatLng(x,y), this.getZoom());
	else if (count > 1)
	{
		var center = new GLatLng((minX + maxX) / 2, (minY + maxY) / 2)
		span = new GSize(Math.abs(maxX - minX), Math.abs(maxY - minY));
		slopWid = 0;
		slopHgt = 0;
		if (typeof slopPercentage != "undefined")
		{
			slopWid = span.width * slopPercentage / 200;
			slopHgt = span.height * slopPercentage / 200;
			span.width  *= 1 + slopPercentage / 100;
			span.height *= 1 + slopPercentage / 100;
		}
		deltaHgt = 0;
		if (typeof heightOffsetPct != "undefined")
		{
			deltaHgt = span.height * heightOffsetPct / 100;
			center = new GLatLng(center.lat() + deltaHgt, center.lng());
		}
		// needs slop
		var bounds = new GLatLngBounds(new GLatLng(minX-slopHgt, minY-slopWid), new GLatLng(maxX+slopHgt, maxY+slopWid)); // sw, ne
		var zoom = this.getBoundsZoomLevel(bounds);
		this.setCenter(center, zoom);
	}
}

function shorten(x) {
	var factor = 1000000
	return Math.round(x * factor) / factor;
}

function poweredByClick(map) {
	var center = map.getCenter();
	var span = map.getBounds().toSpan();
	var zoom = map.getZoom();
	var url = "http://maps.google.com/maps?ll=" + center.lat() + "," + center.lng() + "&spn=" + shorten(span.lat()) + "," + shorten(span.lng()) + "&z=" + zoom + "&key=" + APIkey;
	document.location = url;
}

function poweredByMouseover(map) {
	var marker = map.getFirstMarker();
	var bounds = map.getBounds();
	var visibleCount = 0;
	var totalCount = 0;
	while (marker != null) {
		if (!marker.isHidden())
		{
			var point = marker.getPoint();
			if (bounds.contains(point))
				visibleCount++;
			totalCount = totalCount + 1;
		}
		marker = map.getNextMarker();
	}
	var title = map.poweredByTitle + " (" + visibleCount + " markers of " + totalCount + " visible)"
	map.poweredByObj.setAttribute("title",title);
	map.poweredByObj.setAttribute("alt",title);
}

function getPoweredBy(map) {
	try {
		var tooltip = "GMap " + getGoogleMapsVersion() + " & PdMarker " + getPdMarkerShortVersion();
		map.poweredByTitle = tooltip;
		var b = document.createElement("img");
		b.setAttribute("src","http://www.google.com/intl/en_ALL/mapfiles/transparent.gif");
		b.setAttribute("width",62);
		b.setAttribute("alt",tooltip);
		b.setAttribute("title",tooltip);
		b.setAttribute("height",30);
		b.style.display = "block";
		b.style.position = "absolute";
		b.style.left    = "2px";
		b.style.bottom  = "0px";
		b.style.width   = "62px";
		b.style.height  = "30px";
		b.style.cursor  = "pointer";
		b.style.zIndex  = 600001;
		b.onclick = function() { poweredByClick(map); };
		b.onmouseover = function() { poweredByMouseover(map); };
	      map.getPane(G_MAP_FLOAT_PANE).parentNode.parentNode.appendChild(b);
		return b;
	}
	catch (e) {
	}
	return true;
}

function setPoweredBy(map) {
	if (!map.poweredByObj) {
		getGoogleMapsVersion(); // possibly reduce IE memory leak, unchecked
		map.poweredByObj = getPoweredBy(map);
	}
}


// PdMarker code


function PdMarkerNamespace() {

var userAgent = navigator.userAgent.toLowerCase();
var n4=(document.layers);
var n6=(document.getElementById&&!document.all);
var ie=(document.all);
var o6=(userAgent.indexOf("opera") != -1);
var safari=(userAgent.indexOf("safari") != -1);
var msie  = (userAgent.indexOf("msie") != -1) && (userAgent.indexOf("opera") == -1);
var msiePre7 = false;
if (msie)
	msiePre7 = userAgent.substr(userAgent.indexOf("msie")+5,2) < 7;   

var nextMarkerId = 10;
var permitLeft = true;

var icon = new GIcon();
icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
icon.iconSize = new GSize(30, 30);
icon.shadowSize = new GSize(37, 34);
icon.iconAnchor = new GPoint(9, 34);
icon.infoWindowAnchor = new GPoint(9, 2);
icon.infoShadowAnchor = new GPoint(18, 25);
icon.image = "restaurant_icon.gif";

// Globals - careful of multiple maps

function PdMarker(a, b, tooltip) {
	this.inheritFrom = GMarker;
	if (typeof b == "undefined") // pmj oct 23, 2005
		b = icon;
	this.inheritFrom(a,b);
	if (typeof tooltip != "undefined")
		this.pendingTitle = tooltip;
	else
		this.pendingTitle = "";
	if (typeof b != "undefined")
		this.oldImagePath = b.image;
	else
		this.oldImagePath = "restaurant_icon.gif";
	this.internalId = nextMarkerId;
	nextMarkerId += 1;
	this.zIndexSaved = false;
	this.pendingCursor = "";
	this.percentOpacity = 70;
	this.mouseOutEnabled = true;
	this.setImageOn = true;
	this.hidingEnabled = true;
	this.showDetailOnClick = true;
	this.detailOpen = false;
	this.userData = "";
	this.displayed = true;
}

// PdMarker.prototype = new GMarker;
PdMarker.prototype = new GMarker(new GLatLng(1, 1));


function addMarkerToMapList(map,marker) {
	try {
		if (map.pdMarkers.length) ;
	}
	catch(e) {
		map.pdMarkers = new Array();
	}
	// add to list
	map.pdMarkers.push(marker);
}

function removeMarkerFromMapList(map,marker) {
	var id = marker.internalId;
	for (var i=0; i<map.pdMarkers.length; i++)
		if (map.pdMarkers[i].internalId == id)
		{
			map.pdMarkers.splice(i,1);
			return;
		}
}

PdMarker.prototype.initialize = function(a) {
	if (typeof a == "GMap")
	{
		GLog.write("PdMarker requires GMap2");
		return;
	}
	addMarkerToMapList(a,this);
	try
	{
		GMarker.prototype.initialize.call(this, a);
		this.isMarker = true;
		if (this.pendingTitle.length > 0)
			this.setTitle(this.pendingTitle);
		if (this.pendingCursor.length > 0)
			this.setCursor(this.pendingCursor);

		this.map = a;
		setPoweredBy(a);

		GEvent.bindDom(this, "mouseover", this, this.onMouseOver);
		GEvent.bindDom(this, "mouseout",  this, this.onMouseOut);
		GEvent.bindDom(this, "click",  this, this.onClick);
		GEvent.bind(this.map, "zoomend", this, this.reZoom);
	}
	catch(e) {
		alert("PdMarker initialize error: " + e);
	}
}

PdMarker.prototype.allowLeftTooltips = function(a){
	permitLeft = a;
}

PdMarker.prototype.reZoom = function(){
	var didSet = false;
	if (this.tooltipObject)
		if (this.tooltipObject.style.display == "block")
		{
			setTTPosition(this);
			didSet = true;
		}
	if (this.detailObject)
	{
		if (!didSet)
			setTTPosition(this);
		setDetailPosition(this);
	}
}

PdMarker.prototype.setId = function(id) {
	this.internalId = id;
}

PdMarker.prototype.getId = function() {
	return this.internalId;
}

PdMarker.prototype.setName = function(a) {
	this.name = a;
}

PdMarker.prototype.getName = function() {
	if (this.name)
		return this.name;
	else
		return null;
}

PdMarker.prototype.setUserData = function(a) {
	this.userData = a;
}

PdMarker.prototype.getUserData = function() {
	if (this.userData)
		return this.userData;
	else
//		return null;
		return "";
}

PdMarker.prototype.setUserData2 = function(a) {
	this.userData2 = a;
}

PdMarker.prototype.getUserData2 = function() {
	if (this.userData2)
		return this.userData2;
	else
		return "";
}

PdMarker.prototype.setImageEnabled = function(a) {
	this.setImageOn = a;
}

var PdMIN = "";
var PdMIA = "";

function PdCompPdMIN(marker) {
	if (PdMIN.length == 0)
		for (var i in marker)
			if (eval("typeof marker." + i) == "object")
				try {
					if (eval("typeof marker." + i + "[0].src") != "undefined")
					{
						PdMIA = "this." + i;
						PdMIN = PdMIA + "[0]";
					}
				}
				catch (e) {}
}

PdMarker.prototype.setImageOld = function(a) {
	// 		GMarker.prototype.initialize.call(this, a);
	var msFilter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + a + '")';
	if (this.mouseOutEnabled && this.setImageOn)
	{
		PdCompPdMIN(this);
		try {
			if (this.oldImagePath.length == 0)
				eval("this.oldImagePath = " + PdMIN + ".src");
			if (msie && msiePre7)
				eval(PdMIN + ".style.filter = msFilter");
			else
				eval(PdMIN + ".src = a");
		}
		catch (e) {}
	}
}

PdMarker.prototype.setImage = function(a) {
	if (this.mouseOutEnabled && this.setImageOn)
		GMarker.prototype.setImage.call(this, a);
}

PdMarker.prototype.restoreImage = function() {
	if (this.mouseOutEnabled && this.setImageOn && this.oldImagePath.length > 0)
		this.setImage(this.oldImagePath);
}

PdMarker.prototype.display = function(a) {
	if (a)
		this.show();
	else
		this.hide();
}

PdMarker.prototype.blink = function(a,b) {
	if (a)
	{
		this.blinkOn = true;
		this.blinkSpeed = b;
		if (!this.blinking)
		{
			this.blinking = a;
			PdMarkerAddToExtList(this);
			PdMarkerBlinkOnOff(this.getId());
		}
	}
	else
	{
		this.blinking = a;
		this.display(true);
		PdMarkerRemoveFromExtList(this);
	}
}

PdMarker.prototype.setIcon = function(a) {
	this.remove();
	this.icon = a;
	this.initialize(this.map);
	this.redraw(true); 
}

PdMarker.prototype.setMarkerZIndex = function(a) {
	PdCompPdMIN(this);
	if (!this.zIndexSaved)
	{
		this.zIndexSaved = true;
		this.oldZIndex = eval(PdMIN + ".style.zIndex");
	}
	eval(PdMIN + ".style.zIndex = a")
	this.redraw(true);
}

PdMarker.prototype.topMarkerZIndex = function() {
	this.setMarkerZIndex (600000);
}

PdMarker.prototype.restoreMarkerZIndex = function() {
	PdCompPdMIN(this);
	if (this.zIndexSaved)
	{
		this.zIndexSaved = false;
		eval(PdMIN + ".style.zIndex = this.oldZIndex")
		this.redraw(true);
	}
}

PdMarker.prototype.onInfoWindowOpen = function() {
	this.hideTooltip();
	GMarker.prototype.onInfoWindowOpen.call(this);
}

PdMarker.prototype.setHoverImage = function(a) {
	this.hoverImage = a;
}

var inMouseOver = false;

PdMarker.prototype.onMouseOver = function() {
	if (inMouseOver)
		return;
	inMouseOver = true;
	if (this.hoverImage)
		this.setImage(this.hoverImage);
	if (!this.detailOpen)
		this.showTooltip();
	inMouseOver = false;
}

PdMarker.prototype.onMouseOut = function() {
	if (this.hoverImage)
		this.restoreImage();
	if (!this.detailOpen)
		if (this.mouseOutEnabled)
			this.hideTooltip();
}

PdMarker.prototype.setMouseOutEnabled = function(a) {
	this.mouseOutEnabled = a;
}

PdMarker.prototype.getMouseOutEnabled = function() {
	return this.mouseOutEnabled;
}

PdMarker.prototype.setTooltipHiding = function(a) {
	this.hidingEnabled = a;
}

PdMarker.prototype.getTooltipHiding = function() {
	return this.hidingEnabled;
}

PdMarker.prototype.setTitle = function(a) {
	this.tooltipText = "";
	PdCompPdMIN(this);
	try {
		eval(PdMIN + ".title = a");
	}
	catch (e) {
		this.pendingTitle = a;
	}
}

PdMarker.prototype.setCursor = function(a) {
	PdCompPdMIN(this);
	try {
		eval(PdMIN + ".style.cursor = a");
	}
	catch (e) {
		this.pendingCursor = a;
	}
}

PdMarker.prototype.setTooltipClass = function(a) {
	this.pendingClassName = a;
	if (this.tooltipObject)
	{
		var showing = (this.tooltipObject.style.display != "none");
		this.deleteObjects();
		if (this.tooltipRaw)
			this.setTooltipNoResize(this.tooltipRaw);
		if (showing)
			this.showTooltip();

	}
	else
		if (this.tooltipRaw)
			this.setTooltipNoResize(this.tooltipRaw);
}

PdMarker.prototype.resetTooltipClass = function() {
	this.setTooltipClass("markerTooltip");
}

PdMarker.prototype.getTooltip = function() {
	try {
		return this.tooltipRaw;
	}
	catch (e)
	{
		return "";
	}
}

PdMarker.prototype.setTooltipNoResize = function(a) {
	this.setTitle("");
	var ttClass = "markerTooltip";
	if (this.pendingClassName)
		ttClass = this.pendingClassName;
	this.tooltipRaw = a;
	this.tooltipText = "<div class='" + ttClass + "'>" + a + "</div>";
	if (this.tooltipObject)
		this.tooltipObject.innerHTML = this.tooltipText;
}

PdMarker.prototype.setTooltip = function(a) {
	this.setTooltipNoResize(a);
	this.deleteObjects();
}

PdMarker.prototype.showTooltip = function() {
	if (this.tooltipText)
	{
		if (!this.tooltipObject)
			initTooltip(this);
		setTTPosition(this);
		this.tooltipObject.style.display = "block";
	}
}

PdMarker.prototype.hideTooltip = function() {
	if (this.tooltipObject)
		if (this.hidingEnabled)
			this.tooltipObject.style.display = "none";
}

PdMarker.prototype.onClick = function(a) {
	if (this.showDetailOnClick && this.detailWinHTML)
		this.showDetailWin();
}

PdMarker.prototype.setShowDetailOnClick = function(a) {
	this.showDetailOnClick = a;
}

PdMarker.prototype.setDetailWinHTML = function(a) {
	this.detailWinHTML = a;
}




PdMarker.prototype.setDetailWinClass = function(a) {
	this.pendingDetailClassName = a;
}

PdMarker.prototype.resetDetailWinClass = function() {
	this.setDetailWinClass("markerDetail");
}



PdMarker.prototype.showDetailWin = function() {
	if (this.detailOpen)
	{
		this.closeDetailWin();
		return;
	}
	this.hideTooltip();
	this.setMouseOutEnabled(false);

	var winClass = "markerDetail";
	if (this.pendingWinClassName)
		winClass = this.pendingWinClassName;

	var html = "<table><tr><td>" + this.detailWinHTML + "<\/td><td valign='top'><a class='markerDetailClose' href='javascript:PdMarkerClose(" + this.internalId + ")'><img src='http://www.google.com/mapfiles/close.gif' width='14' height='13'><\/a><\/td><\/tr><\/table>";
	html = "<div class='" + winClass + "'>" + html + "</div>";
	this.detailOpen = true;
	if (!this.tooltipText)
	{
		this.ttWidth = 150;
		this.ttHeight = 30;
		setTTPosition(this); // compute ttTop, ttLeft
	}
	initDetailWin(this, this.ttTop, this.ttLeft, html);
	PdMarkerAddToExtList(this);
}


PdMarker.prototype.closeDetailWin = function() {
	this.detailOpen = false;
	if (this.detailObject)
	{
		this.setMouseOutEnabled(true);
		this.onMouseOut();
		// GEvent.trigger(this, "mouseout");
	      this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.detailObject);
		this.detailObject = null;
	}
}

PdMarker.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;
	}
}

PdMarker.prototype.remove = function(a) {
	removeMarkerFromMapList(this.map, this);
	PdMarkerRemoveFromExtList(this.getId());
	GMarker.prototype.remove.call(this);
	this.deleteObjects();
}

PdMarker.prototype.setOpacity = function(b) {
	if (b < 0)
		b=0;
	if (b >= 100)
		b=100;
	var c = b / 100;
	this.percentOpacity = b;
	var d = document.getElementById(this.objId);
	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;}
	}
}

PdMarker.prototype.setOpacityNew = function(b) {
	setObjOpacity(this.objId);
	this.percentOpacity = b;
}

// ***** Private routines *****

function setObjOpacity(objId, b) {
	if (b < 0)
		b=0;
	if (b >= 100)
		b=100;
	var c = b / 100;
	var d = document.getElementById(objId);
	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(theObj) {
	theObj.objId = idToElemId(theObj.internalId);
	theObj.anchorLatLng = theObj.point;

	var b = document.createElement('span');
	theObj.tooltipObject = b;
	b.setAttribute('id',theObj.objId);
	b.innerHTML = theObj.tooltipText;

	// append to body for size calculations
	var c = document.body;
	var d = document.getElementById("pdmarkerwork");
	if (d)
		c = d;
	c.appendChild(b);
	b.style.position = "absolute";
	b.style.bottom = "5px";
	b.style.left = "5px";
	b.style.zIndex = 1;
	if (theObj.percentOpacity)
		theObj.setOpacity(theObj.percentOpacity);
	var tempObj = document.getElementById(theObj.objId);
	theObj.ttWidth  = tempObj.offsetWidth;
	theObj.ttHeight = tempObj.offsetHeight;
	c.removeChild(b);

	b.style.zIndex = 600000;
	b.style.bottom = "";
	b.style.left = "";
	theObj.map.getPane(G_MAP_FLOAT_PANE).appendChild(b);
}

function initDetailWin(theObj, top, left, html) {
	theObj.detailId = "detail" + theObj.internalId;
	var b = document.createElement('span');
	theObj.detailObject = b;
	b.setAttribute('id',theObj.detailId);
	b.innerHTML = html;
	b.style.display = "block";
	b.style.position = "absolute";
	b.style.top  = top + "px";
	if (theObj.rightSide)
		b.style.left = left + "px";
	else
		b.style.right = -left + "px";
	b.style.zIndex = 600001;
	theObj.map.getPane(G_MAP_FLOAT_PANE).appendChild(b);
}

function setTTPosition(theObj) {
	var gap = 5;
	var map = theObj.map;
	var pt  = theObj.getPoint();
	var ttPos = latLongToPixel(map, pt, map.getZoom());
	var theIcon = theObj.getIcon();
	
	ttPos.y -= Math.floor(theIcon.iconAnchor.y/2);

	var rightSide = true;
	var bounds = map.getBounds();
	var boundsSpan	= bounds.toSpan();
	var longSpan = boundsSpan.lng();
	var mapWidth = map.getSize().width;

	var tooltipWidthInDeg = (theObj.ttWidth + theIcon.iconSize.width + 6) / mapWidth * longSpan;
	if (pt.lng() + tooltipWidthInDeg > bounds.getNorthEast().lng() && permitLeft)
		rightSide = false;
	ttPos.y -= Math.floor(theObj.ttHeight/2);
	delta = (theIcon.iconSize.width - theIcon.iconAnchor.x) + gap;
	if (rightSide)
		ttPos.x += delta;
	else
		ttPos.x -= delta
	theObj.rightSide = rightSide;
	theObj.ttLeft = ttPos.x;
	theObj.ttTop  = ttPos.y;
	if (theObj.tooltipObject)
	{
		if (rightSide) {
			theObj.tooltipObject.style.left = ttPos.x + "px";
			theObj.tooltipObject.style.right = null;
		}
		else {
			theObj.tooltipObject.style.left = null;
			theObj.tooltipObject.style.right = -ttPos.x + "px";
		}
		theObj.tooltipObject.style.top  = ttPos.y + "px";
	}
}

function makeInterface(a) {
	var b = a || window;
	b.PdMarker = PdMarker;
}

makeInterface();
}


PdMarkerNamespace();



//<![CDATA[
window.onload = onPageLoad;
var map;

var icon = new GIcon();
icon.image = "http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant_icon.gif";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(14, 14);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);


function onPageLoad() {
    if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(26.10218797369925, -97.18119213867187), 16-3);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
       map.addControl(new GOverviewMapControl());
		marker = new PdMarker(new GLatLng(26.1007, -97.1797));
		marker.setTooltip("The List of all Area Restaurants");
		var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/'>List of all Area Lodgings<\/a>";
		marker.setDetailWinHTML(html);
		marker.setHoverImage("restaurant2_icon.gif");
		map.addOverlay(marker);
		
				
if (true) {
marker1 = new PdMarker(new GLatLng(26.102902936437615, -97.16899752616882), { title: "Amberjack's Bar & Grill", icon: icon });	marker1.setTooltip("Amberjack's Bar & Grill");			var html = " <a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Amberjack.html' Target='Restaurant'>Amberjack's Bar & Grill</a>";	marker1.setDetailWinHTML(html);
map.addOverlay(marker1);		
}
if (true) {
marker2 = new PdMarker(new GLatLng(26.107570783460222, -97.1689224243164), { title: "A&W - Kentucky Fried Chicken", icon: icon });	marker2.setTooltip("A&W - Kentucky Fried Chicken");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/A&W-Kentucky-Fried-Chicken.html' Target='Restaurant'>A&W - Kentucky Fried Chicken</a>";	marker2.setDetailWinHTML(html);
map.addOverlay(marker2);		
}					
if (true) {
marker3 = new PdMarker(new GLatLng(26.07330666827016, -97.21637606620788), { title: "B & A Seafood & Harborview Restaurant", icon: icon });	marker3.setTooltip("B & A Seafood & Harborview Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Harborview.html' Target='Restaurant'>B & A Seafood & Harborview Restaurant</a>";	marker3.setDetailWinHTML(html);
map.addOverlay(marker3);		
}
if (true) {
marker4 = new PdMarker(new GLatLng(26.097661622984017, -97.16614365577698), { title: "Badabing Bagels", icon: icon });	
marker4.setTooltip("Badabing Bagels");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Badabing.html' Target='Restaurant'>Badabing Bagels</a>";	marker4.setDetailWinHTML(html);
map.addOverlay(marker4);		
}
if (true) {
marker5 = new PdMarker(new GLatLng(26.132992584787292, -97.17046737670898), { title: "Bahia Grill", icon: icon });	marker5.setTooltip("Bahia Grill");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Bahia-Mar.html' Target='Restaurant'>Bahia Grill</a>";	marker5.setDetailWinHTML(html);
map.addOverlay(marker5);		
}			
if (true) {
marker6 = new PdMarker(new GLatLng(26.08287098876985, -97.1599692106247), { title: "Beachside Bar & Grill", icon: icon });	marker6.setTooltip("Beachside Bar & Grill");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Beachside.html' Target='Restaurant'>Beachside Bar & Grill</a>";	marker6.setDetailWinHTML(html);
map.addOverlay(marker6);		
}		
if (true) {
marker7 = new PdMarker(new GLatLng(26.11614487753552, -97.16988801956177), { title: "Mamacitas Restaurant", icon: icon });	marker7.setTooltip("Mamacitas Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Mamacitas.html' Target='Restaurant'>Mamacitas Restaurant</a>";	marker7.setDetailWinHTML(html);
map.addOverlay(marker7);		
}		
if (true) {
marker8 = new PdMarker(new GLatLng(26.116944452000055, -97.16902434825897), { title: "Blackbeard's Restaurant", icon: icon });	marker8.setTooltip("Blackbeard's Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Blackbeard.html' Target='Restaurant'>Blackbeard's Restaurant</a>";	marker8.setDetailWinHTML(html);
map.addOverlay(marker8);		
}
if (true) {
marker9 = new PdMarker(new GLatLng(26.10380376353134, -97.16399252414703), { title: "Boomerang Billy's", icon: icon });	marker9.setTooltip("Boomerang Billy's");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Boomerang.html' Target='Restaurant'>Boomerang Billy's</a>";	marker9.setDetailWinHTML(html);
map.addOverlay(marker9);		
}
if (true) {
marker10 = new PdMarker(new GLatLng(26.09432787126847, -97.16560184955597), { title: "Cap'n Roy's Restaurant", icon: icon });	marker10.setTooltip("Cap'n Roy's Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Cap-Roys.html' Target='Restaurant'>Cap'n Roy's Restaurant</a>";	marker10.setDetailWinHTML(html);
map.addOverlay(marker10);		
}
if (true) {
marker11 = new PdMarker(new GLatLng(26.09888044201675, -97.16547310352325), { title: "China Garden Restaurant", icon: icon });	marker11.setTooltip("China Garden Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/China-Garden.html' Target='Restaurant'>China Garden Restaurant</a>";	marker11.setDetailWinHTML(html);
map.addOverlay(marker11);		
}
if (true) {
marker12 = new PdMarker(new GLatLng(26.101149434921812, -97.16869175434112), { title: "Coconuts Bar and Grill ", icon: icon });	marker12.setTooltip("Coconuts Bar and Grill");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Coconuts.html' Target='Restaurant'>Coconuts Bar and Grill</a>";	marker12.setDetailWinHTML(html);
map.addOverlay(marker12);		
}
if (true) {
marker13 = new PdMarker(new GLatLng(26.109593940997786, -97.16925501823425), { title: "Daddy's Cajun Kitchen", icon: icon });	marker13.setTooltip("Daddy's Cajun Kitchen");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Daddy.html' Target='Restaurant'>Daddy's Cajun Kitchen</a>";	marker13.setDetailWinHTML(html);
map.addOverlay(marker13);		
}
if (true) {
marker14 = new PdMarker(new GLatLng(26.10211771785575, -97.16779589653015), { title: "Dairy Queen SPI", icon: icon });	marker14.setTooltip("Dairy Queen SPI");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dairy-Queen-spi.html' Target='Restaurant'>Dairy Queen SPI</a>";	marker14.setDetailWinHTML(html);
map.addOverlay(marker14);		
}
if (true) {
marker15 = new PdMarker(new GLatLng(26.074771481373737, -97.212615609169), { title: "Dairy Queen PI", icon: icon });	marker15.setTooltip("Dairy Queen PI");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dairy-Queen-pi.html' Target='Restaurant'>Dairy Queen PI</a>";	marker15.setDetailWinHTML(html);
map.addOverlay(marker15);		
}
if (true) {
marker16 = new PdMarker(new GLatLng(26.07648201295436, -97.20946133136749), { title: "Daisey Antojitos Restaurant", icon: icon });	marker16.setTooltip("Daisey Antojitos Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Daisey-Antojitos.html' Target='Restaurant'>Daisey Antojitos Restaurant</a>";	marker16.setDetailWinHTML(html);
map.addOverlay(marker16);		
}
if (true) {
marker17 = new PdMarker(new GLatLng(26.097777242726035, -97.16852009296417), { title: "De Luna Bar & Grill", icon: icon });	marker17.setTooltip("De Luna Bar & Grill");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/De-Luna.html' Target='Restaurant'>De Luna Bar & Grill</a>";	marker17.setDetailWinHTML(html);
map.addOverlay(marker17);		
}
if (true) {
marker18 = new PdMarker(new GLatLng(26.093036739590307, -97.16476500034332), { title: "Denny's Restaurant", icon: icon });	marker18.setTooltip("Denny's Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dennys.html' Target='Restaurant'>Denny's Restaurant</a>";	marker18.setDetailWinHTML(html);
map.addOverlay(marker18);		
}
if (true) {
marker19 = new PdMarker(new GLatLng(26.075821895277386, -97.16397106647491), { title: "Dirty Al's Seafood", icon: icon });	marker19.setTooltip("Dirty Al's Seafood");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dirty-Al.html' Target='Restaurant'>Dirty Al's Seafood</a>";	marker19.setDetailWinHTML(html);
map.addOverlay(marker19);		
}
if (true) {
marker20 = new PdMarker(new GLatLng(26.068984399118477, -97.16165363788605), { title: "Dolphin Cove Oyster Bar", icon: icon });	marker20.setTooltip("Dolphin Cove Oyster Bar");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dolphin-Cove.html' Target='Restaurant'>Dolphin Cove Oyster Bar</a>";	marker20.setDetailWinHTML(html);
map.addOverlay(marker20);		
}		
if (true) {
marker21 = new PdMarker(new GLatLng(26.12234384478151, -97.17056930065155), { title: "Dorado's Baja Bar & Grille", icon: icon });	marker21.setTooltip("Dorado's Baja Bar & Grille");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Dorado.html' Target='Restaurant'>Dorado's Baja Bar & Grille</a>";	marker21.setDetailWinHTML(html);
map.addOverlay(marker21);		
}
if (true) {
marker22 = new PdMarker(new GLatLng(26.074135446356063, -97.21364557743072), { title: "Doubleday", icon: icon });	marker22.setTooltip("Doubleday Bar of Champions");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Doubleday.html' Target='Restaurant'>Doubleday</a>";	marker22.setDetailWinHTML(html);
map.addOverlay(marker22);		
}
if (true) {
marker23 = new PdMarker(new GLatLng(26.101780505803503, -97.16679275035858), { title: "D'Pizza Joint", icon: icon });	marker23.setTooltip("D'Pizza Joint");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/DPizza.html' Target='Restaurant'>D'Pizza Joint</a>";	marker23.setDetailWinHTML(html);
map.addOverlay(marker23);		
}
if (true) {
marker24 = new PdMarker(new GLatLng(26.077758872350802, -97.17038691043854), { title: "FishBones Pier and Grill", icon: icon });	marker24.setTooltip("FishBones Pier and Grill");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/FishBones.html' Target='Restaurant'>FishBones Pier and Grill</a>";	marker24.setDetailWinHTML(html);
map.addOverlay(marker24);		
}
if (true) {
marker25 = new PdMarker(new GLatLng(26.07335485320322, -97.21512079238891), { title: "Fisherman's Inn Café", icon: icon });	marker25.setTooltip("Fisherman's Inn Café");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Fishermans-Inn.html' Target='Restaurant'>Fisherman's Inn Café</a>";	marker25.setDetailWinHTML(html);
map.addOverlay(marker25);		
}
if (true) {
marker26 = new PdMarker(new GLatLng(26.072453791673734, -97.22341418266296), { title: "Gabriella's Italian & Seafood ", icon: icon });	marker26.setTooltip("Gabriella's Italian & Seafood ");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Gabriella.html' Target='Restaurant'>Gabriella's Italian & Seafood </a>";	marker26.setDetailWinHTML(html);
map.addOverlay(marker26);		
}
if (true) {
marker27 = new PdMarker(new GLatLng(26.09798921195628, -97.16543018817901), { title: "Garcias's Restaurant", icon: icon });	marker27.setTooltip("Garcias's Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Garcias.html' Target='Restaurant'>Garcias's Restaurant</a>";	marker27.setDetailWinHTML(html);
map.addOverlay(marker27);		
}
if (true) {
marker28 = new PdMarker(new GLatLng(26.07095521944389, -97.22036182880401), { title: "Isabel's Café", icon: icon });	marker28.setTooltip("Isabel's Café");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/IsabelCafe.html' Target='Restaurant'>Isabel's Café</a>";	marker28.setDetailWinHTML(html);
map.addOverlay(marker28);		
}
if (true) {
marker29 = new PdMarker(new GLatLng(26.103066723698084, -97.16687858104706), { title: "Jake's Restaurant", icon: icon });	marker29.setTooltip("Jake's Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Jakes.html' Target='Restaurant'>Jake's Restaurant</a>";	marker29.setDetailWinHTML(html);
map.addOverlay(marker29);		
}
if (true) {
marker30 = new PdMarker(new GLatLng(26.103972366761855, -97.16784417629242), { title: "Jesse's Cantina", icon: icon });	marker30.setTooltip("Jesse's Cantina");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Jesse.html' Target='Restaurant'>Jesse's Cantina</a>";	marker30.setDetailWinHTML(html);
map.addOverlay(marker30);		
}		
if (true) {
marker31 = new PdMarker(new GLatLng(26.104699766483843, -97.16802656650543), { title: "Grapevine Cafe", icon: icon });	marker31.setTooltip("Grapevine Cafe");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Grapevine.html' Target='Restaurant'>Grapevine Cafe</a>";	marker31.setDetailWinHTML(html);
map.addOverlay(marker31);		
}
if (true) {
marker32 = new PdMarker(new GLatLng(26.08663386488554, -97.16369211673736), { title: "Kohnami - Japanese Steak House", icon: icon });	marker32.setTooltip("Kohnami - Japanese Steak House");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Kohnami.html' Target='Restaurant'>Kohnami - Japanese Steak House</a>";	marker32.setDetailWinHTML(html);
map.addOverlay(marker32);		
}
if (true) {
marker33 = new PdMarker(new GLatLng(26.099179123004202, -97.16647624969482), { title: "La Jaiba Restaurant", icon: icon });	marker33.setTooltip("La Jaiba Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/LaJaiba.html' Target='Restaurant'>La Jaiba Restaurant</a>";	marker33.setDetailWinHTML(html);
map.addOverlay(marker33);		
}
if (true) {
marker34 = new PdMarker(new GLatLng(26.08550164215964, -97.16096699237823), { title: "Las Olas Restaurant", icon: icon });	marker34.setTooltip("Las Olas Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/lasOlas.html' Target='Restaurant'>Las Olas Restaurant</a>";	marker34.setDetailWinHTML(html);
map.addOverlay(marker34);		
}
if (true) {
marker35 = new PdMarker(new GLatLng(26.07563397788585, -97.20887660980224), { title: "Lost Galleon", icon: icon });	marker35.setTooltip("Lost Galleon");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Lost-Galleon.html' Target='Restaurant'>Lost Galleon</a>";	marker35.setDetailWinHTML(html);
map.addOverlay(marker35);		
}
if (true) {
marker36 = new PdMarker(new GLatLng(26.101640803382746, -97.16869711875915), { title: "Louie's Backyard", icon: icon });	marker36.setTooltip("Louie's Backyard");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Louies.html' Target='Restaurant'>Louie's Backyard</a>";	marker36.setDetailWinHTML(html);
map.addOverlay(marker36);		
}
if (true) {
marker37 = new PdMarker(new GLatLng(26.077334860208847, -97.20790028572082), { title: "Marcello's", icon: icon });	marker37.setTooltip("Marcello's");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Marcellos.html' Target='Restaurant'>Marcello's</a>";	marker37.setDetailWinHTML(html);
map.addOverlay(marker37);		
}
if (true) {
marker38 = new PdMarker(new GLatLng(26.072222502034464, -97.20277190208435), { title: "Mexiquito Restaurant", icon: icon });	marker38.setTooltip("Mexiquito Restaurant");			var html = "<a href='http://www.guidetosouthpadreisland.com/Place_to_Eat/Restaurants/Mexiquito.html' Target='Restaurant'>Mexiquito Restaurant</a>";	marker38.setDetailWinHTML(html);
map.addOverlay(marker38);		
}							
							
							
											
		document.getElementById("actual").innerHTML = "(actual: " + getGoogleMapsVersion() + ")";
    }
}
function getValue(objId) {
	obj = document.getElementById(objId);
	if (obj)
		return obj.value;
	else
		return "";
}
function setValue(objId, value) {
	obj = document.getElementById(objId);
	if (obj)
		obj.value = value;
}
function clear() {
	setValue("value_input","");
}
function getmarker1() {
	marker1.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.102902936437615, -97.16899752616882), 17-1);
}
function getmarker2() {
	marker2.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.107570783460222, -97.1689224243164), 17-1);
}
function getmarker3() {
	marker3.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.07330666827016, -97.21637606620788), 17-1);
}
function getmarker4() {
	marker4.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.097661622984017, -97.16614365577698), 17-1);
}	
function getmarker5() {
	marker5.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.132992584787292, -97.17046737670898), 17-1);
}
function getmarker6() {
	marker6.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.08287098876985, -97.1599692106247), 17-1);
}	
function getmarker7() {
	marker7.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.11614487753552, -97.16988801956177), 17-1);
}
function getmarker8() {
	marker8.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.116944452000055, -97.16902434825897), 17-1);
}
function getmarker9() {
	marker9.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.10380376353134, -97.16399252414703), 17-1);
}
function getmarker10() {
	marker10.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.09432787126847, -97.16560184955597), 17-1);
}	
function getmarker11() {
	marker11.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.09888044201675, -97.16547310352325), 17-1);
}
function getmarker12() {
	marker12.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.101149434921812, -97.16869175434112), 17-1);
}
function getmarker13() {
	marker13.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.109593940997786, -97.16925501823425), 17-1);
}
function getmarker14() {
	marker14.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.10211771785575, -97.16779589653015), 17-1);
}
function getmarker15() {
	marker15.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.074771481373737, -97.212615609169), 17-1);
}
function getmarker16() {
	marker16.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.07648201295436, -97.20946133136749), 17-1);
}
function getmarker17() {
	marker17.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.097777242726035, -97.16852009296417), 17-1);
}
function getmarker18() {
	marker18.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.093036739590307, -97.16476500034332), 17-1);
}
function getmarker19() {
	marker19.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.075821895277386, -97.16397106647491), 17-1);
}
function getmarker20() {
	marker20.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.068984399118477, -97.16165363788605), 17-1);
}
function getmarker21() {
	marker21.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.12234384478151, -97.17056930065155), 17-1);
}
function getmarker22() {
	marker22.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.074135446356063, -97.21364557743072), 17-1);
}
function getmarker23() {
	marker23.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.101780505803503, -97.16679275035858), 17-1);
}
function getmarker24() {
	marker24.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.077758872350802, -97.17038691043854), 17-1);
}
function getmarker25() {
	marker25.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.07335485320322, -97.21512079238891), 17-1);
}
function getmarker26() {
	marker26.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.072453791673734, -97.22341418266296), 17-1);
}
function getmarker27() {
	marker27.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.09798921195628, -97.16543018817901), 17-1);
}
function getmarker28() {
	marker28.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.07095521944389, -97.22036182880401), 17-1);
}
function getmarker29() {
	marker29.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.103066723698084, -97.16687858104706), 17-1);
}
function getmarker30() {
	marker30.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.103972366761855, -97.16784417629242), 17-1);
}
function getmarker31() {
	marker31.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.104699766483843, -97.16802656650543), 17-1);
}
function getmarker32() {
	marker32.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.08663386488554, -97.16369211673736), 17-1);
}
function getmarker33() {
	marker33.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.099179123004202, -97.16647624969482), 17-1);
}
function getmarker34() {
	marker34.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.08550164215964, -97.16096699237823), 17-1);
}
function getmarker35() {
	marker35.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.07563397788585, -97.20887660980224), 17-1);
}
function getmarker36() {
	marker36.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.101640803382746, -97.16869711875915), 17-1);
}
function getmarker37() {
	marker37.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.077334860208847, -97.20790028572082), 17-1);
}
function getmarker38() {
	marker38.setImage('http://www.guidetosouthpadreisland.com/South_Padre_Island/Maps/restaurant2_icon.gif');
	map.setCenter(new GLatLng(26.072222502034464, -97.20277190208435), 17-1);
}









//]]>














