// Load prototype
google.load("prototype", "1.6.0.3");
// Function to view tab
function viewTab(tabId) {
	// Get all child elements of "contents-container"
	var elements = $('contents-container').childElements();
	// Loop through them all
	for (var i=0, end=elements.length; i<end; i++) {
		// Is clicked tab
		if (tabId == elements[i].id) {
			// - Show element
			elements[i].show();
			// - Make sure css is correct for tab
			$('tab-'+ elements[i].id).addClassName('active-tab');
		}
		// Is not the clicked tab
		else {
			// - Hide
			elements[i].hide();
			// - Make sure css is correct for tab
			$('tab-'+ elements[i].id).removeClassName('active-tab');
		}
	}
}