function go_url(url){
	document.location.href=url;
}
function flip_time(the_obj){
	dest_obj=document.getElementById('time_div');
	if(the_obj.checked){
		dest_obj.className='vis';
	}else{
		dest_obj.className='hidden_div';
	}
}
function focus_me(the_div){
	if(document.getElementById(the_div).value==the_div)
		document.getElementById(the_div).value='';
}
function blur_me(the_div){
	if(document.getElementById(the_div).value=='')
		document.getElementById(the_div).value=the_div;
}
function submit_data(submit_url, return_url, diary_id){
	frm_obj=document.frm_treatment_report;
	frm_obj.action=submit_url;
	frm_obj.ret_url.value=return_url;
	frm_obj.ret_id.value=diary_id;
	frm_obj.submit();
}
function pop_url(url){window.open(url , '','toolbar=no,status=yes,scrollbars,resizable,dependent,width=720,height=600,left=0,top=0');}
function go_back(){
	window.history.go(-1);
}
function popm_url(url, width, height){
	width=(width/100)*screen.width;
	height=(height/100)*screen.height;
	window.open(url, '', 'toolbar=no,status=yes,scrollbars,resizable,dependent,width=' + width + ',height=' + height + ',left=0,top=0');
}
function remove_diary_entry(the_id, table_name){
	if(confirm('Really want to remove this entry?')){
		makeRequest('remove_diary_entry.php?id=' + the_id + '&table=' + table_name); return;
	}
}
