<!--
   _editor_url = "../javascript/htmlarea/";
   _editor_lang = "fr";
function show(whichLayer) {
    if (document.getElementById) {
                layerName = document.getElementById(whichLayer);
                layerName.style.display = 'block';
    }
    else if (document.all) {
                layerName = eval(whichLayer);
                layerName.style.display = 'block';
    }
}

function hide(whichLayer) {
    if (document.getElementById) {
                layerName = document.getElementById(whichLayer);
                layerName.style.display = 'none';
    }
    else if (document.all) {
                layerName = eval(whichLayer);
                layerName.style.display = 'none';
    }
}
function switch_display(whichLayer) {
    if (document.getElementById)
                layerName = document.getElementById(whichLayer);
    else if (document.all)
                layerName = eval(whichLayer);
    
    if (layerName.style.display == 'none')
		show(whichLayer);
    else	hide(whichLayer);
}
function launch_thickbox(href) {
	TB_show('Preview',href,false);
	return false;
}
function deleteDialog(url) {
	if (confirm("Souhaitez-vous supprimer cet élément et son contenu définitivement ?"))
		document.location.href = url;
}
function deleteDialogSubmit(formId, inputId, value) {
	if (confirm("Souhaitez-vous supprimer cet élément et son contenu définitivement ?")) {
		document.getElementById(inputId).value = value;
		document.getElementById(formId).submit();
	}
}

function loading(id, size) {
	var oFCKeditor1 = new FCKeditor(id);
	oFCKeditor1.BasePath = "../javascript/fckeditor/";
	oFCKeditor1.ToolbarSet = "wa2" ;
	oFCKeditor1.Height = size;
	oFCKeditor1.ReplaceTextarea();
	/*config = new HTMLArea.Config();
	config.statusBar	= false;
	config.width		= '500px';
	config.height		= size+'px';
	config.sizeIncludesToolbar = false;

	// parameters:        button ID,   tooltip,          image,           textMode,
	config.registerButton("gauche_perso", "Alignement à gauche", "../javascript/htmlarea/images/ed_align_left.gif", false,
	// function that gets called when the button is clicked
	  function(editor, id) {
	    editor.surroundHTML('<div align="left">', '</div>');
	  }
	);

	// parameters:        button ID,   tooltip,          image,           textMode,
	config.registerButton("centrer_perso", "Alignement centré", "../javascript/htmlarea/images/ed_align_center.gif", false,
	// function that gets called when the button is clicked
	  function(editor, id) {
	    editor.surroundHTML('<div align="center">', '</div>');
	  }
	);

	// parameters:        button ID,   tooltip,          image,           textMode,
	config.registerButton("droite_perso", "Alignement à droite", "../javascript/htmlarea/images/ed_align_right.gif", false,
	// function that gets called when the button is clicked
	  function(editor, id) {
	    editor.surroundHTML('<div align="right">', '</div>');
	  }
	);

	// parameters:        button ID,   tooltip,          image,           textMode,
	config.registerButton("full_perso", "Alignement justifié", "../javascript/htmlarea/images/ed_align_justify.gif", false,
	// function that gets called when the button is clicked
	  function(editor, id) {
	    editor.surroundHTML('<div style="text-align:justify;">', '</div>');
	  }
	);

	config.toolbar = [
	  ['bold', 'italic', 'underline', 'separator',
	  "gauche_perso", "centrer_perso", "droite_perso", "full_perso", 'separator',
	  "insertorderedlist", "insertunorderedlist","createlink", "insertimage"]
	];
	HTMLArea.replace(id, config);*/
	
	//return oFCKeditor1;
}
function AddDownload (id, sTempUrl) {
	FCKeditorAPI.GetInstance(id).CreateLink(sTempUrl);
}
function gotodownload(url) {
	if (url != "") {
		window.open(url,"Download","width=100,height=100,left=10,top=10,status=no");
	}
}
function changeUni(Id, dir, src) {
	if (document.getElementById(Id)) {
		document.getElementById(Id).src	= dir+'/'+src;
	}
}
function chargeCookieIframe(url) {
	window.open("generate_cookie.php?frame_url="+url, "cookextranet", "scrollbars=no,lef=-1000,width=0,height=0,dependent=no,directories=no ,top=-1000,status=no,menubar=no,location=no,resizable=no");
}
//-->

