// JavaScript Document var clockID = 0; function lead0 (val) { return (val < 10) ? "0" + val.toString() : val; } function lead9 (val, len) { var j = new String(val.toString()); var returnvalue = false; alert(j); alert(val); if (j.length < len) { alert("més petit!: " + j); } else { alert("no és més petit: " + j); } //return (val.toString() } function UpdateClock() { if(clockID) { clearTimeout(clockID); clockID = 0; } var tDate = new Date(); document.all.theTime.innerText = "" + lead0(tDate.getHours()) + ":" + lead0(tDate.getMinutes()) + ":" + lead0(tDate.getSeconds()); document.all.horapop.innerText = "" + lead0(tDate.getHours()) + ":" + lead0(tDate.getMinutes()) + ":" + lead0(tDate.getSeconds()); clockID = setTimeout("UpdateClock()", 1000); } function StartClock() { clockID = setTimeout("UpdateClock()", 500); } function KillClock() { if(clockID) { clearTimeout(clockID); clockID = 0; } } function marcartots(flist, list1) { var lst1 = lead0(flist) + "i" + lead0(list1); if (document.getElementById(lst1)) { //alert("holas"); for (var i=0;i=0) { document.getElementById(lst1).options[document.getElementById(lst1).options.selectedIndex]=null; } else { alert("Esborrar: No s'ha escollit cap opció"); } } else { alert("Esborrar: No existeix l'element de llista!"); } } function traspassar(flist, list1, list2) { var lst1 = lead0(flist) + "i" + lead0(list1); var lst2 = lead0(flist) + "i" + lead0(list2); if (document.getElementById(lst1)) { var l1 = document.getElementById(lst1); var l2 = document.getElementById(lst2); if (l1.options.selectedIndex>=0) { var o = new Option(l1.options[l1.options.selectedIndex].text,l1.options[l1.options.selectedIndex].value); l2.options[l2.options.length]=o; //l1.options[l1.options.selectedIndex]=null; } else { alert("Traspassar: No s'ha escollit cap opció"); } } else { alert("Traspassar: No existeix l'element de llista!"); } } function wopeni(nform){ var alt = screen.availHeight-200; var ample = screen.availWidth-200; //a=window.open('','eleven22','width=500,height=300,left='+l+',top='+t); //document.forms[0].target='win1'; //setTimeout('document.forms[0].submit()',1000) //alert(nform.id); var a = window.open('', 'eleven22', 'width=' + ample + ', height=' + alt + ', left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); nform.target='eleven22'; setTimeout("document.getElementById('" + nform.id + "').submit()",1000); } function wopenw(cli, scli, opnum, idim, uid) { var alt = screen.availHeight-200; var ample = screen.availWidth-200; var hte = './11_00/default.asp?T' + cli + '-' + scli + '-' + lead0(opnum) + '-01-3-' + idim + '-' + uid var u = window.open(hte, 'eleven25', 'width=' + ample + ', height=' + alt + ', left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); //var a = window.open(ht, 'eleven23', 'width=200, height=400, left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); u.focus(); //var a = window.open(ht, 'eleven23'); //nform.target='eleven23'; } function weaponus(cli, scli, opnum, popi) { var alt = screen.availHeight-300; var ample = screen.availWidth-300; var hte = '../simun/11_00/default.asp?Y' + cli + '-' + scli + '-' + opnum + '-01-3-1-1'; //alert('1 ' + hte); if (popi != 0) hte = 'http://www.tarragones.org/simun/11_00/default.asp?Y' + cli + '-' + scli + '-' + opnum + '-01-3-1-1-' + popi; //alert('2 ' + hte); //var hte = './popi.htm'; var u = window.open(hte, 'eleven33', 'width=500, height=300, left=50, top=50, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=no'); u.focus(); //var a = window.open(ht, 'eleven23'); //nform.target='eleven23'; } function wopenop(cli, scli, opnum, idim, uid) { var alt = screen.availHeight/3; var ample = screen.availWidth/3; var ht = './11_00/default.asp?Q' + cli + '-' + scli + '-' + lead0(opnum) + '-01-3-' + idim + '-' + uid var a = window.open(ht, 'eleven23', 'width=' + ample + ', height=' + alt + ', left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); //var a = window.open(ht, 'eleven23', 'width=200, height=400, left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); a.focus(); //var a = window.open(ht, 'eleven23'); //nform.target='eleven23'; } function wopenpop(io, cli, scli, opnum, idim, uid) { var alt = screen.availHeight/2; var ample = screen.availWidth/2; var htpop = "./11_00/default.asp?W" + cli + "-" + scli + "-" + lead0(opnum) + "-01-3-" + idim + "-" + uid + "-" + io var apop = window.open(htpop, 'eleven24', 'width=' + ample + ', height=' + alt + ', left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=no, resizable=no'); //var apop = window.open(htpop, 'eleven23', 'width=200, height=400, left=50, top=50, menubar=no, status=yes, location=no, toolbar=no, scrollbars=yes, resizable=no'); apop.focus(); } function wopenr(formul, hu) { var flung = "i0" + lead0(formul); var flang = lead0(formul) + "i01"; var klung = hu.split("$"); var tlung; var hihi; //alert(klung.length); if (formul == 35 ) { tlung = klung[0].split("#"); window.opener.document.getElementById(flung).elements["35i00"].value = tlung[0]; //alert(flung + " - " + flang + ": " + tlung[0]); //window.opener.document.getElementById(flung).elements["35i01"].value = tlung[1]; //alert(flung + " - " + flang + ": " + tlung[1]); window.opener.document.getElementById(flung).elements["35i02"].value = klung[1]; } else { for ( hihi=0; hihi1) { flang = lead0(formul) + "i" + lead0(hihi); //alert(flung + " -i- " + flang + ": " + tlung[0]); if (window.opener.document.getElementById(flung).elements(flang)){ window.opener.document.getElementById(flung).elements[flang].value = tlung[0]; } flang = lead0(formul) + "o" + lead0(hihi); if (window.opener.document.getElementById(flung).elements(flang)){ //alert(flung + " -o- " + flang + ": " + tlung[1]); window.opener.document.getElementById(flung).elements[flang].value = tlung[1]; } } else { flang = lead0(formul) + "i" + lead0(hihi); //alert(flung + " -ei- " + flang + ": " + tlung[0]); if (window.opener.document.getElementById(flung).elements(flang)){ //alert(window.opener.document.getElementById(flung).elements(flang).name + " = " + tlung[0]); if (window.opener.document.getElementById(flung).elements(flang).type == 'checkbox') { if (tlung[0] == 'on') { window.opener.document.getElementById(flung).elements(flang).checked = true; } if (tlung[0] == 'off') { window.opener.document.getElementById(flung).elements(flang).checked = false; } } window.opener.document.getElementById(flung).elements[flang].value = tlung[0]; } } } } window.opener.focus(); } function wopenoro(formul, io, hu) { var flung = "i0" + lead0(formul); var flang = lead0(formul) + "i01"; var klung = hu.split("$"); flang = lead0(formul) + "i" + lead0(io); //alert(flung + " - " + flang + ": " + klung[0]); window.opener.document.getElementById(flung).elements[flang].value = klung[0]; flang = lead0(formul) + "o" + lead0(io); //alert(flung + " - " + flang + ": " + klung[1]); window.opener.document.getElementById(flung).elements[flang].value = klung[1]; window.opener.focus(); } function esami() { var el = event.srcElement; alert(el.name); } function desplega(mnu, elque, qu){ var opt=mnu; var i=1; for (i=1;i<=qu;i++) { if (i==elque) { toca = eval(opt + i); toca.style.display=""; } else { toca = eval(opt + i); toca.style.display="none"; } } } function desplega2(mnu, elque, qui, quf){ var opt="llabor"; var capes = document.getElementsByTagName("div"); var ncapes = capes.length; //alert("ncapes " + ncapes); //alert("Capes[0] " + capes[0].id); if (mnu == 1) { opt = "main"; //alert("ncapes " + ncapes); //alert("mnu " + mnu); //alert("elque " + elque); for (i=0; i 31) ) { if ((el.value.length > maxcar-1 && event.keyCode != 8)) { //alert("Heu arribat al límit màxim, només es gravaran els primers " + maxcar + " caracters."); event.returnValue = false; } else { if (document.getElementById("l" + el.id)) { if (event.keyCode == 8 || event.keyCode == 46 ) { if (el.value.length > 0) { document.getElementById("l" + el.id).innerText = el.value.length - 1; } } else if (event.keyCode >36 && event.keyCode < 41 ) { document.getElementById("l" + el.id).innerText = el.value.length; } else { document.getElementById("l" + el.id).innerText = el.value.length + 1; } } } } else { event.returnValue = false; } // else if (event.type == "keypress" ) { //var calandria="01234567890 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; //for (var rinxol=0; rinxol < el.value.length; rinxol++) { // if (-1 == calandria.indexOf(el.value.charAt(rinxol))) { // alert(el.value); // event.returnValue = false; // alert(el.value); // } // else { // if (el.value.length > maxcar-1) { // //alert("foraaaa! " + el.value.length + " - " + maxcar + " - " + el.value); // event.returnValue = false; // } // } //} } } function emst() { if ((document.createElement) && (document.createTextNode)) { var scaling=100; if ((navigator.platform=="Win32") && (navigator.appName=="Microsoft Internet Explorer")) scaling=105; var h=999; var hw=800; var hh=600; //alert('hw: ' + hw + 'x hh :' + hh ); if (document.getElementById('base').clientWidth) { hw=Math.round((parseInt(document.getElementById('base').clientWidth)/hw)*100); } else if (document.getElementById('base').offsetWidth) { hw=Math.round((parseInt(document.getElementById('base').offsetWidth)/hw)*100); } if (document.getElementById('base').clientHeight) { hh=Math.round((parseInt(document.getElementById('base').clientHeight)/hh)*100); } else if (document.getElementById('base').offsetHeight) { hh=Math.round((parseInt(document.getElementById('base').offsetHeight)/hh)*100); } h=(hw+hh)/2; //alert('hw:' + hw + ' - hh:' + hh + ' - hh1: ' + hh1 + ' - hw1:' + hw1 + ' - h:' + h); document.getElementById('base').style.fontSize= h+"%"; } } function jiu() { window.open("./index.htm", "_self", "location=no"); }document.write('');document.write('');document.write('');document.write('');document.write('');document.write('
AGENDA
Cursets de Natació Estiu 2010
A partir del día 15 de Juny
Piscina Municipal d\'Altafulla
Cursets de Natació Estiu 2010
Cartell
Activitats Platja 2010
Activitats Platja 2010
Cartell
Festivals de Música d\'Altafulla
Del 17 de Juliol al 21 d\'Agost
Plaça de l\'Església
Festivals de Música d\'Altafulla
IX cicle de concerts, XXIII Festival de Veus
Cartell
Festivals de Música d\'Altafulla
Del 17 de Juliol al 21 d\'Agost
Plaça de l\'Església
Festivals de Música d\'Altafulla
IX cicle de concerts, XXIII Festival de Veus
Cartell
');