changeFormAction = function(selection)
{
	var frm = document.cauta;
	var keyword = escape(frm.cuvintCheie.value);
	
// 	alert('selection = ' + selection + ' ------------------ keyword = ' + keyword);
	
	
	if (selection == 'prestatii_sociale')
	{
		frm.action = 'prestatii_sociale.php';
	}
	else if (selection == 'legislatie')
	{
		frm.action = 'legislatie.php';
	}
	else if (selection == 'noutati')
	{
		frm.action = 'noutati.php';
	}
	else if (selection == 'achizitii_publice')
	{
		frm.action = 'achizitii_publice.php';
	}
	else if (selection == 'concursuri')
	{
		frm.action = 'concursuri.php';
	}
   else if (selection == 'download')
	{
		frm.action = 'download.php';
	}
   else if (selection == 'decl')
	{
		frm.action = 'declaratii.php';
	}
	else
	{
		frm.action = 'cauta.php';
	}
	
	frm.submit();
	return false;
}

init = function() {
   // color:#9cb8d2;
   var doc = new String(window.location.href);
   if ( doc.indexOf('prezentare') != -1) {
       document.getElementById('prezentare').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('organizare2') != -1) {
       document.getElementById('structura').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('organizare') != -1) {
       document.getElementById('organizare').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('prestatii_sociale') != -1) {
       document.getElementById('prestatii_sociale').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('comisii') != -1) {
       document.getElementById('comisii').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('legislatia_muncii') != -1) {
       document.getElementById('legislatia_muncii').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('legislatie') != -1) {
       document.getElementById('legislatie').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('declaratii') != -1) {
       document.getElementById('declaratii').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('download') != -1) {
       document.getElementById('download').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('noutati') != -1) {
       document.getElementById('noutati').className = 'paginaCurenta';
   }
   else if ( doc.indexOf('achizitii_publice') != -1) {
       document.getElementById('achizitii_publice').className = 'paginaCurenta';
   }
    else if ( doc.indexOf('concursuri') != -1) {
       document.getElementById('concursuri').className = 'paginaCurenta';
   }
}

