// AJAX JavaScript Document
function send_vid_init(mail,comm){
	if(check_form_send_vid()){
		//document.body.cursor='wait';
			var objetXHR = creationXHR();
		// Déclaration de la fonction de rappel
		function send_vid(){
			document.getElementById("send_wait").innerHTML = "<div align='center' style='line-height:20px; height:20px;'><img src='imgs/wait.gif' width='16' height='16' /></div>";
			if(objetXHR.readyState == 4){
				if(objetXHR.status == 200){
					var resultat = objetXHR.responseText;
					// Le résultat sera à insérer dans la page html
					document.getElementById("send_wait").innerHTML = "";
					document.getElementById("send_ajax").innerHTML = resultat;
					//draw_corner();// On redessine les contours des cadres
				}else{
					alert("Erreur HTTP N°"+objetXHR.status);
				}
			}
		 }
	
		// Traitement Asynchrone GET
		// Désignation de la fonction de rappel
		objetXHR.onreadystatechange = send_vid;
		objetXHR.open("get", "inc_template/applications/envoi_vid.php?mail="+mail+"&comm="+comm, true);
		// envoie de la requête
		objetXHR.send(null);
	}
}