function logoCentering()
{

    var elLogo = document.getElementById("logo");
    for ( i = 0; i < elLogo.childNodes.length; i++)
    {
      if ( elLogo.childNodes[i].className == "image" )
      {
        var elAnchor = elLogo.childNodes[i];
        for ( j = 0; j < elAnchor.childNodes.length; j++)
        {
            if ( elAnchor.childNodes[j].tagName == "SPAN" )
            {
                var elSpan = elAnchor.childNodes[j];
                for ( k = 0; k < elSpan.childNodes.length; k++)
                {
                    if ( elSpan.childNodes[j].tagName == "IMG" )
                    {
                            var elImg = elSpan.childNodes[j];
                            
                            if (elImg && elImg.offsetHeight == 0)
                            {
                                Event.observe(window, 'load', function (e)
                                {
                                    setTimeout(logoCentering, 1000);
                                }
                                
                                );
                                return false;
                            }
                            
                            var offsetTop = parseInt(( 50 - elImg.offsetHeight ) / 2 );
                            
                            if ( offsetTop > 0 )
                            {
                                elAnchor.style.overflow = "visible";
                                elImg.style.position = "relative";
                                elImg.style.top = offsetTop + "px";
                            }
                        }
                    }
                }
            }
        }
    }
}
function colour(el)
{
    el.className = "hover";
}

function decolour(el)
{
    el.className = "";
}

function swap_classes(el, class_1, class_2)
{    
    if (el)
    {
        if (-1 != el.className.search(class_1))
        {
            el.className = el.className.replace(class_1, class_2);
        } 
        else
        if (-1 != el.className.search(class_2))
        {
            el.className = el.className.replace(class_2, class_1);
        } 
    }
}

function swap_titles(el, title_1, title_2)
{
    if (el)
    {                
        if (-1 != el.title.search(title_1))
        {
            el.title = el.title.replace(title_1, title_2);
        } 
        else
        if (-1 != el.title.search(title_2))
        {
            el.title = el.title.replace(title_2, title_1);
        } 
    }    
}

