// JavaScript Document
// overly simplistic test for IE
isIE = (document.all ? true : false);
// both IE5 and NS6 are DOM-compliant
isDOM = (document.getElementById ? true : false);


function getDivStyle(divname) {
	var style;
	if (isDOM) {
		style = document.getElementById(divname).style; 
	}
	else { 
		style = isIE ? document.all[divname].style : document.layers[divname]; 
	} // NS4
	return style;
}

function hideElement(divname) {
	getDivStyle(divname).visibility = 'hidden';
	getDivStyle(divname).display = 'none';
}
function showElement(divname) {
	getDivStyle(divname).visibility = 'visible';
	getDivStyle(divname).display = 'block';
}
function switch_tabs(current_tab){
	tab_array = new Array('story_tab', 'coffee_tab', 'babies_tab' );
	for(i=0; i<3; i++){
		if(tab_array[i] == current_tab){
			//show
			showElement(tab_array[i]);
		}
		else{
			//hide
			hideElement(tab_array[i]);
		}
	}
}