	var js_assistance_creationDemande_echec_global = "";
	var js_assistance_creationEchange_echec_global = "";
	
	/**
	* Cette fonction permet de retrouver le type de demande MG /TE 
	*/
	
		function rafraichirFormulaire(actionType){
			ajaxAnywhere.submitAJAX();
		}
	
	/**
	* Cette fonction permet de verifier la validite de la saisie utilisateur - creation d'une demande
	*/
	
	function verifierFormulaireCreationDemande(nomFormulaire, actionType){
		var getForms = document.forms[nomFormulaire];
		
		var champInterlocuteur = getForms.elements['interlocuteurContrat'];
		var champTypePrestation= getForms.elements['typePrestation'];
		var champMotifUrgence = getForms.elements['motifUrgence'];
		var champMetier = getForms.elements['metier'];
		var champRefProduit = getForms.elements['referenceProduit'];
		var champSoldePointsUtilisationWeb = getForms.elements['soldePointsUtilisationWeb'];
		var champNbpoints = getForms.elements['nbPointsService'];
		var reelSoldePointsUtilisationWeb = parseFloat(champSoldePointsUtilisationWeb.value);
		var reelChampNbpoints = parseFloat(champNbpoints.value);
		// QFA - SAM 9677 - Ajout "assistance technique illimitée" 
		var champIsServiceIllimite = getForms.elements['IsServiceIllimite'];
		
		var message = '';
		
		// retrouver si un bouton "metier" est selectionne
		var returnValue = false;
   		for (i=0;i<champMetier.length;i++){
      		if (champMetier[i].checked==true) {
         	returnValue= true;
         	}
      	}
   	
		if(champInterlocuteur.value == "" ||
			champTypePrestation.value == "-1" ||
			champMotifUrgence.value == "-1" ||
			champRefProduit.value == "-1" ||
			returnValue == false
		)
		{
			alert(js_assistance_creationDemande_echec_global);
			return false
		}
		
		//SAM007578 - 16-05-2008 - FDJE : Mon Assistance - Verification du Solde de points
		/*	if( reelSoldePointsUtilisationWeb != "" && !regInt.test(reelSoldePointsUtilisationWeb) )
			{
					alert("pas entier");
					alert(js_assistance_creationEchange_debit_interdit);
					champTypePrestation.focus(); // document.forms[0].elements["typePrestation"].focus();
					return false;
			}
		*/
		
		// QFA - SAM 9677 - Ajout "assistance technique illimitée" */
		if(champIsServiceIllimite != "o")
		{
			if(  (reelSoldePointsUtilisationWeb == "" && reelChampNbpoints > 0)
				|| (reelSoldePointsUtilisationWeb == 0 && reelChampNbpoints > 0)
				|| ((reelSoldePointsUtilisationWeb < reelChampNbpoints) && (reelChampNbpoints > 0)) 
				) 
				{
					alert(js_assistance_creationEchange_debit_interdit);
					champTypePrestation.focus(); // document.forms[0].elements["typePrestation"].focus();
					return false;
				}
		}
		
		OnSubmit(actionType);
		
		
}
	/**
	* Cette fonction permet de verifier la validite de la saisie utilisateur - creation d'un ?change
	*/
	
	function verifierFormulaireCreationEchange(nomFormulaire, actionType){
		var getForms = document.forms[nomFormulaire];
		
		// var champAction = getForms.elements['action'];
		var champNote= getForms.elements['note'];
		var champCreePar = getForms.elements['creePar'];

		

		
		if(//champAction.value == "" ||
			champNote.value == "" ||
			champCreePar.value == "-1" 
		)
		{
			alert(js_assistance_creationEchange_echec_global);
			return false
		}


		OnSubmit(actionType);
		
	}
	
	//SAM007443 - 19-05-2008 - FDA : Mon Assistance - Impression détail dossier
	/**
	* Cette fonction permet de lancer une impression 
	* et un apercu avant impression
	*/
	function OnSubmitFormAssistanceWithParameterNewWindow (adresse)
	{
		posX = (screen.width) ? (screen.width - 700)/ 2 : 0;
		posY = (screen.height) ? (screen.height - 500)/ 2 : 0;
		contenu = 'height= ' + 500 + ', width = ' + 700 + ', top ='+ posY +', left =' + posX 
	                 + ',  scrollbars = ' + 'yes' + ', resizable';
		window.open(adresse, 'print', contenu);
	}



	