<!--
// ---------------------------------------------------------------------------------------------------------------------- 
// RECARGA DE PÁGINA POR REDIMENSIONAMIENTO (AUTOMATICO)
// ---------------------------------------------------------------------------------------------------------------------- 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// ---------------------------------------------------------------------------------------------------------------------- 
// PERMITE SOLO INGRESO DE NÚMEROS
// ---------------------------------------------------------------------------------------------------------------------- 
function isNumberKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;
	return true;
}


// ---------------------------------------------------------------------------------------------------------------------- 
// MUESTRA EL CAMPO "CURRICULO"
// ---------------------------------------------------------------------------------------------------------------------- 
var lastDiv = "";
function showTipo(divName) {
	// hide last div
	if (lastDiv) {
		document.getElementById(lastDiv).className = "hiddeDiv";
	}
	//if value of the box is not nothing and an object with that name exists, then change the class
	if (divName && document.getElementById(divName)) {
		document.getElementById(divName).className = "visibDiv";
		lastDiv = divName;
	}
	return lastDiv;
}


// ---------------------------------------------------------------------------------------------------------------------- 
// HACE EL ROLLOVER DE DESTACADOS
// ---------------------------------------------------------------------------------------------------------------------- 
/*var ax2 = document.getElementsByName("result");
for (var i=0;i<ax2.length;i++) {
	ax2[i].onmouseover = function() {this.className = "resBoxOn";}
	ax2[i].onmouseout  = function() {this.className = "resBoxOf";}
}*/
// esta función es para hacer un conteo de los elementos existentes
function getElements(){
	var x=document.getElementsByName("result")
	alert(x.length + " elementos")
	
	
	
}


// ---------------------------------------------------------------------------------------------------------------------- 
// CAMBIO DE FOTO EN DETALLES DE INMUEBLE
// ---------------------------------------------------------------------------------------------------------------------- 
function cambiarPic(pic) {
	document.cambio.src = 'images/'+pic;
}


function ocultaEmail() {
	var befor = "escuela";
	var after = "maspirineo";
	var exten = "com";
	document.write (befor + "@" + after + "." + exten);
}






/*




// ---------------------------------------------------------------------------------------------------------------------- 
// DESHABILITAR BOTON DERECHO DEL MOUSE (AUTOMATICO)
// ---------------------------------------------------------------------------------------------------------------------- 
var messageText="© 2011 - Todos los derechos reservados.";
function clickIE() {
	if (event.button==0) {alert(messageText); return false;}
}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {
			alert(messageText);return false;
		}
	}
}
if(window.navigator.appName=="Netscape"){
	document.onmouseup=clickNS;
	document.oncontextmenu=clickIE;
	document.oncontextmenu=new Function("return false")
} else if (window.navigator.appName=="Microsoft Internet Explorer") {
	document.oncontextmenu=clickIE;
} else if (window.navigator.appName=="Opera") {
} else if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
} else {
	document.onmouseup=clickNS;
	document.oncontextmenu=clickIE;
}


// ---------------------------------------------------------------------------------------------------------------------- 
// REDIRECCIONA A UN LINK ESPECIFICO
// ---------------------------------------------------------------------------------------------------------------------- 
function redirURL(lnk) {
	document.location.href = lnk;
}



// ---------------------------------------------------------------------------------------------------------------------- 
// VERIFICA LOS DATOS DE LA PLANILLA 'CURRICULO'
// ---------------------------------------------------------------------------------------------------------------------- 
function verCurric() {
	// limpiamos los estilos
	document.curriculo.nombre.className = "plaCam2a planCaOf";
	document.curriculo.correo.className = "plaCam2a planCaOf";
	document.curriculo.curric.className = "plaCam2b planCaOf";
	document.curriculo.c_dire.className = "plaCam2a planCaOf";
	document.curriculo.c_arch.className = "plaCam2a planCaOf";
	// iniciamos la verificacion
	var themessage = "";
	var cabecera = "Error en el formulario:";
	if (document.curriculo.nombre.value == "") {
		themessage = themessage + "\n* Por favor escriba su nombre.";
		document.curriculo.nombre.className = "plaCam2a planCaOn";
	}
	if (document.curriculo.correo.value == "") {
		themessage = themessage + "\n* Por favor escriba su correo electrónico.";
		document.curriculo.correo.className = "plaCam2a planCaOn";
	}
	if (!(document.curriculo.correo.value == "") && !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.curriculo.correo.value))) {
		themessage = themessage + "\n* Verifique su correo electrónico, parece mal escrito.";
		document.curriculo.correo.className = "plaCam2a planCaOn";
	}
	if (document.curriculo.curric.value == "none") {
		themessage = themessage + "\n* Por favor seleccione cómo enviará su currículo";
		document.curriculo.curric.className = "plaCam2b planCaOn";
	}
	if ((document.curriculo.curric.value == "c_url") && (document.curriculo.c_dire.value == "http://")) {
		themessage = themessage + "\n* Por favor complete la dirección web de su currículo.";
		document.curriculo.c_dire.className = "plaCam2a planCaOn";
	}
	if (!(document.curriculo.c_dire.value == "http://") && !(/^[A-Za-z]+\:\/\/[A-Za-z0-9-]+\.[A-Za-z0-9]+/.test(document.curriculo.c_dire.value))) {
		themessage = themessage + "\n* Verifique su dirección web, parece mal escrita.";
		document.curriculo.c_dire.className = "plaCam2a planCaOn";
	}
	if ((document.curriculo.curric.value == "c_arc") && (document.curriculo.c_arch.value == "")) {
		themessage = themessage + "\n* Por favor seleccione su archivo para enviar.";
		document.curriculo.c_arch.className = "plaCam2a planCaOn";
	}
	if (themessage == "") {
		document.curriculo.submit();
		return false;
	} else {
		themessage=cabecera + themessage;
		alert(themessage);
		return false;
	}
}

*/

// -->
