window.onload = function main()
{
	startIt();

document.getElementById('bookmark').onclick = function bookmark()
	{
		
		var title = 'ANB Construction';
		var url = 'http://anewbeginningconstruction.com';
		if(window.sidebar)
		{
		window.sidebar.addPanel(title, url, "");
		} 
		else if(document.all)
		{
		window.external.AddFavorite(url, title);
		} 
		else if(window.opera && window.print)
		{
		alert('Press ctrl+D to bookmark (Command+D for macs) after you 		click Ok');
		} 
		else if(window.chrome)
		{
		alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
		}
		else if (navigator.vendor != null && navigator.vendor.match(/Apple Computer, Inc./) && navigator.userAgent.indexOf('Safari') != -1)

{

alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');

}
}
}

function remove(el){
	document.getElementById(el).style.display = "none";	
}

function add(el){
	document.getElementById(e).style.display = "block";	
}

function fadeOut(id)


{
document.getElementById("animate4").style.display="none";
	document.getElementById("animate3").style.display="none";
	document.getElementById("animate2").style.display="none";
	document.getElementById("animate1").style.display="none";



	var start = (new Date).getTime();



	var duration = 3000; 



	var finish = start + duration;



	var interval = setInterval(function()



	{



		var time = (new Date).getTime();



		var pos = time>finish ? 1 : (time - start)/duration;



		var easing = (-Math.cos(pos*Math.PI)/2) + 0.5; 



		document.getElementById(id).style.opacity = 1+(-1*easing); 



		document.getElementById(id).style.filter = 'alpha(opacity='+(100-100*easing)+')';



		if(time>finish)



		{ 


document.getElementById("animate5").style.display="none";
	
			startIt();



			clearInterval(interval);



		}



	},10);



}


function startIt(){
	document.getElementById("animate1").style.display="block";	
	document.getElementById("animate1").style.opacity=0;document.getElementById("animate1").style.filter="alpha(opacity=0)";var a=(new Date).getTime();var b=2e3;var c=a+b;var d=setInterval(function(){var e=(new Date).getTime();var f=e>c?1:(e-a)/b;var g=-Math.cos(f*Math.PI)/2+.5;document.getElementById("animate1").style.opacity=1*g;document.getElementById("animate1").style.filter="alpha(opacity="+100*g+")";if(e>c){clearInterval(d);
	start2();
	}},10)}
	
	function start2(){
	document.getElementById("animate2").style.display="block";	
	document.getElementById("animate2").style.opacity=0;document.getElementById("animate2").style.filter="alpha(opacity=0)";var a=(new Date).getTime();var b=2e3;var c=a+b;var d=setInterval(function(){var e=(new Date).getTime();var f=e>c?1:(e-a)/b;var g=-Math.cos(f*Math.PI)/2+.5;document.getElementById("animate2").style.opacity=1*g;document.getElementById("animate2").style.filter="alpha(opacity="+100*g+")";if(e>c){clearInterval(d);
	start3();
	}},10)}
	
	function start3(){
	document.getElementById("animate3").style.display="block";	
	document.getElementById("animate3").style.opacity=0;document.getElementById("animate3").style.filter="alpha(opacity=0)";var a=(new Date).getTime();var b=2e3;var c=a+b;var d=setInterval(function(){var e=(new Date).getTime();var f=e>c?1:(e-a)/b;var g=-Math.cos(f*Math.PI)/2+.5;document.getElementById("animate3").style.opacity=1*g;document.getElementById("animate3").style.filter="alpha(opacity="+100*g+")";if(e>c){clearInterval(d);
	start4();
	}},10)}
	
		function start4(){
	document.getElementById("animate4").style.display="block";	
	document.getElementById("animate4").style.opacity=0;document.getElementById("animate4").style.filter="alpha(opacity=0)";var a=(new Date).getTime();var b=2e3;var c=a+b;var d=setInterval(function(){var e=(new Date).getTime();var f=e>c?1:(e-a)/b;var g=-Math.cos(f*Math.PI)/2+.5;document.getElementById("animate4").style.opacity=1*g;document.getElementById("animate4").style.filter="alpha(opacity="+100*g+")";if(e>c){clearInterval(d);
	start5();
	}},10)}
	
	function start5(){
	document.getElementById("animate5").style.display="block";	
	document.getElementById("animate5").style.opacity=0;document.getElementById("animate5").style.filter="alpha(opacity=0)";var a=(new Date).getTime();var b=2e3;var c=a+b;var d=setInterval(function(){var e=(new Date).getTime();var f=e>c?1:(e-a)/b;var g=-Math.cos(f*Math.PI)/2+.5;document.getElementById("animate5").style.opacity=1*g;document.getElementById("animate5").style.filter="alpha(opacity="+100*g+")";if(e>c){clearInterval(d);
	fadeOut("animate5");
	}},10)}


