function Roll(obj,how){
//rollover x immagini statiche
eval('document.'+obj+'.src="../FixedPortal/img/'+obj+'_'+how+'.gif"')
}

function CRoll(obj,how,path){
// usata per i contenuti dinamici: e' possibile impostare un path diverso da /img/
eval('document.'+obj+'.src="'+path+obj+'_'+how+'.gif"')
}

function CRoll2(obj,path){
// usata per i contenuti dinamici: e' possibile impostare un path diverso da /img/
eval('document.'+obj+'.src="'+path+'"')
}

function MRoll(which,how){
// usata nella mappa del sito
eval('document.frmap'+which+'.src="../FixedPortal/img/fr_map_'+how+'.gif"')
}

function OpenPop(src,w,h,popName){
var sPopName='pop';
if (arguments.length == 4) sPopName=popName;
t=(screen.height-h)/2
l=(screen.width-w)/2
eval("window.open(src,sPopName,'top="+t+",left="+l+",width="+w+",height="+h+"');");
}


function mOver (o) {
  o.className='menuOn';
  o.childNodes[1].className='menuOn'
}

function mOut (o) {
  o.className='menuOff';
  o.childNodes[1].className='menu'
}

function shot(URL,  WinName, options)
{
   desktop =window.open(URL,  WinName, options);
}


// Aggiunte da BHuman


  // Restituisce un oggetto del modello DOM della pagina dato il suo Id
  //
  // Input: objectId		l'id dell' oggetto da risolvere
  //
  function getById ( objectId )
  {
      return document.getElementById ( objectId );
  }



  // Disabilita il tasto Enter in un campo di testo di id inputId se vuoto
  // (usato per disinibire il submit di un form col tasto Enter)
  //
  // Input: inputId		l'id del campo di input
  //        e             l'evento da disabilitare
  //
  function disableEnterKey ( inputId, e )
  {
      var key;
      var objInput = getById ( inputId );
        
      if ( window.event )
          key = window.event.keyCode;     // IE
      else
          key = e.which;                  // firefox

      if ( ( key == 13 ) && ( objInput.value == "" ) )
          return false;
      else
          return true;
  }

    
   
  // Usata per validare il form di ricerca in cerca133 e in domande frequenti
  //
  // Input: formId		l'id del form contenente i campi di ricerca
  //
  function validateSelfcareSearch ( formId )
  {
      var objForm    = getById ( formId );
      var formAction = getById ( "formAction" );
            
      if ( objForm.query.value == "" )
      {
          alert ( "Prego inserire le parole da cercare" );
      }
      else
      {
          objForm.action = formAction.value;
          
          // Trasforma le maiuscole in minuscole (questo per bypassare temporaneamente un controllo nella ParamSmandrupperAction)
          str = new String ( objForm.query.value );
          str = str.toLowerCase ();
          objForm.query.value = str;
          
          objForm.submit ();
      }
  }  
