<script language="javascript">

function set_flag_DEL()
{
  top.flag_delete = true;
}
function set_flag_RAD(txt)
{
  top.objSELECTED = txt;
  top.flag_winPage = true;
  //alert('RAD');
}
function set_flag_Style(txt)
{
//alert('Style');
  top.objStyle_mod = txt;
  top.flag_modStyle = true;
}


//  ============================
//  Tratamento do evento onClick
//  ============================
  function mouse_Click(evt)
  {
    var objectID = getObjEvento(evt);
    //alert('Obj ['+objectID+']' );
<?php
    if( $modo_RAD )
    {
      //echo( "alert( 'atv: ' + top.winPage_ativa );" );
      include( INC . "onClick_modo_RAD.js.php" );
    }else
    {
      if( defined('STUDIO') )
      {
        $inc_ = ( STUDIO == 'core' ) ? INC : _INC_ ;
      }else
      {
        $inc_ = INC;
      }// End
      
      $arrFile = getFile( $inc_, "onClick" );
//echo("\nSTUDIO: ".STUDIO." INC: ".$inc_ );echo("\n<pre>");print_r($arrFile);exit;
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_   = strpos( $nFile, '_' ) +1;
        $len_   = strpos( $nFile, '.js' ) - $ini_;

        $nObj_  = substr( $nFile, $ini_, $len_ );

        if( isset($componentes_no_Prj[ $nObj_ ] ) ||
            isset($componentes_no_Prj[ strtolower($nObj_) ] )
          )
        {
          //echo("alert('". $inc_ . $nFile."');");
          include( $inc_ . $nFile );
        }else
        {
          //echo("alert('erro...[Inclusão do Evento do Obj: ".$nObj_."]');");
        }// End if ( isset($componentes_no_Prj[$nObj_] ) )
      }// End foreach( $arrFile as $i_ => $nFile )
      //echo("\n<pre>");print_r($componentes_no_Prj);exit;
    }// End if( $modo_RAD )
?>    
    //alert('Objeto: ' +objectID);
    //event.returnValue = false;
  }// End function mouse_Click(evt)


//  ============================
//  Tratamento do evento onOver
//  ============================
  function mouse_Over(evt)
  {
//alert('evento: '+evt);
    var objectID = getObjEvento(evt);
//    if( objectID != null &&
//        objectID != ''
//      )
    {
<?php
    if( $modo_RAD ) 
    {
      include( INC . "onOver_modo_RAD.js.php" );
    }else
    {
      //echo("alert('Over..');");
      $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;
      
      $arrFile = getFile( $inc_, "onOver" );
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_ = strpos( $nFile, '_' ) +1;
        $len_ = strpos( $nFile, '.js' ) - $ini_;
        
        $nObj_ = substr( $nFile, $ini_, $len_ );

        if( isset($componentes_no_Prj[ $nObj_ ] ) ||
            isset($componentes_no_Prj[ strtolower($nObj_) ] )
          )
        {
          include( $inc_ . $nFile );
        }else
        {
          //coment
        }// End if ( isset($componentes_no_Prj[ $nObj_ ] ) )
      }// End foreach( $arrFile as $i_ => $nFile )
    }// End if( $modo_RAD )
?>    
    }// End
    event.returnValue= false;
  }// End function mouse_Over(evt)


//  ============================
//  Tratamento do evento onOut
//  ============================
  function mouse_Out(evt)
  {
    var objectID = getObjEvento(evt);
<?php
    if( $modo_RAD ) 
    {
      include( INC . "onOut_modo_RAD.js.php" );
    }else
    {
      $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;

      $arrFile = getFile( $inc_, "onOut" );
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_ = strpos( $nFile, '_' ) +1;
        $len_ = strpos( $nFile, '.js' ) - $ini_;

        $nObj_ = substr( $nFile, $ini_, $len_ );

        if( isset($componentes_no_Prj[ $nObj_ ] ) ||
            isset($componentes_no_Prj[ strtolower($nObj_) ] )
          )
        {
          include( $inc_ . $nFile );
        }// End if()
      }// End foreach( $arrFile as $i_ => $nFile )
    }// End if()   
?>    
    event.returnValue= false;
  }// End function mouse_Out(evt)


//  =============================
//  Tratamento do evento DblClick
//  =============================
  function mouse_DblClick(evt)
  {
    var objectID = getObjEvento(evt);
<?php
    if( $modo_RAD ) 
    {
      include( INC . "onDbClick_modo_RAD.js.php" );
    }else
    {
      $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;

      $arrFile = getFile( $inc_, "onDblClick" );
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_ = strpos( $nFile, '_' ) +1;
        $len_ = strpos( $nFile, '.js' ) - $ini_;
        $nObj_ = substr( $nFile, $ini_, $len_ );

        if( isset($componentes_no_Prj[ $nObj_ ] ) ||
            isset($componentes_no_Prj[ strtolower($nObj_) ] )
          )
        {
          if( file_exists( $inc_ . $nFile ) )
          {
            //echo( $inc_ . $nFile);
            include( $inc_ . $nFile );
          }else
          {
            echo("erro: Evento DblClick... [file not existe:".$inc_ . $nFile."]");
            exit;
          }// End
          //exit;
        }// End if()
      }// End foreach( $arrFile as $i_ => $nFile )
    }// End    
?>    
    event.returnValue= false;
  }// End function mouse_DblClick(evt)


//  ==============================
//  Tratamento do evento MouseMove
//  ==============================
  function mouse_Move(evt)
  {
    var objectID = getObjEvento(evt);
<?php
    if( $modo_RAD ) 
    {
      include( INC . "onMove_modo_RAD.js.php" );
    }else
    {
      $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;

      $arrFile = getFile( $inc_, "onMove" );
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_ = strpos( $nFile, '_' ) +1;
        $len_ = strpos( $nFile, '.js' ) - $ini_;
        $nObj_ = substr( $nFile, $ini_, $len_ );

        if( isset($componentes_no_Prj[ $nObj_ ] ) ||
            isset($componentes_no_Prj[ strtolower($nObj_) ] )
          )
        {
          include( $inc_ . $nFile );
        }// End if()
      }// End foreach( $arrFile as $i_ => $nFile )
    }// End if()   
?>    
    event.returnValue= false;
  }// End function mouse_Move(evt)


  function mouse_Button_Dir(evt)
  {
    var objectID = getObjEvento(evt);
    //alert( objectID );
<?php
    if( $modo_RAD )
    {
?>
    event.returnValue = true;
<?php
    }else
    {
?>
    event.returnValue = true;
<?php
    }
?>
  }
//  ===============================
//  Tratamento do evento mouse_Down
//  ===============================
  function mouse_Down(evt)
  {
    var objectID = getObjEvento(evt);
//alert( evt.button );
    var hr = new Date();

    evtMOUSE_H = hr.getHours();
    evtMOUSE_M = hr.getMinutes();
    evtMOUSE_S = hr.getSeconds();
<?php
      if( $modo_RAD )
      {
        include( INC . "onDown_modo_RAD.js.php" );
      }else
      {
        $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;
        
        $arrFile = getFile( $inc_, "onDown" );
        foreach( $arrFile as $i_ => $nFile )
        {
          $ini_ = strpos( $nFile, '_' ) +1;
          $len_ = strpos( $nFile, '.js' ) - $ini_;
          $nObj_ = substr( $nFile, $ini_, $len_ );

          if ( isset($componentes_no_Prj[ $nObj_ ] ) )
          {
            include( $inc_ . $nFile );
          }// End if()
        }// End foreach( $arrFile as $i_ => $nFile )
      }// End if()
?>
    event.returnValue = false;
  }// End function mouse_Down(evt)


//  ===============================
//  Tratamento do evento mouse_UP
//  ===============================
  function mouse_Up(evt)
  {
    var objectID = getObjEvento(evt);
<?php
    if($modo_RAD ) 
    {
      include( INC . "onUp_modo_RAD.js.php" );
    }else
    {
      $inc_ = ( defined('STUDIO') ) ? INC : _INC_ ;
      
      $arrFile = getFile( $inc_, "onUp" );
      foreach( $arrFile as $i_ => $nFile )
      {
        $ini_ = strpos( $nFile, '_' ) +1;
        $len_ = strpos( $nFile, '.js' ) - $ini_;
        $nObj_ = substr( $nFile, $ini_, $len_ );

        if ( isset($componentes_no_Prj[ $nObj_ ] ) )
        {
          include( $inc_ . $nFile );
        }// End if()
      }// End foreach( $arrFile as $i_ => $nFile )
    }// End if()   
?>
    event.returnValue= false;
  }// End function mouse_UP(evt)
-->



</script>
