var whichon = null;

	function pausecomp(millis)
	{
		var date = new Date();
		var curDate = null;
		
		do { curDate = new Date(); }
		while(curDate-date < millis);
	} 

	function showOne(element){
		
		/* hide whichever is open if there is one */
		if(whichon != null){
			if(whichon == "all"){
				showall();
				pausecomp(1000);
			}
			else{
				Effect.BlindUp($(whichon), {fps: 30});
			}
		}
		
		/* show the one you want to show */
		var thisq = element.getElementsByTagName("div");
		for(var j=0; j<thisq.length; j++)
		{
			if(whichon == thisq[j].id){
				Effect.BlindUp(thisq[j], {fps: 30});
				whichon = null;
			}
			else{
				Effect.BlindDown(thisq[j], {fps: 30});
				whichon = thisq[j].id;
			}
		}
	}
	
	function showall(){
		var toggle = null;
		var showthem = document.getElementById("faq").getElementsByTagName("div");
		for(var i=0; i<showthem.length; i++)
		{
			if(whichon != "all"){
				Effect.BlindDown(showthem[i]);
				toggle = 1;
			}
			else{
				Effect.BlindUp(showthem[i]);
				toggle = 0;
			}
		}
		
		if(toggle == 1){
			whichon = "all";
		}
		else{
			whichon = null;
		}
	} 
