function GXHO()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

var xmlHttp;

function bT(ttitle,tthreadid,tforumid,tpage,tissticky,tstickys,tmiscdir,tlastposter,tlastpostid,tthreadiconid)
{
	xmlHttp=GXHO()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	}
	
	var rornot = confirm(ttitle + '\n\nBump this thread?');
	
	if (rornot == true)
	{
		var firstThread, bumpThread;
		var imgDir = tmiscdir.substring(0,7);
		
		var action = '?do=threadbump';
		var tid = '&tid=' + tthreadid;
		
		var fid = '&fid=' + tforumid;
		var lastposter = '&lastposter=' + tlastposter;
		var lastpostid = '&lastpostid=' + tlastpostid;
		var lastthread = '&lastthread=' + ttitle;
		var lasticonid = '&lasticonid=' + tthreadiconid;
		
		var url = 'misc.php';
		url = url + action + tid + fid + lastposter + lastpostid + lastthread + lasticonid;
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if (tpage == 1)
				{
					if (tissticky != 1)
					{
						firstThread = document.getElementById('threadbits_forum_' + tforumid).getElementsByTagName('tr')[tstickys];
					}
					else
					{
						firstThread = document.getElementById('threadbits_forum_' + tforumid).getElementsByTagName('tr')[0];
					}
					
					bumpThread = document.getElementById('td_threadtitle_' + tthreadid).parentNode;
					
					// set bold, new statusicon, timestamp
					document.getElementById('thread_title_' + tthreadid).style.fontWeight = 'bold';
					document.getElementById('thread_statusicon_' + tthreadid).setAttribute('src', imgDir + 'statusicon/thread_dot_new.gif');
					document.getElementById('td_threadtitle_' + tthreadid).parentNode.getElementsByTagName('td')[3].getElementsByTagName('div')[0].firstChild.nodeValue = 'Today ';
					document.getElementById('td_threadtitle_' + tthreadid).parentNode.getElementsByTagName('td')[3].getElementsByTagName('div')[0].getElementsByTagName('span')[0].firstChild.nodeValue = xmlHttp.responseText;
					
					document.getElementById('td_threadtitle_' + tthreadid).parentNode.parentNode.insertBefore(bumpThread, firstThread);
				}
				else
				{
					if (tissticky != 1)
					{
						bumpThread = document.getElementById('td_threadtitle_' + tthreadid).parentNode.style.display = 'none';
					}
					else
					{
						firstThread = document.getElementById('threadbits_forum_' + tforumid).getElementsByTagName('tr')[0];
						
						bumpThread = document.getElementById('td_threadtitle_' + tthreadid).parentNode;
					
						// set bold, new statusicon, timestamp
						document.getElementById('thread_title_' + tthreadid).style.fontWeight = 'bold';
						document.getElementById('thread_statusicon_' + tthreadid).setAttribute('src', imgDir + 'statusicon/thread_dot_new.gif');
						document.getElementById('td_threadtitle_' + tthreadid).parentNode.getElementsByTagName('td')[3].getElementsByTagName('div')[0].firstChild.nodeValue = 'Today ';
						document.getElementById('td_threadtitle_' + tthreadid).parentNode.getElementsByTagName('td')[3].getElementsByTagName('div')[0].getElementsByTagName('span')[0].firstChild.nodeValue = xmlHttp.responseText;
						
						document.getElementById('td_threadtitle_' + tthreadid).parentNode.parentNode.insertBefore(bumpThread, firstThread);
					}
					
					
				}
			}
		}
		xmlHttp.open("POST",url,true);
		xmlHttp.send(null);
	}
}