function baynote_showRecommendations(guideType)
{
	if (!guideType) return;
	baynote_tag.server = "http://xpc-www.baynote.net";
	baynote_tag.customerId = "xpc";
	baynote_tag.code = "www";
	baynote_tag.type = "guide";
	baynote_tag.listSize = "5";
	if (guideType == "home") baynote_tag.guide = "HomeGuide";
	if (guideType == "auto") baynote_tag.guide = "ProductGuide";
	if (window.location.href.indexOf("http://search.xtremepcgear.com") == 0)
		baynote_tag.query = baynote_getUrlParamValue("query");
	if(!baynote_tag.guide) {
		baynote_tag.noshow();
	} else {
		bnResourceManager.waitForResource("Policy", "baynote_policyLoaded()");
		baynote_tag.show();
	}
}

/*
 * baynote_policyLoaded
 *
 * Once the policy has loaded, check to see if the guide
 * is showing.  If so, show the guide.
 */
function baynote_policyLoaded() {
	var related;
	if (bnPolicy.get("guide","ok")) related = document.getElementById("bn_recommendation");
	else related = document.getElementById("ys_recommendation");
	if (!related) return;
	related.style.display = "block";
}

/*
 *	baynote_getUrlParamValue()
 *
 *	Get the value of a URL parameter
 *
 *	Parameters
 *		paramName - The name of the URL parameter whose value we want
 *
 *	Return
 *		String - The value of the requested URL parameter of the empty
 *					string if the param is not present or has no value
 */
function baynote_getUrlParamValue(paramName) {
	var url = window.location.href;
	var regex = new RegExp("[\\?&]"+paramName+"=([^&#]*)");
	var match = regex.exec(url);

	if (!match) return "";
	else return match[1];
}

