
var activeDiv="";

function ChangeImage(path)
{	var ImgPath;
	ImgPath = '../Images/Menu/lbl' + path + '.gif';
	window.event.srcElement.src = ImgPath;
}
function SwapImage(form,path)
{
	
	var ImgPath;
	ImgPath = 'Images/' + path;
	tdBack.background = ImgPath;
}
function CustomImage(form,path,msg,MID)
{
	
	var ImgPath;
	var msgBreak;
	var msgMID;
	
	ImgPath = 'Images/' + path;
	form.imgMain.src = ImgPath;
	msgBreak = msg;
	msgMID = 'Custom ID: ' + MID;

	document.all.lblCustomDesc.innerText=msgBreak;
	document.all.lblMID.innerText=msgMID;
}
    
//Open or closes Child Options
function OpenCloseDiv(divName)
{		    
		var divObj = document.getElementById(divName);
        var arrowName = divName + '_arrow';
		var objArrow = document.getElementById(arrowName);
          try{
		if (divObj.getAttribute('isOpen')== 'true')
		{
			HideDiv(divName);			
			divObj.setAttribute('isOpen','false');			
			objArrow.src = "Images/Common/bluearrowup.gif";

		}
		else
		{
			SimpleShow(divName);
            divObj.setAttribute('isOpen','true');
			objArrow.src = "Images/Common/bluearrowdown.gif";

		}	
          }
          catch(e){}
}

function SimpleShow(divtoshow)
{
    try{
        document.getElementById(divtoshow).style.display = "";
       }
    catch(e){}
}
function HideDiv(divtohide)
{
    try{document.getElementById(divtohide).style.display = "none";}
    catch(e){}
}
function ShowDiv(divtoshow)
{
	try{
        var classchange = 'link'+activeDiv;
        ChangeDivClass(classchange,'menuItemOff');
	}
	catch(e){}
    try{
        document.getElementById(divtoshow).style.display = "";
        activeDiv=divtoshow;}
    catch(e){}
}
function ChangeDivClass(sDivName,sClassName)
{
    try{document.getElementById(sDivName).className=sClassName;}catch(e){}
}
function HideAll()
{
	try{
        var classchange = 'link'+activeDiv;
        ChangeDivClass(classchange,'menuItemOff');
	}
	catch(e){}
    HideDiv(activeDiv);
}
function CheckBeforeChange(divtocheck)
{
	if (activeDiv == divtocheck)
	{return false;}
	else
	{return true;}
}
