/**
 * @author sasha
 * Frontend functions
 */

var input_check_state = 0

function timedMsg(){
	var t=setTimeout("$('#flashMessage:not(.permanent)').parent().fadeOut('slow');",5000);
}

function checkMessages(form){
	if(input_check_state == 0) {
		$("#" + form +" input[type=checkbox]").attr('checked', true);
		input_check_state = 1;
	}
	else if(input_check_state == 1){
		$("#" + form +" input[type=checkbox]").attr('checked', false);
		input_check_state = 0;
	}
}

function submiform(form){
	document.getElementById(form).submit();
}