events.add(window, 'load', WindowLoad);

		function WindowLoad()
		{
			/*
				Example 1 Description:
				The DateChooser will close 200 milliseconds after mouseout.
				It will show 10 pixels to the right of, and 10 pixels above the click.
				It will call the FunctionEx1() function (below) when updated.
				Instead of using setLink() or setIcon(), so it attaches an event handler to 'datelinkex1' in the markup.
			*/

			var ndExample1 = document.getElementById('datechooser');
			ndExample1.DateChooser = new DateChooser();

			// Check if the browser has fully loaded the DateChooser object, and supports it.
			if (!ndExample1.DateChooser.display)
			{
				return false;
			}

			ndExample1.DateChooser.setCloseTime(200);
			ndExample1.DateChooser.setXOffset(10);
			ndExample1.DateChooser.setYOffset(-10);
			ndExample1.DateChooser.setUpdateFunction(FunctionEx1);
			document.getElementById('datelink').onclick = ndExample1.DateChooser.display;
		}
		
		function FunctionEx1(objDate){
			// objDate is a plain old Date object, with the getPHPDate() property added on.
			document.getElementById('deliveryDate').value = objDate.getPHPDate('m/d/y');
			return true;
		}
