function submitbutton(pressbutton) {
	var form = document.adminForm;
	switch(pressbutton){
		case 'cancel':
		case 'create':
			submitform( pressbutton );
			return;
	}
	if (form.title.value == ''){
		alert( lgMustAddChartTitle );
	} else if(form.category.value == '0'){
		alert( lgMustAddChartCategory );
	}  else if(form.type.value == '0'){
		alert( lgMustAddChartType );
	} else {
		submitform( pressbutton );
	}
}