rem: cursor.onmouseout = function( e ) { 
add: var onmouseout = function( e ) { 
context: function hop_make_slider( parent, id, min, max, step, value, cap, curw, curh ) {   var doc = (parent == undefined ? document : parent.ownerDocument || parent.document);   var slider, tbody, tr, tr2;   var line1, line2, cursor;   var td1, td3;   var div;   var caption;   if( curw == undefined )      curw = 4;   if( curh == undefined )      curh = "10px";   // the slider   slider = doc.createElement( "table" );   slider.className = "hop-slider";   slider.id = id;      slider.onchange = undefined;      slider.parent = parent;   slider.width = "100%";   slider.rules = "none";   slider.cellpadding = 0;   slider.cellspacing = 0;   slider.border = 0;   hop_style_set( slider, "border-collapse", "collapse" );   hop_style_set( slider, "border-spacing", "0" )   parent.appendChild( slider );   tbody = doc.createElement( "tbody" );   slider.appendChild( tbody );      tr = doc.createElement( "tr" );   tr2 = doc.createElement( "tr" );   if( cap == "top" ) {      tbody.appendChild( tr2 );      tbody.appendChild( tr );   } else {      if( cap == "bottom" ) {	 tbody.appendChild( tr );	 tbody.appendChild( tr2 );      } else {	 tbody.appendChild( tr );      }   }   // the two lines and the cursor   line1 = doc.createElement( "td" );   line1.className = "lineleft";   line2 = doc.createElement( "td" );   line2.className = "lineright";   cursor = doc.createElement( "td" );   cursor.className = "cursor";   slider.line1 = line1;   slider.line2 = line2;   slider.cursor = cursor;   line1.style.border = 0;   line1.style.margin = 0;   line1.style.padding = 0;   line2.style.border = 0;   line2.style.margin = 0;   line2.style.padding = 0;   cursor.width = (Math.round( curw / 2 ) * 2);   cursor.style.width = cursor.width + "%";   cursor.style.height = curh;   cursor.style.border = 0;   cursor.style.margin = 0;   cursor.style.padding = 0;   tr.appendChild( line1 );   tr.appendChild( cursor );   tr.appendChild( line2 );   if( cap ) {      td1 = doc.createElement( "td" );      caption = doc.createElement( "td" );      caption.className = "caption";      caption.align = "center";      caption.style.width = cursor.width + "%";      td3 = doc.createElement( "td" );      caption.innerHTML = "";      slider.cap = caption;         tr2.appendChild( td1 );      tr2.appendChild( caption );      tr2.appendChild( td3 );   } else {      slider.cap = false;   }   div = doc.createElement( "div" );   div.className = "lineleft";   line1.appendChild(div);   div = doc.createElement( "div" );   div.className = "lineright";   line2.appendChild(div);   div = doc.createElement( "div" );   div.className = "cursoroff";   div.style.height = curh;   cursor.appendChild( div );   slider.min = min;   slider.max = max;   slider.step = step;   // cursor event handling   var mousemove = function( e ) {      hop_slider_mousemove( e, slider );   };   var delmousemove = function( e ) {      hop_remove_event_listener( doc, "mousemove", mousemove, true );   };      cursor.onmouseover = function( e ) {      div.className = "cursoron";   };   cursor.onmouseout = function( e ) {      div.className = "cursoroff";   };   cursor.onmousedown = function( e ) {      hop_add_event_listener( doc, "mousemove", mousemove, true );      hop_add_event_listener( doc, "mouseup", delmousemove, true );      hop_add_event_listener( doc, "onblur", delmousemove, true );   }      // line event handling   var onlineclick = function( e ) {      var val;      val = ((e.clientX - hop_element_x( slider )) / slider.offsetWidth) * 100;      hop_slider_value_set( slider, val );   }   line1.onclick = onlineclick;   line2.onclick = onlineclick;   slider.value = min - 1;   if( value != undefined )      hop_slider_value_set( slider, value );   else      hop_slider_value_set( slider, min );   return slider;}
meta: 4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/b0437a3b760258723ea3639dedeb8983f5e9c448/hop-slider.js/clean/share/hop-slider.js