function listen(o,e,f){o.addEventListener?o.addEventListener(e,f,false):o.attachEvent("on"+e,f)}; // crossbrowser listener
function removeListen(o,e,f){o.addEventListener?o.removeEventListener(e,f,false):o.detachEvent("on"+e,f)};

//window.addEventListener('load', init, false);
listen(window, 'load', init);
listen(window, 'DOMContentLoaded', initHomeSlideshow);

function init()
{
	hideAddressBar();
	setAlphaRollovers();
}

function hideAddressBar()
{
	setTimeout( function() { window.scrollTo(0, 0) }, 0);
}

function getElementsByClass(theClass)
{
	var htmlTags = document.getElementsByTagName( '*' );
	var items = new Array();
	for (var i = 0; i < htmlTags.length; i++)
	{
		if (htmlTags[i].className == theClass)
		{
			items.push(htmlTags[i]);
		}
	}
	return items;
}

function newWindow(url, width, height) {
	var params = 'width = ' + width;
	params += ', height = ' + height;
	params += ', top = ' + (screen.width - width) * 0.5;
	params += ', left = ' + (screen.height - height) * 0.5;
	params += ', fullscreen = yes';

	var newwin = window.open(url,'windowname', params);
	window.focus ? newwin.focus() : '';
	return false;	
}
