var StaticImages = new Array();

function SetStaticImage(ImgID, ImgSrc)				// ID of the image to keep static and the source of the static image
{	
	SwitchImage(ImgID, ImgSrc);
	StaticImages[ImgID] = 1;						// set this imageID as static
}

function UnSetStaticImage(ImgID, ImgSrc)			// ID of the image to remove from static list
{	
	StaticImages[ImgID] = 0;						
	SwitchImage(ImgID, ImgSrc);	
}

function SwitchImage(ImgID, ImgSrc)
{	
	if(ImgID=="")
		return;
	if(!StaticImages[ImgID])						// chect if the current imageID is set as static, in which case we won't change it
	{
		var oImageElement = document.getElementById(ImgID);
		if(oImageElement)
			oImageElement.setAttribute('src', ImgSrc);
	}
}