// * Copyright 2001-04 by Creative Element/Annoyances.org  * //

function Startup() {
	popupHandle=-1;
}

function showBox(boxName) {
	browseHandle=open('/quicklink/' + boxName + '.html','Browse','width=300,height=300,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	if (browseHandle.opener == null) browseHandle.opener = self;
	browseHandle.focus();
	return false;
}

function logout(){
	document.cookie = "id=; path=/; expires=Monday, 31-Dec-1979 23:12:40 GMT;";
	document.cookie = "pw=; path=/; expires=Monday, 31-Dec-1979 23:12:40 GMT;";
	setTimeout("refresh()", 50);
}

function refresh() {
	window.location.reload(false);
}

function expand(id, tree) {
	var branch = document.getElementById("b" + id);
	var bullet = document.getElementById("i" + id);
	
	if (branch.style.display == 'none') {
		branch.style.display = 'inline';
		bullet.src = "/pictures/forum/tree_1_minus" + tree + ".gif";
	}
	else if (branch.style.display == 'inline') {
		branch.style.display = 'none';
		bullet.src = "/pictures/forum/tree_1_plus" + tree + ".gif";
	}
}

function ShowTip(fArg) {
  var tooltipOBJ = (document.getElementById) ? document.getElementById('ih' + fArg) : eval("document.all['ih" + fArg + "']");
  if (tooltipOBJ != null) {
    var tooltipLft = (document.body.offsetWidth?document.body.offsetWidth:document.body.style.pixelWidth) - (tooltipOBJ.offsetWidth?tooltipOBJ.offsetWidth:(tooltipOBJ.style.pixelWidth?tooltipOBJ.style.pixelWidth:$TOOLTIPWIDTH)) - 5;    var tooltipTop = 10;

    if (navigator.appName == 'Netscape') {
      if (parseFloat(navigator.appVersion) >= 5) tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
      tooltipOBJ.style.left = tooltipLft; tooltipOBJ.style.top = tooltipTop;
    }
    else {
      tooltipLft -= 30;
      tooltipTop = (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + event.clientY - (tooltipOBJ.scrollHeight?tooltipOBJ.scrollHeight:tooltipOBJ.style.pixelHeight) - 30;
      if (tooltipTop < (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + 10) {
        if (event.clientX > tooltipLft) tooltipTop = (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + event.clientY + 30;
        else tooltipTop = (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + 10;
      } 
      tooltipOBJ.style.pixelLeft = tooltipLft; tooltipOBJ.style.pixelTop = tooltipTop;
    }
    tooltipOBJ.style.visibility = "visible";
  }
}

function HideTip(fArg) {
  var tooltipOBJ = (document.getElementById) ? document.getElementById('ih' + fArg) : eval("document.all['ih" + fArg + "']");
  if (tooltipOBJ != null) tooltipOBJ.style.visibility = "hidden";
}
