function vedo_classifiche(stringObj){
  objDiv=document.getElementById(stringObj);
  if (objDiv.id == 'A1') {
     objDiv2=document.getElementById('A2');
     objDiv3=document.getElementById('B1');
     objDiv4=document.getElementById('B2');
     objDiv5=document.getElementById('C1');
  }else if (objDiv.id == 'A2') {
     objDiv2=document.getElementById('A1');
     objDiv3=document.getElementById('B1');
     objDiv4=document.getElementById('B2');
     objDiv5=document.getElementById('C1');
  }else if (objDiv.id == 'B1') {
     objDiv2=document.getElementById('A1');
     objDiv3=document.getElementById('A2');
     objDiv4=document.getElementById('B2');
     objDiv5=document.getElementById('C1');
  }else if (objDiv.id == 'B2') {
     objDiv2=document.getElementById('A1');
     objDiv3=document.getElementById('A2');
     objDiv4=document.getElementById('B1');
     objDiv5=document.getElementById('C1');
  }else if (objDiv.id == 'C1') {
     objDiv2=document.getElementById('A1');
     objDiv3=document.getElementById('A2');
     objDiv4=document.getElementById('B1');
     objDiv5=document.getElementById('B2');
  }
  objDiv.style.visibility='visible';
  objDiv2.style.visibility='hidden';
  objDiv3.style.visibility='hidden';
  objDiv4.style.visibility='hidden';
  objDiv5.style.visibility='hidden';

}


function controlla_pagina(obj){
 if ( parseInt(obj.gio.value) < 1 || parseInt(obj.gio.value) > 18 || !isInteger(obj.gio.value)) {
   alert('Inserisci una giornata valida!!');
   return false
 }else{
   return true
 }
 //!isNaN(parseInt(obj.gio.value)) && (parseInt(obj.gio.value)>18 || parseInt(obj.gio.value)<1 )
}

function invia(objForm){
   objForm.submit()
}

function vedo(stringObj){


  objDiv=document.getElementById(stringObj);
  if (objDiv.id == 'federazione') {
     objDiv2=document.getElementById('together');
     objDiv2.style.visibility='hidden';
  }else{
     objDiv2=document.getElementById('federazione');
     objDiv2.style.visibility='hidden';
  }
  objDiv.style.visibility='visible';
}
function trim(stringa){
  reTrim=/\s+$|^\s+/g;
  return stringa.replace(reTrim,"");
}
function valida(myForm){
  error=''
  Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
  if(trim(myForm.nome.value)=="") error+='Il campo Nome non è compilato! \n'
  if(trim(myForm.cognome.value)=="") error+='Il campo Cognome non è compilato! \n'
  if(trim(myForm.oggetto.value)=="") error+='Il campo Oggetto non è compilato! \n'
  if(trim(myForm.email.value)=="" || !Filtro.test(myForm.email.value) ) error+='Il campo Email non è compilato o la mail non è valida! \n'
  if(error!=''){
    alert(error)
    return false;
  } else {
    return true;
  }

}
/**
 *
 * @access public
 * @return void
 **/
function rosa(num){
   window.parent.rose.window.location.href='larosa.php?idSquadra='+num;
}
function controlla_form(obj){
   if (obj.pass.value!='' && obj.user.value){
      return true;
   }else{
      alert('Devi compilare correttamente la form di login.')
      return false;
   }
}

/**
 *
 * @access public
 * @return void
 **/
function mostra(){
   for(var i=0; i<arguments.length; i++) {
     document.getElementById(arguments[i]).style.display = ''
    // alert(arguments[i])
   }
}

/**
 *
 * @access public
 * @return void
 **/
function nascondi(){
   for(var i=0; i<arguments.length; i++) {
      document.getElementById(arguments[i]).style.display = 'none'
   }

}