	//added the "h_" this is conflicting with something in rare cases
	var h_objXML = null;

	function doSearch( intAlbumID ){
		if( intAlbumID != null && h_objXML == null ){
			var search_url = '/searchXML';
			search_url += '/artist/' + intAlbumID + '/tracks';
			var myAjax = new Ajax.Request(
				search_url, {
					method: 'get',
					paramters: '',
					onComplete: showResults
				}
			);
		}
	}

	function showResults( request ) {
		h_objXML = request.responseXML;
		var objResultsTableLayer = $( 'Panel_2' );
		if( h_objXML.documentElement.getAttribute( 'num_results' ) == 0 )
			objResultsTableLayer.innerHTML = '&nbsp;' + h_objXML.documentElement.getAttribute( 'num_results' ) + ' items returned.';
		else{
			objTable = new Table( 'ArtistTable', null, objResultsTableLayer, 0 );
			objTable.Headers( 'Action', 'Artist', 'PA', 'Track', 'Album', 'Time', 'Share' );
			objTable.HeaderClass( 'Play', 'Artist', 'PA', 'Track', 'Album', 'Time', 'Share' );
			objTable.ContainsHotTracks = true;
			objTable.AjaxFields( 
				'artist_id', //{0}
				'artist_name', //{1}
				'explicit', //{2}
				'track', //{3}
				'album_id', //{4}
				'album', //{5}
				'streamable', //{6}
				'lfm_cost', //{7}
				'track_id', //{8}
				'duration', //{9}
				'trackNumber', //{10}
				'hot_track', //{11}
				'afs', /* {12} */
				'can_purchase' /* {13} */
			);
			objTable.RowTemplate(
				'',
				'',
				'',
				'',
				'',
				'',
				'<a href="/napsterlinks/?query={8}&amp;type=track" class="share"></a>'
			);
			var xtemp = "test";
			objTable.RowLogic(
				//'(false) ? (true) ? \'m1 - a\' : \'m1 - b\' : (false) ? \'m2 - a\' : \'m2 - b\'',
				'({6} == 0 ) ? ({13} == 1) ? \'<img src="/images/buttons/btn_30_second.gif" class="LinkButton" onclick="Play( {8}, 0 )" style="margin: 2px 4px 0 3px;" alt="" /><a href="#" class="linkBuyMP3" onclick="Buy( {8}, 0 )" />\' : \'<img src="/images/buttons/btn_30_second.gif" class="LinkButton" onclick="Play( {8}, 0 )" style="margin: 2px 4px 0 3px;" alt="" /><span class="ghostbuy"></span>\' : ({13} == 1) ? \'<img src="/images/buttons/btn_play.gif" class="LinkButton" onclick="Play( {8}, 0 )" alt="" /><a href="#" class="linkBuyMP3" onclick="Buy( {8}, 0 )" />\' : \'<img src="/images/buttons/btn_play.gif" class="LinkButton" onclick="Play( {8}, 0 )" alt="" /><span class="ghostbuy"></span>\'',
				//'( {6} == 0 )? \'<img src="/images/buttons/btn_30_second.gif" class="LinkButton" onclick="Play( {8}, 0 )" style="margin: 2px 4px 0 3px;" alt="" /><a href="#" class="linkBuyMP3" onclick="Buy( {8}, 0 )" />\' : \'<img src="/images/buttons/btn_play.gif" class="LinkButton" onclick="Play( {8}, 0 )" alt="" /><a href="#" class="linkBuyMP3" onclick="Buy( {8}, 0 )" />\'',
				'( "{11}" == "Y" )? "<a href=\\\"/view/artist/index.html?id={0}\\\" class=\\\"Hot_Track\\\" title=\\\"{1}\\\"><div>{1}</div></a>" : "<a href=\\\"/view/artist/index.html?id={0}\\\" title=\\\"{1}\\\"><div>{1}</div></a>"',
				'( {2} == 0 )? "" : "Explicit"',
				'( "{11}" == "Y" )? "<a href=\\\"javascript:Play( {8}, 0 )\\\" class=\\\"Hot_Track\\\" title=\\\"{3}\\\"><div>{3}</div></a>" : "<a href=\\\"javascript:Play( {8}, 0 )\\\" title=\\\"{3}\\\"><div>{3}</div></a>"',
				'( "{11}" == "Y" )? "<a href=\\\"/view/album/index.html?id={4}\\\" class=\\\"Hot_Track\\\" title=\\\"{5}\\\"><div>{5}</div></a>" : "<a href=\\\"/view/album/index.html?id={4}\\\" title=\\\"{5}\\\"><div>{5}</div></a>"',
				'( {6} == 0 )? "0:30" : "{9}"',
				//'( "{12}" == "Y" && {13} == 0 )? "<a href=\\\"/view/album/index.html?id={4}\\\"><img src=\\\"/images/buttons/btn_view_album.gif\\\" alt=\\\"\\\" /></a>" : "<div class=\\\"AdjustTextHeight\\\"><div class=\\\"DownloadButtonRollover\\\"><a href=\\\"javascript:Buy( {8}, 0 )\\\" title=\\\"Download Track\\\"></a></div></div>"'
				null
			);
			objTable.RowClass( 'Play', 'Artist', 'PA', 'Track', 'Album', 'Time', 'Share' );
			objTable.AjaxObject = h_objXML.documentElement;
			objTable.MakeTable();
		}
	}
