function js_datepicker() {
	
	Date.format = "yyyy-mm-dd";
    Date.firstDayOfWeek = 7;
	
	$(".date-pick").datePicker();
    
	$(".date-pick-onfocus")
		.datePicker()
		.bind(
			"focus",
			function()
			{
				$(this).dpDisplay();
                $(".cluetip-diaryhelp").hide();
			}
        ).bind(
			"blur",
			function(event)
			{
				// works good in Firefox... But how to get it to work in IE?
				if ($.browser.mozilla) {

					var el = event.explicitOriginalTarget
					
					var cal = $("#dp-popup")[0];
				
					while (true){
						if (el == cal) {
							return false;
						} else if (el == document) {
							$(this).dpClose();
							return true;
						} else {
							el = $(el).parent()[0];
						}
					}
				}
			}
	);
		
}