// 3column LIST----------------------------------------------------------------------------------------------------

function list3column() {
	
	hgtAry = new Array();
	listAry = document.getElementsByClassName("detail");
	listLen = listAry.length;
	for(i=0; i<listLen; i++){
		hgtAry.push(Element.getHeight(listAry[i]));
	}
	var maxVal = hgtAry[0];
	hgtLen = hgtAry.length;
	for(i=0; i<hgtLen; i++){
		if(maxVal < hgtAry[i]) {
			maxVal = hgtAry[i];
		}
		chkLen = (i+1)/3 + "";
		if(chkLen.indexOf(".",0) == -1){
			listAry[i-2].style.height = maxVal + "px";
			listAry[i-1].style.height = maxVal + "px";
			listAry[i].style.height = maxVal + "px";
			maxVal = hgtAry[i+1];
		}
	}
	setSideHgt();
	$("footer").style.bottom = "2px";
	
	zoomAry = document.getElementsByClassName("zoom");
	zoomLen = zoomAry.length;
	for(i=0; i<zoomLen; i++){
		new Insertion.Bottom(zoomAry[i], '<img src="../common/img/spacer.gif" alt="" width="1" height="180" class="listSpacer" />');
		
		orgSrc = zoomAry[i].innerHTML;
		orgStr = zoomAry[i].getElementsByTagName("img")[0].getAttribute("src");
		orgAry = orgStr.split(".jpg");
		capStr = zoomAry[i].parentNode.getElementsByTagName("div")[0].innerHTML;
		capStr = capStr.replace(/>/g,'&gt;');
		capStr = capStr.replace(/</g,'&lt;');
		capStr = capStr.replace(/"/g,'&quot;');
		zmStr = orgAry[0] + "_z" + ".jpg";
//		cngStr = '<a href="' + zmStr + '" rel="lightbox[roadtrip]" title="' + capStr + '">' + orgSrc +'</a>';
//		zoomAry[i].innerHTML = cngStr;
	}
	
}






// Event --------------------------------------------------------------------------------------------------------------------
addEvent(window, 'load', list3column);





