function checkAllTracks(theform) {
  	
  	elm=theform.elements;
  	for(i=0;i<elm.length;i++) {
   		if(elm[i].type=="checkbox") {
			elm[i].checked=true;
		}
	}
}
function unCheckAllTracks(theform) {
  	
  	elm=theform.elements;
  	for(i=0;i<elm.length;i++) {
   		if(elm[i].type=="checkbox") {
			elm[i].checked=false;
		}
	}
}

function setCurrentArtistType(type,current,all) {
	for (i=1;i<=all;i++) {
		
		if (i==current) {
			document.getElementById(type+"_tab_"+i).className = "h4_"+i+" h4_up" ;
		}
		else {
			document.getElementById(type+"_tab_"+i).className = "h4_"+i ;
		}
	}
}
function showArtistList(type,current,all) {
	for (i=1;i<=all;i++) {
		if (i==current) {
			document.getElementById(type+"_list_"+i).style.display = "block" ;
			document.getElementById(type+"_list_"+i).className = "up" ;
		}
		else {
			document.getElementById(type+"_list_"+i).className = "" ;
			document.getElementById(type+"_list_"+i).style.display = "none" ;
		}
	}
}
function showTab(type,current,all) {
	setCurrentArtistType(type,current,all) ;
	showArtistList(type,current,all) ;
}
function showAlbumList(type,current,all) {
	for (i=1;i<=all;i++) {
		if (i==current) {
			document.getElementById(type+"_list_"+i).style.display = "block" ;
			document.getElementById(type+"_list_"+i).className = "topCommendBox topBox_up" ;
		}
		else {
			document.getElementById(type+"_list_"+i).className = "topCommendBox" ;
			document.getElementById(type+"_list_"+i).style.display = "none" ;
		}
	}
}
function showAlbumTab(type,current,all) {
	setCurrentArtistType(type,current,all) ;
	showAlbumList(type,current,all) ;
}
function setCurrentHotSongsTab(current,all) {
	for (i=1;i<=all;i++) {
		
		if (i==current) {
			document.getElementById("hotSongsTab"+i).className = "currA1" ;
		}
		else {
			document.getElementById("hotSongsTab"+i).className = "" ;
		}
	}
}
function showHotSongsList(current,all) {
	for (i=1;i<=all;i++) {
		if (i==current) {
			document.getElementById("hotSongsList"+i).style.display = "block" ;
		}
		else {
			document.getElementById("hotSongsList"+i).style.display = "none" ;
		}
	}
}
function showHotSongs(current,all) {
	setCurrentHotSongsTab(current,all) ;
	showHotSongsList(current,all) ;
}