var curtain_main, opacity = 95, interval_curtain = null, interval_fading = null, service_largephoto_main, development_largephoto_main;


window.onload = function()
{
	curtain_main = document.getElementById('curtain_largephoto_main');
	service_largephoto_main = document.getElementById('service_largephoto_main');
	development_largephoto_main = document.getElementById('development_largephoto_main');
	var content_service_main_link = document.getElementById('content_service_main_link');
	var content_development_main_link = document.getElementById('content_development_main_link');
	var t2 = new Date().getTime();
	var t = ((t2-t1)>1500) ? 0 : 1500-(t2-t1);
	
	content_service_main_link.onmouseover = function() {service_largephoto_main.style.zIndex = 3; development_largephoto_main.style.zIndex = 2;}
	content_development_main_link.onmouseover = function() {development_largephoto_main.style.zIndex = 3; service_largephoto_main.style.zIndex = 2;}	
	
	//content_service_main.onclick = function() {window.location.href = 'products.html';}
	//content_development_main.onclick = function() {window.location.href = 'development.html';}
	
	if (!interval_curtain) interval_curtain = setTimeout("initCurtainFading()", t);
}


function initCurtainFading()
{
	document.getElementById('L0100').style.zIndex = 1;
	clearTimeout(interval_curtain);
	service_largephoto_main.style.visibility = development_largephoto_main.style.visibility = 'visible';
	if (!interval_fading) interval_fading = setInterval(curtainFading, 50);
}

function curtainFading()
{
	curtain_main.style.filter = 'alpha(opacity='+opacity+')';
	curtain_main.style.opacity = (opacity/100);
	opacity -= 5;
	if (opacity == 0)
	{
		clearInterval(interval_fading);	
		curtain_main.style.zIndex = 1;
	}
}


