
var esnavidad = 0;

if (esnavidad){
	color_back_menu = "#c3f58d";
	document.write("<link rel='stylesheet' href='css/estilos_navidad.css' type='text/css'>");
}else{
	color_back_menu = "#F8F9B3";
	document.write("<link rel='stylesheet' href='css/estilos_normal.css' type='text/css'>");
}

function CrearMenuIzquierdo(){	
		var intContador;
		
		var NumMenus_Seccion_1 = 7 ;
		var NumMenus_Seccion_2 = 6 ;
		var NumMenus_Seccion_3 = 6 ;
		
		var Menus_Seccion_1 = new Array(NumMenus_Seccion_1 - 1);
		var Menus_Seccion_2 = new Array(NumMenus_Seccion_2 - 1);
		var Menus_Seccion_3 = new Array(NumMenus_Seccion_3 - 1);
				
		for (intContador=0;intContador<=NumMenus_Seccion_1;intContador++) { 
		    Menus_Seccion_1[intContador] = new Array(1);
		    Menus_Seccion_2[intContador] = new Array(1);
		    Menus_Seccion_3[intContador] = new Array(1);
		} 
	
		Menus_Seccion_1[0][0] = "Inicio";
		Menus_Seccion_1[0][1] = "Inicio.htm"
		Menus_Seccion_1[1][0] = "Información"
		Menus_Seccion_1[1][1] = "informacion.htm"
		Menus_Seccion_1[2][0] = "Estatutos"
		Menus_Seccion_1[2][1] = "pagPDF.htm?" + Menus_Seccion_1[2][0] + "&" + "estatutos_ampa.pdf"
		Menus_Seccion_1[3][0] = "Horario de Atención"
		Menus_Seccion_1[3][1] = "horario.htm"
		Menus_Seccion_1[4][0] = "Hazte Socio (formulario)"
		Menus_Seccion_1[4][1] = "socio.htm?" + "impreso_socio.pdf"
		Menus_Seccion_1[5][0] = "Hazte Socio (automático)"
		Menus_Seccion_1[5][1] = "socios_automatico.htm?" + "20"
		Menus_Seccion_1[6][0] = "Contacto"
		Menus_Seccion_1[6][1] = "mailto:ampa.camilojosecela@gmail.com"
		
		Menus_Seccion_2[0][0] = "Act. Extraescolares (FACEI)"	
		Menus_Seccion_2[0][1] = "pagPDF.htm?" + Menus_Seccion_2[0][0] + "&" + "act_extraescolares.pdf"
		Menus_Seccion_2[1][0] = "Serv. Canguros (FACEI)"	
		Menus_Seccion_2[1][1] = "pagPDF.htm?" + Menus_Seccion_2[1][0] + "&" + "canguros.pdf"
		Menus_Seccion_2[2][0] = "Campamento Urbano"	
		Menus_Seccion_2[2][1] = "pagPDF.htm?" + Menus_Seccion_2[2][0] + "&" + "infocampamento.pdf"
		Menus_Seccion_2[3][0] = "Campamento Urbano Navidad"	
		Menus_Seccion_2[3][1] = "pagPDF.htm?" + Menus_Seccion_2[3][0] + "&" + "campamento_navidad.pdf"
		Menus_Seccion_2[4][0] = "Ludoteca"	
		Menus_Seccion_2[4][1] = "pagPDF.htm?" + Menus_Seccion_2[4][0] + "&" + "infoludoteca.pdf"
		Menus_Seccion_2[5][0] = "Eventos"	
		Menus_Seccion_2[5][1] = "fiestas.htm"	
		
						
		Menus_Seccion_3[0][0] = "Gimnasia Rítmica"	
		Menus_Seccion_3[0][1] = "pagPDF.htm?" + Menus_Seccion_3[0][0] + "&" + "impreso_inscripcion_gimnasia_ritmica.pdf"
		Menus_Seccion_3[1][0] = "Act. Futbol y Baloncesto"	
		Menus_Seccion_3[1][1] = "pagPDF.htm?" + Menus_Seccion_3[1][0] + "&" + "impreso_act_futbol_baloncesto.pdf"
		Menus_Seccion_3[2][0] = "Escuela Deportiva"	
		Menus_Seccion_3[2][1] = "pagPDF.htm?" + Menus_Seccion_3[2][0] + "&" + "impreso_act_escueladeportiva.pdf"
		Menus_Seccion_3[3][0] = "Inscripción Actividades FACEI"	
		Menus_Seccion_3[3][1] = "pagPDF.htm?" + Menus_Seccion_3[3][0] + "&" + "impreso_inscripcion_actividades.pdf"
		Menus_Seccion_3[4][0] = "Campamento Urbano Navidad"	
		Menus_Seccion_3[4][1] = "pagPDF.htm?" + Menus_Seccion_3[4][0] + "&" + "campamento_navidad.pdf"
		Menus_Seccion_3[5][0] = "Act. Francés"	
		Menus_Seccion_3[5][1] = "pagPDF.htm?" + Menus_Seccion_3[4][0] + "&" + "impreso_act_frances.pdf"
		
		document.getElementById('seccion_1').innerHTML = ImprimeTablaIzquierdo(NumMenus_Seccion_1,Menus_Seccion_1);
		document.getElementById('seccion_2').innerHTML = ImprimeTablaIzquierdo(NumMenus_Seccion_2,Menus_Seccion_2);
		document.getElementById('seccion_3').innerHTML = ImprimeTablaIzquierdo(NumMenus_Seccion_3,Menus_Seccion_3);
		
		
}

function CrearMenuDerecho(){	
		
		var intContador;
		
		var NumMenus_Comunicados = 4 ;
		
		if (NumMenus_Comunicados>0){
			
			var Menus_Comunicados = new Array(NumMenus_Comunicados - 1);
			
			for (intContador=0;intContador<=NumMenus_Comunicados;intContador++) { 
			    Menus_Comunicados[intContador] = new Array(2);
			} 
			
			Menus_Comunicados[0][0] = "(28/11/2011)"
			Menus_Comunicados[0][1] = "Impreso Act. Extraescolar<BR>FRANCES"
			Menus_Comunicados[0][2] = "Abrir('pdfs/impreso_act_frances.pdf',1);"
			
			Menus_Comunicados[1][0] = "(31/01/2012)"
			Menus_Comunicados[1][1] = "Actividades 2º trismestre"
			Menus_Comunicados[1][2] = "Abrir('pdfs/actividades2trimestre.pdf',1);"
			
			Menus_Comunicados[2][0] = "(31/02/2012)"
			Menus_Comunicados[2][1] = "Campamento Semana Sta."
			Menus_Comunicados[2][2] = "Abrir('pdfs/campamentoss.pdf',1);"
			
			Menus_Comunicados[3][0] = "(31/02/2012)"
			Menus_Comunicados[3][1] = "Fiesta Carnaval 2012"
			Menus_Comunicados[3][2] = "Abrir('',1);"
			
			/*
			Menus_Comunicados[2][0] = "(21/01/2011)"
			Menus_Comunicados[2][1] = "Impreso Escuela Abierta 25/02"
			Menus_Comunicados[2][2] = "Abrir('pdfs/Escuela_abierta_02.pdf',1);"
			
			Menus_Comunicados[3][0] = "(19/02/2011)"
			Menus_Comunicados[3][1] = "Disponible Info Carnaval 2011"
			Menus_Comunicados[3][2] = "Abrir('pdfs/carnaval.pdf',1);"
			
			Menus_Comunicados[4][0] = "(10/05/2011)"
			Menus_Comunicados[4][1] = "Campamento Urbano y Ludoteca (sección Qué Ofrecemos)"
			Menus_Comunicados[4][2] = "Abrir('info_campamentourbano.htm',0);"
			
			Menus_Comunicados[5][0] = "(23/07/2011)"
			Menus_Comunicados[5][1] = "Programación 5ª semana Campamento Urbano"
			Menus_Comunicados[5][2] = "Abrir('pdfs/programacion_5semana_verano-11.pdf',1);"
			*/
			
			document.getElementById('seccion_4').innerHTML = ImprimeTablaDerecho(NumMenus_Comunicados,Menus_Comunicados);
		}
}

function CrearNotas(){	
		
		var intContador;
		
		var Num_Notas = 3 ;
		
		if (Num_Notas>0){
		
			var Menus_Notas = new Array(Num_Notas- 1);
			
			for (intContador=0;intContador<=Num_Notas;intContador++) { 
			    Menus_Notas[intContador] = new Array(3);
			} 
			
			/*
			Menus_Notas[0][0] = "ACTIVIDADES 2ª TRIMESTRE"
			Menus_Notas[0][1] = "Información de las actividades previstas para este 2º trimeste<BR><BR>IMPRESO SALIDA SOCIO CULTURAL 12/02/2012"
			//Menus_Notas[0][2] = "Abrir('pdfs/FIN-DE-SEMANA-camilo-JULIO-2011.pdf',1);"
			Menus_Notas[0][2] = "Abrir('',1);"
			*/
			Menus_Notas[0][0] = "ACTIVIDADES 2ª TRIMESTRE"
			Menus_Notas[0][1] = "Información de las actividades previstas para este 2º trimeste<BR><center>e<center>IMPRESO SALIDA 12/02/2012"
			Menus_Notas[0][2] = "Abrir('pdfs/actividades2trimestre.pdf',1);"
			
			Menus_Notas[1][0] = "CAMPAMENTO SEMANA SANTA"
			Menus_Notas[1][1] = "Información posible campamento preparado para semana santa"
			Menus_Notas[1][2] = "Abrir('pdfs/campamentoss.pdf',1);"
			
			Menus_Notas[2][0] = "FIESTA CARNAVAL"
			Menus_Notas[2][1] = "La fiesta de Carnaval será el Viernes 17/02, de 17:00 a 19:00. Chocolate gratis para los socios del AMPA (recoger los tickets los días 13-14 a las 9.00 en la puerta del colegio)"
			Menus_Notas[2][2] = "Abrir('',1);"
			
			
			if (Num_Notas==1){
				document.getElementById("seccion_5").innerHTML = ImprimeTablaNota(Menus_Notas, 0);
			}else{
				if (Num_Notas==2){
					document.getElementById("seccion_5").innerHTML = ImprimeTablaNota(Menus_Notas, 0);
					document.getElementById("seccion_6").innerHTML = ImprimeTablaNota(Menus_Notas, 1);
				}else{
					if (Num_Notas==3){
						document.getElementById("seccion_5").innerHTML = ImprimeTablaNota(Menus_Notas, 0);
						document.getElementById("seccion_6").innerHTML = ImprimeTablaNota(Menus_Notas, 1);
						document.getElementById("seccion_7").innerHTML = ImprimeTablaNota(Menus_Notas, 2);
					}
				}
			}
		}
}

function ImprimeTablaIzquierdo(NumMenus_Seccion, objElementos){
		
		var intContador;
		
		var textoMenu = "<TBODY>";
		textoMenu = "<table border='0' cellspacing='0' cellpadding='0' width='190'>"
		for (intContador=0;intContador<=NumMenus_Seccion-1;intContador++) { 
			  textoMenu = textoMenu + ImprimeMenuIzquierdo(objElementos[intContador][0],objElementos[intContador][1]);
		} 
		textoMenu = textoMenu + "</table></TBODY>";
		
		return textoMenu;
}

function ImprimeTablaDerecho(NumMenus_SeccionDerecha, objElementos){
		
		var intContador;
		
		var textoMenu = "<TBODY>";
		textoMenu = "<table border='0' cellspacing='0' cellpadding='0' width='190'>"
		
		for (intContador=NumMenus_SeccionDerecha-1;intContador>=0;intContador-=1) { 
				textoMenu = textoMenu + ImprimeMenuDerecho(objElementos[intContador][0],objElementos[intContador][1],objElementos[intContador][2]);
		} 
		textoMenu = textoMenu + "</table></TBODY>";
		
		return textoMenu;
}

function ImprimeTablaNota(objElemento, Contador){
	
	
	textoMenu = "<table id='postit" + Contador + "' border='0' cellspacing='0' cellpadding='0' width='216' height='229' background='images/nota2010.GIF'>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='216' border='0' height='1'></td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='216' border='0' height='30'></td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td height='175' valign='top'>";
	textoMenu = textoMenu + "<table border='0' cellspacing='0' cellpadding='0' width='216'>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='18' height='1'></td>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='168' height='1'></td>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='30' height='1'></td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td colspan='2' align='right'><font class='texto12' style='font-size:14px;color:red;font-weight:bold'><a style='text-decoration:none;color:red' href=\"javascript:CerrarNota('postit" + Contador + "');\" title='Pulsa aquí para cerrar esta nota'>X</a></font>&nbsp;</td><font color='#000000'></font>"
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='30' height='1'></td>"
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td colspan='3' align='center'>";
	textoMenu = textoMenu + "<font class='texto12' style='font-size:9px;color:darkred;font-weight:bold'>";
	textoMenu = textoMenu + objElemento[Contador][0] ;
	textoMenu = textoMenu + "</font>";
	textoMenu = textoMenu + "</td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='18' height='5'></td>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='168' height='5'></td>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='30' height='5'></td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "<tr>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='18' height='1'></td>";
	textoMenu = textoMenu + "<td>";
	textoMenu = textoMenu + "<font class='texto12' style='font-size:9px;color:darkred;font-weight:bold' onclick=\"javascript:" + objElemento[Contador][2] + "\" onmouseover=\"javascript:this.style.cursor='hand';\">";
	textoMenu = textoMenu + objElemento[Contador][1] ;
	textoMenu = textoMenu + "</font>";
	textoMenu = textoMenu + "</td>";
	textoMenu = textoMenu + "<td><img src='images/img_transparente.gif' width='30' height='1'></td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "</table>";
	textoMenu = textoMenu + "</td>";
	textoMenu = textoMenu + "</tr>";
	textoMenu = textoMenu + "</table>";
	
	return textoMenu;
}

function ImprimeMenuIzquierdo(texto_menu, enlace_menu){

			var codigoMenu = "";
				
			codigoMenu="<tr>";
			codigoMenu = codigoMenu + "<td><img src='images/img_transparente.gif' width='15' border='0' height='1'></td>"
			codigoMenu = codigoMenu + "<td><img src='images/img_transparente.gif' width='25' border='0'  height='1'></td>"
			codigoMenu = codigoMenu + "<td><img src='images/img_transparente.gif' width='160' border='0'  height='1'></td>"
			codigoMenu = codigoMenu + "</tr>"
			codigoMenu = codigoMenu + "<tr onmouseover=\"javascript:this.style.backgroundColor='#FBB053';this.style.cursor='hand'\" onmouseout=\"javascript:this.style.backgroundColor=color_back_menu;\">"	
		  codigoMenu = codigoMenu + "<td><img src='images/img_transparente.gif' border='0' width='1' height='18'></td>"
			codigoMenu = codigoMenu + "<td colspan='2' class='menucabecerapeq' onclick=\"javascript:parent.parent.frames[1].location.href='" + enlace_menu + "';\">" + texto_menu + "</td>"
			codigoMenu = codigoMenu + "</tr>"

			return codigoMenu;
}

function ImprimeMenuDerecho(fecha_menu,texto_menu, enlace_menu){

			var codigoMenu = "";
				
			codigoMenu="<tr>";
			codigoMenu = codigoMenu + "<td><img src='images/img_transparente.gif' width='5' border='0' height='20'></td>";
			codigoMenu = codigoMenu + "<td width='18'><img src='images/iconota.gif'>&nbsp;</td>";
			codigoMenu = codigoMenu + "<td class='menucabecerapeq' style='color:red' onmouseover=\"style.cursor='hand'\" onclick=\"javascript:" + enlace_menu + "\"><font style='font-size: 9px'><b>" + fecha_menu + "</b></font><BR>" + texto_menu + "</td>";
			codigoMenu = codigoMenu + "</tr>";
			codigoMenu = codigoMenu + "<tr><td colspan='3'><img src='images/img_transparente.gif' width='15' border='0' height='10'></td></tr>";

			return codigoMenu;
}

function CerrarNota(objNota){
	document.getElementById(objNota).style.display="none";
}

function Abrir(FICHERO, ventana){
		if (FICHERO!=""){
			if (ventana==1){
				window.open(FICHERO,"blank","location=no");
			}else{
				parent.parent.frames[1].location.href=FICHERO;		
			}
		}
}

function leerGET(){ 
  var cadGET = location.search.substr(1,location.search.length); 
  var arrGET = cadGET.split("&"); 
  return arrGET; 
} 

if (esnavidad){

	var snowsrc="images/snow.gif"
	
	var no = 30;
	
	var ns4up = (document.layers) ? 1 : 0; 
	var ie4up = (document.all) ? 1 : 0;
	var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
	
	var dx, xp, yp; 
	var am, stx, sty; 
	var i, doc_width = screen.width - 10, doc_height = screen.height;
	
	
	
	dx = new Array();
	xp = new Array();
	yp = new Array();
	am = new Array();
	stx = new Array();
	sty = new Array();
	
	for (i = 0; i < no; ++ i) { 
	dx[i] = 0; 
	xp[i] = Math.random()*(doc_width-50); 
	yp[i] = Math.random()*doc_height;
	am[i] = Math.random()*20; 
	stx[i] = 0.02 + Math.random()/10; 
	sty[i] = 0.7 + Math.random(); 
	if (ns4up) { 
	if (i == 0) {
	document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
	} else {
	document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
	}
	} else if (ie4up||ns6up) {
	if (i == 0) {
	document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
	} else {
	document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
	}
	}
	}
}

function snowNS() { 
for (i = 0; i < no; ++ i) { 
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}

function snowIE_NS6() { 
for (i = 0; i < no; ++ i) { 
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i];
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
} 
}
setTimeout("snowIE_NS6()", 10);
}

if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}

