$(document).ready(function(){
	$('#carousel').infiniteCarousel({
		displayTime: 5000,
		textholderHeight : 0,
		displayProgressBar : 0,
		imagePath: '/images/',
		enableKeyboardNav: 0,
		displayThumbnails: false
	});
	
	$('.top_nav > li').hover(
		function(event)
		{
			$(this).find('ul').slideDown('500');
		},
		function(event)
		{
			$(this).find('ul').slideUp('fast');
		}
	);
	
	$('.items_table tr:even').addClass('even');
	
	if ($('#form_toggle input:checked').length > 0)
	{
		var form_type = $('#form_toggle input:checked').val();
		if (form_type == 1) $('#var1').show();
		if (form_type == 2) $('#var2').show();
	}
	
	$('#form_toggle input').click(function(event)
	{
		if ($(this).attr('value') == '1')
		{
			$('#var2').slideUp('fast');
			$('#var1').slideDown('fast');
		}
		else
		{
			$('#var1').slideUp('fast');
			$('#var2').slideDown('fast');
		}
	});
});

function doClear(theText)
{
	if (theText.value == theText.defaultValue) {
		theText.value = "" 
	}
}
	
function doDefault(theText)
{
	if (theText.value == "")
	{
		theText.value = theText.defaultValue
	}
}
