// preload 

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

						
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		
		index_01a = newImage("images/index_05-over.jpg");
		index_02a = newImage("images/index_05-over.jpg");
		index_03a = newImage("images/index_05-over.jpg");
		index_04a = newImage("images/index_05-over.jpg");
		index_05b = newImage("images/index_05-over.jpg");
		index_06a = newImage("images/index_05-over.jpg");
		index_07a = newImage("images/index_05-over.jpg");
		index_08b = newImage("images/index_05-over.jpg");
		menu_01a = newImage("images/menu_01.gif");
		menu_02b = newImage("images/menu_02.gif");
		menu_03a = newImage("images/menu_03.gif");
		menu_04b = newImage("images/menu_04.gif");
		menu_05a = newImage("images/menu_05.gif");
		menu_06b = newImage("images/menu_06.gif");
		menu_07a = newImage("images/menu_07.gif");
		menu_08b = newImage("images/menu_08.gif");
		menu_09a = newImage("images/menu_09.gif");
		menu_10b = newImage("images/menu_10.gif");
		menu_11a = newImage("images/menu_11.gif");
		menu_12b = newImage("images/menu_12.gif");
		menu_13a = newImage("images/menu_13.gif");
		menu_14b = newImage("images/menu_14.gif");
		menu_15a = newImage("images/menu_15.gif");
		
		index_05a = newImage("images/index_05-over.jpg");
		index_08a = newImage("images/index_08-over.jpg");
		menu_02a = newImage("images/menu_02-over.gif");
		menu_04a = newImage("images/menu_04-over.gif");
		menu_06a = newImage("images/menu_06-over.gif");
		menu_08a = newImage("images/menu_08-over.gif");
		menu_10a = newImage("images/menu_10-over.gif");
		menu_12a = newImage("images/menu_12-over.gif");
		
		preloadFlag = true;
	}
}
// Start Emerigos logo
function eon2(a)
	{
	document.getElementById('emeon').style.opacity=a/10;
	document.getElementById('emeon').style.filter='alpha(opacity='+a*10+')';
	if (a<10) setTimeout("eon2("+(a+1)+")",25);
	}

function eon(a)
	{
	document.getElementById('emeoff').style.opacity=a/10;
	document.getElementById('emeoff').style.filter='alpha(opacity='+a*10+')';
	if (a>0) setTimeout("eon("+(a-1)+")",20);
		else
		{
		document.getElementById('emeoff').style.display='none';
		document.getElementById('emeon').style.display='';
		document.getElementById('emeon').style.opacity=0;
		document.getElementById('emeon').style.filter='alpha(opacity=0)';
		eon2(0);
		}
	}
	
function eoff2(a)
	{
	document.getElementById('emeoff').style.filter='alpha(opacity='+a*10+')';
	document.getElementById('emeoff').style.opacity=a/10;
	if (a<10) setTimeout("eoff2("+(a+1)+")",25);
	}

function eoff(a)
	{
	document.getElementById('emeon').style.filter='alpha(opacity='+a*10+')';
	document.getElementById('emeon').style.opacity=a/10;
	if (a>0) setTimeout("eoff("+(a-1)+")",20);
		else
		{
		document.getElementById('emeon').style.display='none';
		document.getElementById('emeoff').style.display='';
		document.getElementById('emeoff').style.filter='alpha(opacity=0)';
		document.getElementById('emeoff').style.opacity=0;
		eoff2(0);
		}
	}
	// End Emerigos logo
	
function changecolor(theid)
{
	document.getElementById(theid).style.backgroundColor='#FFFFFF';
	document.getElementById(theid).style.color='#000000';
	document.getElementById(theid).style.fontWeight='normal';
	document.getElementById(theid).style.borderColor='#FF0000';
	document.getElementById(theid).style.filter='alpha(opacity=90)';
	document.getElementById(theid).style.opacity='0.90';
}

function switchback(theid)
{
	document.getElementById(theid).style.backgroundColor='#ffffff';
	document.getElementById(theid).style.color='#666666';
	document.getElementById(theid).style.fontWeight='normal';
	document.getElementById(theid).style.filter='alpha(opacity=70)';
	document.getElementById(theid).style.opacity='0.70';
	document.getElementById(theid).style.borderColor='#68676c';
}
