// 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) {
		
		var index_01 = newImage("images/index_01.jpg");
		var index_02 = newImage("images/index_02-over.jpg");
		var index_03 = newImage("images/index_03-over.jpg");
		var index_04 = newImage("images/index_04-over.jpg");
		var index_05 = newImage("images/index_05-over.jpg");
		var index_06 = newImage("images/index_06.jpg");
		
		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';
}

var remind=false;
	if (window.XMLHttpRequest)
	{
		remind=new XMLHttpRequest();	
	}
	else if(window.ActiveXObject)
	{
		remind=new ActiveXObject("Microsoft.XMLHTTP");	
	}	

// *********  ajax function ******

function getData(dataSource,divID,ajaxobj)
{
	var obj=document.getElementById(divID);
	now=new Date();
	dataSource=dataSource+'&now='+now;
	
	ajaxobj.open("GET",dataSource);
		
	ajaxobj.onreadystatechange = function()
	{
		if (ajaxobj.readyState==4 && ajaxobj.status==200)
		{
		obj.innerHTML=ajaxobj.responseText;	
		}
	}
	ajaxobj.send(null);
}