var current_image_1 = 0;
var dia_texto_sdc = new Array();

dia_texto_sdc[0] = "<b>Bulk Material Transporter</b><br><div align='justify'></div>";
dia_texto_sdc[1] = "<b>Descripcion de La competencia</b><br><br><div align='justify'>Este concurso consiste en diseñar un dispositivo capaz de transportar una carga específica (Arroz) en un terreno irregular y éste tiene que descargar su contenido en un recipiente al final de la pista.</div>";
dia_texto_sdc[2] = "<b>Dispositivo a realizar</b><br><br><div align='justify'>El dispositivo a diseñar debe ser capaz de subir una serie de escalones, girar 90 grados, bajar, descargar el arroz en el recipiente al final de la pista y devolverse hasta su posición inicial para el próximo recorrido</div>";
dia_texto_sdc[3] = "<b>Restricciones del concurso</b><br><br><div align='justify'>No debe presentar dimensiones mayores a 25 x 25 x 30 cm.<br>Debe subir simultáneamente los escalones.<br> Debe  apoyar todo su peso en dos escalones.<br>El recorrido se tiene que hacer en un tiempo máximo de 10 minutos.<br>Debe tener un máximo de 8 pilas alcalinas de 1.5 V ó 10 pilas recargables de 1.2 V, de tamaño AA, AAA, C ó D. Adicionalmente, se pueden emplear 2 pilas cuadradas de 9 Voltios</div>";



var dia_links_sdc = new Array();

dia_links_sdc[0] = "<br><br><a href='http://www.asme.org/students/Competitions/designcontest/2005/index.html' target='_blank' class='f11bluedark'><img src='Images/flecha_azul_left.gif' height='7' width='4' border='0'> Ver Página</a>";
dia_links_sdc[1] = "<br><br><a href='http://www.asme.org/students/Competitions/designcontest/2005/index.html' target='_blank' class='f11bluedark'><img src='Images/flecha_azul_left.gif' height='7' width='4' border='0'> Ver Página</a>";
dia_links_sdc[2] = "<br><br><a href='http://www.asme.org/students/Competitions/designcontest/2005/index.html' target='_blank' class='f11bluedark'><img src='Images/flecha_azul_left.gif' height='7' width='4' border='0'> Ver Página</a>";
dia_links_sdc[3] = "<br><br><a href='http://www.asme.org/students/Competitions/designcontest/2005/index.html' target='_blank' class='f11bluedark'><img src='Images/flecha_azul_left.gif' height='7' width='4' border='0'> Ver Página</a>";


var dia_bild_sdc = new Array();

dia_bild_sdc[0] = "sdc_0.JPG";
dia_bild_sdc[1] = "sdc_1.JPG";
dia_bild_sdc[2] = "sdc_2.JPG";
dia_bild_sdc[3] = "sdc_3.JPG";



//hasta aqui es el codigo de las matrices para la galeria, definicion de variables.

function getReference1 (idname) {
	if ((bw.ns6 || bw.ie6) &&  (document.getElementById(idname))) return document.getElementById(idname);
	if ((bw.ie4 || bw.ie5) && (document.all[idname]))  return document.all[idname];
	return null;
}


function makeBrowser1(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns6=(this.dom && !document.all)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5 && !this.ver.indexOf("Netscape6")) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
    this.opera = (navigator.userAgent.indexOf("Opera") != -1);
	if (this.ie6) this.ie5=true;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ns6 || this.opera)
	return this
}
bw=new makeBrowser1();

function writeLayer1(text1,id,nestref) {
	var html  ='<table width="169" border="0" cellspacing="0" cellpadding="0"><tr>';
		html +='	<td><img src="../../shared/transparent.gif" width="6" height="3"></td>';
		html +='	<td><img src="../../shared/transparent.gif" width="162" height="1"></td>';
		html +='	<td><img src="../../shared/transparent.gif" width="1" height="1"></td>';
		html +='</tr><tr>';
		html +='	<td><img src="../../shared/transparent.gif" width="6" height="180"></td>';
		html +='	<td class="f11bluedark" valign="top">'+text1+'</td>';
		html +='	<td><img src="../../shared/transparent.gif" width="1" height="1"></td>';
		html +='</tr><tr>';
		html +='	<td colspan="3"><img src="../../shared/transparent.gif" width="1" height="3"></td>';
		html +='</tr></table>';

	if (bw.ns4 ) {
		var lyr = (nestref)? eval('document.'+nestref+'.document.'+id+'.document') : document.layers[id].document;
		lyr.open();
		lyr.write(html);
		lyr.close();
	}
	else  if (bw.ns6) document.getElementById(id).innerHTML = html;
	else document.all[id].innerHTML = html;
}

function getLayerStyleRef1 (layername){
	if (bw.ns4)	return (document.layers[layername]);
	if (bw.ie5 || bw.ns6) if (document.getElementById(layername)) return (document.getElementById(layername).style);
	if (bw.ie4)	if (document.all[layername]) return (document.all[layername].style);
	return null;
}
function setLayerGalery1(){
	if (getReference1 ("contento")) return;
	
	if (bw.ns4 || bw.ns6) {
		w=window.innerWidth-16;
	} else if (bw.opera){
		w=window.innerWidth;
	}
	 else {
		w=document.body.clientWidth;
	}
	if (bw.ns6 && (window.innerHeight > document.height)) w = w+16;

	var main_ref = getLayerStyleRef1 ('dialayeru');
	main_ref.visibility = "show";
	
	if (bw.ns6) main_ref.left = (((w-720)/2));
	else main_ref.left = ((w/2)+187);

	infoTimer=setTimeout("setLayerGalery1()", 100);
}

function showContent1 (text1) {
	
	var ref = getReference1 ("contento");
	if (ref) ref.innerHTML = text1;
	else writeLayer1(text1,'dialayeru');		
}

function next_image(){
	if (current_image_1 < (dia_bild_sdc.length-1)){
		current_image_1++;
	} else {
		current_image_1 = 0;
	}
	displayImage1();
	writeLayer1(dia_texto_sdc[current_image_1],'dialayeru');	
	showContent1 (dia_texto_sdc[current_image_1]+dia_links_sdc[current_image_1]);
}

function prev_image(){
	if (current_image_1 > 0) {
		current_image_1--;
	} else {
		current_image_1 = (dia_bild_sdc.length-1);
	}
	displayImage1();
	writeLayer1(dia_texto_sdc[current_image_1],'dialayeru');
	showContent1 (dia_texto_sdc[current_image_1]+dia_links_sdc[current_image_1]);
}

function displayImage1(){
	if (bw.ns4 || bw.ie4) document.images['diau'].src = ("images/"+dia_bild_sdc[current_image_1]);
	if (bw.ie5 || bw.ns6) document.getElementById('diau').src = ("images/"+dia_bild_sdc[current_image_1]);
}
<!--Esto es para el segundo script

-->
