// © ATELIER 33 / ALL RIGHTS RESERVED / 2005 / http://www.atelier33.com / contact@atelier33.com\\
//                                          APP CHASSE01                                        \\
//=============================================================================================\\
//----------------------------
function Chasse01Manu()
{
	var Dis=document.Form01;
	Dis.NV_Total.value=parseFloat(Dis.Total.value)+parseFloat(Dis.Total_ajout.value);

}
//----------------------------
function GDCCheck(pvType, pvOpt)
{
	var Dis=document.Form01; var i=0; var bFlag=true; var Act
	var iMax=eval("Dis.GDC_"+pvOpt+"_nbre.value"); //alert(iMax);

	for(i=1; i<=iMax; i++)
		{
		var sTat=eval("Dis.GDC_"+pvOpt+"_Tatouage_"+i+".value");
		var sNom=eval("Dis.GDC_"+pvOpt+"_Nom_du_chien_"+i+".value");
		var sNe=eval("Dis.GDC_"+pvOpt+"_Ne_le_"+i+".value");	
	
		//CHECK DATA
		if (bFlag && !check_empty(sTat)){bFlag=false; DaAct=eval("Dis.GDC_"+pvOpt+"_Tatouage_"+i+".focus()"); alert("Option "+pvType+", chien #"+i+" : indiquez le numéro de tatouage svp.");}
		if (bFlag && !check_empty(sNom)){bFlag=false; DaAct=eval("Dis.GDC_"+pvOpt+"_Nom_du_chien_"+i+".focus()"); alert("Option "+pvType+", chien #"+i+" : indiquez le nom de tatouage svp.");}
		if (bFlag && !check_date(sNe)){bFlag=false; DaAct=eval("Dis.GDC_"+pvOpt+"_Ne_le_"+i+".focus()");alert("Option "+pvType+", chien #"+i+" : indiquez la date de naissance svp.");}
		if(!bFlag){break;}
		}
	
	return bFlag;

}
//----------------------------
function GDCAdd(pvName, pvType)
{
	var Dis=document.Form01; var iMax=0; var bFlag=true; var sRow=""; var oAct;	
	
	//GET DATA
	var sTat=eval("Dis."+pvName+"_Tatouage_0.value");
	var sNom=eval("Dis."+pvName+"_Nom_du_chien_0.value");
	var sNe=eval("Dis."+pvName+"_Ne_le_0.value");	
	//alert(pvName+" : "+"TAT="+sTat+" | NOM="+sNom+" | NE="+sNe);
	
	//CHECK DATA
	if (bFlag && !check_empty(sTat)){bFlag=false; alert("Chien à ajouter   : indiquez le numéro de tatouage svp.");}
	if (bFlag && !check_empty(sNom)){bFlag=false; alert("Chien à ajouter : indiquez le nom de tatouage svp.");}
	if (bFlag && !check_date(sNe)){bFlag=false; alert("Chien à ajouter : indiquez la date de naissance svp.");}
	
	//ADD DATA
	if(bFlag)
		{
		iMax=eval("Dis."+pvName+"_nbre.value"); iMax++;
		sRow='<table width="100%" border="0" cellspacing="0" cellpadding="2" class="txtb01"><tr align="left" valign="middle" >';
		sRow+='<td width="5%" style="border:0px;border-top:1 px solid #CC0000;">'+iMax+'</td>';
		sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
		sRow+='<input type="text" name="'+pvName+'_Tatouage_'+iMax+'" class="formbox" value="'+sTat+'" size="20" maxlength"=30">';
		sRow+='</td>';
		sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
		sRow+='<input type="text" name="'+pvName+'_Nom_du_chien_'+iMax+'" class="formbox" value="'+sNom+'" size="20" maxlength="30">';
		sRow+='</td>';
		sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
		sRow+='<input type="text" name="'+pvName+'_Ne_le_'+iMax+'" class="formbox" value="'+sNe+'" size="12" maxlength="10">';
		sRow+='</td>';
		sRow+='<td width="5%" style="border:0px;border-top:1 px solid #CC0000;">';
		sRow+='<a href="javascript:GDCDel(\''+pvName+'\', \''+pvType+'\', '+iMax+');">';
		sRow+='<img src="/app_pics/butt/dog_remove01.gif" hspace="0" vspace="0" border="0" alt="Supprimer">';
		sRow+='</a>';
		sRow+='</td>';
		sRow+='</tr></table>';
		GetDivTxt(sRow, pvName+"_CONT","APPEND")
		oAct=eval("Dis."+pvName+"_nbre.value=iMax");
		Chasse01Eval(pvType);
		
		oAct=eval("Dis."+pvName+"_Tatouage_0.value=''");
		oAct=eval("Dis."+pvName+"_Nom_du_chien_0.value=''");
		oAct=eval("Dis."+pvName+"_Ne_le_0.value=''");
		}
}
//----------------------------
function GDCDel(pvName, pvType, pvIdx)
{
	var Dis=document.Form01; var iRow=0; var iMax=0; var i=0;
	var bFlag=true;	var sRow="";
	
	iMax=eval("Dis."+pvName+"_nbre.value");
	for(iRow=1; iRow<=iMax; iRow++)
		{
		if(parseInt(iRow)!=parseInt(pvIdx))
			{
			//GET DATA
			var sTat=eval("Dis."+pvName+"_Tatouage_"+iRow+".value");
			var sNom=eval("Dis."+pvName+"_Nom_du_chien_"+iRow+".value");
			var sNe=eval("Dis."+pvName+"_Ne_le_"+iRow+".value");
			//GET DATA
			if (bFlag && !check_empty(sTat)){bFlag=false; alert("Chien à ajouter   : indiquez le numéro de tatouage svp.");}
			if (bFlag && !check_empty(sNom)){bFlag=false; alert("Chien à ajouter : indiquez le nom de tatouage svp.");}
			if (bFlag && !check_date(sNe)){bFlag=false; alert("Chien à ajouter : indiquez la date de naissance svp.");}
			//ADD DATA
			if(bFlag)
				{	
				i++;	
				sRow+='<table width="100%" border="0" cellspacing="0" cellpadding="2" class="txtb01"><tr align="left" valign="middle" >';
				sRow+='<td width="5%" style="border:0px;border-top:1 px solid #CC0000;">'+i+'</td>';
				sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
				sRow+='<input type="text" name="'+pvName+'_Tatouage_'+i+'" class="formbox" value="'+sTat+'" size="20" maxlength"=30">';
				sRow+='</td>';
				sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
				sRow+='<input type="text" name="'+pvName+'_Nom_du_chien_'+i+'" class="formbox" value="'+sNom+'" size="20" maxlength="30">';
				sRow+='</td>';
				sRow+='<td width="30%" style="border:0px;border-top:1 px solid #CC0000;">';
				sRow+='<input type="text" name="'+pvName+'_Ne_le_'+i+'" class="formbox" value="'+sNe+'" size="12" maxlength="10">';
				sRow+='</td>';
				sRow+='<td width="5%" style="border:0px;border-top:1 px solid #CC0000;">';
				sRow+='<a href="javascript:GDCDel(\''+pvName+'\', \''+pvType+'\', '+i+');">';
				sRow+='<img src="/app_pics/butt/dog_remove01.gif" hspace="0" vspace="0" border="0" alt="Supprimer">';
				sRow+='</a>';
				sRow+='</td>';
				sRow+='</tr></table>';
				}
				else
				{
				bFlag=false; break;
				}
			}
		}
	
	//alert(i);
	if(bFlag)
		{
		GetDivTxt(sRow, pvName+"_CONT","")
		oAct=eval("Dis."+pvName+"_nbre.value=i");
		Chasse01Eval(pvType);
		}
	
}
//----------------------------
function Chasse01Eval(DaAct)
{
	var Dis=document.Form01; var Total=0; var Price=0; var bFlag=true; var iRI
	if(DaAct=="ADMEDIT" || DaAct=="ADMCOPY")
	{
		//ISAUTO ?
		if (Dis.CALCUL_AUTO[1].checked)
			{
				if(Dis.RC_tiers_type[1].checked) {Price=ToFloat(Dis.P_RCT_2.value);} else {Price=ToFloat(Dis.P_RCT_1.value);}						
				Dis.P_RCT_K.value=Price; Total+=Price; Price=0;
			
				switch (Dis.RI_option.selectedIndex)
				{
				case 0	: Price=0; break;			
				default	: Price=ToFloat(eval("Dis.P_RI_"+Dis.RI_option.selectedIndex+".value")); break;
				}
				Dis.RI_K.value=Price; Total+=Price; Price=0;			
			
				if (check_int(Dis.RCPCC_nbre, true, true)){Price=parseInt(Dis.RCPCC_nbre.value)*ToFloat(Dis.P_RCPCC.value);}
				else {Dis.RCPCC_nbre.value=0; alert(ExpRCPCCNbre); Dis.RCPCC_nbre.focus();}
				Dis.RCPCC_K.value=Price; Total+=Price; Price=0;
				
				if (check_int(Dis.GDC_1_nbre, true, true)){Price=parseInt(Dis.GDC_1_nbre.value)*ToFloat(Dis.P_GDC_1.value);}
				else {Dis.GDC_1_nbre.value=0; alert(ExpGDC1NBRE); Dis.Dis.GDC_1_nbre.focus();}
				Dis.GDC_1_K.value=Price; Total+=Price; Price=0;				
			
				Price=parseInt(Dis.GDC_2_nbre.value)*ToFloat(Dis.P_GDC_2.value);
				Dis.GDC_2_K.value=Price; Total+=Price; Price=0;
				
				Price=parseInt(Dis.GDC_3_nbre.value)*ToFloat(Dis.P_GDC_3.value);
				Dis.GDC_3_K.value=Price; Total+=Price; Price=0;
				
				Price=parseInt(Dis.GDC_4_nbre.value)*ToFloat(Dis.P_GDC_4.value);
				Dis.GDC_4_K.value=Price; Total+=Price; Price=0;
			
				if(Dis.EAB[1].checked) {Price=ToFloat(Dis.P_EAB.value);} else {Price=0.00;}	
				Dis.EAB_K.value=Price; Total+=eval(Price); Price=0;
				
				if (bFlag){Dis.Total.value=Monify(eval(Total));} else {Dis.Total.value="00.00";}								
			}
		Chasse01Manu();			
		}
	else
		{
			if(Dis.RC_tiers_type[0].checked) {Price=ToFloat(Dis.P_RCT_1.value);} else {Price=ToFloat(Dis.P_RCT_2.value);}						
			Total+=Price; Price=0;
			
			for (iRI=0; iRI<Dis.RI_option.length; iRI++){if (Dis.RI_option[iRI].checked){break;}}
			Price=ToFloat(eval("Dis.P_RI_"+iRI+".value"));
			Total+=Price; Price=0;			
			
			Price=parseInt(Dis.RCPCC_nbre.value)*ToFloat(Dis.P_RCPCC.value);
			Dis.RCPCC_K.value=Price; Total+=Price; Price=0;			
			
			Price=parseInt(Dis.GDC_1_nbre.value)*ToFloat(Dis.P_GDC_1.value);
			Dis.GDC_1_K.value=Price; Total+=Price; Price=0;		
			
			Price=parseInt(Dis.GDC_2_nbre.value)*ToFloat(Dis.P_GDC_2.value);
			Dis.GDC_2_K.value=Price; Total+=Price; Price=0;	

			Price=parseInt(Dis.GDC_3_nbre.value)*ToFloat(Dis.P_GDC_3.value);
			Dis.GDC_3_K.value=Price; Total+=Price; Price=0;	

			Price=parseInt(Dis.GDC_4_nbre.value)*ToFloat(Dis.P_GDC_4.value);
			Dis.GDC_4_K.value=Price; Total+=Price; Price=0;				
			
			if(Dis.EAB[1].checked) {Price=ToFloat(Dis.P_EAB.value);} else {Price=0;}	
			Total+=eval(Price); Price=0;	
			
			if (bFlag){Dis.Total.value=Monify(eval(Total));} else {Dis.Total.value="00.00";}			
		}
	 		
}
//----------------------------
function Chasse01EditCheck(DaAct, DaMeth, DaPage)
{
	//alert(DaAct);
	var Dis=document.Form01; var bFlag=true; var bCheckFlag=true; var i=0;
//CHECK
	//GDC_1, GDC_2
	if(!GDCCheck("D1", 1)){bFlag=false; }
	if(bFlag && !GDCCheck("D2", 2)){bFlag=false; }

	//SOUCRIPTEUR
	if (bFlag && Dis.Titre_souscr.selectedIndex==0){bFlag=false; alert("Souscripteur : "+ExpTitre); Dis.Titre_souscr.focus();}
	if (bFlag && !check_empty(Dis.Nom_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpNom); Dis.Nom_souscr.focus();}
	if (bFlag && !check_empty(Dis.Prenom_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpPre); Dis.Prenom_souscr.focus();}
	if (bFlag && !check_date(Dis.Date_naissance_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpBirth); Dis.Date_naissance_souscr.focus();}	
	if (bFlag && !check_empty(Dis.Profession_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpProf); Dis.Profession_souscr.focus();}
	if (bFlag && !check_empty(Dis.Tel_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpTel); Dis.Tel_souscr.focus();}
	if (bFlag && !check_email(Dis.Email_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpEmail); Dis.Email_souscr.focus();}
	if (bFlag && !check_empty(Dis.Adresse_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpAdr); Dis.Adresse_souscr.focus();}
	if (bFlag && !check_empty(Dis.Code_postal_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpCP); Dis.Code_postal_souscr.focus();}
	if (bFlag && !check_empty(Dis.Ville_souscr.value)){bFlag=false; alert("Souscripteur : "+ExpVille); Dis.Ville_souscr.focus();}	
	if (bFlag && Dis.Pays_souscr.selectedIndex==0){bFlag=false; alert("Souscripteur : "+ExpPays); Dis.Pays_souscr.focus();}
	
	//ACCOMPAGNATEUR
	if (Dis.Titre_accomp.selectedIndex!=0 || check_empty(Dis.Nom_accomp.value) || check_empty(Dis.Prenom_accomp.value)
		|| check_date(Dis.Date_naissance_accomp.value) || check_email(Dis.Email_accomp.value) || check_empty(Dis.Adresse_accomp.value)
		|| check_empty(Dis.Code_postal_accomp.value) || check_empty(Dis.Code_postal_accomp.value)
		|| check_empty(Dis.Ville_accomp.value) || Dis.Pays_accomp.selectedIndex!=0
		)		
		{
		if (bFlag && Dis.Titre_accomp.selectedIndex==0){bFlag=false; alert("Accompagnateur : "+ExpTitre); Dis.Titre_accomp.focus();}
		if (bFlag && !check_empty(Dis.Nom_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpNom); Dis.Nom_accomp.focus();}
		if (bFlag && !check_empty(Dis.Prenom_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpPre); Dis.Prenom_accomp.focus();}
		if (bFlag && !check_date(Dis.Date_naissance_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpBirth); Dis.Date_naissance_accomp.focus();}	
		if (bFlag && !check_email(Dis.Email_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpEmail); Dis.Email_accomp.focus();}
		if (bFlag && !check_empty(Dis.Adresse_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpAdr); Dis.Adresse_accomp.focus();}
		if (bFlag && !check_empty(Dis.Code_postal_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpCP); Dis.Code_postal_accomp.focus();}
		if (bFlag && !check_empty(Dis.Ville_accomp.value)){bFlag=false; alert("Accompagnateur : "+ExpVille); Dis.Ville_accomp.focus();}	
		if (bFlag && Dis.Pays_accomp.selectedIndex==0){bFlag=false; alert("Accompagnateur "+ExpPays); Dis.Pays_accomp.focus();}
		}
	
	//SOC CHASSE
	if (check_empty(Dis.Societe_chasse_nom.value) || check_empty(Dis.Societe_chasse_adresse.value)
		|| check_empty(Dis.Societe_chasse_code_postal.value) || check_empty(Dis.Societe_chasse_ville.value)
		|| Dis.Societe_chasse_pays.selectedIndex!=0
		)
		{
		if (bFlag && !check_empty(Dis.Societe_chasse_nom.value)){bFlag=false; alert("Société de chasse : "+ExpNom); Dis.Nom_accomp.focus();}
		if (bFlag && !check_empty(Dis.Societe_chasse_adresse.value)){bFlag=false; alert("Société de chasse : "+ExpAdr); Dis.Adresse_accomp.focus();}
		if (bFlag && !check_empty(Dis.Societe_chasse_code_postal.value)){bFlag=false; alert("Société de chasse : "+ExpCP); Dis.Code_postal_accomp.focus();}
		if (bFlag && !check_empty(Dis.Societe_chasse_ville.value)){bFlag=false; alert("Société de chasse : "+ExpVille); Dis.Ville_accomp.focus();}	
		if (bFlag && Dis.Societe_chasse_pays.selectedIndex==0){bFlag=false; alert("Société de chasse : "+ExpPays); Dis.Pays_accomp.focus();}
		}
		
	//PRESCRIPTEUR
	if(DaAct=="ADMCOPY")
		{
		if(bFlag && Dis.Mode_paiement.selectedIndex==0){bFlag=false; alert("Sélectionnez un mode de paiement"); Dis.Mode_paiement.focus();}
		if(bFlag && Dis.Partenaire.selectedIndex==0){bFlag=false; alert("Préscripteur : sélectionnez un partenaire"); Dis.Partenaire.focus();}
		if(bFlag && Dis.Agence_du_partenaire.selectedIndex==0){bFlag=false; alert("Préscripteur : sélectionnez une agence"); Dis.Agence_du_partenaire.focus();}
		}	
		
	
	
	//TRANSAC ??
	/*
	if(DaAct=="ADMEDIT")
		{
		//alert("TRANSACT");
		if (bFlag && !check_empty(Dis.TPE_ID.value)){bFlag=false; alert(ExpTPEID); Dis.TPE_ID.focus();}
		if (bFlag && !check_empty(Dis.Num_adhesion.value)){bFlag=false; alert(ExpNumAdhes); Dis.Num_adhesion.focus();}
		for (i=0; i<Dis.Validee.length; i++){if (!Dis.Validee[i].checked){bCheckFlag=false} else {bCheckFlag=true; break;}}
		if (bFlag && !bCheckFlag){bFlag=false; alert(ExpValid); Dis.Validee[0].focus();}
		for (i=0; i<Dis.Traitee.length; i++){if (!Dis.Traitee[i].checked){bCheckFlag=false} else {bCheckFlag=true; break;}}
		if (bFlag && !bCheckFlag){bFlag=false; alert(ExpTrait); Dis.Traitee[0].focus();}
		if (bFlag && Dis.Mode_paiement.selectedIndex==0){bFlag=false; alert(ExpPayMode2); Dis.Mode_paiement.focus();}
		if (bFlag && !check_date(Dis.Date_souscription.value)){bFlag=false; alert("Indiquez une date de souscription valide, svp."); Dis.Date_souscription.focus();}
		}	

	for (i=0; i<Dis.RC_tiers_type.length; i++){if (!Dis.RC_tiers_type[i].checked){bCheckFlag=false} else {bCheckFlag=true; break;}}
	if (bFlag && !bCheckFlag){bFlag=false; alert(ExpRCTT); Dis.RC_tiers_type[0].focus();}
	if (bFlag && Dis.RI_option.selectedIndex==0){bFlag=false; alert(ExpRIO); Dis.RI_option.focus();}
	if (bFlag && !check_int(Dis.RCPCC_nbre, true, true)){bFlag=false; Dis.RCPCC_nbre.value=0; alert(ExpRCPCCNbre); Dis.RCPCC_nbre.focus();}	
	if (!Dis.EAB[0].checked && !Dis.EAB[1].checked && bFlag){bFlag=false; alert(ExpEAB); Dis.EAB[0].focus();}	
	*/

	
//EVAL SOUS
	Chasse01Eval(DaAct);	

//SEND
	if(DaAct=="ADMEDIT" || DaAct=="ADMCOPY")
		{
		if (bFlag)
			{
			if (confirm(ExpMod)){Dis.act.value=DaAct; Dis.method=DaMeth; Dis.action=DaPage; Dis.submit();}
			else {alert(ExpModCancel);}
			}
		}
	else
		{
		if(bFlag){Dis.act.value=DaAct; Dis.method=DaMeth; Dis.action=DaPage; Dis.submit();}
		}
}
//----------------------------
function SearchCheck()
{
	var Dis=document.Form01; var bFlag=true; var DaTarget=""; var DaPage=""; var DaTarget=""; var i=0; var DaOutPut=1;
	//PID OR AID
	if(Dis.PID.selectedIndex==0 && Dis.AID.selectedIndex==0){bFlag=false; alert("Préscripteur : sélectionnez un partenaire OU une agence du partenaire"); Dis.AID.focus();}
	
	
	//TARGET ?
	for (i=0;i<Dis.OutPut.length;i++){if (Dis.OutPut[i].checked==true){DaOutPut=i+1; break;}}
	switch (DaOutPut.toString())
	{
		case "1"	: DaAct="WEB";			DaPage="list.asp";		DaTarget='_self';	if (bFlag && !check_empty(Dis.WebName.value)){bFlag=false; alert(ExpWebName); Dis.WebName.focus();}; break;
		case "2"	: DaAct="PRINT";		DaPage="print.asp";		DaTarget='_blank';	if (bFlag && !check_empty(Dis.PrintName.value)){bFlag=false; alert(ExpPrintName); Dis.PrintName.focus();}; break;
		case "3"	: DaAct="EXPCOMPTA";	DaPage="export.asp";	DaTarget='_blank';	if (bFlag && !check_empty(Dis.ExpName1.value)){bFlag=false; alert(ExpExportName); Dis.ExpName1.focus();};	break;
		case "4"	: DaAct="EXPEMAILING";	DaPage="export.asp";	DaTarget='_blank';	if (bFlag && !check_empty(Dis.ExpName2.value)){bFlag=false; alert(ExpExportName); Dis.ExpName2.focus();};	break;
		case "5"	: DaAct="EXPPMAILING";	DaPage="export.asp";	DaTarget='_blank';	if (bFlag && !check_empty(Dis.ExpName3.value)){bFlag=false; alert(ExpExportName); Dis.ExpName3.focus();};	break;
		default		: DaAct="WEB";			DaPage="list.asp";		DaTarget='_self';	if (bFlag && !check_empty(Dis.WebName.value)){bFlag=false; alert(ExpWebName); Dis.WebName.focus();}; break;
	}		
	//SEND
	if (bFlag){Dis.act.value=DaAct; Dis.action=DaPage; Dis.method="get"; Dis.target=DaTarget; Dis.submit();}		
}
//----------------------------
function Chasse01EditBack(DaAct, DaMeth, DaPage)
{
	var Dis=document.Form01;
	Dis.act.value=DaAct; Dis.method=DaMeth; Dis.action=DaPage; Dis.submit();
}
//----------------------------
function Chasse01Pay(DaAct, DaMeth, DaPage)
{
	var Dis=document.Form01; 
	Dis.act.value=DaAct; Dis.method=DaMeth; Dis.action=DaPage; Dis.submit();
}
//----------------------------	
function Chasse01ExportCheck(DaAct)
{
	var Dis=document.Form01; var bFlag=true; var DaTarget=""; var DaPage=""; var DaTarget="";
	//CHECK 
	if (bFlag && !check_date(Dis.Date01.value)){bFlag=false; alert("Du : "+ExpDateValid); Dis.Date01.focus();}
	if (bFlag && !check_date(Dis.Date02.value)){bFlag=false; alert("Au : "+ExpDateValid); Dis.Date02.focus();}

	//TARGET ?
	switch (DaAct)
	{
		case "AVEXP01PROC"	: DaPage="ventil.asp"; DaTarget='_self'; break;
		//case "AVEXP02PROC"	: DaPage="ventil.asp"; DaTarget='_self'; break;
		default			: bFlag=false; break;
	}
	//SEND
	if (bFlag){Dis.Act.value=DaAct; Dis.action=DaPage; Dis.method="get"; Dis.target=DaTarget; Dis.submit();}		
}
//----------------------------