/*	Blog Article Comments*/var blogArticleCommentsDocsAjaxReq;var blogArticleCommentsDocs = '';var blogArticleCommentsStart = 1;var blogArticleCommentsTotal = 0;var blogArticleCommentsHTMLCount = 0;var blogArticleCommentsHTML = '';var blogArticleCommentsHTML2Count = 0;var blogArticleCommentsHTML2 = '';function showblogArticleCommentsDocuments() {	var url = '/' + dbname + '/ISBlogArticleComments?ReadViewEntries&start=' + '1' + '&count=' + '-1' + '&restricttocategory=' + ArticleUNID+ '&outputformat=JSON' + '&ms='+ new Date().getTime();	blogArticleCommentsDocsAjaxReq = createAJAXRequest(url, blogArticleCommentsDocsResponseFunction);	blogArticleCommentsDocsAjaxReq.send(null);	}function blogArticleCommentsDocsResponseFunction() {	if (blogArticleCommentsDocsAjaxReq.readyState === 4){		if (blogArticleCommentsDocsAjaxReq.status === 200) {			eval("blogArticleCommentsDocs = " + blogArticleCommentsDocsAjaxReq.responseText );			outputblogArticleCommentsDocuments();		} else {			// returned other than complete			alert("AJAX failed with error: \n" + blogArticleCommentsDocsAjaxReq.status + " - " + blogArticleCommentsDocsAjaxReq.statusText);		}	}	}function outputblogArticleCommentsDocuments() {	if (typeof blogArticleCommentsDocs != "object") {		alert("data not loaded [" + typeof blogArticleCommentsDocs + "]")		return;	}		blogArticleCommentsTotal = parseInt(blogArticleCommentsDocs['@toplevelentries']);		if (typeof blogArticleCommentsDocs.viewentry != "undefined") {		for (var i = 0; i < blogArticleCommentsDocs.viewentry.length; i++) {			addblogArticleCommentsHTML(i);		}	}	outputblogArticleCommentsHTML();}function addblogArticleCommentsHTML(i) {	var html = '';	html += '<div style="margin-bottom:5px;">';	html += '<a name="' + getViewColData(blogArticleCommentsDocs.viewentry[i], "UNID") + '">';	html += '<img src="/' + dbname + '/ISBlogPostedComment.gif">';	html += '&nbsp;';	html += '<span class="BACommentAuthor">';	html += getViewColData(blogArticleCommentsDocs.viewentry[i], "NomAuthor");	html += '</span>';	html += '</a>';	html += '</div>';	html += '<div  style="margin-bottom:5px;>';	html += '<span class="BHPostedText">';	html += 'Posted&nbsp;';	html += '</span>';	html += '<span class="BHPostedDate">';	html += getViewColData(blogArticleCommentsDocs.viewentry[i], "postedDate");	html += '</span>';	html += '<div>';	html += '<p class="BHPostSummary" style="margin-bottom:2px;">';	html += getViewColDataText(blogArticleCommentsDocs.viewentry[i], "threadbodyhtml");	html += '</p>';		html += '<div style="text-align:right;">';	html += '<a href="' + '/' + dbname + '/(WebISBLReportComment)?OpenAgent&UNID=' + getViewColData(blogArticleCommentsDocs.viewentry[i], "UNID") + '">';	html += '<span class="ISmorenews">';	html += 'Report this comment';	html += '</span>';	html += '</a>';	html += '</div>';		html += '<hr>';		blogArticleCommentsHTML += html;	}function outputblogArticleCommentsHTML() {	if (blogArticleCommentsHTML == '') {		var html = '';		html += '<span class="BHPostSummary">';		html += 'Be the first to comment on this post';		html += '</span>';			blogArticleCommentsHTML = html;	}	var tArea = document.getElementById("articleCommentsOutput");	tArea.innerHTML = blogArticleCommentsHTML;		var href = window.location.href;	if (href.indexOf('#') >= 0) {		var a = Right(href, 33);		window.location.href = a;	}}function Right(str, n){     if (n <= 0)        return "";     else if (n > String(str).length)        return str;     else {        var iLen = String(str).length;        return String(str).substring(iLen, iLen - n);     } } 