var stable1 = stable2 = thumbs_old_onload = timer1 = timer2 = null;
if (typeof window.onload == "function")
{
	thumbs_old_onload = window.onload;
}
window.onload = function()
{
	var isIE5Mac = (
		window.ActiveXObject && 
		document.getElementById && 
		!window.showModelessDialog
	);
	if (thumbs_old_onload)
	{
		thumbs_old_onload();
		thumbs_old_onload = null;
	}
	if (!isIE5Mac) thumbs();
}
function thumbs()
{
	if (!document.getElementsByTagName || !document.getElementById || !document.getElementById('thumbs')) return;
	var th = document.getElementById('thumbs');
	for (var i=0,a; a=th.getElementsByTagName('a')[i]; i++)
	{
		a.onmouseover = function()
		{
			//clearTimeout(timer1);
			clearTimeout(timer2);
			var th = document.getElementById('thumbs');
			for (var i=0,a; a=th.getElementsByTagName('a')[i]; i++)
			{
				a.getElementsByTagName('span')[0].style.display = '';
				//a.getElementsByTagName('em')[0].style.display = '';
			}
			this.getElementsByTagName('span')[0].style.display = 'block';
			//this.getElementsByTagName('em')[0].style.display = 'block';
		}
		a.onmouseout = function()
		{
			var th = document.getElementById('thumbs');
			for (var i=0,a; a=th.getElementsByTagName('a')[i]; i++)
			{
				a.getElementsByTagName('span')[0].style.display = '';
				//a.getElementsByTagName('em')[0].style.display = '';
			}
			//if (stable1) timer1 = setTimeout("stable1.display = 'block'",500);
			if (stable2) timer2 = setTimeout("stable2.display = 'block'",250);
		}
		a.onclick = function()
		{
			//stable1 = this.getElementsByTagName('em')[0].style;
			stable2 = this.getElementsByTagName('span')[0].style;
			var th = document.getElementById('thumbs');
			for (var i=0,a; a=th.getElementsByTagName('a')[i]; i++)
			{
				a.getElementsByTagName('em')[0].style.display = '';
			}
			this.getElementsByTagName('em')[0].style.display = 'block';
			return false;
		}
		a.getElementsByTagName('em')[0].onmouseover =
		a.getElementsByTagName('span')[0].onmouseover =
		a.getElementsByTagName('em')[0].onmouseout =
		a.getElementsByTagName('span')[0].onmouseout = cancelEvent;
	}
}
function cancelEvent(e)
{
	if (e)
	{
		if (e.preventDefault) e.preventDefault();
		if (e.stopPropagation) e.stopPropagation();
	}
	if (window.event)
	{
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	}
}
