// requires the separate file eventHandlersHandler.js for the eventHandlersHandler functions


// NOTES on programming this type of thing! DHTML, AJAX, and wrapper-objects require setTimeout delays for processing to occur before the next code executes. It might be better to make a event handling mechanism where objects notify other objects when they can begin the next execution ... 


// global variables:

var onWindowLoad, typeOfWindowEvent, objDelayedForwarderApplication, makeObjDelayedForwarderApplication; 











// this object is instantiated so that the wrapper objects can be properties of it and so they don't need to be global variables

makeObjDelayedForwarderApplication = function() {
		
	// these vars become private variables only accessible through the getters and setters defined in the returned object literal:
	
	var objEnrollmentFormApplicationObjectLiteral, forwardToHomePageAfterDelay;
	
	
	
	// the following object literal defines the methods, it's returned as the result of calling the maker function:
	
	objDelayedForwarderApplicationObjectLiteral = {
		
		forwardToHomePageAfterDelay: function() {
			
			var forwardToHomePage = function() { // inner helper function inside method
				
				window.location = '/home/';
				
			} // forwardToHomePage
			
			setTimeout(forwardToHomePage,5000); // six seconds
			
		} // forwardToHomePageAfterDelay
	
	} // objDelayedForwarderApplicationObjectLiteral
		
	return objDelayedForwarderApplicationObjectLiteral;
	
} // makeObjDelayedForwarderApplication













// event handler functions must be defined before they're called:

onWindowLoad = function() {
	
	
	
	objDelayedForwarderApplication = makeObjDelayedForwarderApplication();
	objDelayedForwarderApplication.forwardToHomePageAfterDelay();
	
	

} // onWindowLoad







// fire script:

typeOfWindowEvent = typeof(window.event);
attachEventHandler(typeOfWindowEvent,window,'unload',function(){},false); // prevent browser from caching previous state
attachEventHandler(typeOfWindowEvent,window,'load',onWindowLoad,false); // 


