// JavaScript Document
function rcaonline_searchproduct_bindselect(objMaster,objSlave,getURL)
{
   	objSlave.options.length = 1;
	curID = objMaster.options[objMaster.selectedIndex].value;

if (curID != '')
	{
		new Ajax.Request
		(
			getURL+'?id='+curID,
			{
				method:'get',
				
				onSuccess: function(transport)
				{
					var arrTypes = new Array();
					arrTransport = transport.responseText.split('##');
					for (i=0;i<arrTransport.length;i++)
					{
						arrOption = arrTransport[i].split('||');
						objSlave.options[objSlave.length]=new Option(arrOption[1], arrOption[0], true, false)			
					}
				},
				
				onFailure: function(){ 

				}
			
			}
		);
	}
}

function rcaonline_searchproduct_resetselect(objSelect)
{
	objSelect.options.length = 1;	
}

function rcaonline_gotoUrl(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
} 

function rcaonline_toggleDisplay(objWhoToToggle)
{
	if (objWhoToToggle.className == '')
	{
		objWhoToToggle.className = 'no-display';	
	}
	else
	{
		objWhoToToggle.className = '';	
	}
}

function rcaonline_toggleRandomProducts(showID)
{
	if (document.getElementById('rcaonline_randomoffers_1'))
		document.getElementById('rcaonline_randomoffers_1').className = 'no-display';
	if (document.getElementById('rcaonline_randomoffers_2'))
		document.getElementById('rcaonline_randomoffers_2').className = 'no-display';
	if (document.getElementById('rcaonline_randomoffers_3'))
		document.getElementById('rcaonline_randomoffers_3').className = 'no-display';
	
	document.getElementById('rcaonline_randomoffers_'+showID).className = '';
}
