//Changes the displayed select
function changeSelected(a){
	eval(a+'();')
}
//Displays the daily select and hides the others
function daily(){
	document.getElementById('week_day').disabled=true;
	document.getElementById('week_day').style.visibility='hidden';
	document.getElementById('week_day').style.display='none';
	document.getElementById('week_day_label').style.visibility='hidden';
	document.getElementById('week_day_label').style.display='none';
	document.getElementById('month_day').disabled=true;
	document.getElementById('month_day').style.visibility='hidden';
	document.getElementById('month_day').style.display='none';
	document.getElementById('month_day_label').style.visibility='hidden';
	document.getElementById('month_day_label').style.display='none';
}
//Displays the weekly select and hides the others
function weekly(){
	document.getElementById('week_day').disabled=false;
	document.getElementById('week_day').style.visibility='visible';
	document.getElementById('week_day').style.display='inline';
	document.getElementById('week_day_label').style.visibility='visible';
	document.getElementById('week_day_label').style.display='inline';
	document.getElementById('month_day').disabled=true;
	document.getElementById('month_day').style.visibility='hidden';
	document.getElementById('month_day').style.display='none';
	document.getElementById('month_day_label').style.visibility='hidden';
	document.getElementById('month_day_label').style.display='none';
}
//Displays the monthly select and hides the others
function monthly(){
	document.getElementById('week_day').disabled=true;
	document.getElementById('week_day').style.visibility='hidden';
	document.getElementById('week_day').style.display='none';
	document.getElementById('week_day_label').style.visibility='hidden';
	document.getElementById('week_day_label').style.display='none';
	document.getElementById('month_day').disabled=false;
	document.getElementById('month_day').style.visibility='visible';
	document.getElementById('month_day').style.display='inline';
	document.getElementById('month_day_label').style.visibility='visible';
	document.getElementById('month_day_label').style.display='inline';
}
//Shows a confirmation box to remove a periodic report
function removePeriodicReport(a){
	//Shows a confirmation box to delete a periodic report
	if(window.confirm('Are you sure you want to delete this periodic report and all its generated reports?')){
		location = a;
	} else {
		location = "#";
	}
}
//Shows a confirmation box to remove the periodic report reports
function removePeriodicReportReports(a){
	if(window.confirm('Are you sure you want to delete the reports generated by this periodic report?')){
		location = a;
	} else {
		location = "#";
	}
}