
function Void() {
}

function CallOverLib ( DivId ) {
    var DivObj = document.getElementById( DivId ) ;
    var coors = findPos(DivObj);
    var objLeft = coors[0] + 0 ; /** shift the info right **/
    var objTop  = coors[1] + 175 ; /** shift the info down to clear the image **/
    var contents = '\''+document.getElementById( DivId+'_Details').innerHTML+'\'' ;
    overlib( document.getElementById( DivId+'_Details').innerHTML , FIXX , objLeft , FIXY , objTop , WIDTH , 148 , STICKY , FULLHTML );
    // TIMEOUT, 10000 , MOUSEOFF
}


function UpdateSelectionMenu(txt) {
    nd(); // clear any popup windows that might be out there
    var Output = '' ;
    // If anything was passed to this script to display - just do so
    if ( txt ) {  
        document.getElementById('top_selector_menu').innerHTML = txt ;
    } else {
        // document.getElementById('top_selector_menu').innerHTML = 'build a string' ;
        // compareModels('NoModelInfo');
        var List = '0,0' ;
        var stored =  YAHOO.util.Cookie.getSubs( "wp_shower_selector" ) ;
        if ( stored.CompareModels ){
            List = stored.CompareModels ;
        } 
        var Models = document.getElementsByTagName('table') ;
        var ShModelCount   = 0
        var ShCompareCount = 0
        var ShComparePage  = 0
        for ( i = 0 ; i < Models.length ; i++ ) {
            if ( Models[i].className.search( /ModelName/ ) >= 0 ) {
                ShModelCount++ ;
                // how many models are currently displayd
            }
            if ( Models[i].className.search( /ModelNameCompare/ ) >= 0 ) {
                ShCompareCount++ ;
                // how many of those models are checked for future comparison
            }
            if ( Models[i].className.search( /ShowerComparisons/ ) >= 0 ) {
                ShComparePage++ ;
                // Is this the comparison page 
            }
            
        }
        var HistList = List.split(',') ;
        var Checked = 0 ;
        if ( HistList.length ) {
            for ( l = 0 ; l < HistList.length ; l++ ) {
                if ( document.getElementById('Compare_'+HistList[l]) && 
                     document.getElementById('Compare_'+HistList[l]).checked ) {
                    Checked ++ ;
                }
            }
        }
        if ( ShCompareCount == 0 && ShComparePage == 0 ) { 
            if ( ShModelCount == 0 ) { 

                Output += '<div class="navFeedback" >' ;
                Output += 'No Shower Heads match the current selection criteria.  '+
                                'Please review the current state of your selections.'  ;
                Output += '</div>' ;

            } else if ( ShModelCount == 1 ) {

                Output += '<div class="navFeedback" >' ;
                Output += 'Only one shower head matches the current selection criteria.' ;
                Output += '</div>' ;

                var ModelsInfo = document.getElementsByTagName('span') ;
                var InputButton = document.getElementsByTagName('input') ;
                for ( s = 0 ; s < InputButton.length ; s++ ) {
                 //      alert ( document.getElementById( InputButton[s] ).id );
                }
                var Button = '' ;
                for ( s = 0 ; s < ModelsInfo.length ; s++ ) {
                    if ( ModelsInfo[s].id.search( /_Details/ ) >= 0 ) {
                        Model = ModelsInfo[s].id.replace( /_Details/ , "" ) ;
                        var inHTML = document.getElementById( ModelsInfo[s].id ).innerHTML ;
                        // pull the button details out of the pop-up information and strip out the ID
                        // Button = inHTML.substring( inHTML.search( /<input / ) ).replace( /id="ViewDetails"/ , " " ) ;
                        Into =  inHTML.search( /<form/i ) ;
                        Button = inHTML.substring( Into ) ;
                        Button = Button.replace( /method/ , 'name="GetDetails" method' ) ;
                        Button = Button.replace( /id="ViewDetails"/ , ' ' ) ;
                    }
                }

                Output += '<div class="navButton" ><!--<a ' ;
                Output += 'onmouseover="return overlib(\'Go to the detail product page for Model '+Model+'.\', OFFSETX , 15 , FULLHTML );" ' ;
                Output += 'onmouseout="return nd();"' ;
                Output += 'href="javascript:Void();">'+Button+'</a>--></div>' ;

            } else if (( ShModelCount == 2 || ShModelCount == 3 ) && Checked == 0 ) {

                Output += '<div class="navFeedback" >' ;
                Output += ShModelCount+' shower heads match the current selection criteria.   ' ;
                Output += '</div>' ;

                var ModelsInfo = document.getElementsByTagName('span') ;
                var List = '' ;
                for ( s = 0 ; s < ModelsInfo.length ; s++ ) {
                    if ( ModelsInfo[s].id.search( /_Details/ ) >= 0 ) {
                        var inHTML = document.getElementById( ModelsInfo[s].id ).innerHTML ;
                        var ModelNo = ModelsInfo[s].id.replace( /_Details/ , "" );
                        List += ModelNo+',' ;
                    }
                }
                var List = List.replace( /,$/ , "" ) ;
                var ListOut = List.replace( /,/g , ", " ) ;

                Output += '<div class="navButton" ><a ' ;
                Output += 'onmouseover="return overlib(\'Compare the Models; '+ListOut+'.\', OFFSETX , 15 , FULLHTML );" ' ;
                Output += 'onmouseout="return nd();"' ;
                Output += 'href="javascript:Void();"><input type="button" value="Select and Compare these Shower Heads" ';
                Output += 'onClick="domUpdate(\''+List+'\');" /></a></div>' ;

            } else {

                Output += '<div class="navFeedback" >' ;
                Output += ShModelCount+' shower heads match the current selection criteria.   ' ;
                Output += '</div>' ;

                if ( Checked < 2 ) {
                    Output += '<div class="navButton" ><a ' ;
                    Output += 'onmouseover="return overlib(\'Select additional shower head models using the check box above each models picture.\', OFFSETX , 15 , FULLHTML );" ' ;
                    Output += 'onmouseout="return nd();"' ;
                    Output += 'href="javascript:Void();"><input type="button" value="Select Shower Heads to Compare" ';
                    Output += 'onClick="alert(\'Select additional shower head models to compare using the check box above that models picture.\');" />' ;
                    Output += '</a></div>' ;
                } else if ( Checked > 1 ) {
                    var ListOut = List.replace( /,/g , ", " )
                    Output += '<div class="navButton" ><a ' ;
                    Output += 'onmouseover="return overlib(\'Click to show a side by side comparison of the following shower heads ; '+ListOut+'\', ';
                    Output += ' OFFSETX , 15 , FULLHTML );" onmouseout="return nd();"' ;
                    Output += 'href="javascript:Void();"><input type="button" value="Compare Selected Shower Heads" ';
                    Output += 'onClick="compareSelectedModels(\''+List+'\',\'Yes\');" />' ;
                    Output += '</a></div>' ;
                }
            } 
        } else {
            Output += '<div class="navButton" ><a ' ;
            Output += 'href="javascript:Void();"><input type="button" value="Return to prior Shower Head List" ';
            Output += 'onClick="UpdateDisplay();" />' ;
            Output += '</a></div>' ;
        }

        document.getElementById('top_selector_menu').innerHTML =   Output ;
        if ( ShModelCount > 0 ) {
            document.getElementById('SHOW_All').innerHTML = 'Show All '+ShModelCount+' ' ;
        }
    }
}

function domUpdate(List) {
    var ModelList = Array() ;
    ModelList = List.split( ',' ) ;
    for ( l = 0 ; l < ModelList.length ; l++ ) {
        document.getElementById( 'Compare_'+ModelList[l] ).checked = true ;
    }
    YAHOO.util.Cookie.setSub( "wp_shower_selector", "CompareModels" , List ) ;
    compareSelectedModels( List , 'Yes' );
}

function compareSelectedModels(List,txt) {

    cookieUpdate();

    var AttrList = 'CompareModels='+escape(List) ;
    if ( txt ) {
        AttrList += '&FromList='+txt ;
    }

    myurl = '/shower-head-selector/selector.cgi';
    http.open("POST", myurl, true);

    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", AttrList.length);
    http.setRequestHeader("Connection", "close");

    http.onreadystatechange = useHttpResponse;
    http.send(AttrList);
    
    var ListOut = List.replace( /,/g , "</li><li>" )
    var Output = '<table><tr>' ;
    Output += '<td align="right" class="instructions"><input type="button" value="Return to Model List" ' ;
    Output += 'onClick="UpdateDisplay(); " >' ;
    Output += '</td></tr></table>' ;
  //  UpdateSelectionMenu();
    // document.getElementById( 'top_selector_menu' ).innerHTML = Output ;
}

function compareModels( ModelID ) {
    // alert ( ModelID );
    var INP = document.getElementsByTagName('input') ;
    var TotChecked = 0 ; 
    var Error = '' ;
    var ModelList = Array() ;
    var firstINP = '' ;
    for ( i = 0 ; i < INP.length ; i++ ) {
        if ( INP[i].id.substr(0,8) == 'Compare_' ) {
            if ( document.getElementById( INP[i].id ).checked ) {
                TotChecked ++ ;
                var Model = INP[i].id.substr(8) ;
                if ( firstINP.length == 0 ) {
                    // trap the first item in the list for later use - if need be
                    firstINP = INP[i].id ;
                }
                    // Update / Validate the DOM
                if ( TotChecked > 3 ) {
                    // to many items in the list - remove one item
                    // remove the last item in the list unless that
                    // item was the most recent one entered
                    // if so - remove the first item in the list
                    if ( ModelID != INP[i].id ) {
                        document.getElementById( INP[i].id ).checked = false ;
                    } else {
                        document.getElementById( firstINP ).checked = false ;
                        Model = firstINP.substr(8) ;
                    }
                    Error = 'No more than 3 models can be compared at any one time.' 
                    Error += "\n"+Model+' has been removed from the list.';
                }
            }
        }
    }
    // read from the DOM to get the current settings
    for ( j = 0 ; j < INP.length ; j++ ) {
        if ( INP[j].id.substr(0,8) == 'Compare_' ) {
            if ( document.getElementById( INP[j].id ).checked ) {
                    var Model = INP[j].id.substr(8) ;
                    // Output += '<li>'+ Model +'</li>';
                    ModelList.push( Model ) ;
            }
        }
    }
    YAHOO.util.Cookie.setSub( "wp_shower_selector", "CompareModels" , ModelList ) ;
    UpdateSelectionMenu();

    if ( Error.length > 0 ) {
        alert ( Error );
    }
    
    if ( TotChecked == 0 ) {
        if ( ModelID.substr(0,8) == 'Compare_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", "CompareModels" , "" ) ;
        }
    }
}

function UpdateDisplay(one,two) {

    nd();

    var LIS = document.getElementsByTagName('a') ;
    var AttrList = '' ;

    if ( one && two ) {

        var CatTotal = Array() ; var CatOn = Array() ; 
        var FinTotal = Array() ; var FinOn = Array() ; 
        var StyTotal = Array() ; var StyOn = Array() ; 
        var FloTotal = Array() ; var FloOn = Array() ; 
        var SalTotal = Array() ; var SalOn = Array() ; 
        var NewTotal = Array() ; var NewOn = Array() ; 
        var DolTotal = Array() ; var DolOn = Array() ; 
        var ShoTotal = Array() ; var ShoOn = Array() ; 

        // toggle the one selected row
        if ( document.getElementById( one+two ).className == 'menu_off' ) {
            document.getElementById( one+two ).className = 'menu_on' ;
        } else {
            document.getElementById( one+two ).className = 'menu_off' ;
        }

        // record the current state of the filters
        for ( i = 0 ; i < LIS.length ; i++ ) {
            if ( LIS[i].id.substr(0,4) == 'CAT_' ) {
                if (!(  LIS[i].id == 'CAT_All' )) {
                    CatTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                        CatOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,4) == 'FIN_' ) {
                if (!(  LIS[i].id == 'FIN_All' )) {
                    FinTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         FinOn.push(LIS[i].id) ;
                    }
                }
            }
            if ( LIS[i].id.substr(0,4) == 'STY_' ) {
                if (!(  LIS[i].id == 'STY_All' )) {
                    StyTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         StyOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,4) == 'DOL_' ) {
                if (!(  LIS[i].id == 'DOL_All' )) {
                    DolTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         DolOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,4) == 'FLO_' ) {
                if (!(  LIS[i].id == 'FLO_All' )) {
                    FloTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         FloOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,4) == 'SAL_' ) {
                if (!(  LIS[i].id == 'SAL_All' )) {
                    SalTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         SalOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,4) == 'NEW_' ) {
                if (!(  LIS[i].id == 'NEW_All' )) {
                    NewTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'menu_on' ) {
                         NewOn.push(LIS[i].id) ;
                    }
                }
            } 
            if ( LIS[i].id.substr(0,5) == 'SHOW_' ) {
                if (!(  LIS[i].id == 'SHOW_All' )) {
                    ShoTotal.push(LIS[i].id) ;
                    if ( document.getElementById( LIS[i].id ).className == 'sort_on' ) {
                         ShoOn.push(LIS[i].id) ;
                    }
                }
            } 
        }

        if ( one == 'CAT_' ) {
            if ( two == 'All' || CatTotal.length == CatOn.length || CatOn.length == 0 ) {
                document.getElementById( 'CAT_All' ).className = 'menu_on' ;
                for ( var CatCount = 0 ; CatCount < CatTotal.length ; CatCount++ ) {
                    document.getElementById( CatTotal[CatCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'CAT_All' ).className = 'menu_off' ;
            }
        }

       if ( one == 'FIN_' ) {
            if ( two == 'All' || FinTotal.length == FinOn.length || FinOn.length == 0 ) {
                document.getElementById( 'FIN_All' ).className = 'menu_on' ;
                for ( var FinCount = 0 ; FinCount < FinTotal.length ; FinCount++ ) {
                    document.getElementById( FinTotal[FinCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'FIN_All' ).className = 'menu_off' ;
            }
        }
        
        if ( one == 'STY_' ) {
            if ( two == 'All' || StyTotal.length == StyOn.length || StyOn.length == 0 ) {
                document.getElementById( 'STY_All' ).className = 'menu_on' ;
                for ( var StyCount = 0 ; StyCount < StyTotal.length ; StyCount++ ) {
                    document.getElementById( StyTotal[StyCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'STY_All' ).className = 'menu_off' ;
            }
        }
        
        if ( one == 'DOL_' ) {
            if ( two == 'All' || DolTotal.length == DolOn.length || DolOn.length == 0 ) {
                document.getElementById( 'DOL_All' ).className = 'menu_on' ;
                for ( var DolCount = 0 ; DolCount < DolTotal.length ; DolCount++ ) {
                    document.getElementById( DolTotal[DolCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'DOL_All' ).className = 'menu_off' ;
            }
        }
        
        if ( one == 'FLO_' ) {
            if ( two == 'All' || FloTotal.length == FloOn.length || FloOn.length == 0 ) {
                document.getElementById( 'FLO_All' ).className = 'menu_on' ;
                for ( var FloCount = 0 ; FloCount < FloTotal.length ; FloCount++ ) {
                    document.getElementById( FloTotal[FloCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'FLO_All' ).className = 'menu_off' ;
            }
        }

        if ( one == 'SAL_' ) {
            if ( two == 'All' || SalTotal.length == SalOn.length || SalOn.length == 0 ) {
                document.getElementById( 'SAL_All' ).className = 'menu_on' ;
                for ( var SalCount = 0 ; SalCount < SalTotal.length ; SalCount++ ) {
                    document.getElementById( SalTotal[SalCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'SAL_All' ).className = 'menu_off' ;
            }
        }

        if ( one == 'NEW_' ) {
            if ( two == 'All' || NewTotal.length == NewOn.length || NewOn.length == 0 ) {
                document.getElementById( 'NEW_All' ).className = 'menu_on' ;
                for ( var NewCount = 0 ; NewCount < NewTotal.length ; NewCount++ ) {
                    document.getElementById( NewTotal[NewCount] ).className = 'menu_off' ;
                }
            } else {
                document.getElementById( 'NEW_All' ).className = 'menu_off' ;
            }
        }

        if ( one == 'SHOW_' ) {
            for ( i = 0 ; i < LIS.length ; i++ ) {
                if ( LIS[i].id.substr(0,5) == 'SHOW_' ) {
                    document.getElementById( LIS[i].id ).className = 'sort_off' ;
                }
                document.getElementById( one+two ).className = 'sort_on' ;
            } 
        } 

        if ( one == 'SORT_' ) {
            for ( i = 0 ; i < LIS.length ; i++ ) {
                if ( LIS[i].id.substr(0,5) == 'SORT_' ) {
                    document.getElementById( LIS[i].id ).className = 'sort_off' ;
                }
                document.getElementById( one+two ).className = 'sort_on' ;
            } 
        } 
    }

    for ( i = 0 ; i < LIS.length ; i++ ) {
        if ( LIS[i].id.substr(0,4) == 'CAT_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        } 
        if ( LIS[i].id.substr(0,4) == 'FIN_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,4) == 'STY_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,4) == 'DOL_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,4) == 'FLO_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,4) == 'SAL_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,4) == 'NEW_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,5) == 'SHOW_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
        }
        if ( LIS[i].id.substr(0,5) == 'SORT_' ) {
            AttrList += LIS[i].id +'='+document.getElementById( LIS[i].id ).className +'&' ;
            if ( document.getElementById( LIS[i].id ).className == 'sort_on' ) {
                AttrList += 'SortBy='+ LIS[i].id+'&' ;
            }
        }
    }
    
    cookieUpdate();

    myurl = '/shower-head-selector/selector.cgi';
    http.open("POST", myurl, true);

    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", AttrList.length);
    http.setRequestHeader("Connection", "close");

    http.onreadystatechange = useHttpResponse;
    http.send(AttrList);
    // empty the menu area 
    // document.getElementById( 'top_selector_menu' ).innerHTML = '' ;
    // UpdateSelectionMenu();

}

var http = getXMLHTTPRequest();

function getXMLHTTPRequest() {
    try {
        req = new XMLHttpRequest();
    } catch(err1) {
        try {
            req = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (err2) {
            try {
                req = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (err3) {
                alert("Your browser does not support AJAX!");
                req = false;
            }
        }
    }
    return req;
}


function useHttpResponse() {
    document.getElementById('maincopy-selector').innerHTML = 'Please reselect your last item.' ;
    if (http.readyState == 4) {
        if(http.status == 200) {

            if ( http.responseText == null ) {
                document.getElementById('maincopy-selector').innerHTML = 'server error - please reload the page.'
            } else {
                document.getElementById('maincopy-selector').innerHTML = http.responseText ;
            }
//                var INP = document.getElementsByTagName('input') ;
//                for ( i = 0 ; i < INP.length ; i++ ) {
//                    if ( INP[i].id.substr(0,6) == 'price_' ) {
//                        YAHOO.util.Cookie.setSub( "wp_shower_selector", INP[i].id , document.getElementById( INP[i].id ).value ) ;
//                    }
//                }

            UpdateSelectionMenu();
        }
    } else {
        document.getElementById('maincopy-selector').innerHTML = '<img src="/images/wait20trans.gif">';
    }
}

function cookieUpdate() {

    // update/create the cookie for later retrieval as required

    var GetID =  YAHOO.util.Cookie.getSubs( "wp_shower_selector" ) ;
    if (!( GetID )) {
        var stamp = new Date() ;
        var S_ID = stamp.getTime() + ':' + RemoteIP ;
        YAHOO.util.Cookie.setSub( "wp_shower_selector", "SessionID" , S_ID ) ;
    }
    
    var LIS = document.getElementsByTagName('a') ;
    for ( i = 0 ; i < LIS.length ; i++ ) {
        if ( LIS[i].id.substr(0,4) == 'CAT_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        } 
        if ( LIS[i].id.substr(0,4) == 'FIN_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,4) == 'STY_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,4) == 'DOL_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,4) == 'FLO_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,4) == 'SAL_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,4) == 'NEW_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,5) == 'SHOW_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
        if ( LIS[i].id.substr(0,5) == 'SORT_' ) {
            YAHOO.util.Cookie.setSub( "wp_shower_selector", LIS[i].id , document.getElementById( LIS[i].id ).className ) ;
        }
    }

}