// JavaScript Document

window.defaultStatus="Copyright 2006 - Exxels - Servicios inmobiliarios"; 

function validarNumero(theform) {
  if (theform.codigo.value == "")	{
	alert("Ingrese el codigo de la propiedad que quiere consultar");
    theform.codigo.focus();
    return (false);
  }

  valor = parseInt(theform.codigo.value) 
  if (isNaN(valor)) { 
    alert("Ingrese solo el número del codigo de la propiedad");
    theform.codigo.focus();
    return (false);
  } 
  
  return (true);
}

function validarTasacion(theform) {
	if (theform.nombre.value == "")	{
		alert("Ingrese su nombre completo.");
		theform.nombre.focus();
		return (false);
	}

	if (theform.telefono.value == "")	{
		alert("Ingrese su telefono");
		theform.telefono.focus();
		return (false);
	}

	if (theform.direccion.value == "")	{
		alert("Ingrese su telefono.");
		theform.direccion.focus();
		return (false);
	}

	if (theform.barrio.value == 0)	{
		alert("Ingrese el barrio de la propiedad a tasar.");
		theform.barrio.focus();
		return (false);
	}
	
	if (theform.tipodepropiedad.value == 0)	{
		alert("Ingrese el tipo de propiedad a tasar");
		theform.tipodepropiedad.focus();
		return (false);
	}
	
	return (true);
}

function click(e) {
	// Explorer
	if (IE)
	if (event.button == 2){
	accion() ;
	return false ;
}

// Netscape
if (NS)
	if (e.which == 3) {
	accion() ;
	return false ;
	}
}

function accion() {
	window.status = 'Copyright 2006 - Exxels - Servicios inmobiliarios' ;
	if (IE) alert('Copyright 2006 - Exxels - Servicios inmobiliarios');
	return ;
}

var NS = (document.layers) ;
var IE = (document.all) ;
if (NS) document.captureEvents(Event.MOUSEDOWN) ;
document.onmousedown = click ;
