function showAddress(address) {
	var point = startPoint;
	if (address == 'estación coruña'){
		address = 'coruña';
	}
		if (geocoder) {
			geocoder.getLatLng( address,function(point) {
				if (!point) {
						alert(traducir('Noencontrado1') + address + traducir('Noencontrado2'));
				} else {
					latitudMover = point.lat();
					longitudMover = point.lng();
					if(latitudMover<=43.80 && latitudMover>=41.80 && longitudMover>=-9.37 && longitudMover<=-6.8){
						map.panTo(point);
						if(circulo_creado == 0){
							circulo_buscador = 1;
							setTimeout("createCircle(new GLatLng("+ latitudMover + ", " + longitudMover +"), 25000);", 1000);
							map.setCenter(point, 12);
						}else{
							GeoQuery.moveCircle(point);
							map.setCenter(point, 12);
						}
					}else{
						alert(traducir('Noencontrado1') + address + traducir('Noencontrado2'));
					}
				}
			}
		);
    }
}


var calendario;
function abrirCalendario(){
	$('contcal').style.display = 'block'; 
	calendario = new scal('contcal', actualizarFecha, {titleformat:'mmmm yyyy',dayheadlength:2,weekdaystart:1});
}

function actualizarFecha(e) {
	$('fecha').setValue(e.format('dd/mm/yyyy'));
	cerrarCalendario();
}

function cerrarCalendario() {
	calendario.destroy();
	$('contcal').style.display = 'none'; 
	calendario = null;
}

function alternarCalendario() {
	if (undefined == calendario) {
		abrirCalendario();
	}else{
		cerrarCalendario();
	}
}

var visible = 1;

function moverPantalla(){
	if(visible == 1) {
		
		new Effect.Move ('pestana',
			{	x: 300,
				y: 0, 
				mode: 'relative',
				afterFinish: activarBotos,
				beforeStart: desactivarBotos
      		});
		
		visible = 0;
	}else{
	
		new Effect.Move ('pestana',
			{	x: -300,
				y: 0, 
				mode: 'relative',
				afterFinish: activarBotos2,
				beforeStart: desactivarBotos2
      		});
		visible = 1;
	}
}

function activarBotos(obj){
	botonesArray = $$('#boton_pestana a');
	botonesArray.each(function(item) {
	  	enableLink(item);
	});
	$('instrucciones_pestana').style.width= "2px";
	$('pestana').style.left= 0;
	$('instrucciones_pestana').style.marginLeft= "940px";
	if (ie == true){
		$('instrucciones_pestana').style.marginLeft= "-40px";
	}		
}
function desactivarBotos(obj){
	botonesArray = $$('#boton_pestana a');
	botonesArray.each(function(item) {
	  	disableLink(item);
	});
}
function activarBotos2(obj){
	botonesArray = $$('#boton_pestana a');
	botonesArray.each(function(item) {
	  	enableLink(item);
	});
}
function desactivarBotos2(obj){
	$('instrucciones_pestana').style.width= "300px";
	$('instrucciones_pestana').style.marginLeft= "640px";
	$('pestana').style.left= "300px";
	if (ie == true){
		$('instrucciones_pestana').style.marginLeft= "-340px";
	}	
	botonesArray = $$('#boton_pestana a');
	botonesArray.each(function(item) {
	  	disableLink(item);
	});
}

function cancelLink () {
  return false;
}
function disableLink (link) {
  if (link.onclick)
    link.oldOnClick = link.onclick;
  link.onclick = cancelLink;
  if (link.style)
    link.style.cursor = 'default';
}
function enableLink (link) {
  link.onclick = link.oldOnClick ? link.oldOnClick : null;
  if (link.style)
    link.style.cursor = 
      document.all ? 'hand' : 'pointer';
}


