// JavaScript Document

function entsub(myform) {
  if (window.event && window.event.keyCode == 13)
    myform.submit();
  else
    return true;}
	
	function hand(){
  document.body.style.cursor = "hand";
}

function point(){
  document.body.style.cursor = "default";
}

function showProductCategory()
{
	var extLinked = false;
	
	//if they haven't selected a category.
	if(document.forms['search'].category.selectedIndex==0 && document.forms['search'].brand.selectedIndex==0)
	{
		alert('Please select a Product Type and/or Category');
	}else{
		for (i in extLinks)
		{
			if (extLinks[i][0] == $('#category').val() && extLinks[i][1])
			{
			
				window.location = extLinks[i][1];
				extLinked = true;
			}
		}
		if (!extLinked)
				javascript:document.forms['search'].submit();
	}
}

function stateChange(val, type)
{
	
	if (val == 'N/A') {
		$('#'+type+'_other_state').show();
	}
	else {
		
		$('#'+type+'_other_state input').val('');
		$('#'+type+'_other_state').hide();
	}
}