arrayOn = new Array();
function preload(img)
{
	if (document.images)
	{
		arrayOn[img] = new Image();
		arrayOn[img].src = 'images/' + img + '_on.gif';
	}
}

function imgsOn()
{
	for (cnt = 0; cnt < arguments.length; cnt++)
	{
		if (document.getElementById) el = document.getElementById(arguments[cnt]);
		else if (document.images)	 el = document.images[arguments[cnt]];
		if (el) el.src = 'images/' + arguments[cnt] + '_on.gif';
	}
}
function imgsOff()
{
	for (cnt = 0; cnt < arguments.length; cnt++)
	{
		if (document.getElementById) el = document.getElementById(arguments[cnt]);
		else if (document.images) el = document.images[arguments[cnt]];
		if (el) el.src = 'images/' + arguments[cnt] + '.gif';
	}
}

function arrowOn(el, dir)
{
	if (document.getElementById) el = document.getElementById(el);
	else if (document.images) el = document.images[el];
	else return false;

	if (el) el.src = 'images/arrow_' + dir + '_on.gif';
}

function arrowOff(el, dir)
{
	if (document.getElementById) el = document.getElementById(el);
	else if (document.images) el = document.images[el];
	else return false;

	if (el) el.src = 'images/arrow_' + dir + '.gif';
}

function preloadRollovers()
{
	preload('home_atom');
	preload('home_title');

	preload('projects_atom');
	preload('projects_title');
	preload('projects_software');
	preload('projects_hardware');

	preload('services_atom');
	preload('services_title');
	preload('services_development');
	preload('services_consultancy');

	preload('profile_atom');
	preload('profile_title');
	preload('profile_investment');

	preload('arrow_up');
	preload('arrow_down');
}

function swapLogo()
{
	if (document.getElementById) el = document.getElementById('logo-image');
	else if (document.images) el = document.images['logo-image'];
	if (el) el.src = 'images/logo_animated.gif';
}

function showElement(el)
{
	if (!document.getElementById) { return false; }
	el = document.getElementById(el);
	if (el)	el.style.visibility = 'visible';
	return false;
}

function hideElement(el)
{
	if (!document.getElementById) { return false; }
	el = document.getElementById(el);
	if (el)	el.style.visibility = 'hidden';
	return false;
}
