// script.aculo.us effects.js v1.7.1_beta2, Sat Apr 28 15:20:12 CEST 2007

// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
//  Justin Palmer (http://encytemedia.com/)
//  Mark Pilgrim (http://diveintomark.org/)
//  Martin Bialasinki
// 
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/ 

// converts rgb() and #xxx to #xxxxxx format,  
// returns self (or first argument) if not convertable  
 function show_row(sursa){
    // Make sure the element exists before calling it's properties
    if (document.getElementById(sursa) != null)
      // Toggle visibility between none and inline
      if (document.getElementById(sursa).style.display == 'none')
      {
        document.getElementById(sursa).style.display = 'block';
      } else {
        document.getElementById(sursa).style.display = 'none';
      }
  }
   function show_row2(sursa){
   var nr_grupate = document.getElementById('grupate').value;
   var i=0;
   var id=0;
   var contor=0;
   var text="test:";
   if (nr_grupate>0){
   		for (i=1;i<=nr_grupate;i++)
		{
		 	if (document.getElementById('grupate'+i) != null){
				text=text+" id:"+id;
		 		id=document.getElementById('grupate'+i).value*1;
				if (document.getElementById('afisare_tr_'+id) != null){
		 			if (id==sursa) {
						document.getElementById('afisare_tr_'+id).style.display = 'table-row'
						contor=document.getElementById('apartine'+id).value*1;
						document.getElementById('optiune'+contor).checked=true;
					} else {
						document.getElementById('afisare_tr_'+id).style.display = 'none'
					}
		 		}
		 	}
		}
   }
  }  
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
function swich_background(sursa){
    // Make sure the element exists before calling it's properties
    if (document.getElementById(sursa) != null)
      // Toggle visibility between none and inline
      if (document.getElementById(sursa).style.display== 'none')
      {
        document.getElementById(sursa + "_buton").style.backgroundImage= "url(images/comprima.jpg)";
      } else {
        document.getElementById(sursa + "_buton").style.backgroundImage = "url(images/extinde.jpg)";
      }
  } 
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
function swich_background_footer(sursa){
    // Make sure the element exists before calling it's properties
    if (document.getElementById(sursa) != null)
      // Toggle visibility between none and inline
      if (document.getElementById(sursa).style.display== 'none')
      {
        document.getElementById(sursa + "_buton").style.backgroundImage= "url(images/footer_extinde_ro.png)";
      } else {
        document.getElementById(sursa + "_buton").style.backgroundImage = "url(images/footer_comprima_ro.png)";
      }
  } 
