var oCurrDiv, oCurrA;

function selectImg(item) {
	if (oCurrDiv) {
		oCurrDiv.className = '';
		oCurrA.style.color = 'black';
	}
	oCurrDiv = item.parentElement ? item.parentElement : item.parentNode; //Gecko related
	oCurrA = item;
	oCurrDiv.className = 'selected';
	oCurrA.style.color = 'highlighttext';

	oImgM = document.getElementById('img_medium');
	img = item.firstChild;
	while (img.tagName != 'IMG' && img.nextSibling) img = img.nextSibling;

	//oImgM.removeAttribute('height');
	oImgM.src = img.src;
	return false;
}

