<!--
    // -----------------------------------------------------------
    // prodTable.js
    // 
    // 
    // 
    // 
    // 
    // 
    // 
    // -----------------------------------------------------------
  
    function UpdateCss()
    {
        var bShowNotRec = false;
        var bShowDiscon = false;
        var bAltRow = true;
        
        //Get the "include legacy" flag from the checkbox
        if (document.getElementById("ptProducts_ptSingleItem_chkLegacy")!=null) {
            bShowNotRec = document.getElementById("ptProducts_ptSingleItem_chkLegacy").checked;
        }
        //Get the "include obsolete" flag from the checkbox
        if (document.getElementById("ptProducts_ptSingleItem_chkObsolete")!=null) {
            bShowDiscon = document.getElementById("ptProducts_ptSingleItem_chkObsolete").checked;
        }
        
        //Find all table row elements
        var rows = document.getElementsByTagName('tr');
        
        for (var i=0; i<rows.length; i++) {
            var tr = rows[i];
            
            if (tr.className.indexOf('pt') != -1 && tr.className.indexOf('pt-header' == -1)) {
                var bShow = true;

                if (tr.className.indexOf('pt-rec') != -1) {
                    if (bShowNotRec) {
                        tr.className='pt-rec';
                        bShow = true;
                    }
                    else {
                        tr.className='pt-rec-hide';
                        bShow = false;
                    }
                }
                else if (tr.className.indexOf('pt-dis') != -1) {
                    if (bShowDiscon) {
                        tr.className='pt-dis';
                        bShow = true;
                    }
                    else {
                        tr.className='pt-dis-hide';
                        bShow = false;
                    }
                }
                
                if (bShow) {
                    //Toggle the altrow flag
                    bAltRow = !bAltRow;
                    
                    if (bAltRow) {
                        tr.bgColor = "#DCDCDC";
                    }
                    else {
                        tr.id = "White";
                    }
                }
            }
        }
    }

//-->
