
function go(day) {
	location.href='#' + day;
}
function goMonth(val) {
	var fm = document.diaryForm;
	if (val == 1 && fm.m.selectedIndex > 1) {
		fm.m.options[(fm.m.selectedIndex-1)].selected=true; 
		fm.submit();
	} else if (val == -1 && fm.m.selectedIndex < fm.m.options.length-1) {
		fm.m.options[(fm.m.selectedIndex+1)].selected=true;
		fm.submit();
	} else if (val == 0) {
		if (fm.m.value != '') fm.submit();
	} else {
		alert('This is the last month containing diary.');
	}
}
function getCode() {
	return (100 + Math.floor(Math.random()*100)) * 4 * 13;
}