 

function getZjInfo(keyword) {
	 
  //dwr.util.useLoadingMessage();
    
  fillZjInfo(keyword,"");
}

var zjsearchResultCache = { };
 
 
function fillZjInfo(keyword,firstSingerPath) {
  
	ZjSearchResult.fillZjSearchResult(keyword, function(zjsearchResult) {

	 
    // Delete all the rows except for the "pattern" row
    dwr.util.removeAllRows("zjshowflag", { filter:function(div) {
		
      return (li.id != "zjpattern");
    }});

	 
    // Create a new set cloned from the pattern row
    var zjInfo, id;
	zjsearchResult.sort(function compare(a,b){return a.id-b.id;});  
     

	 var zjnum=zjsearchResult.length;
	 dwr.util.setValue("syzjnum", zjnum+"张");
 
	 dwr.util.setValue("syzjnum1", zjnum+"张");

	  
	 dwr.util.setValue("zjtableSingerMore", '<a target=_blank href=singer'+firstSingerPath+'><font color=red>查看全部</font></a>', {escapeHtml:false });

	 if(zjnum==0) {
		 zjshowflag.style.display = "none";
	 }
	 else{
		 zjshowflag.style.display = "";

	 }
	

	 if(zjnum>4) zjnum=4;
    
	 for (var i = 0; i < 4; i++) {
		  
		
		 //id = zjInfo.id;
		 id=i+1;
		 dwr.util.cloneNode("zjpattern", { idSuffix:id });
		 if(i<zjnum){ 

			 
			  zjInfo = zjsearchResult[i];
			  
			  
			  if((zjInfo.albumpath).length==0){
				  dwr.util.setValue("zjtableName" + id,"《"+ zjInfo.albumname+"》", { escapeHtml:false });
			  }
			  else{
				  dwr.util.setValue("zjtableName" + id,"<a target=_blank href=album"+zjInfo.albumpath+">《"+ zjInfo.albumname+"》</a>", { escapeHtml:false });

			  }
			  dwr.util.setValue("zjtableTime" + id,"发行："+ zjInfo.issue_date, { escapeHtml:false });
		 
			  if((zjInfo.albumpath).length==0){
				  dwr.util.setValue("zjtablePic" + id, "<img src='"+zjInfo.picture_url+"' border='0' width='90'>", { escapeHtml:false });

			  }
			  else{

				  dwr.util.setValue("zjtablePic" + id, "<a target=_blank href=album"+zjInfo.albumpath+"><img src='"+zjInfo.picture_url+"' border='0'  width='90'></a>", { escapeHtml:false });


			  }
			

			  dwr.util.setValue("zjtableSong" + id,zjInfo.songinfo, { escapeHtml:false });

			  if((zjInfo.albumpath).length==0){
				  dwr.util.setValue("zjtableMore" + id, "<img src='http://img.mms.sohu.com/rbt/rbt0316/images/more.jpg' border='0'>", { escapeHtml:false });

			  }
			  else{

				  dwr.util.setValue("zjtableMore" + id, "<a target=_blank href=album"+zjInfo.albumpath+"><img src='http://img.mms.sohu.com/rbt/rbt0316/images/more.jpg' border='0'></a>", { escapeHtml:false });


			  }
			  
		  
			  $("zjpattern" + id).style.display = ""; // officially we should use table-row, but IE prefers "" for some reason
			   zjsearchResultCache[id] = zjInfo;

		 }
		 else{
			  
			 $("zjpattern" + id).style.display = "none";
			 

		 }

	   
     
	  
    }
  });
}

 
