function navigateUser(a,onpg,strt,prpg,rbc_aID)
{	
	var d = document.results;
	if(a)
		d.aID.value = a;
	
	d.op.value=onpg;
	d.s.value=strt;
	
	if(prpg)
		d.p.value=prpg;
	
	if(rbc_aID)
		d.rbc_aID.value=rbc_aID;

	d.submit();
}


function initBrowseControlVars()
{
	var d = document.results;
	d.r.value='browse';
	d.action='/modperl/product/catalog.cgi';
	return true;
}


function initVars(obj,r)
{
	var d = document.results;
	d.control.value='sw'; 
	//d.sw.value='yes';
	
	if(r)
	{	d.r.value=r; }
	else
	{ d.r.value='search'; }
	
	d.sw_str.value=obj.str.value;
	d.s.value='';
	d.op.value='';
	d.action=obj.action;
	d.submit();
} //end function


function toggleObject(string)
{
	obj = document.getElementById(string);
	
    if (obj.style.display == "none") 
    {
        showObject(obj,'')
    } else {
        hideObject(obj)
    }
}

// show a section of matching categories (more/fewer)
function showObject(obj,str)
{
	if(!obj) { obj = document.getElementById(str); }
	obj.style.display="";
}

function hideObject(obj) 
{
	obj.style.display="none";      
}
