/* preload SWF for IE7 */
function load_swf($ID, $filename, $width, $height){
	document.getElementById($ID).innerHTML = '<object type="application/x-shockwave-flash" data="' + $filename + '" width="' + $width + '" height="' + $height + '"><param name="menu" value="false" /><param name="movie"	value="' + $filename + '" /><param name="wmode" value="transparent" /></object>';
}
function show_object($object) {
	$object.style.visibility = "visible";
}
function hide_object($object) {
	$object.style.display = "none";
}
function equalize_thumbs() {
	var thumb_max_height=0;
	var div=document.getElementsByTagName('div');
	for(var z=0; z<div.length; z++) {
		if(div[z].className=='thumbnail_list equalize_thumbs') {
			var thumb=div[z].getElementsByTagName('a');
			var thumb_width = thumb[0].offsetWidth + 20;
			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;
						}
					}
				}
				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";
					}
				}
				thumb_max_height = 0;
			}
		}
	}
}
