function toggleComments (postid) { 	var whichpost = document.getElementById(postid); 	if (whichpost.className=="commentshown") { 	  whichpost.className="commenthidden"; 	} 	else { 	  whichpost.className="commentshown"; 	} } function toggleBtn (btn) { 	if (btn.className=="open") { 	  btn.className="closed"; 	 btn.setAttribute("title","show comments");	} 	else { 	  btn.className="open";	 btn.setAttribute("title","hide comments"); 	} }function getElementsByStyleClass (className) {	var all = document.getElementsByTagName('div');	var elements = new Array();	for (var e = 0; e < all.length; e++)		if (all[e].className == className)		elements[elements.length] = all[e];	return elements;}window.onload = function(){	var coms = getElementsByStyleClass('comments');	for (var i=0;i<coms.length;i++){		var tag = coms[i].getElementsByTagName('div');		for (var a=0;a<tag.length;a++){			tag[a].className="commenthidden";		}	}	var btns = document.getElementsByTagName('a');	for (var i=0;i<btns.length;i++){		if (btns[i].className == "closed")			btns[i].setAttribute("title","show comments");	}}