--- ECHO_content/js/hl_lib.js 2004/12/10 19:33:09 1.5 +++ ECHO_content/js/hl_lib.js 2005/06/09 08:34:49 1.6 @@ -69,6 +69,16 @@ function placeAreas() { // N4: grow layer for border img.resizeBy(2,2); } + } 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]; + li.width = rect.width; + li.height = rect.height; + } + moveElement(img, rect); + moveElement(txt, rect); } else { if (img.layers) { // for N4 we size a transparent image as the area @@ -110,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)"; @@ -118,6 +138,7 @@ function highlightPair(id, highlight) { } } } else { + // unhighlight if (link.style) { link.style.backgroundColor = ""; } else if (link.layers) { @@ -129,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)";