<!--
function VerifSaisie()
{
    var oName = GetObj('Subject');
    if(oName && oName.value == "")
    {
    	alert('Vous devez saisir un sujet !');
        oName.focus();
    	return false;
    }

    oName = GetObj('Text');
    if(oName && oName.value == "")
    {
    	alert('Vous devez saisir un texte !');
        oName.focus();
    	return false;
    }

    var oType = GetObj('TypeN');
    if(oType && oType.checked)
    {
	    oName = GetObj('NbDays');
	    if(oName && oName.value == "")
	    {
	    	alert('Vous devez saisir un nombre de jours !');
	        oName.focus();
	    	return false;
	    }
        if(isNaN(oName.value))
	    {
	    	alert('Vous devez saisir une valeur numérique pour le nombre de jours !');
	        oName.focus();
	    	return false;
	    }
    }
	oType = GetObj('TypeD');
	if(oType && oType.checked)
	{
	    oName = GetObj('Date');
	    if(oName && oName.value == "")
	    {
	    	alert('Vous devez saisir une date !');
	        oName.focus();
	    	return false;
	    }
		var Reg=new RegExp("^[0-9]{2}[/]{1}[0-9]{2}[/]{1}[0-9]{4}$","g");
		if(!Reg.test(oName.value))
		{
			alert("Vous devez saisir une date valide");
			oName.focus();
			return false;
		}
	}
    oName = GetObj('Hour');
    if(oName && isNaN(oName.value))
    {
    	alert('Vous devez saisir une valeur numérique pour l\'heure d\'envoi !');
        oName.focus();
    	return false;
    }
}
function CheckAll()
{
	var bCheck = false;
	var oObj = GetObj("all");
	if(oObj && oObj.checked) bCheck = true;
	var i = 0;
	while(oObj)
	{
		oObj = GetObj("del"+i);
		if(oObj) oObj.checked = bCheck;
		i ++;
	}

}

function ConfirmDeleteAttach()
{
	return confirm("Etes vous sur de vouloir supprimer cet attachement ?");
}


function Add()
{
	oObj = GetObj("NewAction");
	if(oObj) oObj.value = 'V';
	return true;
}

function DeleteAttach(Id)
{
	if(!ConfirmDeleteAttach())
		return false;
	sName = 'Path'+Id;
    oName = GetObj(sName);
    if(oName && oName.value != "") oName.value = "";
	oObj = GetObj("NewAction");
	if(oObj) oObj.value = 'V';
	return true;
}

function ConfirmDeleteCriterion()
{
	return confirm("Etes vous sur de vouloir supprimer ce critère ?");
}

function DeleteCrit(Id)
{
	if(!ConfirmDeleteCriterion())
		return false;
	sName = 'CritVar'+Id;
    oName = GetObj(sName);
    if(oName && oName.value != "") oName.value = "0";
	oObj = GetObj("NewAction");
	if(oObj) oObj.value = 'V';
	return true;
}

function TestMail()
{
//	alert('TestMail');
//	alert(document.forms["formfiche"].action);
	document.forms["formfiche"].action = "testmail.php";
//	alert(document.forms["formfiche"].action);
	return true;
}

function FCKeditor_OnComplete( editorInstance )
{
	editorInstance.Events.AttachEvent( 'OnBlur'	, FCKeditor_OnBlur ) ;
	editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
}

function FCKeditor_OnBlur( editorInstance )
{
	editorInstance.ToolbarSet.Collapse() ;
}

function FCKeditor_OnFocus( editorInstance )
{
	editorInstance.ToolbarSet.Expand() ;
}


function SetMailHtml()
{
	var sBasePath = '/mailing/' ;

	oFCKeditor = new FCKeditor( 'TextHtml' ) ;
//		oFCKeditor.Config['ToolbarStartExpanded'] = false ;
	oFCKeditor.Config['SkinPath'] = sBasePath+'js/fckeditor/editor/skins/office2003/' ;
	oFCKeditor.Config['PreloadImages'] = sBasePath+'js/fckeditor/editor/skins/office2003/images/toolbar.start.gif;'+sBasePath+'js/fckeditor/editor/skins/office2003/images/toolbar.end.gif;'+sBasePath+'js/fckeditor/editor/skins/office2003/images/toolbar.bg.gif;'+sBasePath+'js/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif';
	oFCKeditor.Height = 600 ;
	oFCKeditor.Width = 450 ;
	oFCKeditor.BasePath	=  sBasePath + 'js/fckeditor/' ;
	oFCKeditor.Config["CustomConfigurationsPath"] = sBasePath + 'js/fckeditor/fckconfigCM.js' ;
	oFCKeditor.ToolbarSet = 'Basic' ;
	oFCKeditor.ReplaceTextarea() ;
}
-->