rem:  if (i == csIndex) { listbox.rows[i].className = "currentsong"; } else { listbox.rows[i].className = ""; } 
context: function updatePlaylist_handler(req, url) {	playlistnodes = req.responseXML.getElementsByTagName("playlistitem");	var resp = req.responseXML;	var newPlaylist = new Array();	listbox = document.getElementById("playlist");	csIndex = currentSong - 1;	for (i = 0; i < playlistnodes.length; i++) {		newitem = new Object();		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)" class="plstitle">' + newPlaylist[i].title +			'</a>' + BY + '<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>';		if (listbox.rows[i].childNodes[0].innerHTML != newHTML) {			listbox.rows[i].childNodes[0].innerHTML = newHTML;		}		if (listbox.rows[i].url != newPlaylist[i].url) {			listbox.rows[i].url = newPlaylist[i].url;		}		if (i == csIndex) {			listbox.rows[i].className = "currentsong";		} else {			listbox.rows[i].className = "";		}	}	if (playlist.length < newPlaylist.length) {		for (i = baselength; i < newPlaylist.length; i++) {			theTR = listbox.insertRow(-1);			theTR.url = newPlaylist[i].url;			if (i == csIndex) {				theTR.className = "currentsong";			} else {				theTR.className = "";			}			buttonsTD = document.createElement('td');			buttonsTD.innerHTML = '<img onclick="doMoveDown(event)" src="html/images/playlist/down.gif"/>' +				'<img onclick="doMoveUp(event)" src="html/images/playlist/up.gif"/><img oncli' +				'ck="doRemove(event)" src="html/images/playlist/delete.gif"/>';			buttonsTD.className = "playlistbuttons";			titleTD = document.createElement('td');			titleTD.innerHTML = '<a onclick="doSelect(event)" class="plstitle">' + newPlaylist[i].title +				'</a>' + BY + '<a onclick="doArtist(event)">' + newPlaylist[i].artist + '</a>';			titleTD.className = "playlistitem";			theTR.appendChild(titleTD);			theTR.appendChild(buttonsTD);		}	}	if (newPlaylist.length < playlist.length) {		extras = playlist.length - baselength;		for (i = 0; i < extras; i++) {			listbox.deleteRow(baselength);		}	}	highlightCurrentSong();	playlist = newPlaylist;	cansave = getdata(resp, "cansave");	playlistinfo = getdata(resp, "playlistinfo");	displayPlaylistHeader();		if (playlistRefs == 0) {		playlistRefs++;		maybeDoneLoading();	}}
meta: 6551	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6551/12a4eb11a417be9aa08782a482188314abb22694/playlist.js/clean/HTML/Default2/html/playlist.js