function popupboxopen(type, data1, data2)
	{
	popup = document.getElementById('popupbox');
	content = document.getElementById('popupboxcontent');
	
	if(popup.style.display == "inline")
		{
		popupboxclose();
		return;
		}
	
	tableopen = '<table width="180px" cellspacing="0" cellpadding="0"><tr>';
	tableclose = '</tr></table>';
	tdopen = '<td class="popupchoice">';
	tdclose = '</td>';
	
	if(type == 1)
		{
		insert = tableopen + tdopen + '<a href="http://www.dbocom.com/forum/member.php?u=' + data1 + '"><font face="Arial">Your Account</font></a>' + tdclose + tableclose;
		insert += tableopen + tdopen + '<a href="http://www.dbocom.com/forum/usercp.php"><font face="Arial">User Control Panel</font></a>' + tdclose + tableclose;
		if(data2 == 1) { insert += tableopen + tdopen + '<a href="http://www.dbocom.com/forum/register.php?do=requestemail"><font face="Arial">Activate Your Account</font></a>' + tdclose + tableclose; }
		insert += tableopen + tdopen + '<a href="http://www.dbocom.com/forum/search.php?do=getnew"><font face="Arial">Recent Forum Posts</font></a>' + tdclose + tableclose;
		insert += tableopen + tdopen + '<a href="http://www.dbocom.com/forum/memberlist.php"><font face="Arial">View Members</font></a>' + tdclose + tableclose;
		insert += tableopen + tdopen + '<a href="http://www.dbocom.com/forum/search.php"><font face="Arial">Search the Forums</font></a>' + tdclose + tableclose;
		insert += tableopen + tdopen + '<a href="javascript:popupboxclose()"><font face="Arial">Close</font></a>' + tdclose + tableclose;
		}
		
	content.innerHTML = insert;
	pos = findPos(document.getElementById('userbox'));
	pos[0] += 31;
	pos[1] = 138;
	popup.style.left = pos[0] + "px";
	popup.style.top = pos[1] + "px";
	popup.style.display = "inline";
	}
	
function popupboxclose()
	{
	popup = document.getElementById('popupbox');
	content = document.getElementById('popupboxcontent');

	popup.style.display = "none";
	content.innerHTML = "";
	}
	
function findPos(obj)
	{
	var curleft = curtop = 0;

	if (obj.offsetParent)
		{
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	return [curleft,curtop];
	}
 }
