var origWidth, origHeight; if (document.layers) { origWidth = window.innerWidth; origHeight = window.innerHeight; window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); } } var layer_encour; // ID du layer visible en cour function swapLayers(id) { if (layer_encour) hideLayer(layer_encour); showLayer(id); layer_encour = id; //alert(id); } function showLayer(id) { var layer = getElemRefs(id); if (layer && layer.css) layer.css.visibility = "visible"; //alert(id); } function hideLayer(id) { var layer = getElemRefs(id); if (layer && layer.css) layer.css.visibility = "hidden"; //alert(id); } function getElemRefs(id) { var elmt = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null; if (elmt) elmt.css = (elmt.style)? elmt.style: elmt; return elmt; }