onsearchpage = false

leftNav_els = new Array( "leftNav_motorcycles","leftNav_atvs","leftNav_scooters" );

leftNav_texts = new Array( "Motorcycle","ATV","Scooter" );

// the values in the next array MUST match what the database uses as labels
leftNav_indicators = new Array("motorcycle","atv","scooter" );


function popHelp( index )
{
	winSettings = "height=300, width=550, status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0";
	msgs = new Array();
	msgs[0] = "cvv_cvc.htm";
	helpWin = window.open("/help/" + msgs[index], "helpWin", winSettings );
}


function rtn2shopping( settings )
{
	var settings = settings.split("|");
	search_settings = settings;
}

function preload( type, year, mNum )
{
	search_settings[0] = type;
	search_settings[1] = year;
	search_settings[2] = mNum;

//alert( search_settings[1] );
}

function goToCart()
{
	location.href = "/cart.asp?rtn=" + search_settings.join("|");	
}


function leftNav_textswap( theEl,theState )
{
	workingEl = document.getElementById(leftNav_els[theEl]);
	if( theState == 0 )
	{
		theText = leftNav_texts[theEl] + " Manuals";
		workingClass = "leftNav";
	}
	else
	{
		theText = "Click for " + leftNav_texts[theEl] + " Manuals";
		workingClass = "leftNav_over";
	}
	workingEl.innerHTML = theText;
	workingEl.className = workingClass;
}


function navClick( theCat )
{
	if( !onsearchpage )
	{
		window.location = "/default.asp?click=" + theCat;
		return(true);
	}
	
	if( !pgLoaded )
	{
		alert("Please wait until the page finishes loading. Thanks!");
		return(false);
	}

	theSel = document.techManuals.productLine;

	for( i=0; i<theSel.options.length; i++ )
	{
		if( theSel.options[i].value.toLowerCase() == theCat.toLowerCase() )
		{
			theSel.selectedIndex = i;
			break;
		}
	}
	gSearch.Clear();
	gSearch.GetModelYear()
	
}


function switchNavIndicators( id )
{
	var theEl;
	
	if( typeof(id) == "string" )
	{
		for(i=0; i< leftNav_indicators.length; i++ )
		{
			if( leftNav_indicators[i].toLowerCase() == id.toLowerCase() )
			{
				id = i;
				break;
			}
		}
		if( typeof(id) == "string" ) id=-1;
	}
	
	for(i=0; i< leftNav_indicators.length; i++ )
	{
		theEl = document.getElementById("navIndicator_" + leftNav_indicators[i]);
		if( id == i )
		{
			theEl.style.visibility = "visible";
		}
		else
		{
			theEl.style.visibility = "hidden";
		}
	}
}
	
	
			
	




























