function addMemberRating(iRating,iRatingItemID,iRatingTypeID,sResultText,sFailText,sEnteredText)
{
	if(sResultText=="") sResultText="Your rating has been successfully recorded";
	if(sFailText=="") sFailText="Your rating could not be recorded at the current time.";
	if(sEnteredText=="") sEnteredText="Your rating has already been recorded.";
	//alert("/__cmsys/@custom/@addmemberrating.asp?Rating=" + iRating + "&RatingItemID=" + iRatingItemID + "&RatingTypeID=" + iRatingTypeID);
	Http.get({
		url: "/__cmsys/@custom/@addmemberrating.asp?Rating=" + iRating + "&RatingItemID=" + iRatingItemID + "&RatingTypeID=" + iRatingTypeID,
		callback: addRatingShowResult,
		cache: Http.Cache.Get
	}, [sResultText,sFailText,sEnteredText]);
}

function addRatingShowResult(xmlreply, sResultText, sFailText,sEnteredText)
{
	if (xmlreply.status == Http.Status.OK)
	{
		if(xmlreply.responseText=="ok") {
			alert(sResultText);
		} else if(xmlreply.responseText=="alreadyentered") {
			alert(sEnteredText);
		} else {
			alert(sFailText);
		}
	} else {
		alert(sFailText);
	}
}