function GDakStreetViewControl() {
}

GDakStreetViewControl.prototype = new GControl();

GDakStreetViewControl.prototype.initialize = function(map) {
	var container = document.createElement("div");
	
	var newContainer = document.createElement("span");
	newContainer.appendChild(document.createTextNode("New"));
	
	var stvContainer = document.createElement("span");
	stvContainer.appendChild(document.createTextNode("Street View"));
	
	var hlpContainer = document.createElement("span");
	hlpContainer.appendChild(document.createTextNode("?"));
	
	container.appendChild(stvContainer);
	container.appendChild(newContainer);
	container.appendChild(hlpContainer);
	
	this.setButtonStyle_(container);
	this.setNewStyle_(newContainer);
	this.setHelpStyle_(hlpContainer);
	
	GEvent.addDomListener(stvContainer, "click", function() {
		toggleStreetsView();
		if (container.style.fontWeight != "bold") {
			container.style.fontWeight = "bold";
		}
		else {
			container.style.fontWeight = "normal";
		}
	});
	
	GEvent.addDomListener(newContainer, "click", function() {
		toggleStreetsView();
		if (container.style.fontWeight != "bold") {
			container.style.fontWeight = "bold";
		}
		else {
			container.style.fontWeight = "normal";
		}
	});
	
	GEvent.addDomListener(hlpContainer, "click", function() {
		NewWindow("http://www.daknomarketing.com/helpfiles/streetview.php","StreetView","500px","400px",'no','center');
	});
	
	map.getContainer().appendChild(container);
  	return container;
}
/*
GDakStreetViewControl.prototype.clicked = function() {
	toggleStreetsView();
	if (container.style.fontWeight != "bold") {
		container.style.fontWeight = "bold";
	}
	else {
		container.style.fontWeight = "normal";
	}
}
*/

GDakStreetViewControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(215, 7));
}

GDakStreetViewControl.prototype.setHelpStyle_ = function(button) {
	button.style.textDecoration = "none";
	button.style.paddingLeft = "3px";
	button.style.marginLeft = "3px";
	button.style.borderLeft = "1px solid black";
	button.style.fontWeight = "bold";
}

GDakStreetViewControl.prototype.setButtonStyle_ = function(button) {
	button.style.textDecoration = "none";
	button.style.color = "#000";
	button.style.backgroundColor = "white";
	button.style.font = "12px Arial";
	button.style.border = "1px solid black";
	button.style.padding = "2px";
	button.style.marginBottom = "3px";
	button.style.textAlign = "center";
	button.style.width = "120px";
	button.style.cursor = "pointer";
	button.style.height = "12px";
}

GDakStreetViewControl.prototype.setNewStyle_ = function(button) {
	button.style.textDecoration = "none";
	button.style.fontStyle = "italic";
	button.style.fontWeight = "bold";
	button.style.color = "#990000";
	button.style.marginLeft = "6px";
	button.style.marginRight = "6px";
}
