function select2ul( obj )
{
    ul = document.createElement( 'ul' );
    ul.className = 'select2ul';
    opts = obj.options;

    // Get the selection option:
    for( i = 0; i < opts.length; i++ )
    {
        selectedOpt = 0;
        if( opts[i].selected )
        {
            selectedOpt = i;
            break; // we found the selected option, leave the loop
        }
    }

    for( i = 0; i < opts.length; i++ )
    {
        li = document.createElement( 'li' );
        txt = document.createTextNode( opts[i].text );
        li.appendChild( txt );
        if( i == selectedOpt )
            li.className = 'selected';
        ul.appendChild( li );
    }
    obj.parentNode.appendChild(ul);
}

function selects2uls()
{
    s = document.getElementsByTagName( 'select' );
    for( i = 0; i < s.length; i++ )
        select2ul( s[i] );
}


