function moreToLoad()
{
	// TODO: Replicated from subsearch.js
	searchPage = $('#searchfield').val();
	
	$('#searchfield').focus(function() {
		if($(this).val() == searchPage) {
			$(this).val("");
		}
	}).blur(function () {
		if($(this).val() == "") {
			$(this).val(searchPage);
		}
	});

	$(".reviewcopy").hover(
		function(){ $(this).find(".reportoptions").show() },
		function(){ $(this).find(".reportoptions,.reportoptionslist").hide() }
	)
}

function rateReview(obj,id,rate)
{
	var bIsActive=$(obj).hasClass("gactive")||$(obj).hasClass("bactive");
	$("#bookreview-"+id+" .ratethis>a").removeClass("gactive bactive ginactive binactive");
	if (bIsActive)
	{
		$("#bookreview-"+id+" .ratetext").text("Rate this review");
		rate=0;
	}
	else
	{
		$("#bookreview-"+id+" .ratetext").text("You rated");
		$("#bookreview-"+id+" .goodreview").addClass((rate==1)?"gactive":"ginactive");
		$("#bookreview-"+id+" .badreview").addClass((rate==1)?"binactive":"bactive");
	}
	/* NOTE: id is the unique review id and is generated via server side in the button's onclick handler */
	$.get("/ajax/rateReview.aspx",{id: id, rate: rate});
}

function deleteReviewConfirm()
{
    return confirm("Are you sure you want to delete this review?");
}
