function updateBackground(newBackgroundImage, newBackgroundColor) {
	elBackground = findObject('backgroundContainer');
	elBackground.style.backgroundImage = "url('http://glsfileserver.greenlightsolutions.nl"+wwwroot+"/images/nav/"+newBackgroundImage+"')";
	elBackground.style.backgroundColor = "#"+newBackgroundColor;
}

function changeMedialist(album, listToShow, mediaType) {
	var i=1;
	while (findObject(mediaType+'List_'+album+'_'+i)!=null) {
		findObject(mediaType+'List_'+album+'_'+i).style.display = (i==listToShow ? '' : 'none');
		findObject(mediaType+'Link_'+album+'_'+i).className = (i==listToShow ? 'inactiveMoreLink' : 'activeMoreLink');
		i++;
	}
}

function delayShowCorrectButton() {
	if (mouseInId[1] || mouseInId[2] || mouseInId[3]) {
		ct_button.style.display = 'none';
		ct_button_f2.style.display = '';
	} else {
		ct_button.style.display = '';
		ct_button_f2.style.display = 'none';
	}
}

function showCorrectButton() {
	setTimeout("delayShowCorrectButton()", '50');
}

// Show splash page, once per visit, and only if starting at the homepage
// Disabled, as the client wants this to happen every time the
// 'default page' of the site is requested.
/*
if (currentPage=='_' && !document.cookie.match(/splashShown/)) {
	window.location='Splash_page';
} else if (currentPage=='37') {
	document.cookie='splashShown=1'; // Mark 'splash page shown'
} else if (!document.cookie.match(/splashShown/)) {
	document.cookie='splashShown=0'; // Mark 'do not show splash page'
}
*/



function doScrollEffect(id, vspeed) {
	var scrollId = id;
	var scrollVspeed = vspeed;
	if (scrollId) {
		var div = document.getElementById(scrollId);
		div.scrollTop=Math.max(0, Math.min(div.scrollHeight-div.clientHeight, div.scrollTop+scrollVspeed));
	}
	return false;
}

