/* Functii pt chestionar */

 function abc() {
 	var a = 0;
 }
 
 /**
  * activetext
  * @param {type}  
  */
  function activetext() {
  	for (i=0;i<document.chest.partener.length;i++)
  	{
  		if (document.chest.partener[i].checked) {
			//alert(document.chest.partener[i].value);
			if (document.chest.partener[i].value == 'publicatii') {
				document.getElementById("altele").disabled=true;
				document.getElementById(document.chest.partener[i].value).disabled=false;
				return "publicatii";
			} else if(document.chest.partener[i].value == 'altele') {
				document.getElementById("publicatii").disabled=true;
				document.getElementById(document.chest.partener[i].value).disabled=false;
				return "altele";
			} else {
				document.getElementById("altele").disabled=true;
				document.getElementById("publicatii").disabled=true;
			}

		}
  	}
  }

  function verificare() {
  	var santinela = 0;
  	//alert("mere");
   	var client = document.getElementById("client").value;
   	if (client.length == 0) {
   		//alert(client);
   		santinela = 1;
   	}
   	var nume = document.getElementById("nume").value;
   	if (nume.length == 0) {
   		//alert(nume);
   		santinela = 1;
   	}
   	var functia = document.getElementById("functia").value;
   	if (functia.length == 0) {
   		//alert(functia);
   		santinela = 1;
   	}
   	var select1 = 0;
   	for (a=0;a<document.chest.relatie.length;a++)
   	{
   		if (document.chest.relatie[a].checked) {
   			select1 = document.chest.relatie[a].value;
   		}
   	}
   	//alert(select1);
   	if (select1 == 0) {
   		santinela = 1;
   	}
   	var select2 = 0;
   	for (a=0;a<document.chest.informatii.length;a++)
   	{
   		if (document.chest.informatii[a].checked) {
   			select2 = document.chest.informatii[a].value;
   		}
   	}
   	if (select2 == 0) {
   		santinela = 1;
   	}
   	var select3 = 0;
   	for (a=0;a<document.chest.oferta.length;a++)
   	{
   		if (document.chest.oferta[a].checked) {
   			select3 = document.chest.oferta[a].value;
   		}
   	}
   	if (select3 == 0) {
   		santinela = 1;
   	}
   	select4 = 0;
   	for (a=0;a<document.chest.produse.length;a++)
   	{
   		if (document.chest.produse[a].checked) {
   			select4 = document.chest.produse[a].value;
   		}
   	}
   	if (select4 == 0) {
   		santinela = 1;
   	}
   	select5 = 0;
   	for (a=0;a<document.chest.promptitudine.length;a++)
   	{
   		if (document.chest.promptitudine[a].checked) {
   			select5 = document.chest.promptitudine[a].value;
   		}
   	}
   	if (select5 == 0) {
   		santinela = 1;
   	}
   	var select6 = 0;
   	for (a=0;a<document.chest.conformitate.length;a++)
   	{
   		if (document.chest.conformitate[a].checked) {
   			select6 = document.chest.conformitate[a].value;
   		}
   	}
   	if (select6 == 0) {
   		santinela = 1;
   	}
   	var select7 = 0;
   	for (a=0;a<document.chest.calitatea.length;a++)
   	{
   		if (document.chest.calitatea[a].checked) {
   			select7 = document.chest.calitatea[a].value;
   		}
   	}
   	if (select7 == 0) {
   		santinela = 1;
   	}
   	var select8 = 0;
   	for (a=0;a<document.chest.conditii.length;a++)
   	{
   		if (document.chest.conditii[a].checked) {
   			select8 = document.chest.conditii[a].value;
   		}
   	}
   	if (select8 == 0) {
   		santinela = 1;
   	}
	var select9 = 0;
   	for (a=0;a<document.chest.impresia.length;a++)
   	{
   		if (document.chest.impresia[a].checked) {
   			select9 = document.chest.impresia[a].value;
   		}
   	}
   	if (select9 == 0) {
   		santinela = 1;
   	}
   	
   	//alert(select9);
   	var select10 = 0
   	for (b=0;b<document.chest.unic.length;b++)
   	{
   		if (document.chest.unic[b].checked) {
   			select10 = document.chest.unic[b].value;
   		}
   	}
   	if (select10 == 0) {
   		santinela = 1;
   	}
   	//alert(select10);
   	var select11 = 0
   	for (c=0;c<document.chest.partener.length;c++)
   	{
   		if (document.chest.partener[c].checked) {
   			select11 = document.chest.partener[c].value;
   		}
   	}
   	//alert(select11);
   	if (select11 == 0) {
   		santinela = 1;
   	} else if (select11 == "publicatii") {
   		areaintr = document.getElementById("publicatii").value.length;
   		if (areaintr == 0) {
   			santinela = 1;
   		}
   	} else if (select11 == "altele") {
   		areaintr = document.getElementById("altele").value.length;
   		if (areaintr == 0) {
   			santinela = 1;
   		}
   	}
   	
   	var sugestii = document.getElementById("sugestii").value.length;
   	if (sugestii == 0) {
   		santinela = 1;
   	}

   	//alert(areaintr);
   	if (santinela == 0) {
   		return true;
   	} else {
   		alert("Toate campurile sunt obligatorii!");
   		return false;
   	}

  }