
tx_brochotalbum_pi2 = {
	showHideContent: function(ref, className, altSrc) {
		var tempObj = $(ref.parentNode.parentNode);
		tempObj = tempObj.firstDescendant().firstDescendant();

		while(tempObj){
			if(tempObj.hasClassName(className)){
				tempObj.style.display = 'block';
			} else{
				tempObj.style.display = 'none';
			}

			tempObj = tempObj.next();
		}

		var tempObj = $(ref.parentNode).firstDescendant();

		while(tempObj){
			tx_brochotalbum_pi2.swapImgInDiv(tempObj, false);
			tempObj = tempObj.next();
		}

		tx_brochotalbum_pi2.swapImgInDiv(ref, altSrc);
	},
	
	swapImgInDiv: function(divObj, imgSrc){
		var theImgObject = $(divObj).firstDescendant().next().firstDescendant();

		if(imgSrc){
			if(theImgObject.swapImg == undefined){
				theImgObject.swapImg = {
					onclickImg: imgSrc,
					normalImg: theImgObject.src
				};
			}
			
			theImgObject.setAttribute('src', imgSrc);
		} else{
			if(theImgObject.swapImg){
				theImgObject.setAttribute('src', theImgObject.swapImg.normalImg);
			}
		}
	}
}

