function writediv(texte,id)
{
	document.getElementById('divaction'+id).innerHTML = texte;
}
function addslashes(str) {
	
	 str=str.replace('"','');
     str=str.replace(/\'/g,'\\\'');
     str=str.replace(/\"/g,'\\"');
     str=str.replace(/\\/g,'\\\\');
     str=str.replace(/\0/g,'\\0');
	 	 
     return str;
}

function str_replace(cherche,remplace,texte){ 
	while(texte.indexOf(cherche) > -1){ 
		texte = texte.replace(cherche,remplace); 
	} 
	return texte; 
}

function stripslashes(str) {
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	str=str.replace(/\\\\/g,'\\');
	return str;
}

function view_desc(id){
	$('.filelist').fadeOut("fast");
	
	 if($('#file_'+id).val() == 'close'){
		 
		$('#file_'+id).fadeIn("slow");
		$('#file_'+id).val("open");
	 }
	 else{
		 
		 $('#file_'+id).fadeOut("slow");
		 $('#file_'+id).val("close");
	 }
	
}
/*function hide_desc(id){
	$('.filelist').fadeIn("slow");
	$('#file_'+id).fadeOut("fast");
}*/

function view_fck(id){
	$('#comment'+id).fadeOut("fast");
	$('#btnwrite'+id).fadeOut("fast");
	$('#divfck'+id).fadeIn("slow");
}
function view_comment(id){

	$('#divfck'+id).fadeOut("fast");
	$('#btnwrite'+id).fadeIn("slow");
	$('#comment'+id).fadeIn("slow");
}





function file(fichier)
 {
 if(window.XMLHttpRequest) // FIREFOX
	  xhr_object = new XMLHttpRequest(); 
 else if(window.ActiveXObject) // IE
	  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
 else 
	  return(false); 
 xhr_object.open("GET", fichier, false); 
 xhr_object.send(null); 
 if(xhr_object.readyState == 4) return(xhr_object.responseText);
 else return(false);
 }
