function styleInput(){
    $('input').focus(function () {
		$(this).addClass('inputfocus');
	});
    $('input').blur(function () {
		$(this).removeClass('inputfocus');
	});
	//for phone #
	$('#phone').focus(function () {
		if($(this).val() == '(XXX) XXX-XXXX')
		{
		$(this).val('');
		}
	});
    $('#phone').blur(function () {
		if($(this).val() == '')
		{
		$(this).val('(XXX) XXX-XXXX');
		}
	});
};

function setupFormsSelect(){
	//hide manuals tree
	$('#manuals h3').hide();
	$('#manuals ul').hide();

	//build form and vendor select elements
	frm = '<form id="frmManuals">' + 
	'<select id="vendor" name="vendor"><option value="" selected="selected">--Select a product vendor--<\/option><\/select>' + 
	'<br \/><br \/>' + 
	'<select id="product" name="product"><option value="" selected="selected">--Select a vendor first--<\/option><\/select>' + 
	'<\/form><br \/>';

	$('#manuals').append(frm);

	$('#manuals > h3').each(function(){
		$('#vendor').append('<option value="' + $(this).text() + '">' + $(this).text() + '<\/option>');
	});

	//vendor select change event
	$('#vendor').change(function(){
//		$('#product').empty();
		str = '<option value="" selected="selected">--Select a vendor first--<\/option>';

		if($(this).val() != ''){
			str = '<option value="" selected="selected">--Select an item--<\/option>';
			$('h3:contains("' + $(this).val() + '") + ul > li').each(function(){
				a = $(this).find('a');
				str += '<option value="' + a.attr('href') + '">' + a.text() + '<\/option>';
			});
		};

		$('#product').empty();
		$('#product').append(str);
	});

	//item select change event
	$('#product').change(function(){
		if($(this).val() != ''){
			window.open($(this).val());
		};
	});

};

