function fadeIn(info) {
	var container = document.getElementById('info' + info.toString());;
	
	document.getElementById('black_bg').style.height = sizes(1) + 'px';
	new Effect.Appear('black_bg',{from:0.0,to:0.80});
	container.style.top = 140 + scrollOffset() + 'px';
	setTimeout("revInfo(" + info + ")", 1000);
}

function fadeOut() {
	var counter;
	var activeDiv;
	
	for (counter=0;counter<6;counter++){
		activeDiv = document.getElementById('info' + (counter+1).toString());
		
		if(activeDiv.style.display == 'block')
			activeDiv.style.display = 'none';
	}
	
	new Effect.Fade('black_bg',{from:0.80,to:0.0});
}

function vid_fadeOut() {
	var counter;
	var activeDiv;
	
	for (counter=0;counter<2;counter++){
		activeDiv = document.getElementById('info' + (counter+1).toString());
		
		if(activeDiv.style.display == 'block')
			activeDiv.style.display = 'none';
	}
	
	new Effect.Fade('black_bg',{from:0.80,to:0.0});
}

function revInfo(id) {
	var infoDiv = document.getElementById('info' + id.toString());
	
	infoDiv.style.display = 'block';
}

function sizes(type){
	if( window.innerHeight && window.scrollMaxY ) // Firefox 
	{
		pageWidth = window.innerWidth + window.scrollMaxX;
		pageHeight = window.innerHeight + window.scrollMaxY;
	}
	else {
		if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac
		{
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
		}
		else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		{ pageWidth = document.body.offsetWidth + document.body.offsetLeft; 
		  pageHeight = document.body.offsetHeight + document.body.offsetTop; 
		}
	}
	
	if(type==0)
		return pageWidth;
	else
		return pageHeight;
}

function scrollOffset(){
	var x,y;
	
	if (self.pageYOffset) // all except Explorer
	{
		x = self.pageXOffset;
		y = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}	
	
	return y;
}