

function init_plugin_document(){
	switch($.urlParam('page')){
		default:
		break;
	}

	var urlOptions = $.urlParam('data');
	if(urlOptions && urlOptions!=''){
		urlOptions = JSON.parse(atob(urlOptions));
	}
	
	var doc = new DocumentApi('#document-container',urlOptions);

	doc.load();



}


/** SETTINGS */
//Enregistrement des configurations
function document_setting_save(){
	$.action({ 
		action : 'document_setting_save', 
		fields :  $('#document-setting-form').toJson() 
	}, function(r){
		$.message('success','Enregistré');
	});
}


