var defaultFontSize = 76;

var currentFontSize = defaultFontSize;

var tnt = 6;



//Color de fondo para el estado activo

var bgColor1 = ["#4B9BCC", "#528AB7", "images/stage.jpg"];

var bgColor2 = ["#4B9BCC", "#528AB7", "images/stage1.jpg"];

var bgColor3 = ["#4B9BCC", "#528AB7", "images/stage2.jpg"];

var bgColor4 = ["#4B9BCC", "#528AB7", "images/stage3.jpg"];

var bgColor5 = ["#4B9BCC", "#528AB7", "images/stage5.jpg"];

var bgColor6 = ["#4B9BCC", "#528AB7", "images/stage.jpg"];



//Arreglo multidimensional con los links de cada seccion

var navCont = [new Array(

					new Array("Calendario",

						new Array("Ilustraciones", "http://www.fundaciontelevisa.org/valores/calendario.html"),

						new Array("Actividades", "http://www.fundaciontelevisa.org/valores/actividades.html")

					)

				),

				new Array(

					new Array("Gu&iacute;a para usar los valores",

						new Array("Introducci&oacute;n: valores para la vida", "http://www.fundaciontelevisa.org/valores/introduccion.html"),

						new Array("Nociones sobre la educaci&oacute;n en valores", "http://www.fundaciontelevisa.org/valores/nociones.html"),

						new Array("Qu&eacute; son los valores", "http://www.fundaciontelevisa.org/valores/ideas.html"),

						new Array("Educar en valores", "http://www.fundaciontelevisa.org/valores/razones.html")

					),

					new Array("",

						new Array("C&oacute;mo educar en valores", "http://www.fundaciontelevisa.org/valores/orientaciones.html"),

						new Array("Estrategias de aprendizaje para primaria", "http://www.fundaciontelevisa.org/valores/estrategias.html"),

						new Array("Recomendaciones para un ambiente de paz y confianza", "http://www.fundaciontelevisa.org/valores/confianza.html"),

						new Array("Orientaciones para aprovechar el calendario","http://www.fundaciontelevisa.org/valores/orientaciones-didacticas.html")

					)

				),

				new Array(

					new Array("Enlaces",

						new Array("Acci&oacute;n", "http://www.fundaciontelevisa.org/valores/accion.html"),
						
						new Array("Actitud", "http://www.fundaciontelevisa.org/valores/actitud.html"),
						
						new Array("Adaptaci&oacute;n", "http://www.fundaciontelevisa.org/valores/adaptacion.html"),
						
						new Array("Alegr&iacute;a", "http://www.fundaciontelevisa.org/valores/alegria.html"),

						new Array("Amistad", "http://www.fundaciontelevisa.org/valores/amistad.html")
						
						
					),

					new Array("",

						new Array("Amor", "http://www.fundaciontelevisa.org/valores/amor.html"),

						new Array("Autoestima", "http://www.fundaciontelevisa.org/valores/autoestima.html"),

						new Array("Autonom&iacute;a", "http://www.fundaciontelevisa.org/valores/autonomia.html"),
						
						new Array("Bondad", "http://www.fundaciontelevisa.org/valores/bondad.html"),
						
						new Array("Civilidad", "http://www.fundaciontelevisa.org/valores/civilidad.html")
						
						
					),

					new Array("",

						new Array("Compasi&oacute;n", "http://www.fundaciontelevisa.org/valores/compasion.html"),
						
						new Array("Comunicaci&oacute;n", "http://www.fundaciontelevisa.org/valores/comunicacion.html"),
						
						new Array("Conciencia", "http://www.fundaciontelevisa.org/valores/conciencia.html"),

						new Array("Confianza", "http://www.fundaciontelevisa.org/valores/confianza.html"),
						
						new Array("Convicci&oacute;n", "http://www.fundaciontelevisa.org/valores/conviccion.html")

						

					),

					new Array("",

						new Array("Cortes&iacute;a", "http://www.fundaciontelevisa.org/valores/cortesia.html"),
						
						new Array("Creatividad", "http://www.fundaciontelevisa.org/valores/creatividad.html"),

						new Array("Cultura", "http://www.fundaciontelevisa.org/valores/cultura.html"),

						new Array("Di&aacute;logo", "http://www.fundaciontelevisa.org/valores/dialogo.html"),
						
						new Array("Dignidad", "http://www.fundaciontelevisa.org/valores/dignidad.html")


					),

					new Array("",

						new Array("Disciplina", "http://www.fundaciontelevisa.org/valores/disciplina.html"),
						
						new Array("Equidad", "http://www.fundaciontelevisa.org/valores/equidad.html"),
						
						new Array("Escuela", "http://www.fundaciontelevisa.org/valores/escuela.html"),

						new Array("Esfuerzo", "http://www.fundaciontelevisa.org/valores/esfuerzo.html"),
						
						new Array("Esperanza", "http://www.fundaciontelevisa.org/valores/esperanza.html")
						
						
						),

					new Array("",

						new Array("&Eacute;tica", "http://www.fundaciontelevisa.org/valores/etica.html"),
						
						new Array("&Eacute;xito", "http://www.fundaciontelevisa.org/valores/exito.html"),
						
						new Array("Familia", "http://www.fundaciontelevisa.org/valores/familia.html"),

						new Array("Felicidad", "http://www.fundaciontelevisa.org/valores/felicidad.html"),
						
						new Array("Fortaleza", "http://www.fundaciontelevisa.org/valores/fortaleza.html")

					)

				),

				new Array(

					new Array("Enlaces",

						new Array("Generosidad", "http://www.fundaciontelevisa.org/valores/generosidad.html"),

						new Array("Gratitud", "http://www.fundaciontelevisa.org/valores/gratitud.html"),

						new Array("Honestidad", "http://www.fundaciontelevisa.org/valores/honestidad.html"),

						new Array("Humanidad", "http://www.fundaciontelevisa.org/valores/humanidad.html"),
						
						new Array("Humildad", "http://www.fundaciontelevisa.org/valores/humildad.html")
						
						
					),

					new Array("",

						new Array("Independencia", "http://www.fundaciontelevisa.org/valores/independencia.html"),
						
						new Array("Iniciativa", "http://www.fundaciontelevisa.org/valores/iniciativa.html"),
						
						new Array("Innovaci&oacute;n", "http://www.fundaciontelevisa.org/valores/innovacion.html"),
						
						new Array("Inteligencia", "http://www.fundaciontelevisa.org/valores/inteligencia.html"),

						new Array("Justicia", "http://www.fundaciontelevisa.org/valores/justicia.html")
						
						
					),

					new Array("",

						new Array("Lealtad", "http://www.fundaciontelevisa.org/valores/lealtad.html"),
						
						new Array("Libertad", "http://www.fundaciontelevisa.org/valores/libertad.html"),
						
						new Array("Naturaleza", "http://www.fundaciontelevisa.org/valores/naturaleza.html"),
						
						new Array("Paciencia", "http://www.fundaciontelevisa.org/valores/paciencia.html"),

						new Array("Patriotismo", "http://www.fundaciontelevisa.org/valores/patriotismo.html")

						

					),

					new Array("",

						new Array("Paz", "http://www.fundaciontelevisa.org/valores/paz.html"),
						
						new Array("Perd&oacute;n", "http://www.fundaciontelevisa.org/valores/perdon.html"),
						
						new Array("Perseverancia", "http://www.fundaciontelevisa.org/valores/perseverancia.html"),

						new Array("Persona", "http://www.fundaciontelevisa.org/valores/persona.html"),

						new Array("Respeto", "http://www.fundaciontelevisa.org/valores/respeto.html")


					),

					new Array("",

						new Array("Responsabilidad", "http://www.fundaciontelevisa.org/valores/responsabilidad.html"),
						
						new Array("Sabidur&iacute;a", "http://www.fundaciontelevisa.org/valores/sabiduria.html"),

						new Array("Salud", "http://www.fundaciontelevisa.org/valores/salud.html"),

						new Array("Sinceridad", "http://www.fundaciontelevisa.org/valores/sinceridad.html"),
						
						new Array("Sociedad", "http://www.fundaciontelevisa.org/valores/sociedad.html")
						
						
					),

					new Array("",

						new Array("Solidaridad", "http://www.fundaciontelevisa.org/valores/solidaridad.html"),
						
						new Array("Templanza", "http://www.fundaciontelevisa.org/valores/templanza.html"),

						new Array("Tolerancia", "http://www.fundaciontelevisa.org/valores/tolerancia.html"),

						new Array("Trabajo", "http://www.fundaciontelevisa.org/valores/trabajo.html"),
						
						new Array("Urbanidad", "http://www.fundaciontelevisa.org/valores/urbanidad.html")
				
					
					)
					
					),

				new Array(

					new Array("Enlaces",

						new Array("Frases", "http://www.fundaciontelevisa.org/valores/frases.html"),

						new Array("Cuentos", "http://www.fundaciontelevisa.org/valores/cuentos.html"),

						new Array("Actividades", "http://www.fundaciontelevisa.org/valores/actividades.html")
						
					),

					new Array("",
						
						new Array("Campa&ntilde;as en TV", "http://www.fundaciontelevisa.org/valores/campanas.html"),

						new Array("Campa&ntilde;as impresas", "http://www.fundaciontelevisa.org/valores/editorial.html"),

						new Array("Telenovelas con causa", "http://www.fundaciontelevisa.org/valores/telenovela.html")
						
				   ),

					new Array("",
						
						new Array("Libro de valores 2005", "http://www.fundaciontelevisa.org/valores/libro2005.html"),

						new Array("Libro de valores 2006", "http://www.fundaciontelevisa.org/valores/libro2006.html"),

						new Array("Libro de valores 2007", "http://www.fundaciontelevisa.org/valores/libro.html")
						
				  ),

					new Array("",
						
						new Array("Vocabulario", "http://www.fundaciontelevisa.org/valores/vocabulario.html"),

						new Array("Lecturas recomendadas", "http://www.fundaciontelevisa.org/valores/lecturas.html"),

						new Array("Cartilla moral", "http://www.fundaciontelevisa.org/valores/cartilla.html"),
						
						new Array("Lecci&oacute;n XIII", "http://www.fundaciontelevisa.org/valores/xiii.html"),
						
						new Array("Lecci&oacute;n XIV", "http://www.fundaciontelevisa.org/valores/xiv.html")
				
					
					)

				),

				new Array(

					new Array("",

						new Array("Campaña en TV", "http://www.fundaciontelevisa.org/valores/videogaleria-claudio.html")
			
					
					)




				)

				];



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 showNav(idItem) {

	var tdWidth = Math.round(100 / navCont[idItem - 1].length);

	var out = '';

	out = '<table width="100%" border="0" cellpadding="0" cellspacing="10" class="nav_item' + idItem + '"><tr>';

	for(var i = 0; i < navCont[idItem - 1].length; i++){

		if( navCont[idItem - 1].length > 1){

			if(navCont[idItem - 1][i][0] != ""){

				out += '<td class="titulo_navcell">' + navCont[idItem - 1][i][0] + '</td>';

			} else {

				out += '<td class="titulo_navcell">&nbsp;</td>';

			}

		} else {

			out += '<td colspan="' + navCont[idItem - 1][i].length + '" class="titulo_navcell">' + navCont[idItem - 1][i][0] + '</td>';

		}

	}

	out += '</tr><tr>';

	for(var i = 0; i < navCont[idItem - 1].length; i++){

		if( navCont[idItem - 1].length > 1){

			out += '<td><ul>';

			for(var j = 1; j < navCont[idItem - 1][i].length; j++){

				out += '<li><a href="' + navCont[idItem - 1][i][j][1] +'">' + navCont[idItem - 1][i][j][0] + '</a></li>';

			}

			out += '</ul></td>';

		} else {

			for(var j = 1; j < navCont[idItem - 1][i].length; j++){

				out += '<td><ul><li><a href="' + navCont[idItem - 1][i][j][1] +'">' + navCont[idItem - 1][i][j][0] + '</a></ul></li></td>';

			}

		}

	}

	out += '</tr></table>';

	

	//VAR PARA ESTILOS

	if (document.getElementById || document.all) {		

		var el = (document.getElementById) ? document.getElementById("subNavInline"): document.all["subNavInline"];

		if (el && typeof el.innerHTML != "undefined") el.innerHTML = out;

		

		for(var i = 0; i < tnt; i++){

			var navItem =  (document.getElementById) ? document.getElementById("main_nav" + (i + 1)): document.all["main_nav" + (i + 1)];	

			navItem.style.backgroundColor= eval("bgColor" + (i + 1))[0];

			navItem.style.borderBottom = "solid #FFFFFF 1px";

		}

		

		navItem =  (document.getElementById) ? document.getElementById("main_nav" + idItem): document.all["main_nav" + idItem];

		navItem.style.backgroundColor= eval("bgColor" + idItem)[1];

		navItem.style.borderBottom = "none";

		

		stageImg = (document.getElementById) ? document.getElementById("stage"): document.all["stage"];

		if(stageImg != undefined || stageImg != null) stageImg.style.backgroundImage = "url(" + eval("bgColor" + idItem)[2] + ")";

   }

}

function writeFecha(){

	monthNames = new Array(

	"enero",

	"febrero",

	"marzo",

	"abril",

	"mayo",

	"junio",

	"julio",

	"agosto",

	"sept.",

	"octubre",

	"noviembre",

	"diciembre"

	);

	theDate = new Date();

	document.write(theDate.getDate() + " de " + monthNames[theDate.getMonth()] + " de " + theDate.getFullYear());

}

var defaultFontSize = 11;

var currentFontSize = defaultFontSize;

function changeSize(number){

	currentFontSize = parseInt(currentFontSize) + parseInt(number * 2);



	if(currentFontSize > 24){

		currentFontSize = 24;

	}else if(currentFontSize < 10){

		currentFontSize = 10;

	}



	setFontSize(currentFontSize);

}



function setFontSize(size){

	var stObj = (document.getElementById) ? document.getElementById('colNt') : document.all('colNt');

	stObj.style.fontSize = size + 'px';

	stObj.style.lineHeight = (size + 2) + 'px';

}

function savePag(){

	if(!document.execCommand){

		alert("Funci—n no disponible en tu navegador");

		return false;

	}

	document.execCommand('saveas', 'false')

}