function verify() 
{                       
	var themessage = "";
	if (document.FormCrma.edtClCode.value == "")
	{
		themessage = "#";
	}
	if (document.FormCrma.edtInvoice.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtClientName.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtDate.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtSku.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtQte.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtSerial.value == "")
	{
		themessage = "#";
	}	
	if (document.FormCrma.edtProblem.value == "")
	{
		themessage = "#";
	}	
	
	//alert(document.FormCrma.edtClCode.value);
	if (themessage == "") 
	{
		//alert("ahahasjkhaskds WTF???");
		//document.SurveyForm.submit();
		return true;
	}
	else 
	{
		alert("Veuillez vérifier, vous avez oublier un ou plusieurs champ(s) requis");
		return false;
	}
}
function LogUser()
{
	if(document.acces.user.value==""){alert("Veuillez insérer votre nom d'user");return false}
	else{if(document.acces.passwd.value==""){alert("Veuillez insérer votre mot de passe");return false}
	     else{document.acces.submit();}}
}
function LoadCombo(varpage)
{
	
	var varitem = window.document.FormCombo.choix_sys.value;
	window.parent.location.href= "?page=" + varpage + "&combo=" + varitem;
}

function LoadProduit(varpage)
{
	var varitem = window.document.FormProduit.choix_prod.value;
	window.parent.location.href= "?page=" + varpage + "&type=" + varitem;
}
function LoadMark(varpage,vartype)
{
	var varitem = window.document.FormProduit.choix_mrk.value;
	window.parent.location.href= "?page=" + varpage + "&type=" + vartype + "&mark=" + varitem;
}

function popprod(prod_id)
{
	window.open('pop_produit.php?prod_id='+prod_id+'&mode=pop','Detail','toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,width=650,height=400');
}

function poprma(rmaid)
{
	window.open('poprma.php?Rma_Id='+rmaid+'&mode=pop','Detail','toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,width=700,height=500');
}

function popproddesc(prod_id)
{
	window.open('pop_produit.php?prod_id='+prod_id+'&mode=see','Detail','toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,width=650,height=400');
}

/*function popcombo(combo_id, index)
{
	window.open('pop_combo.php?combo_id='+combo_id+'&index='+index,'Mod','toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,width=640,height=450');
}*/
//JAVASCRIPT POUR CHACHER OU AFFICHER LES DESCRIPTIONS
function showAndHide(theId, linkid) {
   var el = document.getElementById(theId);
   var link = document.getElementById(linkid);
   if (el.style.display=="none") {
      el.style.display="block"; //show element
      link.innerHTML = "Cacher les détails...";
   }
   else {
      el.style.display="none"; //hide element
      link.innerHTML = "Afficher les détails...";
   }
   return false;
}