// JavaScript Document
function MagicFlashHider(){
	var items = Array();
	
	this.init = function(){
		var objs = this.collectionToArray(document.getElementsByTagName("OBJECT"));
		var embs = this.collectionToArray(document.getElementsByTagName("EMBED"));
		var cObj;
		var total = objs.concat(embs);
					
		for(var a = 0; a < total.length; a++){
			cObj = objs[a];
			
			if(cObj.style.visibility !== "hidden"){
				items.push(cObj);
			}
		}
			
	}
	
	this.hide = function(){
		var cObj;
		
		for(var a = 0; a < items.length; a++){
			cObj = items[a];
			cObj.style.visibility = "hidden";
			
		}
	}
	
	this.show = function(){
		for(var a = 0; a < items.length; a++){
			cObj = items[a];
			cObj.style.visibility = "visible";
			
		}
	}
	
	this.collectionToArray = function(col) {
		a = new Array();
		for (i = 0; i < col.length; i++)
			a[a.length] = col[i];
		return a;
	}
}

	

