function getObj(name){
	if (document.getElementById){
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style; 
	} else if (document.all) {
		this.obj = document.all[name];
		this.style = document.all[name].style;
	} else if (document.layers){
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
	return this;
}

function togglePanel(name){
	var panelObj = getObj('more_panel_'+name);
	if(panelObj.style.display=='none'){
		panelObj.style.display='block';
		toggleArrow(name,'down');
	}else{
		panelObj.style.display='none';
		toggleArrow(name,'right');
	}
}

function toggleArrow(name,state) {
	var bV=parseInt(navigator.appVersion);
	var NS4=(document.layers) ? true : false;
	var IE4=((document.all)&&(bV>=4))?true:false;
	var arrowObj = getObj('more_panel_'+name+'_arrow');
	f = '<img src="/new_design/arrow_'+state+'.gif" width="20" height="20" border="0" align="absmiddle">';
	if (NS4) {
		arrowObj.obj.document.write(f);
		arrowObj.obj.document.close(); 
	} else { 
		arrowObj.obj.innerHTML = f 
	}
}

function toggleComment(name){
	var panelObj;
	var bV=parseInt(navigator.appVersion);
	var NS4=(document.layers) ? true : false;
	var IE4=((document.all)&&(bV>=4))?true:false;
	
	var comment_item = new Array("comment", "chord", "guitar", "bass", "drum");
	for(i = 0; i < comment_item.length; i++) {
		if (comment_item[i] != name){
			panelObj = getObj('tab_comment_'+comment_item[i]);
			panelObj.style.background="url(http://www.musicatm.com/images/lyrictabbg.gif) repeat-x"; 
		}
	}
	panelObj = getObj('tab_comment_'+name);
	panelObj.style.background='#ccc';
	
	var commentObj = getObj('comment_msg');
	if(name=='comment'){
		commentObj.style.height='200';
		commentObj.style.background="#ffffff";
	}else  if(name=='chord'){
		commentObj.style.height='700';
		commentObj.style.background="#ffffee";
	}else  if(name=='guitar'){
		commentObj.style.height='350';
		commentObj.style.background="#ffffee";
	}	else  if(name=='bass'){
		commentObj.style.height='350';
		commentObj.style.background="#eeffee";
	}	else  if(name=='drum'){
		commentObj.style.height='350';
		commentObj.style.background="#eeffff";
	}
	
	var fileuploadObj = getObj('comment_fileupload');
	if(name!='guitar'){
		fileuploadObj.style.display='none';
	}else{
		fileuploadObj.style.display='block';
	}
	
	document.webForm.typepc.value=""+name;
}