//here you place the ids of every element you want.
var ids=new Array('productFeatures','productManuals','productPhotos','productReviews','productVideos','productTellaFriend');
var tabs=new Array('productFeaturestab','productManualstab','productPhotostab','productReviewstab','productVideostab','productTellaFriendtab');

function switchid(id){	
	hideallids();
	showdiv(id);
}


function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
		document.getElementById(id).style.display = 'none';
}


function showdiv(id) {
		document.getElementById(id).style.display = 'block';
}

function switchtab(id){	
    hidealltabs();
	showtab(id);
}

function hidealltabs(){
	//loop through the array and hide each element by id
	for (var i=0;i<tabs.length;i++){
		hidetab(tabs[i]);
	}		  
}

function hidetab(id) {
		document.getElementById(id).style.backgroundPosition = '0px 0px';
}

function showtab(id) {
		document.getElementById(id).style.backgroundPosition = '0px -40px';
}
