Advertisement
Advertisement
| 04.11.2008 at 02:40AM PDT, ID: 23314521 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: |
//The code calling the function is here
<map name="testMap">
<area onMouseover="showByLink('img3','nameLayer',this,-500,30)" onMouseout="hide('nameLayer')" shape="circle" coords="282,326,4"/>
</map>
//The function is here
<SCRIPT LANGUAGE="JavaScript"><![CDATA[
function showByLink(imgName, object,link,x,y) {
img=eval(imgName);
document.county.src= img.src;
//Added this for Firefox but not working
var browser = window.navigator.userAgent
if(browser.indexOf("Firefox") > 0) {
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
if(c){
c[object].style.visibility = 'visible';
if (c[object].myFlag == null) {
c[object].style.left = link.x + x;
c[object].style.top = c[object].offsetTop + y;
}
c[object].myFlag = true;
}
}
else{
if (document.layers && document.layers[object]) {
document.layers[object].left = link.x + x;
document.layers[object].top = link.y + y;
document.layers[object].visibility = 'visible';
}
else if (document.all) {
document.all[object].style.visibility = 'visible';
if (document.all[object].myFlag == null) {
document.all[object].style.posLeft = document.all[object].offsetLeft + x;
document.all[object].style.posTop = document.all[object].offsetTop + y;
}
document.all[object].myFlag = true;
}
}
}
|