
function SearchPlaceControl() {
	this.geo = new GClientGeocoder();
	
	this.divStyle = { backgroundColor: "white", padding: "2px" };
	this.msgStyle = { display: "none", position: "absolute", backgroundColor: "black", color: "white", padding: "10px", textAlign: "center", fontSize: "8pt", fontWeight: "bold", zIndex: 9999999999 };
}

SearchPlaceControl.prototype = new GControl();
SearchPlaceControl.prototype.initialize = function(map) {
	var div = jQuery("<div></div>").css(this.divStyle).opacity(9).appendTo(map.getContainer());
	var msg = jQuery("<div></div>").css(this.msgStyle).appendTo(map.getContainer());
	
	var input = jQuery("<input id='inputSearchPlace' type='text' tabindex='1' />").appendTo(div);
	var label = jQuery("<label for='inputSearchPlace'>場所を検索</label>").appendTo(div).innerLabel();
	
	var button = jQuery("<button id='doSearch' tabindex='2'>Go!</button>")
	.click(function(){ CrepeMaps.search( input.val() ); })
	.appendTo(div);

	return div[0];
}

SearchPlaceControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(15, 0));
}
