var message="www.cuspide.es";
var vent;
function abrirVentana(enlace,ancho,alto,tit)
{
	var y=screen.width;
	var x=screen.height;
	//x=eval((x-alto)*0.5);
	//y=eval((y-ancho)*0.5);
	x=0;
	y=0;
	//var vent;

	if (navigator.appName=='Netscape'){
		vent = window.open (enlace,tit,'top='+x+',left='+y+',width=' + ancho + ',height='+ alto +', scrollbars=yes, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no');
	}else{
		vent = window.open (enlace,tit,'top='+x+',left='+y+',width=' + ancho + ',height='+ alto +', scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no');
	}
	vent.focus();
	//location.href=enlace;
	setTimeout("Verifica_apertura()",1500);
}

function Verifica_apertura()
{
	if (vent.closed) 
	{
		document.getElementById("error").value="No se ha abierto la ficha"; //+ navigator.userProfile;
		alert("Para ver la ficha del inmueble, tiene que permitir las ventanas emergentes. Tiene que deshabilitar el bloqueo de ventanas emergentes proporcionado por Windows XP, las barras MSN, Yahoo, Google ...");
		//document.buscador.pagina.value=n_pag+1;
		document.buscador.submit();
	}
}


//en desuso
function Open_Window(theURL,winName,features) { 
 var vent;	
	vent= window.open(theURL,winName,features);
    vent.focus();
}


var message="Cuspide";

function click(e){
	if (document.all) {
		if (event.button==2) {
				alert(message);
				return false;
				}
		}
	if (document.layers){
		if (e.which==3) {
			alert(message);
			return false;
			}
		}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
}

document.onmousedown=click;