rem: if (parsedData['isplayer']) { showElements(['playCtlffwd']); showElements(['playCtlrew']); showElements(['playCtlmute']); showElements(['volumeControl']); } else { hideElements(['playCtlffwd']); hideElements(['playCtlrew']); hideElements(['playCtlmute']); hideElements(['volumeControl']); 
add: var playeronly = ['playCtlffwd', 'playCtlrew', 'playCtlmute', 'volumeControl']; for (var i=0; i < playeronly.length; i++) { var key = elems[i]; if (parsedData['isplayer']) { showElements([key]); } else { showElements([key]); } 
context: function refreshInfo(theData,force) {	var parsedData = fillDataHash(theData);	refreshSleepTime(parsedData);	var myString = new String($('songtitlehref').innerHTML);	var rExp= new RegExp("item=(.+?)&amp;player","i");	if (rExp.exec(myString) == null) {rExp= new RegExp("item=(.+?)&player","i");}	var a = rExp.exec(myString);	var newsong = 1;	if (force != 1) {		if (a[1] == parsedData['songtitleid']) {newsong = 0;}	}		var elems = ['thissongnum', 'playtextmode', 'songcount'];	if (newsong) {		elems.push('songtitle');		refreshElement('songtitle', parsedData['songtitle']);		refreshPlaylist(player);	}	if (parsedData['streamtitle']) {		refreshElement('songtitle', parsedData['streamtitle']);	}	if (parsedData['durationseconds']) updateTime(parsedData['songtime'],parsedData['durationseconds']);	if (parsedData['thissongnum']) {		hideElements(['notplaying']);		showElements(['nowplaying']);	} else {		hideElements(['nowplaying']);		showElements(['notplaying']);	}	if (parsedData['isplayer']) {		showElements(['playCtlffwd']);		showElements(['playCtlrew']);		showElements(['playCtlmute']);		showElements(['volumeControl']);	} else {		hideElements(['playCtlffwd']);		hideElements(['playCtlrew']);		hideElements(['playCtlmute']);		hideElements(['volumeControl']);	}		// refresh cover art	if ($('coverartpath') && newsong) {		var coverPath = null;		if (parsedData['coverartpath'].match('cover') || parsedData['coverartpath'].match('radio')) {			coverPath = parsedData['coverartpath'];		} else {			coverPath = '/music/'+parsedData['coverartpath']+'/cover_100x100_f_000000.jpg';		}		$('coverartpath').src   = coverPath;				var tooltip = "";		if (parsedData['album']) {			tooltip = parsedData['album'];			if (parsedData['artist']) {				tooltip += " " + parsedData['by'] + " " + parsedData['artist'];			}			if (parsedData['year'] && parsedData['year'] != 0) {				tooltip += " (" + parsedData['year'] + ")";			}		}				$('coverartpath').title = tooltip;		$('coverartpath').alt   = tooltip;	}		// refresh href content	if (newsong) {		refreshHrefElement('albumhref',parsedData['albumid'],"album.id=");		refreshHrefElement('coverhref',parsedData['albumid'],"album.id=");		refreshHrefElement('removealbumhref',parsedData['album'],"p4=");		refreshHrefElement('removeartisthref',parsedData['artist'],"p3=");		refreshHrefElement('songtitlehref',parsedData['songtitleid'],"item=");		refreshHrefElement('zaphref',parsedData['thissongnum']-1,"p2=");	}	//refresh text elements	for (var i=0; i < elems.length; i++) {		var key = elems[i];		if ($(key)) {			refreshElement(key, parsedData[key]);		}	}		if (newsong) {		var elems = ['duration', 'bitrate', 'year'];		for (var i=0; i < elems.length; i++) {			var key = elems[i];			if (parsedData[key] && parsedData[key] != 0) {				showElements([key],'inline');				refreshElement(key, "("+parsedData[key]+")");			} else {				hideElements([key]);			}		}				if(parsedData['album']) {			showElements(['albuminfo']);			showElements(['albumhref'], 'inline');			refreshElement('album', parsedData['album']);		} else {			hideElements(['albuminfo', 'albumhref']);		}		if(parsedData['artist']) {			showElements(['artistinfo', 'artisthtml']);			refreshElement('artisthtml', parsedData['artisthtml']);		} else {			hideElements(['artistinfo', 'artisthtml']);		}		if(parsedData['playermodel'] == 'squeezebox') {			showElements(['squeezeboxlogo']);			hideElements(['slimp3logo']);		} else {			hideElements(['squeezeboxlogo']);			showElements(['slimp3logo']);		}	}	return true;}
meta: 6551	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6551/f0966079c4d59a641f4ab017c53be660762ed477/ajax.js/buggy/HTML/Fishbone/html/ajax.js