var clients = new Image();
var clients_sel = new Image();
var contact = new Image();
var contact_sel = new Image();
var philosophy = new Image();
var philosophy_sel = new Image();
var services = new Image();
var services_sel = new Image();
var story = new Image();
var story_sel = new Image();

var sections = new Array(
        new Array ("clients", "/clients.php"), 
        new Array ("contact", "/contact.php"),
        new Array ("philosophy", "/philosophy.php"),
        new Array ("services", "/services/"),
        new Array ("story", "/carissa-bub.php"));
        
for (var i = 0; i < sections.length; i++)
{
    eval (sections[i][0] + ".src = '/images/sections/" + sections[i][0] + ".gif';");
    eval (sections[i][0] + "_sel.src = '/images/sections/" + sections[i][0] + "_sel.gif';");
}

function SwitchImg(e, img, over)
{
    //alert (location.href);
    var found = false;
    for (var i = 0; i < sections.length; i++)
    {
        if ((location.href.indexOf(sections[i][1]) >= 0) && (sections[i][0] == img))
        {
            found = true;
        }
    }
    
    if (!found)
    {
        eval ("e.src = over ? " + img + "_sel.src : " + img + ".src;");
    }
}


/*
var tl = 0;
setTimeout('SetTime()', 150);

function SetTime()
{
	var div = document.getElementById ("zone0");
	tl++;
	if (tl > 50)
	{
	}
	else
	{
		if (div != null)
		{
			div.style.backgroundPosition = tl + "px 0px";
		}
		setTimeout('SetTime()', 150);
	}
}
*/