﻿
/*
* Support product listing
*/
function showProducts(current) {

    //hide all selected
    for (i = 0; i < current.parentNode.parentNode.childNodes.length; i++) {
        mynode = current.parentNode.parentNode.childNodes[i];
        if (mynode.tagName == 'LI') {
            mynode.childNodes[0].className = "";
        }
    }
    //select the node and show content
    current.className = "selected";
    var c = current.parentNode.getElementsByTagName("div")[0];
    var prods = document.getElementById("supportProducts");
    prods.innerHTML = c.innerHTML;
		
}

/*
* Support Tab Toggle
*/
function tabSupportToggle(show, color) {
    var tabs = $$("div.tabContent");
    //hide all tabs
    for (x = 0; x < tabs.length; x++) {
        tabs[x].style.display = "none";
        var section = tabs[x].id.substring(7);
        var tabHide = document.getElementById("img" + section);
        tabHide.src = "http://copiers.toshiba.com/media/css/images/support/support" + section + ".gif";
    }

    //show the tab we want, reset image
    var tabShow = document.getElementById("img" + show);
    tabShow.src = "http://copiers.toshiba.com/media/css/images/support/support" + show + "_" + color + ".gif";
    var contentShow = document.getElementById("content" + show);
    contentShow.style.display = "block";

}

/*
/* Support Show Note
*/
function showSupportNote(note) {
    el = document.getElementById(note);
    el.style.display = (el.style.display == "block" ? 'none' : 'block');
}

/*
/* Support Show All Notes
*/
function showSupportNotes(el) {
    var notes = $(el).select("div.supportNote");
	var curAnchor;
    for (x = 0; x < notes.length; x++) {
        notes[x].style.display = 'block';
		curAnchor = $($(notes[x]).parentNode).childElements()[0];
		curAnchor.innerHTML = "-";
    }
}

/*
/* Support Hide All Notes
*/
function HideSupportNotes(el) {
    var notes = $(el).select("div.supportNote");
    for (x = 0; x < notes.length; x++) {
        notes[x].style.display = 'none';
		curAnchor = $($(notes[x]).parentNode).childElements()[0];
		curAnchor.innerHTML = "+";
    }
}

/* 
/* Reset the Plus to a Minus and vice versa
*/
function resetPlus(el) {
	if (el.innerHTML == "+") {
		el.innerHTML = "-";	
	} else {
		el.innerHTML = "+";
	}
}