var old_class;
function check_button(button_id, row_id, menu_buttons){
	var button=document.getElementById(button_id);
	var row=document.getElementById(row_id);
	z = 1;
	for(var x=0;x<menu_buttons.length;x++){
		menu_buttons[x].checked=false;
		var rid = menu_buttons[x].value;
		var myrow = 'row_'+rid;
		document.getElementById(myrow).className='row_'+z;
		if(z == 2){
			z = 1;
		}else{
			z = 2;
		}
	}
	button.checked=true;
	old_class = row.className;
	row.className = 'checked';
}

function change_class(myclass, row_id, button_id){
	var button=document.getElementById(button_id);
	var row=document.getElementById(row_id);
	if(button.checked!=true){
		row.className = myclass;
	}
}

function change_class_cal(myclass, day_id){
	var day=document.getElementById(day_id);
	day.className = myclass;
}

function new_window(file, width, height, name){
	var x = (screen.availWidth - width) / 2;
	var y = (screen.availHeight - height) / 2;
	window.open(file, name, 'resizable=yes,scrollbars=yes,height='+height+'px,width='+width+'px,status=yes,left='+x+',top='+y+'').focus();
}

function close_window(){
	window.opener.document.forms[0].submit();
	window.close();
}
function show_wait_message(){
	obj = document.getElementById('wait_message');
	if (navigator.appName == "Microsoft Internet Explorer"){
		var y = document.body.scrollTop;
	}else{
		var y = window.pageYOffset;
	}
	obj.style.top = (parseInt(y)+200)+'px';
	obj.style.visibility = 'visible';
	setTimeout('window.close()',2000);
}
