+ nb = document.createElement( 'div' );
+ nb.setAttribute( 'class', 'list_element' );
+ vlms.appendChild( nb );
+
+ nbname = document.createElement( 'b' );
+ nbname.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) );
+ nb.appendChild( nbname );
+
+ link = document.createElement( 'input' );
+ link.setAttribute( 'type', 'button' );
+ if( elt.getAttribute( 'enabled' ) == 'yes' )
+ {
+ nb.appendChild( document.createTextNode( " enabled " ) );
+ link.setAttribute( 'onclick', 'vlm_disable("'+elt.getAttribute( 'name' ) + '");' );
+ link.setAttribute( 'value', "Disable" );
+ }
+ else
+ {
+ nb.appendChild( document.createTextNode( " disabled " ) );
+ link.setAttribute( 'onclick', 'vlm_enable("'+elt.getAttribute( 'name' ) + '");' );
+ link.setAttribute( 'value', "Enable" );
+ }
+ nb.appendChild( link );
+
+ nb.appendChild( document.createTextNode( " " ) );
+ nb.appendChild( create_button( "Delete", 'vlm_delete("'+elt.getAttribute( 'name' ) + '");' ) );
+
+ list = document.createElement( 'ul' );
+
+ item = document.createElement( 'li' );
+ item.appendChild( document.createTextNode( "Date: " + elt.getAttribute( 'date' ) ) );
+ list.appendChild( item );
+
+ item = document.createElement( 'li' );
+ item.appendChild( document.createTextNode( "Period (in seconds): " + elt.getAttribute( 'period' ) ) );
+ list.appendChild( item );
+
+ item = document.createElement( 'li' );
+ if( elt.getAttribute( 'repeat' ) == -1 )
+ {
+ item.appendChild( document.createTextNode( "Number of repeats left: for ever" ) );
+ }
+ else
+ {
+ item.appendChild( document.createTextNode( "Number of repeats left: " + elt.getAttribute( 'repeat' ) ) );
+ }
+ list.appendChild( item );
+
+ commands = elt.getElementsByTagName( 'command' );
+ for( i = 0; i < commands.length; i++ )
+ {
+ item = document.createElement( "li" );
+ item.appendChild( document.createTextNode( "Command: " + commands[i].firstChild.data + " " ) );
+ list.appendChild( item );
+ }
+
+ item = document.createElement( 'li' );
+ sel = document.createElement( 'select' );
+ sel.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_action' );
+ sel.setAttribute( 'onchange', 'vlm_schedule_type_change("'+elt.getAttribute('name')+'");');
+ sel.appendChild( create_option( 'play', 'play' ) );
+ sel.appendChild( create_option( 'pause', 'pause' ) );
+ sel.appendChild( create_option( 'stop', 'stop' ) );
+ sel.appendChild( create_option( 'seek', 'seek' ) );
+ sel.appendChild( create_option( '(other)', '' ) );
+ item.appendChild( sel );
+
+ item.appendChild( document.createTextNode( " " ) );
+ text = document.createElement( 'input' );
+ text.setAttribute( 'type', 'text' );
+ text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_name' );
+ text.setAttribute( 'size', '10' );
+ text.setAttribute( 'value', '(name)' );
+ text.setAttribute( 'onfocus', 'if( this.value == "(name)" ) this.value = "";' );
+ text.setAttribute( 'onblur', 'if( this.value == "" ) this.value = "(name)";' );
+ item.appendChild( text );
+
+ item.appendChild( document.createTextNode( " " ) );
+ text = document.createElement( 'input' );
+ text.setAttribute( 'type', 'text' );
+ text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_opt' );
+ text.setAttribute( 'size', '30' );
+ text.setAttribute( 'value', '(options)' );
+ text.setAttribute( 'onfocus', 'if( this.value == "(options)" ) this.value = "";' );
+ text.setAttribute( 'onblur', 'if( this.value == "" ) this.value = "(options)";' );
+ item.appendChild( text );
+ item.appendChild( document.createTextNode( " " ) );
+ item.appendChild( create_button( "Append command", 'vlm_schedule_append("' + elt.getAttribute( 'name' ) + '");') );
+
+ list.appendChild( item );
+
+ nb.appendChild( list );
+ vlm_schedule_type_change( elt.getAttribute('name') );
+