

/**
*
*/
function toggleZoomListImg(idOfImgToToggle, thumbData, fullsizeData) {
	
	// Make sure that the image exists
	if(document.getElementById(idOfImgToToggle)) {
		
		// Assume that we are changing to fullsize
		var changingTo = 'fullsize';
		var newSrc = fullsizeData[0];
		var newWidth = fullsizeData[1];
		var newHeight = fullsizeData[2];
		var newImgClassName = 'imgListFullsize';
		
		// If the class of the imag is fullsize
		if(document.getElementById(idOfImgToToggle).className == 'imgListFullsize') {

			changingTo = 'thumbnail'; // We are changing to thumbnail
			newSrc = thumbData[0]; // Get thumbnail data
			newWidth = thumbData[1];
			newHeight = thumbData[2];
			newImgClassName = 'imgListThumbnail';
			
		}
		
		// Change the image
		document.getElementById(idOfImgToToggle).src = newSrc;
		document.getElementById(idOfImgToToggle).width = newWidth;
		document.getElementById(idOfImgToToggle).height = newHeight;
		document.getElementById(idOfImgToToggle).className = newImgClassName;
		
		
		// Style the surrounding li
		document.getElementById('li_' + idOfImgToToggle).style.height = newHeight + 'px';
		document.getElementById('li_' + idOfImgToToggle).style.width = newWidth + 'px';
		
		// Style the surrounding link
		document.getElementById('a_' + idOfImgToToggle).style.height = newHeight + 'px';
		document.getElementById('a_' + idOfImgToToggle).style.width = newWidth + 'px';		
		
		// Change the css-class of the li depending on whether we are changing to
		// fullsize or thumbnail.
		if(changingTo == 'fullsize') {
			
			document.getElementById('li_' + idOfImgToToggle).className = 'fullsizeWrapper';
			
			var imgListTimeout = setTimeout(function() { var imgListScrollHandler = new scrollHandler(); imgListScrollHandler.init(15, 3);  imgListScrollHandler.scrollToBottomOfElement(idOfImgToToggle, false, false, 20); }, 200);
			
		} else {
			
			document.getElementById('li_' + idOfImgToToggle).className = 'thumbnailWrapper';
			
		}
		
	}
	
	return false;
	
}



