1function pcredits_mouseover(evt,date, id) { 2 if(!evt) evt = document.event; 3 4var top; 5var left; 6 7 if(evt.clientX) { 8 top = evt.clientY; 9 left = evt.clientX; 10 } 11 else if(e.pageX) { 12 left= e.pageX; 13 top = e.pageY; 14 } 15 else { 16 return; 17 } 18 19 left -= 24; 20 pos = getElementPosition('credits_d'); 21 22 if(date.length > 100) { 23 left = 20; 24 } 25 pos.top-=32; 26 top -= pos.top; 27 28 if(document.body.scrollLeft || document.body.scrollTop) { 29 top+=document.body.scrollTop; 30 left += document.body.scrollLeft; 31 } 32 else if(document.documentElement.scrollTop || document.documentElement.scrollLeft) { 33 top+=document.documentElement.scrollTop; 34 left += document.documentElement.scrollLeft; 35 } 36 else if(window.pageXOffset || window.pageYOffset) { 37 top+=window.pageYOffset; 38 left += window.pageXOffset; 39 } 40 41 dom = document.getElementById('pcredit_mo'); 42 dom.innerHTML = date; 43 dom.style.visibility="visible"; 44 dom = document.getElementById('pcredit_mo'); 45 dom.style.top = top + "px"; 46 dom.style.left = left + "px"; 47 dom.style.visibility="visible"; 48 if(id) { 49 show_remainder(id) 50 } 51 52 53 54} 55 56function show_remainder(id) { 57 58 remainder = document.getElementById(id); 59 remainder.style.display = 'block'; 60 61} 62 63function hide_remainder(id) { 64 remainder = document.getElementById(id); 65 remainder.style.display = 'none'; 66 67} 68 69function pcredits_mouseout(id) { 70 dom = document.getElementById('pcredit_mo'); 71 dom.style.visibility="hidden"; 72 if(id) { 73 hide_remainder(id); 74 } 75 76} 77 78function getElementPosition(elemID){ 79var offsetTrail = document.getElementById(elemID); 80var offsetLeft = 0; 81var offsetTop = 0; 82while (offsetTrail){ 83offsetLeft += offsetTrail.offsetLeft; 84offsetTop += offsetTrail.offsetTop; 85offsetTrail = offsetTrail.offsetParent; 86} 87if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){ 88offsetLeft += document.body.leftMargin; 89offsetTop += document.body.topMargin; 90} 91return {left:offsetLeft,top:offsetTop}; 92} 93