// carga imagenes y/o swf
function ramImages(){
width="502"; //Anchura del banner 
height="181"; //Altura del banner 

banners= new Array(); //lista del origen imágenes o flash
banners[0]="http://www.nebrija.com/src/index07/fotos/publi1.jpg"; 
banners[1]="http://www.nebrija.com/src/index07/fotos/publi2.jpg"; 

url= new Array(); //lista de enlaces
url[0]="http://www.nebrija.com/carreras-universitarias/publicidad.htm"; //poner "#" en caso de no tener link y en caso de ser un flash el link va en un getURL dentro del mismo flash
url[1]="http://www.nebrija.com/carreras-universitarias/publicidad.htm";

alt= new Array(); //lista de txt alternativos
alt[0]="Infórmate sobre nuestros estudios de Publicidad"; //si no hay texto se mete nada..
alt[1]="Infórmate sobre nuestros estudios de Publicidad";

//
totalbanners = banners.length; 
var ahora = new Date() 
var segundos = ahora.getSeconds() 
var ad = segundos % totalbanners; 
seleccionado=banners[ad]; 
localizador=seleccionado.lastIndexOf('.'); 
localizador2=localizador+4 
extension=seleccionado.substring(localizador+1,localizador2);  
archivo=seleccionado.substring(0,localizador); 

document.write("<center>"); 
if (extension=="swf"){ 
	flash=seleccionado; 
	document.write('<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=' + width + ' height=' + height + ' CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\">'); 
	document.write('<PARAM NAME=\"MOVIE\" VALUE=\"' + flash + '\">'); 
	document.write('<PARAM NAME=\"vmode\" VALUE=\"transparent\">');
	document.write('<PARAM NAME=\"PLAY\" VALUE=\"true\">');
	document.write('<PARAM NAME=\"LOOP\" VALUE=\"true\">'); 
	document.write('<PARAM NAME=\"QUALITY\" VALUE=\"high\">'); 
	document.write('<EMBED SRC=' + flash + ' width=' + width + ' height=' + height + ' PLAY=\"true\" LOOP=\"true\" QUALITY=\"high\" PLUGINSPAGE=\http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash\">'); 
	document.write('</EMBED>'); 
	document.write('</OBJECT>');} 
else {
	document.write('<a href=\"' + url[ad] + '\" target=\"_self\">');
	document.write('<img src=\"' + seleccionado + '\" width=')
	document.write(width + ' height=' + height + ' ');
	document.write('alt=\"' + alt[ad] + '\" border=0><br></a>');
	}
	//document.write('<small>' + txt + '</small></a>');esto es para meterle un texto a la imagen
	document.write('</center>');	
	
//lineas del script anterior--------------	
//document.write('<img src='+seleccionado+' width='+width+' height='+height+'>'); 
//document.write('</center>');} 
// Fin 
}