// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//
function loadIframe(theURL) {
document.getElementById("contentFRM").src = theURL;
}
//permite generar un iFrame y modificar su tamaño basado en el contenido del mismo
function autofitIframe(id){
if (!window.opera && !document.mimeType && document.all && document.getElementById){
parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
}
}

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);

// extender_contraer DIV para menu principal
	var altura = 0;
	var velocidad = 10;
	function extender() {
		var objeto = document.getElementById('texto');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 21)) {
			objeto.style.height = altura;
			window.setTimeout ("extender();", 10);
		}
		
	}
	function contraer() {
		var objeto2 = document.getElementById('texto');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("contraer();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function extender_contraer () {
		if (	altura <= 0) {
			extender();
		} else {
			contraer();
		}
	}		
// extender_contraer DIV para logIn
	var altura = 0;
	var velocidad = 10;
	function loginExt() {
		var objeto = document.getElementById('logmeIn');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 40)) {
			objeto.style.height = altura;
			window.setTimeout ("loginExt();", 10);
		}
		
	}
	function loginCont() {
		var objeto2 = document.getElementById('logmeIn');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("loginCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_login () {
		if (	altura <= 0) {
			loginExt();
		} else {
			loginCont();
		}
	}		
// extender_contraer DIV para recuperación de clave
	var altura = 0;
	var velocidad = 10;
	function passwordExt() {
		var objeto = document.getElementById('password');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 40)) {
			objeto.style.height = altura;
			window.setTimeout ("passwordExt();", 10);
		}
		
	}
	function passwordCont() {
		var objeto2 = document.getElementById('password');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("passwordCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_password () {
		if (	altura <= 0) {
			passwordExt();
		} else {
			passwordCont();
		}
	}		
// extender_contraer DIV para ristro de usuario
	var altura = 0;
	var velocidad = 10;
	function regusrExt() {
		var objeto = document.getElementById('regusr');
		objeto.style.visibility = 'visible';
		objeto.style.overflow = 'visible';
		altura += velocidad;
		if (!(altura >= 1)) {
			objeto.style.height = altura;
			window.setTimeout ("regusrExt();", 10);
		}
		
	}
	function regusrCont() {
		var objeto2 = document.getElementById('regusr');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("regusrCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_regusr () {
		if (	altura <= 0) {
			regusrExt();
		} else {
			regusrCont();
		}
	}		
// extender_contraer DIV para ristro de empresa
	var altura = 0;
	var velocidad = 10;
	function regempExt() {
		var objeto = document.getElementById('regemp');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 40)) {
			objeto.style.height = altura;
			window.setTimeout ("regempExt();", 10);
		}
		
	}
	function regempCont() {
		var objeto2 = document.getElementById('regemp');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("regempCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_regemp () {
		if (	altura <= 0) {
			regempExt();
		} else {
			regempCont();
		}
	}		
// extender_contraer DIV para recomendar
	var altura = 0;
	var velocidad = 10;
	function recomExt() {
		var objeto = document.getElementById('recom');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 80)) {
			objeto.style.height = altura;
			window.setTimeout ("recomExt();", 10);
		}
		
	}
	function recomCont() {
		var objeto2 = document.getElementById('recom');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("recomCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_recom () {
		if (	altura <= 0) {
			recomExt();
		} else {
			recomCont();
		}
	}		
// extender_contraer DIV para contacto
	var altura = 0;
	var velocidad = 10;
	function contactaExt() {
		var objeto = document.getElementById('contacta');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 100)) {
			objeto.style.height = altura;
			window.setTimeout ("contactaExt();", 10);
		}
		
	}
	function contactaCont() {
		var objeto2 = document.getElementById('contacta');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("contactaCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_contacta () {
		if (	altura <= 0) {
			contactaExt();
		} else {
			contactaCont();
		}
	}		
// extender_contraer DIV para Somos
	var altura = 0;
	var velocidad = 10;
	function semosExt() {
		var objeto = document.getElementById('semos');
		objeto.style.visibility = 'visible';
		objeto.style.overflow = 'visible';
		altura += velocidad;
		if (!(altura >= 1)) {
			objeto.style.height = altura;
			window.setTimeout ("semosExt();", 10);
		}
		
	}
	function semosCont() {
		var objeto2 = document.getElementById('semos');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("semosCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function exp_cont_semos () {
		if (	altura <= 0) {
			semosExt();
		} else {
			semosCont();
		}
	}		
// extender_contraer DIV para eMail
	var altura = 0;
	var velocidad = 10;
	function mailExt() {
		var objeto = document.getElementById('mail');
		objeto.style.visibility = 'visible';
		objeto.style.height = '100%';
		objeto.style.padding = '10px';
		altura += velocidad;
		if (!(altura >= 1)) {
			objeto.style.height = altura;
			window.setTimeout ("mailExt();", 10);
		}
		
	}
	function mailCont() {
		var objeto2 = document.getElementById('mail');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("mailCont();", 10);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
			objeto.style.padding = '0px';
		}
		
	}
	function exp_cont_mail () {
		if (	altura <= 0) {
			mailExt();
		} else {
			mailCont();
		}
	}		
