function channelTab(targ, obj) {
	var content = document.getElementById('channel_body').getElementsByTagName('div');
	var lis = targ.parentNode.getElementsByTagName('li');
	var chan = document.getElementById(obj);
	
	for (i=0; i < lis.length;i++){
		lis[i].className = 'channel_inactive';
	}
	targ.className = 'channel_active';

	// adds comment tab style
	if (targ.id == 'comments_tab'){
		targ.style.backgroundColor='#B7B5B6';
	}
	else{
		document.getElementById('comments_tab').style.backgroundColor='#f1f1f1';
	}
	// quick way to set display to none
	for (j=0; j < content.length;j++){
		if (content[j].className == 'channel_content'){
			content[j].style.display = 'none';	
		}	
	}

	chan.style.display='block';

	// changes the body style - for comments tab mainly
	if (obj == 'comments_c'){
		chan.parentNode.className = 'inactive_channel_body'
	}
	else{
		chan.parentNode.className = 'active_channel_body'
	}
}