function showTab(idx) {
	$$('.tab').each(function(node){ node.removeClassName('active'); });
	$('tab_' + idx).addClassName('active');

	$$('.tab_box').each(function(node){ node.hide(); });
	$('box_' + idx).show();
}

function fixSize(img, maxh, maxw) {
	if (Prototype.Browser.IE) {
		img.style.width = maxw;
		img.style.height = maxh;
		img.style.display = 'block';
		return;
	}
	if (img.height > img.width) {
		if (img.height > maxh) {
			img.height = maxh;
			img.style.width = 'auto';
		} else {
			if (img.width > maxw) {
				img.width = maxw;
			}
			img.style.height = 'auto';
		}
	} else {
		if (img.width > maxw) {
			img.width = maxw;
			img.style.height = 'auto';
		} else {
			if (img.height > maxh) {
				img.height = maxh;
			}
			img.style.width = 'auto';
		}
	}
	img.style.display = 'block';
}

function fixImage(img, maxh, maxw) {
	img.src = IMG_ROOT_PATH + 'pages/mainDesign/no_pictures.jpg';
	img.height = maxh;
	img.width = maxw;
	img.style.display = 'block';
}
