//checks all DataGrid CheckBoxes with the given name with the given value
// Ex. Mailing
    function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) {
        re = new RegExp(':' + aspCheckBoxID + '$')  //generated control name starts with a colon

        for(i = 0; i < document.forms[0].elements.length; i++) {

            elm = document.forms[0].elements[i]

            if (elm.type == 'checkbox') {

                //if (re.test(elm.name)) {

                    elm.checked = checkVal
                //}
            }
        }
    }
//_____________________FIN checks all DataGrid CheckBoxes____________________

// Coche ou décoche les clients d'une liste_____________________________________________
function checkAll(lstClients_Id, Chk_Id) 
{
	if (document.layers) {
		for ( var i=0;i<document.layers[lstClients_Id].length;i++ )
		{
			if(document.layers[Chk_Id].checked)
				document.layers[lstClients_Id].options[i].selected=true;
			else
				document.layers[lstClients_Id].options[i].selected=false;
		}				
	}
	if (document.all) {								
		for ( var i=0;i<document.all[lstClients_Id].length;i++ )
		{
			if(document.all[Chk_Id].checked)
				document.all[lstClients_Id].options[i].selected=true;
			else
				document.all[lstClients_Id].options[i].selected=false;
		}					
	}
	// NS6 : celui-ci ne supporte plus document.layers mais document.getElementById
	else if (document.getElementById) {					
		for ( var i=0;i<document.all[lstClients_Id].length;i++ )
		{
			if(document.getElementById(Chk_Id).checked)
				document.getElementById(lstClients_Id).options[i].selected=true;
			else
				document.getElementById(lstClients_Id).options[i].selected=false;
		}					
	}			
}
//___________________________________ FIN Coche ou décoche les clients d'une liste______________________________





// Affiche un message rappelant à l'utilisateur d'enregistrer son travail. Session = 20 min______________________
/*var actif = window.setInterval("MsgSession()",900000);
var i = 0, couleur = 1;
function MsgSession() {
  alert("Enregistrez votre travail avant que votre session expire.\nCe message s'affiche automatiquement toutes les 15 minutes.") ; 
 
}*/
//___________________________________ FIN Affiche un message______________________________



// Raccourcis Menu_____________________________________________
/*function ShortsMenu(TypeAction, HrefShort, HeaderTitle) 
{ 	
	if(TypeAction == "Del")
	{		
		confirm("Etes-vous sur de vouloir supprimer le titre " + HeaderTitle + " ?");		
	}		
	
	if(TypeAction == "Add")
	{
		window.location.href = HrefShort ;
	}	
	
	if(TypeAction == "Edit")
	{
		window.location.href = HrefShort ;
	}	
}

function ShortsLinks(TypeAction, HrefShort, LinkTitle) 
{ 	
	if(TypeAction == "Del")
	{		
		confirm("Etes-vous sur de vouloir supprimer le titre " + LinkTitle + " ?");		
	}		
	
	if(TypeAction == "Add")
	{
		window.location.href = HrefShort ;
	}	
	
	if(TypeAction == "Edit")
	{
		alert("Edit") ;
		window.location.href = HrefShort ;
	}	
}*/

//___________________________________ FIN _______________________________________________________
