/*
(C) www.dhtmlgoodies.com, September 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

www.dhtmlgoodies.com
Alf Magne Kalleland

*/	
	
/* Used for login pop-ups on home page  */
	
function showHideAnswer()
{
	var numericID = this.id.replace(/[^\d]/g,'');
	var obj = document.getElementById('a' + numericID);
	
	/* Hack to handle the Game Tracker box that has two links that dim the same box. q1 and q4 map to homeBox1  */
	if(numericID==4){numericID=1};
	
	if(obj.style.display=='block'){
		obj.style.display='none';
		new Effect.Opacity('homeBox' + numericID, {duration:0.5, from:0.6, to:1.0}); 
	}else{
		obj.style.display='block';
		new Effect.Opacity('homeBox' + numericID, {duration:0.5, from:1.0, to:0.6});
	}	

}


function initShowHideContent()
{
	var divs = document.getElementsByTagName('IMG');
	for(var no=0;no<divs.length;no++){
		if(divs[no].className=='question'){
			divs[no].onclick = showHideAnswer;
		}	
	}	
	
	var divs = document.getElementsByTagName('input');
	for(var no=0;no<divs.length;no++){
		if(divs[no].className=='question'){
			divs[no].onclick = showHideAnswer;
		}	
	}
}

window.onload = initShowHideContent;
