var hideTimeout = 500;
var hideTimeoutControl = null;
var activeElement = null;

function hover(elm)
{
	preventHide();
	cls.add(elm.parentNode,'hover');
}

function out()
{
	if (activeElement)
	{
		cls.remove(activeElement.parentNode,'hover');
		activeElement = null;
	}
}

function preventHide()
{
	clearTimeout(hideTimeoutControl)
}

function hide(elm)
{
	activeElement = elm;
	hideTimeoutControl = setTimeout('out()',hideTimeout);
}

function openWindow(url,w,h)
{
	return !window.open(url,'fullSizePhoto','width='+w+',height='+h);
}


