function toggleImg(id,width,thwidth,height,thheight)
{
	if ((!tog[id]) || (tog[id] == false))
	{
		o = document.getElementById('img'+id);
		
		if (o)
		{
			tog[id] = true;
			o.getElementsByTagName('img')[0].src = path + 'blank.gif';
			preloadImage(path + o.getElementsByTagName('img')[0].alt);
			o.style.width = width + 'px';
			o.getElementsByTagName('span')[3].style.display = 'block';
		}
	}
	else
	{
		o = document.getElementById('img'+id);
		
		if (o)
		{
			tog[id] = false;
			o.getElementsByTagName('img')[0].src = path + 'th-' + o.getElementsByTagName('img')[0].alt;
			o.style.width = state + 'px';
			o.getElementsByTagName('span')[3].style.display = 'none';
		}
	}
}

function preloadImage(image)
{
	preload = new Image();
	preload.src = image;
	o.getElementsByTagName('img')[0].src = preload.src;
	
	// why have i done it this way?
	//if (preload.complete == true) setTimeout("timeOut()", 500);
	//preload.onload = function() {
		//setTimeout("timeOut()", 500);
	//}
}

function timeOut()
{
	o.getElementsByTagName('img')[0].src = preload.src;
}