var inscripcions_obertes = "no";


// CAMBIA LA INFORMACIÓN DE PANTALLA
var pantallaActual = "";
var numAnterior = 0;
//var dataMajorEdat = "04/01/92";
var dataMajorEdat = "04/01/1992";

function cambiarInfo(num) {

	pantallaActual = num;

	pant = "opcio_" + num;
	pantAnterior = "opcio_" + numAnterior;

	if (num == 0) {
		document.getElementById("caixa").style.visibility = "hidden";
	}
	else {
		if (num == 4)
			window.location.href = "fotos";

		else {

			if (numAnterior != 0)
				colorEncima(document.getElementById(pantAnterior), false, numAnterior);
	
			colorEncima(document.getElementById(pant), true, num);
	
			document.getElementById("caixa").style.visibility = "visible";
	
			if (num == 3) {
				if (inscripcions_obertes == "si")
					window.location.href = "inscripcion.php";
				else
					document.getElementById("caixa").innerHTML = texteApartat(num);
			}
			else
				document.getElementById("caixa").innerHTML = texteApartat(num);
		}
	}

	numAnterior = num;


}



// CAMBIA EL COLOR DE LA OPCIÓN SELECCIONADA EN EL MENÚ
function colorEncima(objeto, activar, posicion) {
	if (activar) {
		objeto.style.backgroundImage = "url(img/menu/opc" + posicion + "_selec.png)";
	}
	else {
		if (pantallaActual != posicion)
			objeto.style.backgroundImage = "url(img/menu/opc" + posicion + ".png)";
	}
}



// FUNCIÓ QUE CODIFICA UNA ADREÇA DE E-MAIL
function mail(nom,domini,titol) {

	adreca = nom + "@" + domini;

	if (titol == "") 	mostrar = adreca;
	else				mostrar = titol;

	enviar = "<a href='mailto:" + adreca + "'>" + mostrar + "</a>";
	return enviar;
}




function subInformacio(numero) {
	document.getElementById("caixa").innerHTML = texteApartat(numero);
}


// FUNCIÓ QUE RETORNA ELS TEXTES DE CADASCUN DELS APARTATS
function texteApartat(apartat) {

	texte = "";

	switch (apartat) {

		//	CRIDA
		case "1":	texte  = "<h1>CRIDA! Pasqua Jove Claver 2010</h1>";
					texte += "<p>Any 2010. Un any de 10. Un any de Déu?</p>";
					texte += "<p>Aquesta és la pregunta que, amb unes o altres paraules tots ens fem en el moment d’anar a la Pasqua. La Pasqua Jove és un espai de trobada amb altres joves, bé que ho sabem. També és un moment on cadascú té l’oportunitat de veure la seva vida i el paper de Jesús té i pot tenir en ella.</p>";
					texte += "<p><b>CRIDA</b> és el lema que encapçala la setena edició de la pasqua jove. <i>Cridem</i> per expressar de forma intensa els nostres sentiments; Jesús <i>crida personalment</i> les persones. També, al nostre món, hi ha coses que <i>ens criden</i> l’atenció i no totes són bones. Hem de veure si per nosaltres són beneficioses o no. <i>Cridem</i> de joia perquè hi ha un tresor al nostre cor que ens alimenta, que ens <u>crema</u> per dins (bé que ho vam experimentar l’any passat, oi?).</p>";
					texte += "<p>Enguany incorporem una modificació adreçada a les persones més veteranes que ja heu participat en vàries edicions: un <b>recés itinerant</b>. Un camí, a peu, seguint el camí de Sant Jaume, que culmina el Dissabte sant, quan ens reunirem amb la resta de la tropa a Raimat, per celebrar junts la Vetlla Pasqual.</p>";
					texte += "<p>Com veieu cada any és diferent, cada any som diferents persones i estem en diferent situació. La Pasqua et surt al pas per ajudar-te a veure i viure la teva vida d’una forma una mica més autèntica. No deixis lloc a la mandra, anima’t! <b>LA PASQUA ET CRIDA!</b></p>";
					texte += "<p>Enric Puiggròs sj.<br>" + mail("enricp","jesuites.net","") + "<br><a href='http://www.tskv.cat' target='_blank'>www.tskv.cat</a></p>";

					break;


		//	INFORMACIÓ
		case "2":	texte  = "<h1>CRIDA! Pasqua Jove Claver 2010</h1>";
					texte += "<p><span class='titol'>Quan?</span><br>Del dijous 1 al diumenge 4 d'abril.</p>";
					texte += "<p><span class='titol'>On?</span><br>Al col.legi Claver de Raïmat, Lleida.</p>";
					texte += "<p><span class='titol'>Anada i Tornada</span><br>Sortida des de Barcelona:<br>Concentració el dijous 1 d’abril a les 8:45h de Palau Reial. Sortida en <br>autocar a les 9:00h.</p>";
					texte += "<p><img src='img/mapa.jpg'></p>";
					texte += "<p>Arribada a Barcelona el diumenge 4 d’abril a les 13:30 a Palau Reial.</p>";
					texte += "<p><span class='titol'>Preu: 65€*</span><br>*55 € si no s’utilitza l’autobús.</p>";
					texte += "<p><span class='titol'>Modalitat Itinerant</span><br>Aquest any hem canviat l’antiga modalitat de sil.lenci/recés per una nova experiència. Es tracta de la modalitat itinerant, viure la Pasqua caminant de Cervera a Lleida seguint el camí de Sant Jaume. <a href='javascript:subInformacio(\"21\")'>Més informació</a></p>";
					texte += "<br>";

					break;



		//	MODALITAT ITINERANT
		case "21":	texte  = "<h1>PROJECTE DE RECÉS ITINERANT</h1>";
					texte += "<p><span class='titol'>TRIDU PASQUAL 2010.1-4 d’abril</span></p>";

					texte += "<ul><li>Seguim el Camí de Sant Jaume des de Cervera fins a Lleida</li></ul>";

					texte += "<ul><li>Nombre: per a vint persones màxim</li>";
					texte += "<li>Es faran de cinc a sis hores de camí diàries. Algunes d’elles en silenci</li>";
					texte += "<li>Adreçat a joves de +23</li>";
					texte += "<li>Caldria entrevista prèvia i/o reunió prèvia amb els pelegrins</li>";
					texte += "<li>Responsables: Santi Torres i David Guindulain</li>";
					texte += "<li>Pel desplaçament fins a Cervera aprofitem un bus dels que van a la Pasqua.</li>";
					texte += "<li>Es participa en les litúrgies dels pobles on es fa nit.</li>";
					texte += "</ul>";

					texte += "<ul><li>S’arriba a la parròquia Sant Ignasi de Lleida a l’hora de berenar.<br>Descans, sopar a la parròquia. Participació a la vetlla pasqual i dormim a Raimat.</li>";
					texte += "<li>Preu únic: 65 euros</li>";
					texte += "</ul>";

					texte += "<table width='100%' border='1' cellpadding='3' cellspacing='0' style='font-size:12px;line-height:1em'>";
					texte += "<tr>";
					texte += "<td width='15%'>&nbsp;</td>";
					texte += "<td width='20%'><b>Dies</b></td>";
					texte += "<td width='20%'><b>Recorregut</b></td>";
					texte += "<td width='20%'><b>Distància</b></td>";
					texte += "<td><b>Nit</b></td>";
					texte += "</tr>";

					texte += "<tr>";
					texte += "<td>1ª etapa</td>";
					texte += "<td>Dijous sant</td>";
					texte += "<td>Cervera-Verdú</td>";
					texte += "<td>14 Kms</td>";
					texte += "<td>Santuari de Sant Pere Claver (Verdú)</td>";
					texte += "</tr>";

					texte += "<tr>";
					texte += "<td>2ª etapa</td>";
					texte += "<td>Divendres sant</td>";
					texte += "<td>Verdú-Palau d’Anglesola</td>";
					texte += "<td>24 Kms</td>";
					texte += "<td>Pensió Sant Antoni (Palau d’Anglesola).</td>";
					texte += "</tr>";

					texte += "<tr>";
					texte += "<td>3ª etapa</td>";
					texte += "<td>Dissabte sant</td>";
					texte += "<td>Palau d’Anglesola-Lleida</td>";
					texte += "<td>24,5 Kms</td>";
					texte += "<td>Col·legi Claver (Raimat)</td>";
					texte += "</tr>";

					texte += "</table>";

					texte += "<br>Si téns algún dubte o vols més informació, pots contactar amb en " + mail("dguindulain","fespinal.com","David Guindulain") + "<br>";

					texte += "<br><a href='javascript:cambiarInfo(\"2\")'>&laquo; Tornar</a><br><br>";

					break;


		//	INSCRIPCIÓ

		case "35":	texte  = "<h1>FORMULARI D'INSCRIPCIÓ</h1>";

					texte += "<form name='formulario' method='post' action='guardarInscripcion.php' onsubmit='return validarFormulari()'>";

					texte += "<table width='100%' border='0' cellpadding='3' cellspacing='0' style='line-height:1.5em;font-size:12px'>";

					texte += "<tr><td width='25%'>Nom*</td><td colspan='3'><input type='text' size='30' name='nom' maxlength='40'></td></tr>";
					texte += "<tr><td>1er cognom*</td><td colspan='3'><input type='text' style='width:100%' name='cognom1' maxlength='40'></td></tr>";
					texte += "<tr><td>2on cognom*</td><td colspan='3'><input type='text' style='width:100%' name='cognom2' maxlength='40'></td></tr>";

					texte += "<tr><td>Data naixement*</td><td colspan='3'>";

					texte += "<select name='dia_n'>";
					texte += "<option value=0>dia</option>";
					for (i=1;i<=31;i++) {
						texte += "<option value=" + i + ">" + i + "</option>";
					}
					texte += "</select> ";

					texte += "<select name='mes_n'>";
					texte += "<option value=0>mes</option>";
					for (i=1;i<=12;i++) {
						texte += "<option value=" + i + ">" + i + "</option>";
					}
					texte += "</select> ";

					texte += "<select name='any_n'>";
					texte += "<option value=0>any</option>";
					for (i=1960;i<=2000;i++) {
						texte += "<option value=" + i + ">" + i + "</option>";
					}
					texte += "</select>";

					texte += "&nbsp;&nbsp;&nbsp;<a href='autoritzacio 2010.pdf' target='_blank'>Full d'Autorització menors de 18 anys</a></td></tr>";

					texte += "<tr><td>Adreça*</td><td colspan='3'><input type='text' style='width:100%' name='carrer_ad' maxlength='75'></td></tr>";
					texte += "<tr><td>Població*</td><td><input type='text' size='20' name='poblacio_ad' maxlength='60'></td>";
					texte += "<td width='15%'>CP*</td>";
					texte += "<td width='30%'><input type='text' style='width:50px' name='codi_ad' maxlength='5'></td></tr>";

					texte += "<tr><td>Telèfon*</td><td><input type='text' size='20' name='telf_prop' maxlength='15'></td>";
					texte += "<td>E-mail*</td><td><input type='text' style='width:100%' name='mail' maxlength='60'></td></tr>";

					texte += "<tr><td colspan='4'><table width='100%' cellpadding='0' cellspacing='0'>";
					texte += "<tr><td>Nom pare/mare/tutor/tutora*</td><td><input type='text' name='nom_pmt' style='width:100%' maxlength='60'></td></tr>";
					texte += "<tr><td>&nbsp;</td><td class='petita'>(camp obligatori només si tens menys de 18 anys)</td></tr>";

					texte += "<tr><td>Telèfon familiar*</td><td><input type='text' name='telf_cont' style='width:100px' maxlength='15'></td></tr>";
					texte += "<tr><td>&nbsp;</td><td class='petita'>(camp obligatori només si tens menys de 18 anys)</td></tr>";

					texte += "</table></td></tr>";


					texte += "<tr><td>Etapa*</td>";
					texte += "<td><select name='etapa'>";
					texte += "<option value='ESO'>ESO</option>";
					texte += "<option value='Batxillerat'>Batxillerat</option>";
					texte += "<option value='Universitaris'>Universitaris</option>";
					texte += "<option value='Post-Universitaris'>Post-Universitaris</option>";
					texte += "<option value='Monitor'>Monitor/a</option>";
					texte += "<option value='Altres'>Altres</option>";
					texte += "</select></td>";

					texte += "<td>Curs*</td>";
					texte += "<td><select name='curs'>";
					texte += "<option value='1r ESO'>1º ESO</option>";
					texte += "<option value='2n ESO'>2º ESO</option>";
					texte += "<option value='1r BATX'>1º BATX</option>";
					texte += "<option value='2n BATX'>2º BATX</option>";
					texte += "<option value='1r UNI'>1º UNI</option>";
					texte += "<option value='2n UNI'>2º UNI</option>";
					texte += "<option value='3r UNI'>3º UNI</option>";
					texte += "<option value='4t UNI'>4º UNI</option>";
					texte += "<option value='5e UNI'>5º UNI</option>";
					texte += "<option value='Post-Uni'>Post-Uni</option>";
					texte += "<option value='Monitor ESO'>Monitor/a ESO</option>";
					texte += "<option value='Monitor BATX'>Monitor/a BATX</option>";
					texte += "<option value='Monitor UNI'>Monitor/a UNI</option>";
					texte += "<option value='Altres'>Altres</option>";
					texte += "</select></td></tr>";
					
					texte += "<tr><td>Centre d'orígen*</td>";
					texte += "<td><select name='origen'>";
					texte += "<option value='Lleida'>Lleida</option>";
					texte += "<option value='St. Ignasi, Sarrià'>St. Ignasi, Sarrià</option>";
					texte += "<option value='Casp'>Casp</option>";
					texte += "<option value='SEK'>SEK</option>";
					texte += "<option value='Clot'>Clot</option>";
					texte += "<option value='Bellvitge'>Bellvitge</option>";
					texte += "<option value='Lestonnac'>Lestonnac</option>";
					texte += "<option value='Sagrat Cor'>Sagrat Cor</option>";
					texte += "<option value='Vedrunes'>Vedrunes</option>";
					texte += "<option value='Universitaris Loiola'>Universitaris Loiola</option>";
					texte += "<option value='Altres'>Altres</option>";
					texte += "</select></td>";

					texte += "<td>Nº SS.SS</td>";
					texte += "<td><input type='text' name='numsoc' style='width:100%' maxlength='30'></td></tr>";
					


					texte += "<tr><td colspan='4'><table border='0' width='100%' cellpadding='0' cellspacing='0'>";

					texte += "<tr><td colspan='2'><input type='checkbox' name='reces' value='si' onclick='canviarItinerant(this)'>&nbsp;Faré opció de recés itinerant?</td><td colspan='2'><a href='index.php?id=mesinfo' target='_blank'>(Més informació...)</a></td></tr>";

					texte += "<tr><td colspan='4'><img src='../grafics web/spacer.gif' width='1' height='5'></td></tr>";

					texte += "<tr><td>Utilitzaré l'autobús?</td>";
					texte += "<td><input type='radio' name='bus' value='no'>&nbsp;No</td>";
					texte += "<td><input type='radio' name='bus' value='anada'>&nbsp;Anada</td>";
					texte += "<td><input type='radio' name='bus' value='tornada'>&nbsp;Tornada</td>";
					texte += "<td><input type='radio' name='bus' value='anada-tornada' checked='true'>&nbsp;Anada i tornada</td></tr>";

					texte += "</table></td></tr>";

					texte += "<tr><td colspan='4'><img src='../grafics web/spacer.gif' width='1' height='5'></td></tr>";


					texte += "<tr><td colspan='4' align='center'><input type='submit' class='boto' value='&nbsp;&nbsp;Enviar&nbsp;&nbsp;'>";
					texte += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
					texte += "<input type='button' value='Cancelar' class='boto' onclick='cambiarInfo(\"0\")'></td></tr>";


					texte += "<tr><td colspan='4'><img src='../grafics web/spacer.gif' width='1' height='5'></td></tr>";

					texte += "<tr><td colspan='4'>Per especials circumstàncies d'allotjament, escriure a " + mail("pau.vidal.sas","gmail.com","Pau Vidal") + ".</td></tr>";

					texte += "<tr><td colspan='4'><a href='autoritzacio 2010.pdf' target='_blank'>IMPORTANT: Si tens menys de 18 anys has d'omplir aquest FULL D'AUTORITZACIÓ.</a></td></tr>";


					

					texte += "</table>";

					texte += "</form>";





					texte += "<script>document.formulario.nom.focus();</script>";



					break;


		//	MISSATGE D'INSCRIPCIÓ

		case "ok":	texte  = "<h1>INSCRIPCIÓ REALITZADA.</h1>";

					texte += "Rebràs un correu electrònic amb les instruccions per completar la teva inscripció.";

					break;


		//	MISSATGE D'ERROR

		case "nok":	texte  = "<h1>ERROR EN LA INSCRIPCIÓ.</h1>";

					texte += "<p>Hi ha hagut un problema en la inscripció o en l'enviament del correu electrònic.</p>";
					texte += "<p>Posa't en contacte amb " + mail("enricp","jesuites.net","la gent de la Pasqua Jove") + " per confirmar que la teva inscripció s'ha realitzat correctament.</p>";

					break;



		//	VIDEOS
		case "5":	texte  = '<h1>VIDEOS DE LA PASQUA</h1>';

					texte += '<object width="425" height="344" border="0"><param name="src" value="video/video_final_crida.wmv"><embed border="0" width="425" height="344" src="video/video_final_crida.wmv" autostart="true"></embed></object>';

					texte += "<br><br><br>";

					texte += '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_pOiU69rJRk&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_pOiU69rJRk&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';

					texte += "<br><br><br>";

					texte += '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/rzjww4nRCtY&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rzjww4nRCtY&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';

					texte += "<br><br>";



					break;



		//	HIMNE
		case "6":	texte  = '<h1>HIMNE DE LA PASQUA</h1>';

					texte += "Pots escoltar aquí l'Himne de la Pasqua:<br><br>";

					texte += '<object type="application/x-shockwave-flash" width="300" height="25" data="himne/xspf_player_slim.swf?playlist_url=himne/test.xspf">';
					texte += '<param name="movie" value="himne/xspf_player_slim.swf?playlist_url=himne/test.xspf"></object>';

					texte += "<br><br>";

					texte += "També pots descarregar-te'l <a href='himne/himne.php'>aquí</a>.<br><br>";

					texte += '<h1>LLETRA</h1>';

					texte += "<p>Viure sense sentit<br>De tornada de tot<br>quan encara no hem sortit</p>";
					texte += "<p>Sense capacitat<br>Per diferenciar.<br>Sense un nord cap a on anar.</p>";

					texte += "<p><i>Però de cop i volta<br>s’obre una possibilitat.<br>Ara estic segur<br>Tu em dónes força per cridar</i><br>";

					texte += "<b>Crida</b>, deixa’t estimar.<br>";
					texte += "<b>Crida</b>, jo crido al teu costat<br>";
					texte += "<b>Crida</b>, vull estar amb Tu, Jesús. // l'Esperit crida més alt</p>";

					texte += "<p>Mirant la realitat<br>Molts signes de Bondat<br>Apareixen si els saps veure.<br>Déu de cop surt al teu pas,<br>Cal que agafis la seva mà<br>i et posis a caminar</p>";

					texte += "<p><i>I de cop i volta<br>Tot és nou al meu voltant<br>Ara estic segur<br>Tu em dónes força per cridar</i><br>";

					texte += "<b>Crida</b>, deixa’t estimar.<br>";
					texte += "<b>Crida</b>, jo crido al teu costat<br>";
					texte += "<b>Crida</b>, vull estar amb Tu, Jesús. // l'Esperit crida més alt</p>";

					texte += "<p><span class='groc'>Música i Lletra: Enric Puiggròs<br>Programacións, arranjaments i baix: Albert Vilela<br>Saxo: Xavi López<br>Guitarra elèctrica: Miquel Escuer<br>Estudi AIRE&AGUA</span></p>";







//					texte += '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_pOiU69rJRk&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_pOiU69rJRk&hl=es_ES&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';

					texte += "<br><br><br>";



					break;





		//	DESCARREGUES
		case "7":	texte  = "<h2>FANZINE DE LA PASQUA</h2>";

					texte += "<p><table><tr><td align='center'><a href='fanzine1.pdf' target='_blank'><img src='img/zine1-thumb.jpg'><br>Fanzine 1</a></td>";

					texte += "<td width='50px'>&nbsp;</td>";

					texte += "<td align='center'><a href='fanzine2.pdf' target='_blank'><img src='img/zine2-thumb.jpg'><br>Fanzine 2</a></td></tr></table></p>";

					texte += "<br>";
					
					texte += "<h2>FULL D'AUTORITZACIÓ MENORS D'EDAT</h2>";

					texte += "<p>Descarrega't <a href='autoritzacio 2010.pdf' target='_blank'>aquí</a> el Full d'Autorització per a menors de 18 anys.</p>";
					
					texte += "<br>";
					
					texte += "<h2>VIDEO</h2>";

//					texte += "<p>Descarrega't <a href='video/cridavideo1_web.wmv'>aquí</a> el vídeo de la Pasqua Jove.</p>";
					texte += "<p>Descarrega't <a href='video/video.php'>aquí</a> el vídeo de la Pasqua Jove.</p>";
					
					texte += "<br>";
					
					texte += "<h2>CARTELL</h2>";

					texte += "<p>Descarrega't <a href='cartell/cartell CRIDA.jpg' target='_blank'>aquí</a> el cartell de la Pasqua Jove.";
					texte += "<a href='cartell/cartell CRIDA.jpg' target='_blank'><img src='cartell/miniatura cartell CRIDA.jpg' align='left' style='margin-right:10px'></a></p>";
					
					break;



		//	ALTRES PASQUES
		case "8":	texte  = "<table width='100%' border='0' cellpadding='3' cellspacing='0' style='font-size:12px;line-height:2em'>";

					texte += "<tr><td width='50%'><a href='http://tskv.cat/pasqua09' target='_blank' class='subtitol'>FIRE 09</a><br>";
					texte += "<a href='http://tskv.cat/pasqua09' target='_blank'><img src='img/tskv2009.jpg' class='poster'></a></td>";

					texte += "<td><a href='http://tskv.cat/pasqua08' target='_blank' class='subtitol'>DOMÈSTIC 08</a><br>";
					texte += "<a href='http://tskv.cat/pasqua08' target='_blank'><img src='img/tskv2008.jpg' class='poster'></a></td></tr>";

					texte += "<tr><td>&nbsp;</td></tr>";

					texte += "<tr><td><a href='http://lacompanyia-cat.net/tskv/index.html' target='_blank' class='subtitol'>DESMARCA'T 07</a><br>";
					texte += "<a href='http://lacompanyia-cat.net/tskv/index.html' target='_blank'><img src='img/tskv2007.jpg' class='poster'></a></td>";

					texte += "<td><a href='http://www.jesuites.net/tskv/2006/' target='_blank' class='subtitol'>ÚLTIMA ESTACIÓ 06</a><br>";
					texte += "<a href='http://www.jesuites.net/tskv/2006/' target='_blank'><img src='img/tskv2006.jpg' class='poster'></a></td></tr>";

					texte += "<tr><td>&nbsp;</td></tr>";

					texte += "<tr><td><a href='http://www.jesuites.net/tskv/2005/' target='_blank' class='subtitol'>TOT ESTÀ x FER 05</a><br>";
					texte += "<a href='http://www.jesuites.net/tskv/2005/' target='_blank'><img src='img/tskv2005.jpg' class='poster'></a></td>";

					texte += "<td><a href='http://www.jesuites.net/tskv/2004/' target='_blank' class='subtitol'>TSKV 04</a><br>";
					texte += "<a href='http://www.jesuites.net/tskv/2004/' target='_blank'><img src='img/tskv2004.jpg' class='poster'></a></td></tr>";

					texte += "</table>";

					texte += "<br><br>";

					break;





		default:	texte  = "<h1>INFORMACIÓ DISPONIBLE PRÒXIMAMENT</h1>";

					break;




	}

	return texte;

}



// CANVIEM ELS VALORS DE L'AUTOBUS, SI FAN O NO EL RECÉS ITINERANT
function canviarItinerant(valor) {
	if (valor.checked) {
		document.formulario.bus[1].disabled = true;
		document.formulario.bus[3].disabled = true;
		document.formulario.bus[2].checked = true;
	}
	else {
		document.formulario.bus[1].disabled = false;
		document.formulario.bus[3].disabled = false;
		document.formulario.bus[3].checked = true;
	}
}


// RETORNA UN ERROR EN EL FORMULARI
function errorDesc(tiperr,campo) {
	switch (tiperr)	{
		case 0: document.formulario.elements[campo].style.backgroundColor = "#FFFFFF";
				break;

		case 1: window.alert("Camp obligatori");
			 	document.formulario.elements[campo].style.backgroundColor = "#FF8080";
				document.formulario.elements[campo].focus();
				break;		 

		case 2: window.alert("Camp numèric");
				document.formulario.elements[campo].style.backgroundColor = "#FF8080";
				document.formulario.elements[campo].focus();
				break;

		default:	break;

   }

}



// VALIDEM EL FORMULARI D'INSCRIPCIÓ
function validarFormulari() {

	// NOMS I COGNOMS
	if (document.formulario.nom.value == "") {
		errorDesc(1,"nom");
		return false;
	}
	errorDesc(0,"nom");

	if (document.formulario.cognom1.value == "") {
		errorDesc(1,"cognom1");
		return false;
	}
	errorDesc(0,"cognom1");

	if (document.formulario.cognom2.value == "") {
		errorDesc(1,"cognom2");
		return false;
	}
	errorDesc(0,"cognom2");


	// DATA NAIXEMENT
	if (document.formulario.dia_n.value == 0) {
		errorDesc(1,"dia_n");
		return false;
	}
	errorDesc(0,"dia_n");

	if (document.formulario.mes_n.value == 0) {
		errorDesc(1,"mes_n");
		return false;
	}
	errorDesc(0,"mes_n");

	if (document.formulario.any_n.value == 0) {
		errorDesc(1,"any_n");
		return false;
	}
	errorDesc(0,"any_n");


	// ADREÇA
	if (document.formulario.carrer_ad.value == "") {
		errorDesc(1,"carrer_ad");
		return false;
	}
	errorDesc(0,"carrer_ad");

	if (document.formulario.poblacio_ad.value == "") {
		errorDesc(1,"poblacio_ad");
		return false;
	}
	errorDesc(0,"poblacio_ad");

	if (document.formulario.codi_ad.value == "") {
		errorDesc(1,"codi_ad");
		return false;
	}
	errorDesc(0,"codi_ad");

	if (document.formulario.telf_prop.value == "") {
		errorDesc(1,"telf_prop");
		return false;
	}
	errorDesc(0,"telf_prop");

	if (document.formulario.mail.value == "") {
		errorDesc(1,"mail");
		return false;
	}
	errorDesc(0,"mail");


//	CAMPS OBLIGATORIS PELS MENORS D'EDAT
	if (esMenorEdat(document.formulario.dia_n.value, document.formulario.mes_n.value, document.formulario.any_n.value)) {
		if (document.formulario.nom_pmt.value == "") {
			errorDesc(1,"nom_pmt");
			return false;
		}
		errorDesc(0,"nom_pmt");

		if (document.formulario.telf_cont.value == "") {
			errorDesc(1,"telf_cont");
			return false;
		}
		errorDesc(0,"telf_cont");
	}




	return true;
}



function esMenorEdat(dia,mes,any) {
//	fecha = mes + '/' + dia + '/' + any.substr(2,2); 
	fecha = mes + '/' + dia + '/' + any; 

	f1 = new Date(fecha);
	f2 = new Date(dataMajorEdat);

	if (f1 >= f2)	return true;
	else			return false;
}


// FUNCIÓ PER REMARCAR LA FILA SELECCIONADA D'UN ALTRE COLOR
function remarcaFila(fila, marcar) {
	if (marcar)	fila.style.backgroundColor = "#eeeeee";
	else 		fila.style.backgroundColor = "#FFFFFF";
}
