function showMyDSInfo(o) { var acode = o.getAttribute('acode') var myDSInfoWin = document.getElementById('myDSInfoWin'); var myDSInfo = document.getElementById('myDSInfo'); if (myDSInfoWin.style.visibility != 'visible' || myDSInfoWin.style.left.replace(/px/,"") < 0 || myDSInfoWin.style.top.replace(/px/,"") < 0) { myDSInfoWin.style.visibility = 'visible'; myDSInfoWin.style.width = 800; myDSInfoWin.style.height = 500; myDSInfoWin.style.top = document.body.scrollTop + 120; if (document.body.scrollWidth - 850 > 0) myDSInfoWin.style.left = document.body.scrollWidth - 850; else myDSInfoWin.style.left = 10; } if (myDSInfoWin.style.top.replace(/px/,"") < document.body.scrollTop || myDSInfoWin.style.top.replace(/px/,"") > parseInt(document.body.scrollTop)+parseInt(document.body.scrollHeight)) { myDSInfoWin.style.top = document.body.scrollTop + 120; } if (myDSInfo.name != acode || myDSInfo.name == '') { if (myDSInfo.src.indexOf('myDSinfo') == -1) { // load the entire flash myDSInfo.src = 'https://services.datasport.com/myDSinfo.htm?acode=' + acode + '&r=' + Math.random()*10001; } else { if(typeof window.frames.myDSInfo.loadA == 'function') { // iframe is loaded, call the function to load only the new person window.frames.myDSInfo.loadA(acode); } } } } function hideMyDSInfo() { var myDSInfoWin = document.getElementById('myDSInfoWin'); myDSInfoWin.style.left = -1000; myDSInfoWin.style.top = -1000; } // Detect if the browser is IE or not. // If it is not IE, we assume that the browser is NS. var IE = document.all?true:false // If NS -- that is, !IE -- then set up for mouse capture if (!IE) document.captureEvents(Event.MOUSEMOVE) // Set-up to use getMouseXY function onMouseMove document.onmousemove = getMouseXY; // Temporary variables to hold mouse x-y pos.s var posx = 0 var posy = 0 function getMouseXY(e) { if (IE) { // grab the x-y pos.s if browser is IE posx = event.clientX + document.body.scrollLeft posy = event.clientY + document.body.scrollTop } else { // grab the x-y pos.s if browser is NS posx = e.pageX posy = e.pageY } // catch possible negative values in NS4 if (posx < 0){posx = 0} if (posy < 0){posy = 0} // show the position values in the form named Show // in the text fields named MouseX and MouseY //document.Show.MouseX.value = tempX //document.Show.MouseY.value = tempY //document.getElementById('dbg').innerHTML = tempX + ':' + tempY; return true } var drag=0; var xdif=0; var ydif=0; var initx="50px"; var inity="50px"; function begindrag(event) { if(drag==0) { floatingd = document.getElementById("myDSInfoWin"); if(floatingd.style.left=="") { floatingd.style.left=initx; } if(floatingd.style.top=="") { floatingd.style.top=inity; } prex=floatingd.style.left.replace(/px/,""); prey=floatingd.style.top.replace(/px/,""); drag=1; xdif=event.clientX-prex; ydif=event.clientY-prey; } else { drag=0; } } function mousepos(event) { floatingd = document.getElementById("myDSInfoWin"); if(drag==1) { floatingd.style.left = event.clientX-xdif+"px"; floatingd.style.top = event.clientY-ydif+"px"; } }