// JavaScript Document
var lastPage = "networks";
function changePage(id){
	if( id == "about"){
		
		document.getElementById("aboutContent").style.display = "block";
				
		if( lastPage == "networks"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '250px', '190px');			
			var myFx = new Fx.Tween(document.getElementById("networksContent"));
			myFx.start('height', '250px', '190px');
			var myFx = new Fx.Tween(document.getElementById("aboutContent"));
			myFx.start('height', '250px', '190px');
									
			$('networksContent').fade('out');	
			
			setTimeout("document.getElementById('networksContent').style.display = 'block';",250);
		}
		if( lastPage == "contact"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '168px', '190px');			
			var myFx = new Fx.Tween(document.getElementById("contactContent"));
			myFx.start('height', '168px', '190px');
			var myFx = new Fx.Tween(document.getElementById("aboutContent"));
			myFx.start('height', '168px', '190px');
						
			$('contactContent').fade('out');
			
			setTimeout("document.getElementById('contactContent').style.display = 'block';",250);
		}
	
		$('aboutContent').fade('in');
		
		document.getElementById("about").className = "active";
		document.getElementById("networks").className = "";
		document.getElementById("contact").className = "";
		
		lastPage = "about";
	}
	if( id == "networks"){
		
		document.getElementById("networksContent").style.display = "block";
		
		if( lastPage == "about"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '190px', '250px');			
			var myFx = new Fx.Tween(document.getElementById("aboutContent"));
			myFx.start('height', '190px', '250px');			
			var myFx = new Fx.Tween(document.getElementById("networksContent"));
			myFx.start('height', '190px', '250px');
						
			$('aboutContent').fade('out');	
			
			setTimeout("document.getElementById('aboutContent').style.display = 'block';",250);
		}
		if( lastPage == "contact"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '168px', '250px');			
			var myFx = new Fx.Tween(document.getElementById("contactContent"));
			myFx.start('height', '168px', '250px');			
			var myFx = new Fx.Tween(document.getElementById("networksContent"));
			myFx.start('height', '168px', '250px');
						
			$('contactContent').fade('out');	
			
			setTimeout("document.getElementById('contactContent').style.display = 'block';",250);
		}		
		
		$('networksContent').fade('in');
		
		document.getElementById("about").className = "";
		document.getElementById("networks").className = "active";
		document.getElementById("contact").className = "";
		
		lastPage = "networks";
	}
	if( id == "contact"){		
	
		document.getElementById("contactContent").style.display = "block";
		
		if( lastPage == "networks"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '250px', '168px');			
			var myFx = new Fx.Tween(document.getElementById("networksContent"));
			myFx.start('height', '250px', '168px');
						
			$('networksContent').fade('out');	
						
			setTimeout("document.getElementById('networksContent').style.display = 'block';",250);
		}
		if( lastPage == "about"){
			var myFx = new Fx.Tween(document.getElementById("content"));
			myFx.start('height', '190px', '168px');			
			var myFx = new Fx.Tween(document.getElementById("aboutContent"));
			myFx.start('height', '190px', '168px');
						
			$('aboutContent').fade('out');	
							
			setTimeout("document.getElementById('aboutContent').style.display = 'block';",250);
		}
		
		$('contactContent').fade('in');
		
		document.getElementById("about").className = "";
		document.getElementById("networks").className = "";
		document.getElementById("contact").className = "active";
		
		lastPage = "contact";
	}
}
function checkStep(){
	var stepCheck =  document.location.hash;
	
	if(stepCheck == "#1" || stepCheck == "" || stepCheck == undefined  || stepCheck == null ){
		gotoStep1();
	}
	if(stepCheck == "#2" ){
		gotoStep2();
	}
	if(stepCheck == "#3" ){
		gotoStep3();
	}
	
}
function checkPage(){
	var pageCheck =  document.location.hash;
	
	if(pageCheck == "#networks"){
		document.getElementById("content").style.height = "250px";
		
		document.getElementById("networksContent").style.opacity = "1";
		document.getElementById("aboutContent").style.opacity = "0";
		document.getElementById("contactContent").style.opacity = "0";
		
		document.getElementById("networksContent").style.display = "block";
		document.getElementById("aboutContent").style.display = "none";
		document.getElementById("contactContent").style.display = "none";
		
		document.getElementById("about").className = "";
		document.getElementById("networks").className = "active";
		document.getElementById("contact").className = "";
		
		lastPage = "networks";
	}
	if(pageCheck == "#about" ){
		document.getElementById("content").style.height = "190px";
		
		document.getElementById("networksContent").style.opacity = "0";
		document.getElementById("aboutContent").style.opacity = "1";
		document.getElementById("contactContent").style.opacity = "0";
		
		document.getElementById("networksContent").style.display = "none";
		document.getElementById("aboutContent").style.display = "block";
		document.getElementById("contactContent").style.display = "none";
		
		document.getElementById("about").className = "active";
		document.getElementById("networks").className = "";
		document.getElementById("contact").className = "";
		
		lastPage = "about";
	}
	if(pageCheck == "#contact" ){
		document.getElementById("content").style.height = "168px";
		
		document.getElementById("networksContent").style.opacity = "0";
		document.getElementById("aboutContent").style.opacity = "0";
		document.getElementById("contactContent").style.opacity = "1";
		
		document.getElementById("networksContent").style.display = "none";
		document.getElementById("aboutContent").style.display = "none";
		document.getElementById("contactContent").style.display = "block";
		
		document.getElementById("about").className = "";
		document.getElementById("networks").className = "";
		document.getElementById("contact").className = "active";
		
		lastPage = "contact";
	}
	
}
function gotoStep1(){
	document.getElementById("part1").style.display = "block";
	document.getElementById("part2").style.display = "none";
	document.getElementById("part3").style.display = "none";
}
function gotoStep2(){
	document.getElementById("part1").style.display = "none";
	document.getElementById("part2").style.display = "block";
	document.getElementById("part3").style.display = "none";
}
function gotoStep3(){
	document.getElementById("part1").style.display = "none";
	document.getElementById("part2").style.display = "none";
	document.getElementById("part3").style.display = "block";
}
function hoverItem(id){	
	document.getElementById("h" + id).style.color = "#096a96";
	document.getElementById("p" + id).style.color = "#096a96";	
	$('img' + id).set('tween', {duration: 'short'});
	$('img' + id).tween('marginLeft', '20px', '15px');
	
	$('bg' + id).fade('in');	
}
function leaveItem(id){
	document.getElementById("h" + id).style.color = "#4b635e";
	document.getElementById("p" + id).style.color = "#799d96";
	$('img' + id).set('tween', {duration: 'short'});
	$('img' + id).tween('marginLeft', '15px', '20px');
	
	$('bg' + id).fade('out');
}

