function onSelectAbonnes(){
	var liste = document.getElementById ("liste");
	var selection = document.getElementById ("selection");
	if(liste.selectedIndex != -1){
		var selected = liste.options[liste.selectedIndex];
		liste.remove(liste.selectedIndex);
		try {
			selection.add(selected, null); // standards compliant; doesn't work in IE
		}
		catch(ex) {
			selection.add(selected, 0); // IE only
		}
	}

}

function onUnSelectAbonnes(){
	var liste = document.getElementById ("liste");
	var selection = document.getElementById ("selection");
	if(selection.selectedIndex != -1){
		var selected = selection.options[selection.selectedIndex];
		selection.remove(selection.selectedIndex);
		try {
			liste.add(selected, null); // standards compliant; doesn't work in IE
		}
		catch(ex) {
			liste.add(selected, 0); // IE only
		}
	}
}

function SelectAllAbonnes()
{
var liste = MM_findObj('liste');
var selection = MM_findObj('selection');

	for(boucletab=0;boucletab<selection.length;boucletab++)
		selection.options[boucletab].selected='selected';
}

function onSelectAbonnes2(){
	var liste = document.getElementById ("liste2");
	var selection = document.getElementById ("selection2");
	if(liste.selectedIndex != -1){
		var selected = liste.options[liste.selectedIndex];
		liste.remove(liste.selectedIndex);
		try {
			selection.add(selected, null); // standards compliant; doesn't work in IE
		}
		catch(ex) {
			selection.add(selected, 0); // IE only
		}
	}

}

function onUnSelectAbonnes2(){
	var liste = document.getElementById ("liste2");
	var selection = document.getElementById ("selection2");
	if(selection.selectedIndex != -1){
		var selected = selection.options[selection.selectedIndex];
		selection.remove(selection.selectedIndex);
		try {
			liste.add(selected, null); // standards compliant; doesn't work in IE
		}
		catch(ex) {
			liste.add(selected, 0); // IE only
		}
	}
}

function SelectAllAbonnes2()
{
var liste = MM_findObj('liste2');
var selection = MM_findObj('selection2');

	for(boucletab=0;boucletab<selection.length;boucletab++)
		selection.options[boucletab].selected='selected';
}

function MM_findObj(n, d)
{ //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function masque(masque_tab)
{
objet=MM_findObj(masque_tab);

if(objet.style.display=='none')
	objet.style.display='block';
else
	objet.style.display='none';
}

function go(lien)
{
	parent.location=lien;
}

function soumet(idmessage,idaction)
{
	document.form_liste.message.value=idmessage;
	document.form_liste.id_action.value=idaction;
	document.form_liste.submit();
}

function sel_all(nombre)
{
if(nombre>0)
	for(boucle=0;boucle<nombre;boucle++)
	{
		if(eval('document.form_liste.case'+boucle+'.checked==""'))
			eval('document.form_liste.case'+boucle+'.checked="checked"');
		else
			eval('document.form_liste.case'+boucle+'.checked=""');
	}
}
