/* Parametros de entrada de la clase */
	var cTexto = new String();
	var cPosicion = new GLatLng();
	var cProfundidad = new Number();
	
	/* Control que centra el hotel con los valores pasados por parametro */
	function GCentrarHotelControl(texto,posicion,profundidad) {
		cTexto       = texto;
		cPosicion    = posicion;
		cProfundidad = profundidad;
	}
	GCentrarHotelControl.prototype = new GControl();
	GCentrarHotelControl.prototype.initialize = function(map) {
	
		var contenedorControl = document.createElement("div");
		
		var divCentro = document.createElement("div");
		this.setButtonStyle_(divCentro);
		contenedorControl.appendChild(divCentro);
		divCentro.appendChild(document.createTextNode(cTexto));
		GEvent.addDomListener(divCentro, "click", function() {
			map.setCenter(cPosicion,cProfundidad);
		});
		
		map.getContainer().appendChild(contenedorControl);
		return contenedorControl;
	}
	
	/* Carga la posicion por defecto del control */
	GCentrarHotelControl.prototype.getDefaultPosition = function() {
		var x = new Number(241);
		var y = new Number(0);
		if (document.all) {x = 295;} /* Solo para Internet Explorer */
		return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(x,y));
	}
	
	/* Devuelve el estilo del boton */
	GCentrarHotelControl.prototype.setButtonStyle_ = function(boton) {
		boton.style.textDecoration = "none";
		boton.style.color = "black";
		boton.style.backgroundColor = "white";
		boton.style.fontFamily = "Arial";
		boton.style.fontSize = "12px";
		boton.style.border = "1px solid black";
		boton.style.padding = "1px";
		boton.style.marginTop = "7px";
		boton.style.textAlign = "center";
		boton.style.width = "7em";
		boton.style.cursor = "pointer";
	}