function checkConfirmUrl(url) {
       var a = false;
       a= confirm ('Voulez-vous supprimer cet element ?');
       if (a) {
           document.location.href = url;
       }
}

function popup(url) {
	var edit = window.open(url, 'editorWindow', 'width=500, height=400, resizable=no');
	edit.focus();
}
function waitImg(htmlDiv) {
	$(htmlDiv).innerHTML = '<img src="themes/admin/images/wait.gif"> Chargement ...';
}

function delPhoto (htmlDiv, elt, id) {
	var url = 'admin.php?ob=fonction&act=delPhoto&pop=X&elt='+elt+'&id='+id;
	var myAjax = new Ajax.Updater(htmlDiv, url, {   
		method: 'get'
	}); 
}

function openEditor(textarea, divPreview, width, height) {

	// location of edit.php file:
	var editFile = 'admin.php?ob=edit&src='+textarea+'&previsu='+divPreview;
	
	var edit = window.open(editFile, 'editorWindow', 'width='+width+', height='+height+', resizable=yes');
	edit.focus();
}
