function Submit(name)
{
document.forms[name].submit();
}
function ActivateLayer(layer)
{
        if(document.getElementById(layer).style.display=='none')
         {
            document.getElementById(layer).style.display='block';        
         }        
         else
         {
                 document.getElementById(layer).style.display='none';
         }
}
function verify(path,msg)
{
 if(msg=='')
      msg='Are you sure to delete?';
      	
 var agree=confirm(msg);
 
 if (agree)
  location.href=path;        
}


function activate_acardion(cat,_method)
{
 if(_method=='click')
 {
   document.getElementById("act_id").value="addpage";
   document.getElementById("value_id").value="";
 }
  document.getElementById("id_catid").value=cat;

 if(document.getElementById("acardion_"+cat).style.display=='none')
 {
    document.getElementById("acardion_"+cat).style.display='block';
    document.getElementById("name_"+cat).style.fontWeight='bold';

 }
 else
 {
   document.getElementById("acardion_"+cat).style.display='none';
   document.getElementById("name_"+cat).style.fontWeight='normal';
 }
}

/*
function verify1()
{
 var agree=confirm("Are you sure to delete?");
 if (agree)
 {
  return true;
 }
}
*/

var activetab=".music_content_1";
function ShowSongContent(num,language,link){

	//Activate language layer
	jQuery(".song_text").hide();
	jQuery(".song_text_"+ language + "_" + num).show();

	if(jQuery(".music_content_" + num).is(':visible')) {
		if((".music_content_" + num !=activetab) || link==true)
			jQuery(".music_content_" + num).hide();
		else
			changeImage(num,language);
	}
	else {
		
		jQuery(".music_content_" + num).show();
		activetab=".music_content_" + num;
		changeImage(num,language);

	}
	
	jQuery(".music_content_" + num).focus();
}

function changeImage(num,language){
	
	BaeImage(num);
	
	rowObjIdStr=".song_btn_"+ language +"_"+ num +"";
	ImgObj=jQuery(".song_btn_"+ language +"_"+ num +"");
	ImgAttrsrc=jQuery(".song_btn_"+ language +"_"+ num +"").attr("src");

	if(".song_btn_eng_" + num == rowObjIdStr){
		
		if(ImgAttrsrc=="images/music_i1.png") {
			ImgObj.attr("src","images/music_i1a.png");
		}
		
	}
	
    if(".song_btn_heb_" + num == rowObjIdStr){
		
		if(ImgAttrsrc=="images/music_i2.png") {
			ImgObj.attr("src","images/music_i2a.png");
		}
		
	}
    
    if(".song_btn_desc_" + num == rowObjIdStr){
		
		if(ImgAttrsrc=="images/music_i3.png") {
			ImgObj.attr("src","images/music_i3a.png");
		}
		
	}

}

function BaeImage(num){
	var num=1;
	jQuery(".music_content").each(function (){
		
		jQuery(".song_btn_eng_"+ num +"").attr("src","images/music_i1.png");
		jQuery(".song_btn_heb_"+ num +"").attr("src","images/music_i2.png");
		jQuery(".song_btn_desc_"+ num +"").attr("src","images/music_i3.png");
		num++;
	});
	
}

