function modify_value_multicheck(idName,valoriLipite) {

	var valori,valoriEx = new Array();
	valori = valoriLipite.split(";");

	n = valori.length;
	for(i = 0; i < n; i++) {

		valoriEx[valori[i]] = 1;
		//alert(valori[i]);
	}

	var oInputs = document.getElementsByTagName("input");
	n = oInputs.length;
	for(i = 0; i < n; i++) {

		if (oInputs[i].type != "checkbox") continue;
		if (oInputs[i].id.length <= idName.length + 2) continue;

		if (oInputs[i].id.substring(0,(idName.length)) == idName) {

			var deLa = idName.length+1;
			var panaLa = oInputs[i].id.length-1; //oInputs[i].lastIndexOf('_');

			if (valoriEx[oInputs[i].id.substring(deLa,panaLa)]) {

				oInputs[i].checked = true;
				//alert(oInputs[i].id);
				//break;
			}
			else {

				oInputs[i].checked = false;
			}
		}

		//oInputs[i].checked=value;
	}
}

function modify_value(idName,valoare)
{
	if (document.getElementById(idName)) {

		obj = document.getElementById(idName);

		if (obj.type == "checkbox") {

			if (obj.value) {

				obj.checked = true;
			}
			else {

				obj.checked = false;
			}
		}
		else {
			obj.value=valoare;
		}
	}
	else alert(idName);
}

function confirmSubmitAction (form,message) { // this check to see that the form is OK

	if (confirm(message)){

		eval("document.forms."+form+".submit();");
	}
}

function selectall(value)
{
	var oInputs = frm.getElementsByTagName("input");
	n = oInputs.length;
	for(i = 0; i < n; i++)
		if  (oInputs[i].type=="checkbox")  oInputs[i].checked=value;
}


function confirmDelete(redirectPage,confirmMessage)
{
	i=confirm(confirmMessage);
	if (i) window.location.href=redirectPage;
}

function confirmAction(redirectPage,confirmMessage)
{
	i=confirm(confirmMessage);
	if (i) window.location.href=redirectPage;
}

function confirmLink(link,mesaj)
{
if(window.confirm(mesaj))
{ 
 window.location.href=link; 
}
}

function markThis ( form , id ) {

	eval("document."+form+"."+id+".checked = true;");
}

function submitMultAction(status,mesaj) {
	if(window.confirm(mesaj)) {
		document.searchResults.actionStatus.value=status;
		searchResults.submit(); 
	}
}

function submitFormCheck(nume,mesaj) {
	if(window.confirm(mesaj)) {
		eval(nume+".submit();"); 
	}
}
