/* ============================================================= */
/*	Google Map Custom Control  */
/*  Displays wait message  */
/* ============================================================= */
function WaitControl() {}
WaitControl.prototype = new GControl();
WaitControl.prototype.initialize = function(map) {
	var containerDiv = $("<div>").css({
		backgroundColor: "#ffffff",
		border: "solid 1px black",
		padding: "10px",
		font: "small Arial",
		fontSize: "12px",
		textAlign: "center"
	}).get(0);
	var msgSpan = $("<span>Please wait...</span>").get(0);
	var msgImg = $('<img>').css({
    verticalAlign: '-3px',
    marginRight: '5px',
    src: "images/indicator.gif"
  }).get(0);
	containerDiv.appendChild(msgImg);
	containerDiv.appendChild(msgSpan);
	map.getContainer().appendChild(containerDiv);
	return containerDiv;
}
WaitControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(map.getSize().width/2-50, map.getSize().height/2-10));
}
// ============================================================================================
// ==== The "More..." control simply accepts a mouseover to reveal the "Layer" control ===
function MoreControl() {}
MoreControl.prototype = new GControl();
MoreControl.prototype.initialize = function(map) {
	var container = $("<div>").css({
		border: "2px solid black",
		fontSize: "12px",
		fontFamily: "Arial, sans-serif",
		width: "80px",
		backgroundColor: "#ffffff",
		textAlign: "center",
    fontWeight: 'bold'
	}).html("More...").get(0);

	map.getContainer().appendChild(container);

	GEvent.addDomListener(container, "mouseover", function() {
	  map.addControl(layerControl);
	});

	return container;
}
MoreControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(210, 7));
}

