function modalPopup_Show(overlayId, contentId)
{
    styleThis(overlayId, "display", "block");
    
    if(document.getElementById(overlayId).style.display == "block")
    {
        hideFlash();
        
        styleThis(overlayId, "display", "block");
        styleThis(contentId, "display", "block");
    }
}


function hideFlash()
{
	var flashObjects = document.getElementsByTagName("object");
	for (var i = 0; i < flashObjects.length; i++) 
	{
		flashObjects[i].style.visibility = "hidden";
	}

	var flashEmbeds = document.getElementsByTagName("embed");
	for (var i = 0; i < flashEmbeds.length; i++) 
	{
		flashEmbeds[i].style.visibility = "hidden";
	}
}



function styleThis(Obj, Property, Value)
{
    document.getElementById(Obj).style[Property] = Value;
}


function ToggleTab(panelArray, tabArray, selectedPanel, selectedTab)
{
    for (var index=0; index < tabArray.length; index++)
    {
        styleThis(panelArray[index], "display", "none");        
        styleThis(tabArray[index], "backgroundColor", "#d0d0d0");        
    }
    
    styleThis(selectedPanel, "display", "block");
    styleThis(selectedTab, "backgroundColor", "#ffffff");
}
