--- ECHO_content/js/hl_lib.js 2004/12/02 12:01:08 1.4 +++ ECHO_content/js/hl_lib.js 2005/06/09 08:34:49 1.6 @@ -69,7 +69,8 @@ function placeAreas() { // N4: grow layer for border img.resizeBy(2,2); } - } else { + } else if (area.type == "text") { + var txt = getElement("t."+area.id); if (img.layers) { // for N4 we size a transparent image as the area var li = img.document.images[0]; @@ -77,10 +78,15 @@ function placeAreas() { li.height = rect.height; } moveElement(img, rect); - if (browserType.isIEWin) { - // IE/Win needs to set the area once - highlightPair(area.id, false); + moveElement(txt, rect); + } else { + if (img.layers) { + // for N4 we size a transparent image as the area + var li = img.document.images[0]; + li.width = rect.width; + li.height = rect.height; } + moveElement(img, rect); } } } @@ -114,6 +120,16 @@ function highlightPair(id, highlight) { } else if (img.layers) { img.bgColor = "#0000ff"; } + } else if (area.type == "text") { + if (img.style) { + img.style.background = "url(area_img)"; + } else if (img.layers) { + img.background.src = "area_img"; + } + var txt = getElement("t."+id); + if (txt.style) { + txt.style.visibility = "visible"; + } } else if (area.type == "area") { if (img.style) { img.style.background = "url(area_img)"; @@ -122,6 +138,7 @@ function highlightPair(id, highlight) { } } } else { + // unhighlight if (link.style) { link.style.backgroundColor = ""; } else if (link.layers) { @@ -133,6 +150,16 @@ function highlightPair(id, highlight) { } else if (img.layers) { img.bgColor = null; } + } else if (area.type == "text") { + if (img.style) { + img.style.background = "url(trans_img)"; + } else if (img.layers) { + img.background.src = null; + } + var txt = getElement("t."+id); + if (txt.style) { + txt.style.visibility = "hidden"; + } } else if (area.type == "area") { if (img.style) { img.style.background = "url(trans_img)";