var StaticImages = new Array();
var StaticImage;

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);
	}
}

function doPopUp(popUPurl, width, height)
{	
	var winOptions = "titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height=" + height + ",width=" + width;
    window.open(popUPurl, "CED", winOptions);	//,height=360,width=370');
}

function SetDivText(divID, sHTML)
{
	var dynamicdiv = document.getElementById(divID);
	dynamicdiv.firstChild.nodeValue = sHTML;
}

function ShowLayer(strLayerID, bShowFlag)
{
	if(bShowFlag==1)
		document.getElementById(strLayerID).style.display="block";
	else
		document.getElementById(strLayerID).style.display="none";
}



function GetSelectValue(strSelectId)
{
    //alert('hello');
    return document.getElementById(strSelectId).value;
}