// Minimizer script - changes block visibility and flips icon from plus to minus
// to use, add minimize class to block title div, inside block title add <a id="imgover" href="#" onclick="toggleItem('hideShow'),toggleImg('imgover')"></a>
// Add hideShow class to blocks content - to use with further blocks add alternate id's to <a> link and block content. Please note that as long as the id's and onclick calls match it doesn't matter what id's are used.
// NOTE!! this will initially hide the content!

function getItem(id)
{
	var itm = false;
	if(document.getElementById)
		itm = document.getElementById(id);
	else if(document.all)
		itm = document.all[id];
	else if(document.layers)
		itm = document.layers[id];

	return itm;
}

function toggleItem(id)
{
	itm = getItem(id);

	if(!itm)
		return false;

	if(itm.style.display == 'none')
		itm.style.display = 'block';

	else if(itm.style.display == 'block')
		itm.style.display = 'none';
				
	else
		itm.style.display = 'block';

	return false;
}


function getImg(id)
{
	var image = false;
	if(document.getElementById)
		image = document.getElementById(id);
	else if(document.all)
		image = document.all[id];
	else if(document.layers)
		image = document.layers[id];

	return image;
}

function toggleImg(id)
{
	image = getImg(id);

	if(!image)
		return false;

	if(image.style.backgroundImage == 'url(minimizer/maxRollover.gif)')
		image.style.backgroundImage = 'url(minimizer/minRollover.gif)';

	else if(image.style.backgroundImage == 'url(minimizer/minRollover.gif)')
		image.style.backgroundImage = 'url(minimizer/maxRollover.gif)';
				
	else
		image.style.backgroundImage = 'url(minimizer/minRollover.gif)';

	return false;
}