//1. Scriptaculous Subnavi
function splash(x)
{
	for(i=1; i<=5; i++) 
	{
		subnavi = "subnavi" + i;		
		if(i == x)
		{
			if (document.getElementById(subnavi).style.display == "none") 
			{
				new Effect.BlindDown(subnavi, {duration: 1, scaleFrom:0, scaleTo:100});
				document.getElementById('bigpicture').style.background = "url(http://www.ambit.at/media/design/bigpictures/"+x+".jpg) left top no-repeat";
			}
			else 
			{
				new Effect.BlindUp(subnavi, {duration: 1, scaleFrom:100, scaleTo:0});
			}
		}
		else 
		{
			new Effect.BlindUp(subnavi, {duration: 1, scaleFrom:100, scaleTo:0});
		}
	}
}

//2. Image-Preloader
function imagepreload()
{
    document.preload = new Array();
    if(document.images)
    {
        for(var i = 0; i < imagepreload.arguments.length; i++)
        {
            document.preload[i] = new Image();
            document.preload[i].src = imagepreload.arguments[i];
        }
    }
}

//IMG-SWAPPER
function change(oldpic,newpic)
{
	document.getElementById(oldpic).src = newpic;
}
