function ServicesMouseOver (id)
{
	document.getElementById('nav'+id).style.color = '#FFFFFF';
}



function ServicesMouseOut (id)
{
    if (id != currentSelection)
    {
        //only revert the color if this item is not currently selected
	    document.getElementById('nav'+id).style.color = '#DCDDDE';
	}
}



function ServicesClick (id)
{
    if (id == currentSelection)
    {
        //the user clicked on the same entry - do nothing
    }
    else
    {
        var strOriginalText;
        var strNewText;
        
        //"deselect" the current entry
        strOriginalText = document.getElementById('nav'+currentSelection).innerHTML;
        strNewText = strOriginalText.replace('[ ', '').replace(' ]','');
        
        document.getElementById('nav'+currentSelection).innerHTML = strNewText;
	    document.getElementById('nav'+currentSelection).style.color = '#DCDDDE';
	    document.getElementById('body'+currentSelection).className = 'hide';
	    
	    //show the new entry
	    strOriginalText = document.getElementById('nav'+id).innerHTML;
    
        document.getElementById('nav'+id).innerHTML = '[ ' + strOriginalText + ' ]';
	    document.getElementById('nav'+id).style.color = '#FFFFFF';
	    document.getElementById('body'+id).className = 'show';
	    
	    //update the current selection
	    currentSelection = id;
        
    }

}



function PortfolioTabMouseOver (tabName)
{
    if (tabName != currentTab)
    {
        document.getElementById(tabName+'-tab').style.color = '#AF292E';
    }
}

function PortfolioTabMouseOut (tabName)
{
    if (tabName != currentTab)
    {
        document.getElementById(tabName+'-tab').style.color = '#6D6E72';
    }
}


function PortfolioTabClick (tab)
{
    if (tab == currentTab)
    {
        //the user clicked on the same tab - do nothing
    }
    else
    {
        //"deselect" the currently selected portfolio item
        document.getElementById(currentTab+currentSelection).style.borderColor = '#DCDDDE';
        document.getElementById(currentTab+'-caption'+currentSelection).className = 'hide';
        
        //"deselect" the current tab
        document.getElementById(currentTab+'-tab').className = '';
        document.getElementById(currentTab+'-tab').style.color = '#6D6E72';
        document.getElementById(currentTab+'-navi').className = 'mt hide';
        
        //"select" the new tab
        document.getElementById(tab+'-tab').className = 'selected';
        document.getElementById(tab+'-tab').style.color = '#6D6E72';
        document.getElementById(tab+'-navi').className = 'mt show';
        
        //default to item number one in the new tab
        document.getElementById(tab+'1').style.borderColor = '#6D6E72';
        document.getElementById(tab+'-caption1').className = 'show';
        document.getElementById('full-size').src = 'images/' + tab + '/' + tab + '01.jpg';
        
        //update the currently selected tab
        currentTab = tab;
        currentSelection = '1';
    }
}









function PortfolioMouseOver (id)
{
    if (id != currentSelection)
    {
    document.getElementById(currentTab+id).style.borderColor = '#AF292E';
    }
}


function PortfolioMouseOut (id)
{
    if (id != currentSelection)
    {
        //only revert the color if this item is not currently selected
        document.getElementById(currentTab+id).style.borderColor = '#DCDDDE';
    }
}


function PortfolioClick (id, type, name)
{
    if (id == currentSelection)
    {
        //the user clicked on the same thumbnail - do nothing
    }
    else
    {
        //hide the old stuff
        document.getElementById(currentTab+currentSelection).style.borderColor = '#DCDDDE';
        document.getElementById(currentTab+'-caption'+currentSelection).className = 'hide';
        
        //show the new stuff     
        document.getElementById(currentTab+id).style.borderColor = '#6D6E72';
        document.getElementById('full-size').src = 'images/' + currentTab + '/' + currentTab + '0' + id + '.jpg';
        
        //update the caption
        document.getElementById(currentTab+'-caption'+id).className = 'show';
                
        //update the currentSelection
        currentSelection = id;
    }
}