function preloader() 
{
	var start = '/images/nav_on_';
	var imageObj = new Array();
	
	var images = new Array();
	images[0] = start+'01.gif';
	images[1] = start+'02.gif';
	images[2] = start+'03.gif';
	images[3] = start+'04.gif';
	images[4] = start+'05.gif';
	images[5] = start+'06.gif';
	images[6] = start+'07.gif';
	images[7] = start+'08.gif';
	
	for (var i = 0; i < images.length; i++)
	{
		imageObj[i] = new Image();
		imageObj[i].src = images[i];
	}
}
preloader();

function stxTogDescr()
{
    $('.toggleDescription').slideToggle();
}

function toggle(div)
{
    var div = div.parentNode;
    var disp = div.childNodes[3];
    disp.toggle();
}

sponsor_id = 0;
function rt_sponsor(theid)
{
	$('.sponsorTab').hide();
	
	if (null == theid || -1 == theid || 'undefined' == theid)
	{
		var theid = parseInt(sponsor_id) + 1;
		sponsor_id++;
	}
	// Stop auto rotating on user intervention
	else
	{
		var theid = parseInt(theid);
		clearInterval(rotate);
	}
	
	if (0 > theid || null == $('#sponsor' + theid).css('display')) 
    {
		theid = sponsor_id = 0;
	}
	
	$('.fadeImages').hide();
	$('#sponsor'+theid).fadeIn(500);
	stopNow = setInterval("halt_me()", 300);
}

// Hide the next and back buttons until the fading finishes
function halt_me()
{
    $('.fadeImages').show();
    clearInterval(stopNow);
}
