	function showhideFilterDiv(div, showhide) {
		thediv = document.getElementById(div) ;
		if(showhide == 'show') {
			thediv.style.display = '' ;
			document.getElementById('show' + div).style.display = 'none' ;
			document.getElementById('hide' + div).style.display = '' ;
		}
		if(showhide == 'hide') {
			thediv.style.display = 'none' ;
			document.getElementById('show' + div).style.display = '' ;
			document.getElementById('hide' + div).style.display = 'none' ;
		}
	}


	function confirmDeletion (goLocation, title) {
		inputBox = confirm("Click OK to delete entry '" + title + "' or Cancel to stay on the current page.") ;
			
			if (inputBox == true) { 
				// Redirect
				window.location = goLocation ;
			}
			else {
				// Notice
				alert('Entry NOT deleted.') ;
			}	
	}

	function setCurrentTime(theFormID) {
		var now = new Date() ;
		var hour        = now.getHours() ;
		var minute      = now.getMinutes() ;
		
		var hourIndex = hour ;
		var minuteIndex = Math.round(minute / 5) ;
		
		if(minuteIndex == 12) {
			hourIndex = hourIndex + 1 ;
			minuteIndex = 0 ;
		}
		
		if(theFormID == 'to') {
			document.HRNew.hours_2.options[hourIndex].selected = true ;
			document.HRNew.minutes_2.options[minuteIndex].selected = true ;
		}
		
		if(theFormID == 'from') {
			document.HRNew.hours_1.options[hourIndex].selected = true ;
			document.HRNew.minutes_1.options[minuteIndex].selected = true ;
			
			// Set to to be higher than this time (can't have negative entries) if lower than from
			var FromHourIndex = document.HRNew.hours_1.options.selectedIndex ;
			var ToHourIndex = document.HRNew.hours_2.options.selectedIndex ;
			
			var FromMinuteIndex = document.HRNew.minutes_1.options.selectedIndex ;
			var ToMinuteIndex = document.HRNew.minutes_2.options.selectedIndex ;
			
			// Set hour
			if(FromHourIndex > ToHourIndex) {
				document.HRNew.hours_2.options[document.HRNew.hours_1.options.selectedIndex].selected = true  ;
			}
			
			// Set minutes too if too small and equal hours
			if((FromHourIndex == FromHourIndex && FromMinuteIndex > ToMinuteIndex)) {
				document.HRNew.minutes_2.options[document.HRNew.minutes_1.options.selectedIndex].selected = true ;
			}
		}
	}
	
	function GoJump(page) {
		document.location = page ;
	}	
