<!--

// scripts propres au web Chimie
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function preloadImg () {
	var loadImg = new Array(	"images/submenu1.gif",
								"images/submenu2.gif",
								"images/submenu3.gif",
								"images/submenu4.gif",
								"images/submenu5.gif",
								"images/submenu6.gif",
								"images/submenu7.gif",
								"images/submenu8.gif",
								"images/submenu1over.gif",
								"images/submenu2over.gif",
								"images/submenu3over.gif",
								"images/submenu4over.gif",
								"images/submenu5over.gif",
								"images/submenu6over.gif",
								"images/submenu7over.gif",
								"images/submenu8over.gif"
						
								 );
	// lorsqu'une image est rajoutée, insérer l'image (path) dans l'array loadImg
	// le for loop se charge de faire le preload.
	var preloadImg = new Array();
	for(i = 0; i < loadImg.length; i++) {
		preloadImg[i] = new Image();
		preloadImg[i].src = loadImg[i];
	}
}

function changeImage(layer,imgName,imgSrc) {
     if (document.images) {
	    if(document.layers && layer!=null)
             eval('document.'+layer+'.document.images[\''+imgName+'\'].src = \''+imgSrc+'\'');
	    else document.images[imgName].src = imgSrc;
     }
}

function openpop(page,w,h,sc,t,st,r)  {
        //pour changer la variable popup a chaque click 
        var now = new Date();
        popup = now.getTime();
        popupwin=window.open(page, popup, "width="+w+",height="+h+",scrollbars="+sc+",toolbar="+t+",status="+st+",resizable="+r);
        }

function WM_imageSwap(daImage, daSrc){
  var objStr,obj;
  /*
    WM_imageSwap()
    Changes the source of an image.

    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Shvatz
    Author Email: shvatz@wired.com

    Usage: WM_imageSwap(originalImage, 'newSourceUrl');

    Requires: WM_preloadImages() (optional, but recommended)
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac. 
    */

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}		
		
//-->