// Handles display/hide of image text
	
	function SetTextOn(imageid)
	{
		 // window.alert("In MySetTextOn and imageid is "+imageid);
		// switch off instructions
		 var instext = document.getElementById("gallery_instructions");
		 instext.style.display = "none";
		// switch on image details
		var imgtext = document.getElementById("imgtext"+imageid);
		imgtext.style.color="fcfcfc";
		imgtext.style.display = "inline";
		fadetext(imageid);
	}

	function SetTextOff(imageid)
	{
		//window.alert("In MySetTextOff and imageid is "+imageid);
		var imgtext = document.getElementById("imgtext"+imageid);
		imgtext.style.display = "none";
		imgtext.style.color="fcfcfc";
		// switch on instructions
		var instext = document.getElementById("gallery_instructions");
		instext.style.display = "inline";
	}

	function wsSetTextOn(imageid)
	{
		 // window.alert("In wsSetTextOn and imageid is "+imageid);
		// switch off instructions
		 var instext = document.getElementById("gallery_instructions");
		 instext.style.display = "none";
		// switch on image details
		var imgtext = document.getElementById("imgtext"+imageid);
		imgtext.style.color="fcfcfc";
		imgtext.style.display = "inline";
		fadetext(imageid);
		// switch on banner for artist
		var imgbanner = document.getElementById("wsbanner");
		imgbanner.src="images/watersongs/artistbanner_"+imageid+".jpg";		
	}

	function wsSetTextOff(imageid)
	{
		//window.alert("In wsSetTextOff and imageid is "+imageid);
		var imgtext = document.getElementById("imgtext"+imageid);
		imgtext.style.display = "none";
		imgtext.style.color="fcfcfc";
		// switch on instructions
		var instext = document.getElementById("gallery_instructions");
		instext.style.display = "inline";
		// replace banner for artist with ws logo
		var imgbanner = document.getElementById("wsbanner");
		imgbanner.src="images/watersongs/watersongs%20logo.jpg";		
	}

var hex=252
function fadetext(imageid)
{
	var imgtext = document.getElementById("imgtext"+imageid);
	//window.alert("hex is "+hex); 
	if(hex>2) 
		{ //Set to required final text color - must be shade of gray
			hex-=10; // increase color darkness in each call 
			imgtext.style.color="rgb("+hex+","+hex+","+hex+")";
			setTimeout("fadetext("+imageid+")",50); 
		}
	else 
		{
		//window.alert("final hex was "+hex);
		hex=252;
		}
}

