function showTab(tab) {
	if (tab == 'codes') { 
		document.getElementById('tab-codes').style.display = 'block';
		document.getElementById('tab-comment').style.display = 'none';
		document.getElementById('post-comment').style.display = 'none';
	}
	if (tab == 'comment') { 
		document.getElementById('tab-codes').style.display = 'none';
		document.getElementById('tab-comment').style.display = 'block';
		document.getElementById('post-comment').style.display = 'none';
	}
	if (tab == 'none') { 
		document.getElementById('tab-codes').style.display = 'none';
		document.getElementById('tab-comment').style.display = 'none';
		document.getElementById('post-comment').style.display = 'none';
	}

       if (tab == 'hosting') { 
		document.getElementById('tab-codes').style.display = 'block';
		document.getElementById('tab-comment').style.display = 'none';
		document.getElementById('post-comment').style.display = 'none';
	}
	
}

function showComments() {
	var elm = document.getElementById('mocommentsdiv');
	elm.style.display = 'block';
	// document.getElementById('mocomments').style.display = 'block';
};

function hiLite(getal) {
	for (z=1;z<(getal+1);z++) {
		document.getElementById('star'+z).src = '/static/images/barz3/star_on.png';
	}
	for (x=(getal+1);x<6;x++) {
		document.getElementById('star'+x).src = '';
	}
}

function voteVideo(stars,hash) {
	doRequest('' + (stars*20) + '&hash=' + hash,1);
}

function getFile(hash) {
	window.open('' + hash, 'Download', 'width=100,height=100,scrollbars=no,toolbar=no,location=no');
}

function comment(hash) {
	newcmttxt = document.addcomment.bericht.value;
	newcmtname = document.addcomment.naam.value;
	var post_str = 'c=' + escape(encodeURI(newcmttxt)) + '&n=' + escape(encodeURI(newcmtname));
	doRequest('' + hash + '&' + post_str, 2);
}
