rem: titleTD.innerHTML = '<a onclick="doSelect(event)">' + newPlaylist[i].title + '</a>' + BY + '<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>'; 
add: newHTML = '<a onclick="doSelect(event)">' + newPlaylist[i].title + '</a>' if (!newPlaylist[i].noartist && newPlaylist[i].artist != "") { newHTML += BY + '<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>'; } titleTD.innerHTML = newHTML; 
context: function updatePlaylistList(resp, listbox) {	var playlistnodes = resp.getElementsByTagName("playlistitem");	var newPlaylist = new Array();	var baselength;	var csIndex = currentSong - 1;	for (i = 0; i < playlistnodes.length; i++) {		newitem = new Object();		for (j = 0; j < playlistnodes[i].attributes.length; j++) {			plni = playlistnodes[i].attributes[j];			newitem[plni.name] = plni.value;		}		iv = playlistnodes[i].getElementsByTagName("title")[0];		if (iv && iv.firstChild) newitem.title = iv.firstChild.data; else newitem.title = "";		iv = playlistnodes[i].getElementsByTagName("artist")[0];		if (iv && iv.firstChild) newitem.artist = iv.firstChild.data; else newitem.artist = "";		if (iv) newitem.artistid = iv.getAttribute("id");		iv = playlistnodes[i].getElementsByTagName("album")[0];		if (iv && iv.firstChild) newitem.album = iv.firstChild.data; else newitem.album = "";		iv = playlistnodes[i].getElementsByTagName("url")[0];		if (iv && iv.firstChild) newitem.url = iv.firstChild.data; else newitem.url = "";		newPlaylist.push(newitem);	}	if (playlist.length < newPlaylist.length) baselength = playlist.length;	else baselength = newPlaylist.length;	for (i = 0; i < baselength; i++) {		newHTML = '<a onclick="doSelect(event)">' + newPlaylist[i].title + '</a>';		if (!newPlaylist[i].noartist && newPlaylist[i].artist != "") {			newHTML += BY + '<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>';		}		if (listbox.childNodes[i].childNodes[2].innerHTML != newHTML) {			listbox.childNodes[i].childNodes[2].innerHTML = newHTML;		}		newNum = i + 1 + "";		if (listbox.childNodes[i].childNodes[1].innerHTML != newNum) {			listbox.childNodes[i].childNodes[1].innerHTML = newNum;		}		if (listbox.childNodes[i].url != newPlaylist[i].url) {			listbox.childNodes[i].url = newPlaylist[i].url;		}		if (i == csIndex) {			listbox.childNodes[i].className = "currentsong";		} else {			listbox.childNodes[i].className = "";		}		listbox.childNodes[i].pos = i;	}	if (playlist.length < newPlaylist.length) {		for (i = baselength; i < newPlaylist.length; i++) {			theTR = document.createElement('li');			theTR.url = newPlaylist[i].url;			theTR.pos = i;			if (i == csIndex) {				theTR.className = "currentsong";			} else {				theTR.className = "";			}			buttonsTD = document.createElement('div');			//buttonsTD.innerHTML = '<img onclick="doRemove(event)" src="html/images/remove.gif"/><img ' +			//	'onclick="doMoveUp(event)" src="html/images/move_up.gif"/><img onclick="doMoveDown(' +			//	'event)" src="html/images/move_down.gif"/>';			buttonsTD.innerHTML = '<img onclick="doRemove(event)" src="html/images/remove.gif"/>';			buttonsTD.className = "playlistbuttons";			dragButton = document.createElement('img');			dragButton.src = 'html/images/moveupdown.gif';			dragButton.className = 'dragbutton';			buttonsTD.appendChild(dragButton);			indexTD = document.createElement('div');			indexTD.innerHTML = i + 1;			indexTD.className = "playlistindex";			titleTD = document.createElement('div');			titleTD.innerHTML = '<a onclick="doSelect(event)">' + newPlaylist[i].title + '</a>' + BY +				'<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>';			titleTD.className = "playlistlisting";			theTR.appendChild(buttonsTD);			theTR.appendChild(indexTD);			theTR.appendChild(titleTD);			listbox.appendChild(theTR);			playlistDragMakeSortable(theTR, dragButton);		}	}	if (newPlaylist.length < playlist.length) {		extras = playlist.length - baselength;		for (i = 0; i < extras; i++) {			listbox.removeChild(listbox.childNodes[baselength]);		}	}	highlightCurrentSong();	playlist = newPlaylist;}
meta: 6551	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6551/0b3d72291239bb2eb25dce0437eeae58aa30282a/playlist.js/clean/HTML/ExBrowse2/html/playlist.js