/**
 * Gestion des div (hidden/visible) dans profile et search
 *
 * @author Etienne PHELIPON - Virtua SA <etienne@virtua.ch>
 * @copyright Copyright © Virtua web solutions
 * @name: $Source: /vhosts/swissfriends8/www/public/js/active_div.js,v $
 * @version $Revision: 1.1 $ $Date: 2008/08/05 12:38:00 $ $Author: raphael $
 */
function active_div(pi_layerName) {
  act_div('tab_'+pi_layerName);
  act_div('pic_on_'+pi_layerName);
  act_div('pic_off_'+pi_layerName);
  act_div('modify_'+pi_layerName);
  act_div('save_'+pi_layerName);
}
function act_div(pi_layerName) {
  if (document.getElementById) { // DOM3 = IE5, NS6 
    pt=document.getElementById(pi_layerName).style;
    if (pt.visibility=='hidden') {
      pt.position = 'static'; 
      pt.visibility = 'visible'; // compatible Saafari + FireFox Mac
      pt.display = '' ;
    }
    else {
      pt.position = 'absolute'; 
      pt.visibility = 'hidden';
      pt.display = 'none' ; // compatible Saafari + FireFox Mac
    }
  }
  else {
    if (document.layers) { // Netscape 4 
//    alert('etienne a faire');
      pt=document.pi_layerName.visibility;
      if (pt.visibility=='visible') {
        document.pi_layerName.visibility = 'none';
      }
      else {
        document.pi_layerName.visibility = 'visible';
      }
    }
    else {
//      alert('etienne a faire 2');
      pt=document.getElementById(pi_layerName).style;
      if (pt.visibility=='hidden') {
        document.getElementById(pi_layerName).style.position = 'static'; 
        document.all.pi_layerName.style.visibility = 'visible';
      }
      else { // IE 4
        document.getElementById(pi_layerName).style.position = 'absolute'; 
        document.all.pi_layerName.style.visibility = 'hidden';      
      }
    }
  }
}
/********************* deprecated ******************************

function act_div(pi_layerName) {
  if (document.getElementById) { // DOM3 = IE5, NS6 
    pt=document.getElementById(pi_layerName).style;
    if (pt.visibility=='hidden') {
      pt.position = 'static'; 
      pt.visibility = 'visible';
    }
    else {
      pt.position = 'absolute'; 
      pt.visibility = 'hidden';
    }
  } 
  else { 
    if (document.layers) { // Netscape 4 
      pt=document.pi_layerName.visibility;
      if (pt.visibility=='visible') {
        document.pi_layerName.visibility = 'none';
      }
      else {
        document.pi_layerName.visibility = 'visible';
      }
    } 
    else { // IE 4
      pt=document.getElementById(pi_layerName).style;
      if (pt.visibility=='hidden') {
        document.getElementById(pi_layerName).style.position = 'static'; 
        document.all.pi_layerName.style.visibility = 'visible';
      }
      else {
        document.getElementById(pi_layerName).style.position = 'absolute'; 
        document.all.pi_layerName.style.visibility = 'hidden';         
      }
    }
  } 
}
*/
