[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/install/templates/main_page/ -> javascript.js (source)

   1  /*
   2    $Id: javascript.js,v 1.1 2003/07/09 01:11:06 hpdl Exp $
   3  
   4    osCommerce, Open Source E-Commerce Solutions
   5    http://www.oscommerce.com
   6  
   7    Copyright (c) 2003 osCommerce
   8  
   9    Released under the GNU General Public License
  10  */
  11  
  12  function toggleBox(szDivID) {
  13    if (document.layers) { // NN4+
  14      if (document.layers[szDivID].visibility == 'visible') {
  15        document.layers[szDivID].visibility = "hide";
  16        document.layers[szDivID].display = "none";
  17        document.layers[szDivID+"SD"].fontWeight = "normal";
  18      } else {
  19        document.layers[szDivID].visibility = "show";
  20        document.layers[szDivID].display = "inline";
  21        document.layers[szDivID+"SD"].fontWeight = "bold";
  22      }
  23    } else if (document.getElementById) { // gecko(NN6) + IE 5+
  24      var obj = document.getElementById(szDivID);
  25      var objSD = document.getElementById(szDivID+"SD");
  26  
  27      if (obj.style.visibility == 'visible') {
  28        obj.style.visibility = "hidden";
  29        obj.style.display = "none";
  30        objSD.style.fontWeight = "normal";
  31      } else {
  32        obj.style.visibility = "visible";
  33        obj.style.display = "inline";
  34        objSD.style.fontWeight = "bold";
  35      }
  36    } else if (document.all) { // IE 4
  37      if (document.all[szDivID].style.visibility == 'visible') {
  38        document.all[szDivID].style.visibility = "hidden";
  39        document.all[szDivID].style.display = "none";
  40        document.all[szDivID+"SD"].style.fontWeight = "normal";
  41      } else {
  42        document.all[szDivID].style.visibility = "visible";
  43        document.all[szDivID].style.display = "inline";
  44        document.all[szDivID+"SD"].style.fontWeight = "bold";
  45      }
  46    }
  47  }
  48  
  49  function changeStyle(what, how) {
  50    if (document.getElementById) {
  51      document.getElementById(what).style.fontWeight = how;
  52    } else if (document.all) {
  53      document.all[what].style.fontWeight = how;
  54    }
  55  }
  56  
  57  function changeText(where, what) {
  58    if (document.getElementById) {
  59      document.getElementById(where).innerHTML = what;
  60    } else if (document.all) {
  61      document.all[where].innerHTML = what;
  62    }
  63  }


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics