rem: var np = ((notepad instanceof HTMLElement) || (notepad instanceof Object && notepad.propertyIsEnumerable( "innerHTML" ))) 
add: var np = hop_isHTMLElement( notepad ) 
context: function hop_notepad_remote( service, notepad, tab ) {   var success = function( http ) {      if( http.responseText != null ) {	 var found = 0;	 var np = ((notepad instanceof HTMLElement) ||		   (notepad instanceof Object &&		    notepad.propertyIsEnumerable( "innerHTML" )))	           ? notepad : document.getElementById( notepad );	 var ta = ((tab instanceof HTMLElement) ||		   (tab instanceof Object &&		    tab.propertyIsEnumerable( "innerHTML" )))		   ? tab : document.getElementById( tab );	 var i;	 for( i = 0; i < np.childNodes.length; i++ ) {	    var c = np.childNodes[ i ];	    if( c.className == "hop-notepad-tabs" ) {	       for( j = 0; j < c.childNodes.length; j++ ) {		  var c2 = c.childNodes[ j ];		  if( c2 == ta ) {		     c2.className = "hop-nptab-active";		     found = j;		  } else {		     c2.className = "hop-nptab-inactive";		  }	       }	    }	    if( c.className == "hop-notepad-body" ) {	       hop_replace_inner( c )( http );	    }	 }      }   }   if( !notepad.remote_service ) notepad.remote_service = service;      hop( service( tab ), success );}
meta: 4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/d6084b08745dad0eb19b44957aabebface67a1ec/hop-notepad.js/buggy/share/hop-notepad.js