function Show(showId)
{
    var showElement = document.getElementById(showId);
    showElement.style.visibility='visible';   
     showElement.style.display='inline'; 
}
function Hide(hideId)
{
    var hideElement = document.getElementById(hideId);
    hideElement.style.visibility='hidden';
    hideElement.style.display='none';
}
function ShowOrHide(id)
{
    var element = document.getElementById(id);  
    if(element.style.visibility == "" || element.style.visibility == "hidden" )
    {
        Show(id);
    } 
    else
    {
        Hide(id);
    }  
}

function ShowAndHide(showId, hideId)
{
    var showElement = document.getElementById(showId);
    var hideElement = document.getElementById(hideId);
    showElement.style.visibility='visible'; 
    showElement.style.display='block';   
    hideElement.style.visibility='hidden';
    hideElement.style.display='none';
}

function ShowCommitmentTab()
{
    SetAllResultsTabImagesOff();
    Show('commitmentDiv');
    Hide('controlDiv');
    Hide('challengesDiv');
    document.getElementById('commitmentTabImage').src='/images/start123/tabBLCommitmentOn.gif';
}

function ShowChallengesTab()
{
    SetAllResultsTabImagesOff();
    Show('challengesDiv');
    Hide('controlDiv');
    Hide('commitmentDiv');
    document.getElementById('challengesTabImage').src='/images/start123/tabBLChallengesOn.gif';
}

function ShowControlTab()
{
    SetAllResultsTabImagesOff();
    Show('controlDiv');
    Hide('commitmentDiv');
    Hide('challengesDiv');
    document.getElementById('controlTabImage').src='/images/start123/tabBLControlOn.gif';
}

function SetAllResultsTabImagesOff()
{
    document.getElementById('commitmentTabImage').src='/images/start123/tabBLCommitment.gif';
    document.getElementById('controlTabImage').src='/images/start123/tabBLControl.gif';
    document.getElementById('challengesTabImage').src='/images/start123/tabBLChallenges.gif';
}

function popup(URL, width, height)
{
	if (width == null)
	{
		width = 517;
	}
	if (height == null)
	{
		height = 400;
	}
	
	popupWin = window.open(URL, 'PW', 'scrollbars,resizable=no,width=' + width + ',height=' + height + ',left=25,top=25');
}