

// Copyright (c) NimbleCat, 2008

/*
* this object wraps a DOM element
* 
* */
// make sure that the required includes are there
 if (typeof NC == 'undefined') {
       alert("element.js requires the NC JavaScript framework");
 }

 
 NC.core.EventType = {
	Abort: 		'abort',		// Loading of an image is interrupted 
	Blur:		'blur',			// An element loses focus 
	Change:		'change',		// The ctent of a field changes 
	Click:		'click',		// Mouse clicks an object 
	Dblclick:	'dblclick',		// Mouse double-clicks an object 
	Error:		'error',		// An error occurs when loading a document or an image 
	Focus:		'focus',		// An element gets focus 
	Keydown:	'keydown',		// A keyboard key is pressed 
	Keypress:	'keypress',		// A keyboard key is pressed 
	Keyup:		'keyup',		// A keyboard key is released 
	Load:		'load',			// A page or an image is finished loading 
	Mousedown:	'mousedown',	// A mouse button is pressed 
	Mousemove:	'mousemove',	// The mouse is moved 
	Mouseout:	'mouseout',		// The mouse is moved off an element 
	Mouseover:	'mouseover',	// The mouse is moved over an element 
	Mouseup:	'mouseup',		// A mouse butont is released 
	Reset:		'reset',		// The reset button is clicked 
	Resize:		'resize',		// A window or frame is resized 
	Select:		'select',		// Text is selected 
	Submit:		'submit',		// The submit button is clicked 
	Unload:		'unload'		// the page is unloaded 
 }
 
 NC.core.Event = {
 	getEventTarget: function( event) {
				// get the event target 
		var theTarget = event.target ? event.target : event.srcElement;
		if( theTarget && ( theTarget.nodeType == 3 || theTarget.nodeType == 4 ) ) {
			// for text nodes in Safari
  			theTarget = theTarget.parentNode;
		}
		return theTarget;
 	}
 }
 
 
 
 
 
 
 
 