// #5524 [START] Date format settings
function datePreview(){
	var selection = document.getElementById("formatSelect").value;

	var url = 'index.php?module=AdvancedReports&view=AdvancedReportsAjax&file=controller&a=dateFormat&select='+selection ;
	jQuery.get(url, function(response) {
		jQuery("#preview").html(response);
	});
}

function initDefaultSelect(){
	var select = document.getElementById("formatSelect");
	var url = 'index.php?module=AdvancedReports&view=AdvancedReportsAjax&file=controller&a=dateFormat&init=True';
	jQuery.get(url, function(response) {
		select.value = response;
		datePreview();
	});
}

jQuery(document).ready(function() {
	initDefaultSelect();
});

jQuery(document).ready(function() {
	initDefaultSelect();
});
// #5524 [END]