function change(Name, Image) {
	if (document.images) { document[Name].src = themeFolder + Image; }
}

function displayTab(tabNo, linkobj, postId) {
	clickedTab(linkobj);
	var numOfTabs = countTabs();
	for(i = 0; i < numOfTabs; i++) {
		document.getElementById("postTabs_"+i+"_"+postId).style.display = "none";
	}

	document.getElementById("postTabs_"+tabNo+"_"+postId).style.display = "block";
}

function countTabs() {
	var allDIVS = document.getElementsByTagName('DIV');
	var el, i = 0, howmany = 0;
	while (el = allDIVS.item(i++))
		if (el.id.substr(0,7) == 'postTab')
			howmany++;
	return howmany;
}

function clickedTab(linkobj) {
	var ulid=linkobj.parentNode.parentNode.id; //id of UL element
	var ullist=document.getElementById(ulid).getElementsByTagName("li"); //get list of LIs corresponding to the tab contents
	for (var i=0; i<ullist.length; i++)
		ullist[i].className = "";  //deselect all tabs
	linkobj.parentNode.className="selected";  //highlight currently clicked on tab
}

