sel=new Array(10);
sel_it=0;

h_t=false;
h_ht=0;

function e(id)
{
	return document.getElementById(id);
}

function h_p(c)
{
	var o=e('h_'+c);	
  var w=o.offsetWidth;
  var h=o.offsetHeight;	
  var l=0;
  var t=0;
  var a=0;	
  var b=0;	
	while (o)
	{
		if (o.offsetParent && o.offsetParent.tagName=='BODY' && navigator.appName!='Netscape') break;
		l+=o.offsetLeft;
	  t+=o.offsetTop;	       
	  o=o.offsetParent;		
	}  	  
	return {'l':l, 't':t, 'w':w, 'h':h};
}

function h_toff()
{
	if (h_t)
	{			
		clearTimeout(h_ht);
		h_t=false;
	}
}

function h_out()
{
	h_t=true;
	h_ht=setTimeout('h_ol()', 0);
}

function h_ol()
{	
	if (h_t) h_c(1);				
}

function h_o(id, s)
{
	var o=e('h_b'+id);
	if (o) 
	{
		var p=h_p(id);		
		o.style.top=p.t+((s==1)?35:0)-1+'px';
		o.style.left=p.l+((s==1)?-1:p.w)+'px';
		o.style.visibility='visible';	
		sel[sel_it]=id;
		sel_it++;		
	}
}

function h_c(l)
{
	var o=0;
	if (l<=sel_it)	
		for (var i=sel_it-1; i>=l-1; i--) 
		{
			o=e('h_b'+sel[i]);
			if (o) o.style.visibility='hidden';
			sel_it--;
		}	
}

function h_s(id, l)
{	
	if (h_t)
	{			
		clearTimeout(h_ht);
		h_t=false;
	}			
	h_c(l);								
	if (e('h_b'+id)) h_o(id, l);		
}
