<script language="javascript">

<?php 
  include( create_tabControl_control( $modo_RAD ) );
?> 

/**
 *  tabControl_mouseClick()
 */  
function tabControl_mouseClick( objID )
{
  if( objID.indexOf('tabControl') != -1 &&
        objID.indexOf('ABA') != -1  )
  {
    nrAba = retNrAba( objID );
    ix    = objID.indexOf('_');;
    nrTab = parseInt(objID.substr(ix-1, 1))-1; 
    
//alert(objID+' tab: '+nrAba);
//alert(objID+' tab: '+nrTab);

    if ( nrAba != tabControl_selected[nrTab] )
    {
      for(i=1; i <= tabControl_nrTabs[nrTab]; i ++)
      {
        idx = nrTab +1;
        var nTab = "tabControl" + idx + "_TAB" + i;
        var nAba = "tabControl" + idx + "_ABA" + i; 
          
        var tabSTYLE = findDOM( nTab, 1 );
        var abaSTYLE = findDOM( nAba, 1 );
          
        abaSTYLE.borderTop = "1px solid #FFFFFF";

        tabSTYLE.zIndex = 10;
        abaSTYLE.zIndex = 10;
        abaSTYLE.top    = '9px';
          
        if( i == nrAba )
        {
          tabSTYLE.zIndex = 100;
          abaSTYLE.zIndex = 110;
          abaSTYLE.top = '7px';
          tabControl_selected[nrTab] = i;
        }// end if()
      }// End for()
    }// End if()
    
  }// end if() 
}// end function
  
/**
 *  tabControl_mouseOver()  -----------------------------------------------  //
 */  
function tabControl_mouseOver( objID )
{
    if( objID.indexOf('tabControl') != -1 &&
        objID.indexOf('ABA') != -1
       )
    {
//alert(objID);
      var objDOM   = findDOM( objID, 0 );
      var objSTYLE = findDOM( objID, 1 );
      objDOM.style.color = "#000096" ;
      objSTYLE.cursor = "default";
    }
}// End function

/**
 *  tabControl_mouseOut()  ------------------------------------------------  //
 */  
function tabControl_mouseOut( objID )
{
//alert(objID);
  if( objID.indexOf('tabControl') != -1 &&
        objID.indexOf('ABA') != -1
       )
  {
    var objDOM = findDOM( objID, 0 );
    objDOM.style.color = "#000000" ;
  }
}// end function
  
  
/**
 *  funções auxiliares
 *  ------------------------------------------------------------------------  //
 */
function retNrAba( objID )
{
  var nr = null;
  ix = objID.length;
  ix1 = objID.indexOf( '_' );
  ix2 = objID.indexOf( '_', ix1 + 1 );

  if( ix2 == -1 )
  {
    nr = objID.slice( ix1 + 4 );
  }else
  {
    nr = objID.slice( ix1 + 4, ix2 );
  }
  return nr;
}// End

</script>
            
