﻿function searchProducts()
{
    searchFormObj = document.forms[0] ;
    if (searchFormObj.searchTerm.value == "") {alert("Please enter a search term.");}
    else {searchFormObj.submit();}
}

var activeID = 0;
function toggleSubChildren(wotID)
{
    if (((activeID!=0)&&(activeID!=wotID))||(activeID==wotID))
    {
        containerObj = document.getElementById("subChildContainer_" + activeID) ;
        expanderObj  = document.getElementById("subChildExpander_" + activeID) ;
        containerObj.style.display = "none" ;
        expanderObj.innerHTML = "+" ;
    }
    
    if (activeID!=wotID)
    {
        containerObj = document.getElementById("subChildContainer_" + wotID) ;
        expanderObj  = document.getElementById("subChildExpander_" + wotID) ;
        containerObj.style.display = "block" ;
        expanderObj.innerHTML = "-" ;
        activeID = wotID ;
    }
    else {activeID = 0}
}