﻿var url = new Array(35);
var fader = null;
var timer = null;
var opcion = 0;
var limite_inferior=1;
var limite_superior=1;

function numero_random()
{
var random_inicial = (limite_superior - limite_inferior + 1) * Math.random() + limite_inferior
return Math.floor(random_inicial)
}

// Función para saltar a un URL en un Select Menu
//  In this case, the name of the array containing the URLs
//  is determined based on the option value of the pulldown menu selection.
function jumpToURL(formName,menuName) {	
	 var obj = eval("document." + formName + "." + menuName);
	 var index = obj.value;
	 	 
	 var url = eval(menuName + "_URLs[index]");
	 if (index != "") {
	   location.href=url;
	 }
	}

 function JumpSistema(){
  location.href="Login.aspx?Login=" + document.getElementById('Login').value + "&Password=" + document.getElementById('Password').value;
 }

function delay_change(opcion)
{
 if (opcion==0){
  if (timer)
   clearTimeout(timer);}
 else 
  timer = setTimeout("cambiar("+opcion+")", 500);
}

function propiedades(html,href)
{
 this.html = html
 this.href = href
}

function cambiar(opcion)
{ 
 var color1 = "#006666";
 var color2 = "#4682B4";
 var color3 = "#8B0000";
 var color4 = "#006600";
 var color5 = "gray";
 var link = "link";
 var color = "";
 var titulos = "";
 var factor =1;



if (opcion==5)
 opcion=numero_random();

if (opcion!=0) 
{
 url[0] = new propiedades("Construcción de Sitios Web", "Servicios/ServiciosWeb/SitiosWeb/Servicios.html");
 url[1] = new propiedades("Paquetes Web","Servicios/ServiciosWeb/SitiosWeb/Paquetes.html");
 url[2] = new propiedades("Posicionamiento Web", "Servicios/ServiciosWeb/PosicionamientoWeb/Posicionamiento.html");
 url[3] = new propiedades("Paquetes de Posicionamiento", "Servicios/ServiciosWeb/PosicionamientoWeb/PaquetesPosicionamiento.html");                                                          
 url[4] = new propiedades("¿Por qué invertir en un Sitio Web?","Servicios/ServiciosWeb/SitiosWeb/Servicios.html");
 url[5] = new propiedades("Diseño web minibásico", "Servicios/ServiciosWeb/SitiosWeb/PaquetesMinibasico.html");
 url[6] = new propiedades("¿Qué es el posicionamiento web?", "Servicios/ServiciosWeb/PosicionamientoWeb/Posicionamiento.html");
 url[7] = new propiedades("Posicionamiento minibásico", "Servicios/ServiciosWeb/PosicionamientoWeb/PaquetePosicionamientoMiniBasico.html");
 url[8] = new propiedades("Beneficios de una página web", "Servicios/ServiciosWeb/SitiosWeb/VentajasBeneficios.html");
 url[9] = new propiedades("Diseño web básico", "Servicios/ServiciosWeb/SitiosWeb/PaqueteBasico.html");
 url[10] = new propiedades("Beneficios del posicionamiento", "Servicios/ServiciosWeb/PosicionamientoWeb/VentajasBeneficiosPosicionamiento.html");
 url[11] = new propiedades("Posicionamiento básico", "Servicios/ServiciosWeb/PosicionamientoWeb/PaquetePosicionamientoBasico.html");
 url[12] = new propiedades("Ventajas de un sitio web","Servicios/ServiciosWeb/SitiosWeb/VentajasBeneficios.html");
 url[13] = new propiedades("Diseño web Estándar","Servicios/ServiciosWeb/SitiosWeb/PaqueteEstandar.html");
 url[14] = new propiedades("Ventajas de posicionamiento","Servicios/ServiciosWeb/PosicionamientoWeb/VentajasBeneficiosPosicionamiento.html");
 url[15] = new propiedades("Posicionamiento Estándar", "Servicios/ServiciosWeb/PosicionamientoWeb/PaquetePosicionamientoEstandar.html");
 url[16] = new propiedades("Nuestra metodología web", "Servicios/ServiciosWeb/SitiosWeb/Metodologia.html");
 url[17] = new propiedades("Diseño web corporativo", "Servicios/ServiciosWeb/SitiosWeb/PaqueteCorporativo.html");
 url[18] = new propiedades("¿Cómo se posiciona un Sitio Web?", "Servicios/ServiciosWeb/PosicionamientoWeb/MetodologiaPosicionamiento.html");
 url[19] = new propiedades("Posicionamiento corporativo", "Servicios/ServiciosWeb/PosicionamientoWeb/PaquetePosicionamientoCorporativo.html");
 
 url[20] = new propiedades("Aplicaciones Web", "Servicios/AplicacionesWeb/AplicacionesWeb.html");
 url[21] = new propiedades("Aplicaciones Ventas Web ", "Servicios/AplicacionesWeb/AplicacionesWeb.html");
 url[22] = new propiedades("Aplicaciones Marketing Web", "Servicios/AplicacionesWeb/AplicacionesWeb.html");
 url[23] = new propiedades("Recursos Humanos Web", "Servicios/AplicacionesWeb/AplicacionesWeb.html");
 url[24] = new propiedades("¿Qué es una aplicación Web?","Servicios/AplicacionesWeb/AplicacionesWeb.html");
 url[25] = new propiedades("Administración de contactos","Servicios/AplicacionesWeb/AdministraciondeContactos.html");
 url[26] = new propiedades("Publicidad Web","Servicios/AplicacionesWeb/PublicidadWeb.html");
 url[27] = new propiedades("Exámenes Psicológicos", "Servicios/AplicacionesWeb/Examenes.html");
 url[28] = new propiedades("Beneficios", "Servicios/AplicacionesWeb/VentajasBeneficiosAplicaciones.html");
 url[29] = new propiedades("Control de oportunidades", "Servicios/AplicacionesWeb/ControldeOportunidades.html");
 url[30] = new propiedades("Análisis de ventas", "Servicios/AplicacionesWeb/AnalisisdeVentas.html");
 url[31] = new propiedades("Clima laboral On-Line", "Servicios/AplicacionesWeb/ClimaLaboral.html");
 url[32] = new propiedades("Ventajas", "Servicios/AplicacionesWeb/VentajasBeneficiosAplicaciones.html");
 url[33] = new propiedades("Soporte on-line", "Servicios/AplicacionesWeb/SoporteOnline.html");
 url[34] = new propiedades("Satisfacción del cliente On-Line"," Servicios/AplicacionesWeb/SatisfaccionCliente.html");
 url[35] = new propiedades("Evaluación de desempeño", "Servicios/AplicacionesWeb/EvaluacionDesempeño.html"); 
 url[36] = new propiedades("Caracterísitcas del servicio","Servicios/AplicacionesWeb/CaracteristicasdelServicio.html");
 url[37] = new propiedades("Cátalogo electrónico","Servicios/AplicacionesWeb/CatalogoElectronico.html");
 url[38] = new propiedades("Servicio al cliente por Internet","Servicios/AplicacionesWeb/ServicioalCliente.html");
 url[39] = new propiedades("Capacitación on-line", "Servicios/AplicacionesWeb/CapacitacionOnline.html");
 
 
 url[40] = new propiedades("Relaciones de Pareja", "http://www.esenciahumana.com.mx");
 url[41] = new propiedades("Conflictos en la pareja", "http://www.esenciahumana.com.mx");
 url[42] = new propiedades("Sexualidad", "http://www.esenciahumana.com.mx");
 url[43] = new propiedades("Herramientas de comunicación", "http://www.esenciahumana.com.mx");
 url[44] = new propiedades("Comenzar una pareja", "http://www.esenciahumana.com.mx");
 url[45] = new propiedades("Negociación en la pareja", "http://www.esenciahumana.com.mx");
 url[46] = new propiedades("Amor, sexualidad y pareja"," http://www.esenciahumana.com.mx");
 url[47] = new propiedades("Desarrollo emocional de la pareja", "http://www.esenciahumana.com.mx");
 url[48] = new propiedades("Comunicación en la pareja", "http://www.esenciahumana.com.mx");
 url[49] = new propiedades("Maltrato en la pareja", "http://www.esenciahumana.com.mx");
 url[50] = new propiedades("Sexualidad en la pareja I"," http://www.esenciahumana.com.mx");
 url[51] = new propiedades("Aceptación y compromiso", "http://www.esenciahumana.com.mx"); 
 url[52] = new propiedades("Mujeres líderes y pareja","http://www.esenciahumana.com.mx");
 url[53] = new propiedades("Violencia Familiar","http://www.esenciahumana.com.mx");
 url[54] = new propiedades("Sexualidad en la pareja II","http://www.esenciahumana.com.mx");
 url[55] = new propiedades("Elección de pareja", "http://www.google.com.mx");
 url[56] = new propiedades("Madres solteras y la nueva pareja", "http://www.esenciahumana.com.mx");
 url[57] = new propiedades("Codependencia", "http://www.esenciahumana.com.mx");
 url[58] = new propiedades("Reviviendo la pasión", "http://www.esenciahumana.com.mx");
 url[59] = new propiedades("Matrimonio:Efectos secuandarios", "http://www.esenciahumana.com.mx");
 
 url[60] = new propiedades("Dirección", "http://www.esenciahumana.com.mx");
 url[61] = new propiedades("Ventas", "http://www.esenciahumana.com.mx");
 url[62] = new propiedades("Recursos Humanos"," http://www.esenciahumana.com.mx");
 url[63] = new propiedades("", "http://www.esenciahumana.com.mx");
 url[64] = new propiedades("Planeación estratégica", "http://www.esenciahumana.com.mx");
 url[65] = new propiedades("Estrategias de Ventas", "http://www.esenciahumana.com.mx");
 url[66] = new propiedades("Liderazgo que transforma"," http://www.esenciahumana.com.mx");
 url[67] = new propiedades("Coaching", "http://www.esenciahumana.com.mx");
 url[68] = new propiedades("Balanced Score Card", "http://www.esenciahumana.com.mx");
 url[69] = new propiedades("Negociación con Principios", "http://www.esenciahumana.com.mx");
 url[70] = new propiedades("Cambio Organizacional"," http://www.esenciahumana.com.mx");
 url[71] = new propiedades("Trabajo en Equipo", "http://www.esenciahumana.com.mx");
 url[72] = new propiedades("Administración de Proyectos", "http://www.esenciahumana.com.mx");
 url[73] = new propiedades("El arte de negociar", "http://www.esenciahumana.com.mx");
 url[74] = new propiedades("Administración del tiempo"," http://www.esenciahumana.com.mx");
 url[75] = new propiedades("Estrategias de Compensación", "http://www.esenciahumana.com.mx");
 url[76] = new propiedades("Administración por Objetivos", "http://www.esenciahumana.com.mx");
 url[77] = new propiedades("Calidad y Actitud en el Servicio", "http://www.esenciahumana.com.mx");
 url[78] = new propiedades("Inteligencia Emocional Empresarial","http://www.esenciahumana.com.mx");
 url[79] = new propiedades("Habilidades Directivas", "http://www.esenciahumana.com.mx");
   
  
  if (opcion==1)
  {
  color = color1;
  factor = 0;
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(images/pagina_principal/PosicionamientoWeb.gif)";
/*  document.getElementById('AreaMensajes').style.backgroundColor  = color1;  
  document.getElementById('MensajePrincipal').style.backgroundColor  = color1;
  document.getElementById('MensajePrincipal1').style.backgroundColor  = color1;
  document.getElementById('MensajePrincipal').innerHTML="&#147;Aprende a crear tu vida&#148;";     
  document.getElementById('MensajePrincipal').href="http://www.esenciahumana.com.mx";
  document.getElementById('MensajePrincipal1').innerHTML="Vive nuestros cursos de Dominio Personal";     
  document.getElementById('MensajePrincipal1').href="http://www.esenciahumana.com.mx";  
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(http://www.esenciahumana.com.mx/images/pagina_principal/dominio2.jpg)";                
  document.getElementById('ImagenProblema').src = "http://www.esenciahumana.com.mx/images/pagina_principal/mujer_dinero.jpg";
  document.getElementById('ProblemaMensaje1').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje1').innerHTML="¿Cuál es tu misión en la vida?"
  document.getElementById('ProblemaMensaje2').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje2').innerHTML="Soledad, Depresión, Sin Sentido, Tristeza, Ira, Angustia, Culpa, Rencor, Desesperación"*/
  document.getElementById('ServiciosWeb').style.backgroundColor  = color1;     
  document.getElementById('AplicacionesWeb').style.backgroundColor  = color5;     
//  document.getElementById('Pareja').style.backgroundColor  = color5;
//  document.getElementById('Empresa').style.backgroundColor  = color5;       

 
  /* Control de los bordes  */
  document.getElementById('ServiciosWeb').style.borderBottomStyle  = "none";
  document.getElementById('AplicacionesWeb').style.borderBottom="white thin groove";
//  document.getElementById('Pareja').style.borderBottom  = "white thin groove";
//  document.getElementById('Empresa').style.borderBottom  = "white thin groove";    
  }
  else if (opcion==2)
  {
  factor = 20;
  color = color2;
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(images/pagina_principal/AplicacionesWeb.gif)";
/*  document.getElementById('AreaMensajes').style.backgroundColor = color2;    
  document.getElementById('MensajePrincipal').style.backgroundColor  = color2;
  document.getElementById('MensajePrincipal1').style.backgroundColor  = color2;
  document.getElementById('MensajePrincipal').innerHTML="&#147;Tu hijo, tu espejo y tu reflejo&#148";     
  document.getElementById('MensajePrincipal').href="http://www.esenciahumana.com.mx";
  document.getElementById('MensajePrincipal1').innerHTML="Conócete a través de tu familia, la mayor riqueza";     
  document.getElementById('MensajePrincipal1').href="http://www.esenciahumana.com.mx";    
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(http://www.esenciahumana.com.mx/images/pagina_principal/familia.gif)";                
  document.getElementById('ImagenProblema').src = "http://www.esenciahumana.com.mx/images/pagina_principal/problemas_familiares.jpg";
  document.getElementById('ProblemaMensaje1').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje1').innerHTML="¿Odias a tu familia?"
  document.getElementById('ProblemaMensaje2').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje2').innerHTML="Desintegración, Distanciamiento, Sobreprotección, Violencia, Libertinaje, Dependencia, etc..."  */
  document.getElementById('AplicacionesWeb').style.backgroundColor  = color2;     
  document.getElementById('ServiciosWeb').style.backgroundColor  = color5;     
//  document.getElementById('Pareja').style.backgroundColor  = color5;
//  document.getElementById('Empresa').style.backgroundColor  = color5;
  
/* Control de los bordes  */
  document.getElementById('AplicacionesWeb').style.borderBottomStyle  = "none";
  document.getElementById('ServiciosWeb').style.borderBottom="white thin groove";
//  document.getElementById('Pareja').style.borderBottom  = "white thin groove";
//  document.getElementById('Empresa').style.borderBottom  = "white thin groove";           
  }
/*  else if (opcion==3)
  {
  factor = 40;
  color = color3;
  document.getElementById('AreaMensajes').style.backgroundColor = color3;    
  document.getElementById('MensajePrincipal').style.backgroundColor  = color3;
  document.getElementById('MensajePrincipal1').style.backgroundColor  = color3;
  document.getElementById('MensajePrincipal').innerHTML='&#147;Amor es Libertad&#148';     
  document.getElementById('MensajePrincipal').href="http://www.esenciahumana.com.mx";
  document.getElementById('MensajePrincipal1').innerHTML="Conócete a través de tu pareja";     
  document.getElementById('MensajePrincipal1').href="http://www.esenciahumana.com.mx";    
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(http://www.esenciahumana.com.mx/images/pagina_principal/pareja.gif)";
  document.getElementById('ImagenProblema').src = "http://www.esenciahumana.com.mx/images/pagina_principal/pareja_problemas.jpg";
  document.getElementById('ProblemaMensaje1').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje1').innerHTML="¿Pareja o Enemigo?"
  document.getElementById('ProblemaMensaje2').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje2').innerHTML="Incomprensión, Costumbre, Dependencia, Sin Pasión, Falta de Comunicación etc..."   
  document.getElementById('Pareja').style.backgroundColor  = color3;     
  document.getElementById('Dominio').style.backgroundColor  = color5;     
  document.getElementById('Familia').style.backgroundColor  = color5;
//  document.getElementById('Empresa').style.backgroundColor  = color5;      
  // Control de los bordes 
  document.getElementById('Pareja').style.borderBottomStyle  = "none";
  document.getElementById('Dominio').style.borderBottom="white thin groove";
  document.getElementById('Familia').style.borderBottom  = "white thin groove";
//  document.getElementById('Empresa').style.borderBottom  = "white thin groove";          
  }*/
/*  else if (opcion==4)
  {
  factor = 60;
  color = color4;
  document.getElementById('AreaMensajes').style.backgroundColor  = color4;    
  document.getElementById('MensajePrincipal').style.backgroundColor  = color4;
  document.getElementById('MensajePrincipal1').style.backgroundColor  = color4;
  document.getElementById('MensajePrincipal').innerHTML='&#147;Conciencia Organizacional&#148';     
  document.getElementById('MensajePrincipal').href='http://www.esenciahumana.com.mx';
  document.getElementById('MensajePrincipal1').innerHTML="Una inversión rentable: El Desarrollo Humano";     
  document.getElementById('MensajePrincipal1').href="http://www.esenciahumana.com.mx";    
  document.getElementById('ImagenPrincipal').style.backgroundImage="url(http://www.esenciahumana.com.mx/images/pagina_principal/empresa.gif)";
  document.getElementById('ImagenProblema').src = "http://www.esenciahumana.com.mx/images/pagina_principal/estres.jpg";
  document.getElementById('ProblemaMensaje1').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje1').innerHTML="¿Te aprisiona tu trabajo?"
  document.getElementById('ProblemaMensaje2').href="http://www.esenciahumana.com.mx"
  document.getElementById('ProblemaMensaje2').innerHTML="Desmotivación, Injusticia, Sin Crecimiento, Estrés, Abuso del tiempo etc..."      
  document.getElementById('Empresa').style.backgroundColor  = color4;     
  document.getElementById('Dominio').style.backgroundColor  = color5;        
  document.getElementById('Familia').style.backgroundColor  = color5;
  document.getElementById('Pareja').style.backgroundColor  = color5;        

  document.getElementById('Empresa').style.borderBottomStyle  = "none";  
  document.getElementById('Dominio').style.borderBottom="white thin groove";  
  document.getElementById('Familia').style.borderBottom  = "white thin groove";
  document.getElementById('Pareja').style.borderBottom  = "white thin groove";        
  }*/  
     
/* Control del background de la tabla */  
  for(i=1;i<=20;i++)
  {
   link="link"+i
   document.getElementById(link).style.backgroundColor = color;     
  }
  
  
/* Actualización de los links */ 
  for(i=0;i<=19;i++)
 {
  j=i+1;
  document.getElementById('url'+j).innerHTML=url[factor].html;     
  document.getElementById('url'+j).href=url[factor].href;  
  factor = factor + 1;  
 } 
}  
}

// BEGIN dropdown menu code
function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	   styleObject.visibility = newVisibility;
	   return true;
    } else {
	   return false;
    }
} // changeObjectVisibility

function moveObject(objectId, newXCoordinate, newYCoordinate) {
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	   styleObject.left = newXCoordinate;
	   styleObject.top = newYCoordinate;
	   return true;
    } else {
	   return false;
    }
} // moveObject

function showMenu(mOrder, eventObj) {
    hideMenus();
    var mId = 'menu' + mOrder;
    if(changeObjectVisibility(mId, 'visible')) {
	   eventObj.cancelBubble = true;
	   return true;
    } else {
	   return false;
    }
}

var numMenus = 1;

function hideMenus() {
    for(j = 1; j <= numMenus; j++) {
	  changeObjectVisibility('menu' + j, 'hidden');
    }
}
function hideMenu(menuNumber) {
	changeObjectVisibility('menu' + menuNumber, 'hidden');
}

document.onclick = hideMenus;
// END dropdown menu code
