var UserCode = 0;
var UserName= "";

// If the page in the content frame doesn't have to hit the server, (which will get the ads)
// then it will need to call this function so the top level frameset requests and processes the ad data
// The ad loading code is in browseUtils.js
function requestAds()
{
	// Ask the server for the ads data
	//FOO: RW commented out
    //top.dataFrm.location.replace("/asp/GetAds.asp");
}

// this gets called when the data frame is loaded
function loadDataFinish()
{
    Ads	= top.dataFrm.Ads;
	//FOO: RW
    //loadAds(top.adsFrm, Ads);	// this function lives in browseUtils.js
}

// This function is called for all search requests
function searchRequest(area, newArea)
{
	if(area == "yn") return;		// Disable until implemented

    var typein = top.barFrm.document.searchForm.searchValue;
	
	//FOO: RW Todo Frameset will need to change if the basetype changes
	var baseType = top.barFrm.document.searchForm.baseType.value;
	
    var eValue = escape(typein.value);	// convert to URL-encoded string

	// This flag is set if we need to switch to a new frameset
	if(newArea == true)
		newPortalArea(area, "search", eValue);
	else 	// search within an area so just need to load browse into content frame
	{
		
		var href= area + "-browse.asp" + "?search=" + eValue + "&base=" + baseType;
		
		//FOO: RW Debug
		//alert ("indexUtils.js\nhref = " + href);
		
		contentFrm.location.href= href;
	}

    return false;
}

