function changeSignal(taxa,id){
	if($(taxa+'_'+id).style.display=='none'){
		$(taxa+'_toggle_'+id).innerHTML='[ - ]';
	}else
		$(taxa+'_toggle_'+id).innerHTML='[ + ]';
	Effect.toggle(taxa+'_'+id,'slide');
}

function changeSignalAjax(taxa,id,url)
{
	if($(taxa+'_'+id).style.display=='none'){
		new Ajax.Updater({ success: taxa+'_'+id}, url, { evalScripts:true, onCreate:function(){$('indicator'+'_'+id).show();}, onComplete:function(){$('indicator'+'_'+id).hide(); Effect.toggle(taxa+'_'+id,'slide');}});
		$(taxa+'_toggle_'+id).innerHTML='[ - ]';
	}else
	{
		$(taxa+'_toggle_'+id).innerHTML='[ + ]';
		Effect.toggle(taxa+'_'+id,'slide');
	}
	
}

function tab(tabNum,contentId)
{
  if (typeof activeTab != 'undefined')
  {
    $('entity-tabs').down().writeAttribute({id:tabNum}); $(activeTab).hide(); $(contentId).show(); activeTab=contentId;
  }
  else
  {
    $('entity-tabs').down().writeAttribute({id:tabNum}); $(contentId).show(); activeTab=contentId;
  }
}

function populateSourceList(src,dest,value,text)
{
	if($(dest).options.length!=0)
	{
		for(var i=0; i<$(dest).options.length; i++)
		{
			if(value==$(dest).options[i].value)
			{
				return;
			}
		}
	}
    $(src).options[$(src).length] = new Option(text,value);

}
