function danishCharacters(txt){
	txt = txt.replace(/Ã…/g,"&Aring;");
	txt = txt.replace(/Ã†/g,"&AElig;");
	txt = txt.replace(/Ã˜/g,"&Oslash;");
	txt = txt.replace(/Ã¥/g,"&aring;");
	txt = txt.replace(/Ã¦/g,"&aelig;");
	txt = txt.replace(/Ã¸/g,"&oslash;");
	return txt;
}

var timer = new Date();

function loadComments() {
	
	ProductNumber = $("#ProdNo");
	ProductNumber = ProductNumber.find("SPAN");
	ProductNumber = ProductNumber.html();
	if (ProductNumber.indexOf("-") > -1 ) {
		ProductNumber = ProductNumber.substring(0,ProductNumber.indexOf("-"));
	}
	
	var $commentsWrapper = $("#commentsWrapper");
	if ($commentsWrapper.length <= 0) {
		var $commentsWrapper = $("<div id='commentsWrapper' />");
		var $mainForm = $(".ProductInfo_TD").find("form[name=myform]");
		$mainForm.after($commentsWrapper);
	}
	
	var $loadingImg = $("<br />&nbsp;<p style='text-align:center;'><img src='/utils/images/ajax-load-large.gif' alt='Loading' /></p>");
	$commentsWrapper.html($loadingImg);
	
	$commentsWrapper.load("/utils/comments.asp?relid="+ProductNumber+"&_="+ timer.getTime(), function (){
		$(".star",$commentsWrapper).rating();
	});
}

$(document).ready(function(){
	loadComments();
		
});

