// Rutina per obrir popups ...     
       var win= null;
       function NewWindow(mypage,myname,w,h,scroll,pos) {
             if(pos=="random") {
                     LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
                     TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
             } else if(pos=="center") {
                     LeftPosition=(screen.width)?(screen.width-w)/2:100;
                     TopPosition=(screen.height)?(screen.height-h)/2:100;
             } else {
                     LeftPosition=0;TopPosition=20
             }
             settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
             win=window.open(mypage,myname,settings);
             
       }

       function _viewfoto(im,t,w,h) {
       window.open("kimg.php?image="+im+"&title="+t,"_blank","width="+w+",height="+h+",scrollbars=no,menubar=no,screenX=100,screenY=100");
       }

       function foto(camp){
         window.open("imageBrowser.php?camp="+camp+"&valor="+eval(camp).value,"wfoto","resizable=no,menubar=no,height=400,width=600");
       }
       
       function confirmacio()
       {
          if(confirm('Atenci . Ets a punt d\'esborrar un registre de la base de dades. Vols continuar ?'))
            return true;
          else
            return false;
       }
         
       
          var navegador=navigator.userAgent;
          
          function popup(f)
            {
             window.open(f,"Afegir","toolbar=0,resizable=no,status=no,menubar=no,scrollbars=yes,width=500,height=275");
            }
          function overTD(td,color)
          {         
              if(navegador.search('MSIE')>0)
                 td.style.cursor='hand';
              else 
                 td.style.cursor='pointer';
     
              
              td.bgColor=color;
          }
          function outTD(td,color)
          {
              td.style.cursor='default';
              td.bgColor=color;
          }
          function clickTD(url,w,h)
          {              
                NewWindow(url,'',w,h,'yes','center');
          }

        var Dies = new Array
        ("Diumenge",
         "Dilluns",
         "Dimarts",
         "Dimecres",
         "Dijous",
         "Divendres",
         "Dissabte",
         "Diumenge");
        var Mesos = new Array
        ("Gener",
         "Febrer",
         "Mar",
         "Abril",
         "Maig",
         "Juny",
         "Juliol",
         "Agost",
         "Setembre",
         "Octubre",
         "Novembre",
         "Desembre");
         