// JavaScript Document

 

//Aquí cambia los nombres de las imágenes por las tuyas. 

var imagenes=new Array(); 

 

imagenes[0]=new Image (215,366); 

imagenes[0].src="images/fotos/foto-urbe1.jpg" 

imagenes[1]=new Image (215,366); 

imagenes[1].src="images/fotos/foto-urbe2.jpg" 

imagenes[2]=new Image (215,366); 

imagenes[2].src="images/fotos/foto-urbe3.jpg" 

imagenes[3]=new Image (215,366); 

imagenes[3].src="images/fotos/foto-urbe4.jpg" 

imagenes[4]=new Image (215,366); 

imagenes[4].src="images/fotos/foto-urbe5.jpg" 

imagenes[5]=new Image (215,366); 

imagenes[5].src="images/fotos/foto-urbe6.jpg"

imagenes[6]=new Image (215,366); 

imagenes[6].src="images/fotos/foto-urbe7.jpg"

imagenes[7]=new Image (215,366); 

imagenes[7].src="images/fotos/foto-urbe8.jpg"   

imagenes[8]=new Image (215,366); 

imagenes[8].src="images/fotos/foto-urbe9.jpg"   

imagenes[9]=new Image (215,366); 

imagenes[9].src="images/fotos/foto-urbe10.jpg"   

imagenes[10]=new Image (215,366); 

imagenes[10].src="images/fotos/foto-urbe11.jpg"   

imagenes[11]=new Image (215,366); 

imagenes[11].src="images/fotos/foto-urbe12.jpg"   

imagenes[12]=new Image (215,366); 

imagenes[12].src="images/fotos/foto-urbe13.jpg"   


cont=0 

var cntLinks=0;
var cntLinks2=0;

 

var max = 10;

var nrImages = 10;

function makeImages() {

this[0] = "banners/gif/banner-alacomunidad.gif";

this[1] = "banners/gif/diplomados-2010.gif";

this[2] = "banners/gif/banner-inscripciones-ctt.gif";

this[3] = "banners/gif/banner_diplo_ead.gif";

this[4] = "banners/gif/banner-correo-urbe-edu.gif";

this[5] = "banners/gif/banner-cursos-extension.gif";

this[6] = "banners/gif/university435X55.gif";

this[7] = "banners/gif/banner-poliza2.gif";

this[8] = "banners/gif/20-aniversario.gif";

this[9] = "banners/gif/banner-revista-excelencia.gif";





this.length = nrImages;

}

function makeLinks() {
	
this[0] = "http://www.urbe.edu/eventos/comunicadoahorroelectricidad.html";

this[1] = "http://www.urbe.edu/estudios/extension/dfc/diplomados";

this[2] = "http://www.urbe.edu/estudios/extension/ctt/";

this[3] = "http://www.urbe.edu/eventos/diplomados-ead-mayo-2010.html";

this[4] = "http://www.urbe.edu/servicios/solicitud-de-correo.html";

this[5] = "http://www.urbe.edu/estudios/extension/dfc/cursos/";

this[6] = "http://efpartner.ef.com/master/welcome/sem/ef_programs_v302a.asp?p=ils,ly,ia,efc&ctr=ve";

this[7] = "http://www.urbe.edu/servicios/seguro-estudiantil.html";

this[8] = "http://www.urbe.edu/20-aniversario";

this[9] = "http://www.urbe.edu/";


this.length = nrImages;

}


function makeScripts() {

this[0] = "";

this[1] = "";

this[2] = "";

this[3] = "";

this[4] = "";

this[5] = "";

this[6] = "";

this[7] = "";

this[8] = "";

this[9] = "window.open('http://www.urbe.edu/20-aniversario/revista-excelencia-academica.pdf')";



this.length = nrImages;

 

}

 

var vetImages = new makeImages();

var vetLinks = new makeLinks();

var vetScripts = new makeScripts();






var max2  = 5;

var nrImages2 = 5;

function makeImages2() {

this[0] = "banners/gif/banner-ahorro-energia.gif";

this[1] = "banners/gif/banner-cursos-extension.gif";

this[2] = "banners/gif/banner-programa-educativo-rsu.jpg";

this[3] = "banners/gif/comunicado-rr-jel.gif";

this[4] = "banners/gif/contac-center-2.gif";



this.length = nrImages2;

}

function makeLinks2() {

this[0] = "http://www.urbe.edu/eventos/comunicadoahorroelectricidad.html";

this[1] = "http://www.urbe.edu/estudios/esl_center/index.html";

this[2] = "http://www.urbe.edu/eventos/programa-educativo-rsu.html";

this[3] = "http://www.urbe.edu/eventos/comunicado-rr-jel.html";

this[4] = "http://www.urbe.edu/eventos/contact-center.html";



this.length = nrImages2;

}


function makeScripts2() {

this[0] = "";

this[1] = "";

this[2] = "";

this[3] = "";


this.length = nrImages2;

 

}

 

var vetImages2 = new makeImages2();

var vetLinks2 = new makeLinks2();

var vetScripts2 = new makeScripts2();



 

function presImagen() 

{ 

if (document.all){ 
         if(document.getElementById('foto')!=null && document.getElementById('foto').filters!=null && document.getElementById('foto').filters.blendTrans!=null){
		 document.getElementById('foto').filters.blendTrans.apply();

         document.getElementById('foto').src=imagenes[cont].src 

         document.getElementById('foto').filters.blendTrans.play() 
		 }

        document.getElementById("testLink").innerHTML="<a href="+vetLinks[cntLinks]+" onClick=\"javascript:"+vetScripts[cntLinks]+"\" target=_self><img src="+vetImages[cntLinks]+" border=0></a>";
		
	document.getElementById("testLink2").innerHTML="<a href="+vetLinks2[cntLinks2]+" onClick=\"javascript:"+vetScripts2[cntLinks2]+"\" target=_self><img src="+vetImages2[cntLinks2]+" border=0></a>";

} 

else 

{ 

    document.images.foto.src = imagenes[cont].src 

            document.getElementById("testLink").innerHTML="<a href="+vetLinks[cntLinks]+" onClick=\"javascript:"+vetScripts[cntLinks]+"\" target=_self><img src="+vetImages[cntLinks]+" border=0></a>";

       document.getElementById("testLink2").innerHTML="<a href="+vetLinks2[cntLinks2]+" onClick=\"javascript:"+vetScripts2[cntLinks2]+"\" target=_self><img src="+vetImages2[cntLinks2]+" border=0></a>";
} 

if (cont < imagenes.length-1) 

{

            cont ++

} 

else {

            cont=0

}

if(cntLinks<vetImages.length - 1){

            cntLinks++;

}

else{

            cntLinks=0;

}

 if(cntLinks2<vetImages2.length - 1){

           cntLinks2++;

}

else{

           cntLinks2=0;

}

tiempo=window.setTimeout('presImagen()',5000)

 

//cada 5000 milisegundos (3 seg.) cambia la imagen. 

//cambia la cantidad por el tiempo que quieras que transcurra entre imagen e imagen 

} 

 

//END

 

 

 

//FECHA

function fecha(){

fecha = new Date()

mes = fecha.getMonth()

diaMes = fecha.getDate()

diaSemana = fecha.getDay()

anio = fecha.getFullYear()

dias = new Array('Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sábado')

meses = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre')

document.write('<span id="fecha">')

document.write (dias[diaSemana] + ", " + diaMes + " de " + meses[mes] + " de " + anio)

document.write ('</span>')

}

//END

 

//EVITAR COPIAR TEXTO (SELECCION) Y DESACTIVAR BOTON DERECHO DEL MOUSE

//window.onload = function() { 

//        document.onselectstart = function() {return false;} // ie 

//         document.onmousedown = function() {return false;} // mozilla 

//                         document.oncontextmenu = function(){return false}

//}  

//END

 

//CAMBIAR IMAGENES CON ROLLOVER

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}

 

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

 

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//END

//para recomendar noticia a un amigo


function recomendar(){
	var url="recomendar.jsp?url="+location.href +"&titulo="+document.getElementById("titulo").innerHTML;
    window.open(url,"_blank", "height=390, width=460, toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=1");
	//return url;
}


//Fin