function toggleContent(div_id, img_id){
	var working_div=document.getElementById(div_id);
	div_img=document.getElementById(img_id);
	if (working_div.style.display=='none'){
		working_div.style.display='block';
		div_img.src="images/minus.jpg";
	} else{
		working_div.style.display='none';
		div_img.src="images/plus.jpg";
	}
}

function tabSelect(selected){
	//selected should be the id of the content area, and selected_tab should be the name of its tab for this to work.
	//determine and set the selected tab to on, with its content
	if (selected=='load'){
		var tab=parseURL(document.location, 'tab');
		if (tab!=null){
			//select the tab in the 
			selected=tab;
		} else{
			//select the summary tab
			return true;
		}
	} 
	//set all tabs to off (and their content)
	var tabs_div=document.getElementById('tabs');
	var links = tabs_div.getElementsByTagName("a");
	for(var i=0; i<links.length; i++){
		links[i].className="off";
	}
	var tcontent_div=document.getElementById('tabbedcontent');
	var content = tcontent_div.getElementsByTagName("div");
	//i=1 to skip the tab div
	for(var i=1; i<content.length; i++){
		content[i].style.display="none";
	}
	
	document.getElementById(selected+'_tab').className="on";
	document.getElementById(selected).style.display="block";

	// Special Case for BazaarVoice which has Nested Divs that we need to turn on.
	// gloyd 7-1-09
	if(selected.indexOf("ratings_reviews") > -1) {
		var innerContent = document.getElementById('ratings_reviews').getElementsByTagName("div");
		for(var i=0; i<innerContent.length;i++) {
			innerContent[i].style.display="block";
		}
		for(var j=0; j<innerContent.length;j++) {
			innerContent[j].style.display="";			
		}
	} // End BV Case
}