function dosubmitsearchforum( thisform , buton )
{
	with( thisform )
	{
		err = document.getElementById("div_errors");

		if( err )
		{
			err.innerHTML = "";
		}

		if( false == validate_required(TEXT) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Textul este obligatoriu! <br>";
			}
		}

		if( err.innerHTML == "" )
		{
			var param = buildJSONParam( thisform, buton );

			var action2 = '{"actions":[{"action":"actions/forum/send_search.php", "params":{'+ param + '}, "target":"div_forum"}]}';
	        MenuActionsManager.startActions(action2);
		}
    }

}

function dosubmit_adauga_raspuns( thisform, buton )
{
	with( thisform )
	{
		err = document.getElementById("div_errors");

		if( err )
		{
			err.innerHTML = "";
		}

		if( false == validate_required(USER) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Utilizatorul este obligatoriu! <br>";
			}
		}

		if( false == validate_required(EMAIL) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Email este obligatoriu! <br>";
			}
		}

		if( false == validate_required(RASPUNS) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Raspunsul este obligatoriu! <br>";
			}
		}

		if( err.innerHTML == "" )
		{
			var param = buildJSONParam( thisform, buton );

			var action2 = '{"actions":[{"action":"actions/forum/fo_send_adauga_raspuns.php", "params":{'+ param + '}, "target":""},' +
						  '{"action":"actions/fo_view_prod_raspunsuri.php", "params":{"id_intrebare":"'+ thisform.id_intrebare.value + '"}, "target":"div_fo_raspunsuri"}]}';
	        MenuActionsManager.startActions(action2);
		}
    }
}

function dosubmit_adauga_intrebare( thisform, buton )
{
	with( thisform )
	{
		err = document.getElementById("div_errors");

		if( err )
		{
			err.innerHTML = "";
		}

		if( false == validate_required(USER) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Utilizatorul este obligatoriu! <br>";
			}
		}

		if( false == validate_required(EMAIL) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Email este obligatoriu! <br>";
			}
		}

		if( false == validate_required(TITLU) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Titlu este obligatoriu! <br>";
			}
		}

		if( false == validate_required(INTREBARE) )
		{
			if( err != null )
			{
				err.innerHTML = err.innerHTML + "Intrebarea este obligatoriu! <br>";
			}
		}

		if( err.innerHTML == "" )
		{
			var param = buildJSONParam( thisform, buton );

			var action2 = '{"actions":[{"action":"actions/forum/send_adauga_intrebare.php", "params":{'+ param + '}, "target":""},{"action":"actions/forum/forumgetintrebari.php", "params":{"id_cat":"'+ thisform.id_cat.value + '"}, "target":"div_forum"}]}';
	        MenuActionsManager.startActions(action2);
		}
    }
}


