
if(null==idcomments_post_title)
	idcomments_post_title = document.title;
if(null==idcomments_post_url)
	idcomments_post_url = window.location;
if(null==idcomments_post_id)
	idcomments_post_id = window.location;
	
var commentScript = document.createElement("SCRIPT");
commentScript.type = "text/javascript";
commentScript.src = "http://www.intensedebate.com/js/getCommentLink.php?acct="+idcomments_acct+"&postid="+idcomments_post_id+"&posttitle="+idcomments_post_title+"&posturl="+idcomments_post_url;
var scripts = document.getElementsByTagName("script");

var found=false;
for(var i=0; i<scripts.length; i++)
{
	//if(i==3)
		//alert(scripts[i].src + " - " + IDHost+"js/getCommentLink.php?acct="+acct+"&postid=$postid&posttitle=$posttitle&posturl=$posturl&src=blogger");
	if(scripts[i].src.indexOf("genericLinkWrapper.js")>=0)
	{
		parentObj = scripts[i].parentNode; 
		theObj = scripts[i];
		
		if(theObj.previousSibling.src && theObj.previousSibling.src.indexOf('getCommentLink.php?acct')>0)
			continue;
			
		found=true;
		break;
	}
}
if(found)
	parentObj.insertBefore(commentScript, theObj);
	
var thisdate = new Date();
var newImage = new Image();
newImage.src ="http://www.intensedebate.com/remoteCheckin.php?acct="+idcomments_acct+"&time="+thisdate.getTime();
newImage.style.display = "none";
