var defaultFontSize = 76;

var currentFontSize = defaultFontSize;

var tnt = 6;



//Color de fondo para el estado activo

var bgColor1 = ["#CC0066", "#990033", "images/stage.jpg"];

var bgColor2 = ["#CC0066", "#990033", "images/stage.jpg"];

var bgColor3 = ["#CC0066", "#990033", "images/stage.jpg"];

var bgColor4 = ["#CC0066", "#990033", "images/stage.jpg"];

var bgColor5 = ["#CC0066", "#990033", "images/stage.jpg"];

var bgColor6 = ["#CC0066", "#990033", "images/stage.jpg"];



//Arreglo multidimensional con los links de cada seccion

var navCont = [new Array(

					new Array("Enlaces",

						new Array("Alain Resnais", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/alain.html"),
						
						new Array("François Truffaut", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/francois.html"),

						new Array("Louis Malle", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/louis.html")
						
						

					),

					new Array("",

						new Array("Claude Chabrol", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/claude.html"),
						
						new Array("Agnes Varda", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/agnes.html")
						
						

					),

					new Array("",

						new Array("Jacques D&eacute;my", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/jacques.html"),
						
						new Array("Jean Luc Godard", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/jean.html")

					)

				),

				new Array(

					new Array("Enlaces",

						new Array("Catherine Deneuve", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/catherine.html"),
						
						new Array("Françoise Darl&eacute;ac", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/francoise.html"),
						
						new Array("Jeanne Moreau", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/jeanne.html")

						

					),

					new Array("",

						new Array("Brigitte Bardot", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/brigitte.html"),
						
						new Array("Anna Karina", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/actriz.html"),
						
						new Array("Stephan Audran", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/actriz.html")

				

					),

					new Array("",
							  
						new Array("Dominique Sanda", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/actriz.html"),
						
						new Array("Juliette Mayniel", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/actriz.html"),

						new Array("Jean Seberg", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/seberg.html")

						

					)

				),

				new Array(

					new Array("Enlaces",

						new Array("Jean Paul Belmondo", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/paul.html")
						
					
					),

					new Array("",

						
						new Array("Jean Pierre L&eacute;aude", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/pierre.html")

				

					),

					new Array("",
							  

						new Array("Alain Delon", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/delon.html")

						

					)

				
				),

				new Array(

					new Array("Enlaces",

						new Array("Los 400 golpes", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/400.html"),
						
						new Array("Los amantes", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/amantes.html"),
						
						new Array("Jules et Jim", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/jules.html"),
						
						new Array("Ascensor para el cadalso", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/ascensor.html")

						

					),

					new Array("",

						new Array("Fuego Fatuo", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/fuego.html"),
						
						new Array("Hiroshima, mi amor", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/hiro.html"),
						
						new Array("Pierrot el loco", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/pierrot.html"),
						
						new Array("Los primos", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/primos.html")

				

					),

					new Array("",
							  
						new Array("Sin aliento", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/aliento.html"),
						
						new Array("La rodilla de Clara", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/rodilla.html"),

						new Array("La sirena del Missisippi", "http://www.esmas.com/fundaciontelevisa/olafrancesa/pages/sirena.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')

}
