Ive accidently deleted something needed in the body I think for this code, but I cannot work out what it needs. I think the descarea div is missing? Can you help me rewriteit?
<div class='row4' style='position:absolute; background-color:yellow;border:1px solid #000000; padding:10px; display:none' id='miniTopic'></div>
<script>
function Request() {
if (window.XMLHttpRequest ) { return new XMLHttpRequest(); }
else if (window.ActiveXObject) {
try {
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
return false;
}
}
}
}
function SetDescPos(e) {
if (typeof event!='undefined') {
e=new Object();
e.pageX=event.clientX+document.body.scrollLeft;
e.pageY=event.clientY+document.body.scrollTop;
}
descarea=document.all?document.all.miniTopic:document.getElementById("miniTopic");
descarea.style.left=e.pageX+2;
descarea.style.top=e.pageY+2;
}
function GetTopic(url,tTitle) {
maxlen=300;
if (typeof saveDesc=='undefined') { saveDesc=[]; }
if (typeof saveDesc[url]!='undefined') { descarea=document.all?document.all.miniTopic:document.getElementById("miniTopic");
descarea.innerHTML="<b><u>"+tTitle+"</u></b><br />"+saveDesc[url];
descarea.style.display='';
}
else {
url=url;
tTitle=tTitle;
descReq=Request();
descReq.open("http://inny.ipbfree.com/GET",url);
descarea=document.all?document.all.miniTopic:document.getElementById("miniTopic");
descarea.innerHTML="<b>Loading Topic Preview...Please Wait... <img src='http://static.whosgoing.com/images/loading.gif'>";
descarea.style.display='';
descReq.onreadystatechange=function() {
if (descReq.readyState==4) {
txt=descReq.responseText;
txt.match(/<div class=["']postcolor["']>(.*?)<\/div>/i);
ntxt=RegExp.$1;
if (ntxt.length>maxlen) {
ntxt=ntxt.substring(0,maxlen);
if (ntxt.match(/(<[^>]*?$)/i)!=null) { ntxt=ntxt.replace(RegExp.$1,''); }
ntxt+="...";
}
descarea=document.all?document.all.miniTopic:document.getElementById("miniTopic");
descarea.innerHTML="<b><u>"+tTitle+"</u></b><br />"+ntxt;
saveDesc[url]=ntxt;
}
}
descReq.send(null);
}
}
if (document.location.href.match(/showforum=[0-9]+/i)) {
as=document.getElementsByTagName("a");
for (p=0; p<as.length; p++) {
if (as[p].href && as[p].href.match(/showtopic=[0-9]/i)) {
u=as[p].href;
as[p].onmouseover=function() { GetTopic(this.href,this.innerHTML); }
as[p].title='';
as[p].onmouseout=function() { descarea=document.all?document.all.miniTopic:document.getElementById("miniTopic"); descarea.style.display="none"; }
}
}
}
document.onmousemove=SetDescPos;
</script>