﻿/*
function showroomShowMore(obj) {
    if (!obj || !obj.href || obj.href.indexOf('#') < 0) return;
    var a = obj.href.split('#')[1];
    switch (a) {
        case 'showroom-content-features':
        case 'showroom-content-specs':
        case 'showroom-content-floor':
            break;
        default:
            return;
    }
    var divs = document.getElementById(a).parentNode.childNodes;
    for (var i = 0; i < divs.length; i++) {
        if (divs[i].tagName && divs[i].tagName == 'div' && divs[i].id.indexOf('showroom-content-') === 0) {
            divs[i].style.display = 'none';
        }
    }
    document.getElementById(a).style.display = 'block';
}

function hideShowroomExtras() {
    if (document.getElementById('main-content-showroom')) {
        document.getElementById('showroom-content-features').style.display = 'none';
        document.getElementById('showroom-content-specs').style.display = 'none';
        document.getElementById('showroom-content-floor').style.display = 'none';
    }
}

function emailThisPage() {
    alert('To Do');
}
*/
/*Wire up the top-nav menu for IE6 which doesn't support :hover on non-A tags*/
function initMenu() {
    //Only wire for IE6, ignore 5 or spoofers
    if (navigator.userAgent.indexOf('MSIE 6') < 0) return;
    //Grab the top nav div
    var topNav = document.getElementById('top-nav');
    //Grab the first child's (UL) children (LI)
    var LIs = topNav.childNodes[0].childNodes;
    //Loop through the LI's
    for (var i = 0; i < LIs.length; i++) {
        //Append mouse over/out functions that add/remove the class "over"
        LIs[i].onmouseover = function() { this.className += ' over'; };
        LIs[i].onmouseout = function() { this.className = this.className.replace(/ over/, ''); };
    }
}

/*All load code should go here*/
/*
function loadFunctions() {
    alert('hi');
    initMenu();
    //hideShowroomExtras();
}
if (window.attachEvent) {
    alert('yep');
    window.addEvent('onload', loadFunctions);
} else {
    alert('nope');
}
*/
