var pos = 0; var activar=true; var NSUBMENUS=8;
/*Imagenes Home*/
/*Imagenes Home*/
var objImg1=new Image(); objImg1.src = "UNIMEXNEW/imgs/001.jpg"; var objImg2=new Image(); objImg2.src = "UNIMEXNEW/imgs/002.jpg";  	
var objImg3=new Image(); objImg3.src = "UNIMEXNEW/imgs/004.jpg";  var objImg4=new Image(); objImg4.src = "UNIMEXNEW/imgs/003.jpg"; 	
var objImg5=new Image(); objImg5.src = "UNIMEXNEW/imgs/005.jpg"; var objImg6=new Image(); objImg6.src = "UNIMEXNEW/imgs/005.jpg"; 
/*Imagenes Home*/
/*var objImg1=new Image(); objImg1.src = "UNIMEXNEW/imgs/10.jpg"; var objImg2=new Image(); objImg2.src = "UNIMEXNEW/imgs/11.jpg";  	
var objImg3=new Image(); objImg3.src = "UNIMEXNEW/imgs/004.jpg";  var objImg4=new Image(); objImg4.src = "UNIMEXNEW/imgs/003.jpg"; var objImg5=new Image(); objImg5.src = "UNIMEXNEW/imgs/012.jpg";*/
function ObjElemID(WObj)
{
    return document.getElementById(WObj)     
}
function ProcSendLink(sAction)
{
	document.frm2.action=sAction; document.frm2.target="_blank"; document.frm2.submit()          		
}
function OcultaSubMenus()
{
	for(var J=1;J<NSUBMENUS;J++)     
	{
		ObjElemID("table"+J).style.display="none"; 
	}        
}    
function MostrarMenus(IItem)
{
	for(var J=1;J<NSUBMENUS;J++)       
	{
		if(J==IItem)           
		{             
			ObjElemID("table"+J).style.display="block";         
		}   
		else
		{
			ObjElemID("table"+J).style.display="none";                     
		}                                  
	}                         
}

function MostrarMenusX(IItem)
{
    if(IItem==1)	
    {
        GoPage(28)		
    }  	
    if(IItem==2)	
    {
        GoPage(29)		
    }  		
	if(IItem==3)
    {
        GoPage(21)		
    }		    		
}  
function GoPage(nNodo)
{      
    if(nNodo==1)		
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Admin/Administracion.html";							
    }
	else if(nNodo==2)		
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Comer/Comercio.html";					
	}        				
   else if(nNodo==3)		
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Comun/Comunicacion.html";				
	} 
	else if(nNodo==4)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Conta/Contaduria_Publica.html";		
	} 
	else if(nNodo==5)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Dere/Derecho.html";		
	} 	
	else if(nNodo==6)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Diseno/Diseno_Grafico.html";		
	} 		
	else if(nNodo==7)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Info/Informatica_Administrativa.html";		
	} 			
	else if(nNodo==8)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Merca/Mercadotecnia_Publicidad.html";		
	} 				
	else if(nNodo==9)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Ciencias/Ciencias.html";		
	} 	
	else if(nNodo==10)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Psico/Psicologia_Social.html";		
	} 		
	else if(nNodo==11)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Rela/Relaciones.html";		
	} 						
	else if(nNodo==12)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Sis/Sistemas.html";		
	} 			
	else if(nNodo==13)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Turi/Turismo.html";		
	} 
	else if(nNodo==14)       						
	{
        document.form2.target="_blank"; document.form2.submit()          		
	} 	
	else if(nNodo==15)       						
	{
        document.frm2.target="_blank"; document.frm2.submit()          		
	} 	
    else if(nNodo==160)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/AlumEgres/index.asp?nTipo=1";			
	} 

	else if(nNodo==161)       						
	{
		ObjElemID("IfrMain").src="UNIMEXNEW/AlumEgres/index.asp?nTipo=2";			
	} 
    else if(nNodo==18)								
    {
        ProcSendLink("../../encuesta-v/inicio.php")		
    }
    else if(nNodo==19)								
    {
        ProcSendLink("http://soyunimex.com/articulos/como-aprovechar-tu-correo-de-unimex")		
    }
    else if(nNodo==20)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/BecasCuotas/Prepa.asp";					
    } 
    else if(nNodo==21)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Posindes.html";					
    } 	  
    else if(nNodo==22)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/BecasCuotas/Prepa.asp?nTipo=2";					
    } 	  	         			
    else if(nNodo==23)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/BecasCuotas/Prepa.asp?nTipo=3";					
    } 	 
    else if(nNodo==24)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/AboutUNIMEX/index.asp";					
    } 	 	 	      
    else if(nNodo==25)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/AboutUNIMEX/index.asp?nTipo=2";					
    } 	 	 	        

    else if(nNodo==26)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/AboutUNIMEX/index.asp?nTipo=3";					
    } 	 				
    else if(nNodo==27)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/AboutUNIMEX/index.asp?nTipo=4";					
    } 		
    else if(nNodo==28)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/SUA/index.asp";		
	}
	else if(nNodo==280)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/SUA/Administracion/Administracion.asp";		
    }
	 else if(nNodo==281)								
    {
        ObjElemID("IfrMain").src="UNIMEXNEW/SUA/Contaduria/Contaduria.html";		
	}
	 else if(nNodo==282)								
    {
        ObjElemID("IfrMain").src="UNIMEXNEW/SUA/Derecho/Derecho.html";		
	}
    else if(nNodo==29)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Licindes.html";					
    } 				 
    else if(nNodo==30)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Admin/Administracion.html";					
    } 				 
    else if(nNodo==31)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Comun/Comunicacion_Visual.html";					
    } 				 	
    else if(nNodo==32)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Der/Derecho_Penal.html";					
    } 				 
    else if(nNodo==33)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Docencia/Docencia.html";					
    } 				
    else if(nNodo==34)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Edu/Educacion.html";					
    } 				
    else if(nNodo==35)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Habilidades/Habilidades_Directivas.html	";					
    } 				
    else if(nNodo==36)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Impuestos/Impuestos.html";					
    } 				
    else if(nNodo==37)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Merca/Mercadotecnia.html";					
    } 				
    else if(nNodo==38)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Pos/Terapias/Terapias_Psicosociales.html";					
    } 		
    else if(nNodo==39)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/prepa/Prepa.asp?nTipo=1";					
    } 		
    else if(nNodo==40)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/prepa/Prepa.asp?nTipo=2";					
    } 					
    else if(nNodo==41)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/prepa/Prepa.asp?nTipo=3";		
    } 					
    else if(nNodo==42)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/prepa/Prepa.asp?nTipo=4";					
    } 	
    else if(nNodo==43)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/prepa/Prepa.asp?nTipo=5";
    } 	
    else if(nNodo==44)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Info/index.asp";					
    } 
    else if(nNodo==45)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Info/Inscripcion/Inscripcion.html";					
    } 	
    else if(nNodo==46)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Info/Preguntas/Preguntas.html";					
    } 
    else if(nNodo==47)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Planteles/index.asp";					
    } 
    else if(nNodo==48)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Planteles/index.asp";					
    } 	
    else if(nNodo==49)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Info/faq.asp";					
    } 	
    else if(nNodo==50)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Info/Contacto/Contacto.asp";					
    } 	
    else if(nNodo==53)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/Lic/Idiomas/Idiomas.html";					
    } 		
    else if(nNodo==99999)								
    {   
        var iWidth=screen.width; var iHeight=screen.height;		
        oPop=window.open("/Kiosco1.html", "PPX", "resizable=no,directories=no,menubar=no,status=no,toolbar=no,location=no,scrollbars=yes,fullscreen=no,height=" + iHeight + ",width=" + iWidth + ",left=1,top=10");
        var oPop=null;
        return;		     
    } 
    else if(nNodo==52)								
    {            
        ObjElemID("IfrMain").src="UNIMEXNEW/BecasCuotas/Prepa.asp?nTipo=4";					
    } 		
    else
    {
        return;
    }				    		
}	
function InOut(tdID,sClass)
{  	      		
    ObjElemID(tdID).className=sClass; 
} 
function fnIrPromo(oPromo)	
{
   var SP=0;
   SP=ObjElemID("SP1").value;	 
   oPromo.target="_blank"; oPromo.href=fnDevLinks(SP);	
   var oPromo=null;   
}

function fnDevLinks(nLinks)
{	
	if(nLinks==0)
	{
		return "mkt/index.asp"   	 		
	}
	if(nLinks==1)
	{           
		return "mkt/index.asp"   	 		
	}
	if(nLinks==2)
	{
		return "mkt/pos/posgrado.asp"		
	}	
	if(nLinks==3)
	{
        return "https://www.unimex.edu.mx/pre_inscX/pre_insc.asp?Site=V"		
	}
	if(nLinks==4)
	{
		return "Test/" 		
	}
	if(nLinks==5)
	{
	   return "mkt/index.asp"					   
	}	
	if(nLinks==6)
	{
	   return "/index.asp"					   
	}								
}								
		
function PopPub()
{    
    ChangeAnu();
} 
/********************Carrusel***********************************/
//**************************************************************
function ChangeAnu()
{
    if(activar)
	{
        if(pos>4) pos=0;
        Pic1(DevRutaImgs(pos));  
		ObjElemID("SP1").value=pos;	
        ProcInicioBtns()		
        ObjElemID("tdCarr"+pos).className="BgCarru1";				
    }
    else	
    {       
        pos=0;	
    }	
    pos++;	            	
    var id = setTimeout("ChangeAnu()",8000);		
}
function ProcInicioBtns()
{
    for(var J=0;J<5;J++)	
    {
        ObjElemID("tdCarr"+J).className="BgCarru0";						
    }	
}
function DevRutaImgs(nImgs)
{
	switch (nImgs)
	{
		case 0:
			return objImg1.src; break;
		case 1:
			return objImg2.src; break;				
		case 2:
			return objImg3.src; break;				
		case 3:
			return objImg4.src; break;				
		case 4:
			return objImg5.src; break;	
	}   
}
function Pic1(objImgs) 
{ 
	var pic1 = ObjElemID("ImgCarru");  
	if (pic1 == typeof('undefined')) return; 
	pic1.src = objImgs; 
	var pic1=null;
} 
function PP(nID,sIDBtn)
{
    activar=true;
	ObjElemID("SP1").value=nID;	
    ProcInicioBtns();			
}
function PPX(nID,sIDBtn)
{
    ProcInicioBtns();		
    activar=false;		
	ObjElemID("SP1").value=nID;
    ObjElemID("tdCarr"+nID).className="BgCarru1";				
    Pic1(DevRutaImgs(nID));  	
	pos=nID;
}	
/********************Carrusel***********************************/

/*******************Menus**********************************/
function ShowPag(sPage)
{
	ObjElemID("frmprin").src=sPage;
}
function fnShowHideMenu(nIDTable)
{
	if(ObjElemID("txt" + nIDTable).value=="")	
	{
		ObjElemID("txt" + nIDTable).value=1;
		InOut("Table" + nIDTable,"btnMenusShow");		
	}		
	else
	{
		ObjElemID("txt" + nIDTable).value="";
		InOut("Table" + nIDTable,"btnMenusHide");			
	}				        
}
/*******************Menus**********************************/
function fnShowProf()
{
    var iWidth=screen.width; var iHeight=screen.height;		
    oPop=window.open("http://www.unimexver.edu.mx/KioscoProf.html", "PPX", "resizable=no,directories=no,menubar=no,status=no,toolbar=no,location=no,scrollbars=yes,fullscreen=no,height=" + iHeight + ",width=" + iWidth + ",left=1,top=10");
    var oPop=null;
    return;	  	
}
