/* preload SWF for IE7 */
function equalize_thumbs() {
	var thumb_max_height=0;
	var div=document.getElementsByTagName('ul');
	for(var z=0; z<div.length; z++) {
		if(div[z].className=='gallery_list') {
			var thumb=div[z].getElementsByTagName('div');
			var thumb_width = thumb[0].offsetWidth;
			var thumb_inline = Math.floor(div[z].offsetWidth/thumb_width);
			var thumb_rows = Math.ceil(thumb.length/thumb_inline);
			for (i=0; i<thumb_rows; i++) {
				for (n=0; n<thumb_inline; n++) {
					var id = (i*thumb_inline)+n;
					var e = thumb[id];
					if (e) {									
						if (thumb_max_height < e.offsetHeight ) { 
							thumb_max_height = e.offsetHeight-20;			
						}
					}
				}
				for (n=0; n<thumb_inline; n++) {
					var id = (i*thumb_inline)+n;
					var e = thumb[id];
					if (e) {
						e.style.height = thumb_max_height+"px";
					}
				}					
			}
		}
	}
}