function saveContent(element_id, html, body) {
	// Do some custom HTML cleanup
	
	
	html = html.replace(/&/g,'{{[amp]}}');
		
	//alert(html);
	document.getElementById('cont').value = html;
	document.getElementById('titulo').value = document.getElementById('titulo').value.replace(/&/g,'{{[amp]}}');;
	document.getElementById('tags').value = document.getElementById('tags').value.replace(/&/g,'{{[amp]}}');;
	
	if($type(document.gal) == false)
	{
		//nada
	}
	else
	{
		try
		{
			document.getElementById('photos').value = document.gal.getSelected();
		}
		catch(err)
		{
			document.getElementById('photos').value = "{}";
		}
		
	}
	
	
	
	//
	document.ajaxer.sendForm('newContentForm1','modulos/cmanager2/data/main.php',{mode:'POST'});		
	//alert('lol');
	
	return html;
}

function saveContentAjax(tinyMCE) {
	// Do some custom HTML cleanup
	
	var html = tinyMCE.getContent();
	
	html = html.replace(/&/g,'{{[amp]}}');
		
	//alert(html);
	document.getElementById('cont').value = html;
	document.getElementById('titulo').value = document.getElementById('titulo').value.replace(/&/g,'{{[amp]}}');;
	document.getElementById('tags').value = document.getElementById('tags').value.replace(/&/g,'{{[amp]}}');;
	
	if($type(document.gal) == false)
	{
		//nada
	}
	else
	{
		try
		{
			document.getElementById('photos').value = document.gal.getSelected();
		}
		catch(err)
		{
			document.getElementById('photos').value = "{}";
		}
		
	}
	
	
	
	//
	document.ajaxer.sendForm('newContentForm1','modulos/cmanager2/data/main.php',{mode:'POST'});		
	//alert('lol');
	
	return html;
}