//IMAGE SCALER
function scaleIt()
{

function scale()
{
var img = this.getElementsByTagName('img')[0];	
function scaleStep()
	{
	var step = 40;
	var width = parseFloat(img.getAttribute('width'));
	var height = parseFloat(img.getAttribute('height'));
	if (img.state == 'small')
		{
		width += step;
		height += Math.floor(step * img.ratio);	
		img.setAttribute('width', width);
		img.setAttribute('height', height);
		if (width > img.largeWidth - step)
			{
			img.setAttribute('width', img.largeWidth);
			img.setAttribute('height', img.largeHeight);
			window.clearInterval(interval);
			img.state = 'large';
			}
		}
	else
		{
		width -= step;
		height -= Math.floor(step * img.ratio);
		img.setAttribute('width', width);
		img.setAttribute('height', height);
		if (width < img.smallWidth + step)
			{
			img.setAttribute('width', img.smallWidth);
			img.setAttribute('height', img.smallHeight);
			window.clearInterval(interval);
			img.state = 'small';
			}
		}
}
var interval = window.setInterval(scaleStep, 4);
return false;
}

var links = document.getElementsByTagName('a');
for (var x = 0; x < links.length; x++)
	{
	if (links[x].className == 'resizer')
		{
		var img = links[x].getElementsByTagName('img')[0];
		img.state = 'small';
		img.smallWidth = parseFloat(img.getAttribute('width'));
		img.smallHeight = parseFloat(img.getAttribute('height'));
		img.largeWidth = img.smallWidth * 4;
		img.largeHeight = img.smallHeight * 4;
		img.ratio = img.smallHeight / img.smallWidth;
		links[x].onclick = scale;
		}
	}
}


//TOGGLER
function toggle(obj)
{
var el = document.getElementById(obj);
el.style.display = (el.style.display != 'none' ? 'none' : '' );
}

