
function openComments(post_id) {

	if (eval(document.getElementById('comments_'+post_id)).innerHTML.length > 20) { 
		eval(document.getElementById('comments_'+post_id)).innerHTML = "";
	} else {
		var myFrame = document.createElement("IFRAME");
		myFrame.src = "pivot/entry.php?id="+post_id+"&t=entrypage_template_onlycomments.html";
		myFrame.id="newframe";
		myFrame.width=0;
		myFrame.height=0;
		document.body.appendChild(myFrame);
	}
}

function openBody(post_id) {

	if (eval(document.getElementById('body_'+post_id)).innerHTML.length > 20) { 
		eval(document.getElementById('body_'+post_id)).innerHTML = "";
	} else {
		var myFrame = document.createElement("IFRAME");
		myFrame.src = "pivot/entry.php?id="+post_id+"&t=entrypage_template_onlybody.html";
		myFrame.id="newframe";
		myFrame.width=0;
		myFrame.height=0;
		document.body.appendChild(myFrame);
	}
}


function iframeCallback(obj, target, post_id) {

	var divs = document.getElementsByTagName('div');

	for (i=0;i<divs.length;i++)	{
		if (divs[i].id.substring(0,9)== (target+"_") )	{
			divs[i].innerHTML="";
		}
	}
	eval(document.getElementById(target+'_'+post_id)).innerHTML = obj.document.body.innerHTML;
}


