function cover(anim){
	var flashvars = {}
	var params = {
		bgcolor: "#272727",
		allowfullscreen: "true",
		wmode: "transparent"
	}
	var attributes = {}
	var flashDiv="";
	var coverId=document.getElementById('cover');//Div id of flash on the overlay
	var flashId=document.getElementById('flashcontent')//Div id of main flash animation

	if(coverId.style.display=="none"){ 
	//coverId.style.display = "block";
	Effect.Appear('cover');

	flashId.style.display="none";
		
		 coverId.innerHTML = '<div id="close" ><a href="#" onclick="cover(); return false;"><img src="rhino/skins/JolleyPhotography/scripts/cover/btn_close.png" width="19" height="19" border="0"/></a></div><div id="newFlash"></div><div id="coverAnim"></div>';
        swfobject.embedSWF(anim, "coverAnim", "800", "540", "9.0.0", false, flashvars, params, attributes); 
	}else {
	    flashId.style.display="block";
		Effect.Fade('cover');
	  //coverId.style.display = "none";
	}
}



<!--End Fade Gallery-->
