var imagesAllLoaded = false;
var imagePrefix = "nav";
var numOfImages = 10;
var bulletPrefix = "nav_bullet";
var doBullets = true;

var blendImages = true;

if (blendImages)
{
	var agt = navigator.userAgent.toLowerCase();
	var ie = document.all && (agt.indexOf('opera') == -1) && (parseInt(navigator.appVersion) >= 4);
	var blendDelay = 0;
}

if (doBullets)
{
	var bullet = new Array();
	bullet[0] = new Image();
	bullet[1] = new Image(); 
}

function LI() 
{
	if (document.images) 
	{
		if (doBullets)
		{
			bullet[0].src = "images/bullet_0.gif";
			bullet[1].src = "images/bullet_1.gif";
		}
		
		for (var i = 1; i <= numOfImages; i++) 
		{

			eval (imagePrefix + i + '_0 = new Image();');
			eval (imagePrefix + i + '_0.src = "images/' + imagePrefix + i + '_0.gif";');
			eval (imagePrefix + i + '_1 = new Image();');
			eval (imagePrefix + i + '_1.src = "images/' + imagePrefix + i + '_1.gif";');

			if (blendImages)
			{
				if (blendDelay == 0 && document[imagePrefix+i] && ie) 
				{
					if (document[imagePrefix+i].filters[0])
						blendDelay = document[imagePrefix+i].filters[0].duration * 1000; 
				}

			}
		}
		
		imagesAllLoaded = true;
	}
}

function SI(id, hilite) 
{

	if (imagesAllLoaded && (document[imagePrefix + id]) && (!doBullets || document[bulletPrefix + id])) 
	{
		if (doBullets)
			document[bulletPrefix + id].src = bullet[hilite].src;

		if (ie && blendImages)
		{
			if (document[imagePrefix+id].filters[0]) document[imagePrefix+id].filters[0].apply();
		}

		document[imagePrefix + id].src = eval(imagePrefix + id + "_" + hilite + ".src");

		if (ie && blendImages)
		{
			if (document[imagePrefix+id].filters[0]) document[imagePrefix+id].filters[0].play();
		}
	}
}

window.onload = Init;