/* Highlight Table Cells Script- */ // 07.05.01 new code to detect Netscape 6 var browserName = navigator.appName; var browserVersion = navigator.appVersion; var browserVersionNum = parseFloat(browserVersion) var found_str = browserName.indexOf("Netscape"); function changeto(highlightcolor) { var row_index; source=event.srcElement; row_index = source.parentElement.rowIndex; if (source.tagName=="TR"||source.tagName=="TABLE") return while(source.tagName != "TD") { source=source.parentElement; } // get out cell id, check if we have ignore in id (needed to ignore high light of first row) var source_id = "" + source.id; var found_ignore = false; if (source_id.indexOf("ignore") > -1) { found_ignore = true; } // done check for ignore if (source.style.backgroundColor!=highlightcolor && !found_ignore) { source.style.backgroundColor=highlightcolor } } function changeback(originalcolor) { var row_index = source.parentElement.rowIndex; // check if our first table row should be un-high-lighted even if its the first row (i.e. index=0) if (source.id == "unhighlight") { row_index = -1; //reset make sure our row_index is not 0 so the following code will execute } if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||row_index==0) { return; } if (event.toElement != source) { source.style.backgroundColor = originalcolor; } } var xpos; var ypos; if (document.layers) document.captureEvents(Event.MOUSEMOVE); document.onmousemove=mtrack; function mtrack(e) { if (document.layers) { xpos = e.pageX; ypos = e.pageX; } else if ((found_str > -1) && (browserVersionNum == 5)) { xpos = e.pageX; ypos = e.pageX; } else { xpos = event.x; ypos = event.y; } } var toggleHash = new Array(); var layerList = new Array(); addLayer("accueil", 205,74); addLayer("ausujet", 294,74); addLayer("media", 383,74); addLayer("environnement", 472,74); addLayer("urgence", 561,74); addLayer("aerien", 205,92); addLayer("maritime", 294,92); addLayer("ferr", 383,92); addLayer("routier", 472,92); addLayer("allmodes", 561,92); addLayer("recentnews", 142,268); addLayer("contacts", 142,325); function addLayer(name, xPos, yPos) { layerList[layerList.length] = name; toggleHash[name] = new Array(); toggleHash[name]["name"] = name + "Layer"; toggleHash[name]["toggle"] = false; toggleHash[name]["yPos"] = yPos; toggleHash[name]["xPos"] = xPos; } function Toggle(layerName) { if (!toggleHash[layerName]["toggle"]) { toggleHash[layerName]["toggle"] = true; show(layerName); // Don't forget to hide everything else for (i = 0; i < layerList.length; i++) { // But don't hide the one we just displayed. if (layerList[i] != layerName) { if (toggleHash[layerList[i]]["toggle"]) { toggleHash[layerList[i]]["toggle"] = false; hide(layerList[i]); } } } } else { toggleHash[layerName]["toggle"] = false; hide(layerName); } } function ToggleOff() { for(i = 0; i < layerList.length; i++) { if (toggleHash[layerList[i]]["toggle"]) { toggleHash[layerList[i]]["toggle"] = false; hide(layerList[i]); } } } function show(object) { // check for netscape 6 if ((found_str > -1) && (browserVersionNum == 5)) { var layer_name = "" + toggleHash[object]["name"]; var element = document.getElementById(layer_name); element.style.visibility = "visible"; element.style.left = toggleHash[object]["xPos"] + 'px'; element.style.top = toggleHash[object]["yPos"] + 'px'; } else if (document.layers && document.layers[toggleHash[object]["name"]]) { document.layers[toggleHash[object]["name"]].visibility = 'visible'; document.layers[toggleHash[object]["name"]].left = toggleHash[object]["xPos"] + 'px'; document.layers[toggleHash[object]["name"]].top = toggleHash[object]["yPos"] + 'px'; } else if (document.all) { document.all[toggleHash[object]["name"]].style.visibility = 'visible'; document.all[toggleHash[object]["name"]].style.left = toggleHash[object]["xPos"] + 'px'; document.all[toggleHash[object]["name"]].style.top = toggleHash[object]["yPos"] + 'px'; document.all[toggleHash[object]["name"]].style.zIndex = 100; } } function hide(object) { // check for netscape 6 if ((found_str > -1) && (browserVersionNum == 5)) { var layer_name = "" + toggleHash[object]["name"]; var element = document.getElementById(layer_name); element.style.visibility = "hidden"; } else if (document.layers && document.layers[toggleHash[object]["name"]]) { document.layers[toggleHash[object]["name"]].visibility = 'hidden'; } else if (document.all) { document.all[toggleHash[object]["name"]].style.visibility = 'hidden'; } } var brwsVer=parseInt(navigator.appVersion);var timer;var object='name';