/*
 * NeauxScript V0.5 (neauxscript.js)
 * Copyright (c) 2007-2009  NeauxWare Technologies
 * All rights reserved.
 * License @ http://www.opensource.org/licenses/mit-license.php
 */

(function(){Neaux={name:"NeauxScript",author:"H.G.Laffler",organization:"Neauxware Technologies",homePage:"http://www.neauxware.com",setNamespace:function(){for(var i=0;i<arguments.length;++i){var arr=(arguments[i] instanceof Array)?arguments[i]:[arguments[i]];for(var j=0;j<arr.length;j++){if(typeof arr[j]!="string"){throw new Error("setNamespace: Namespace must be specified as a string")}var sub=arr[j].split(".");var obj=window;for(var n=0;n<sub.length;n++){if(!obj[sub[n]]){obj[sub[n]]={}}if(typeof obj[sub[n]]=="object"){obj=obj[sub[n]]}else{throw new Error("setNamespace: All existing namespace nodes must be objects")}}}}},Module:(function(){var _registeredModules={};var _loadedModules=["neauxscript.js"];var _includePath=null;return{getModules:function(){return _loadedModules},getRegisteredModules:function(){return _registeredModules},getIncludePath:function(){var thePath=_includePath;if(thePath){return thePath}var theScripts=document.getElementsByTagName("script");for(var i=0;i<theScripts.length&&!thePath;++i){var theOffset=theScripts[i].src.search(/neaux(script|ware)\.js$/gi);if(theOffset>=0){thePath=theScripts[i].src.substring(0,theOffset)}}_includePath=thePath;return thePath},register:function(aModuleName,aFileName,aDateModified,aVersionModified){aModuleName=aModuleName.toLowerCase();aVersionModified=aVersionModified.toUpperCase();if(_registeredModules[aModuleName]){throw new Error("Register: Module, "+aModuleName+", error - duplicate registration")}if(aDateModified.search(/\d{8}/)<0){throw new Error("Register: Invalid date format ("+aDateModified+") specified for "+aModuleName+" module - YYYYMMDD is required")}if(aVersionModified.search(/\d\.\d\-[0-9X]\.\d{2}/)<0){throw new Error("Register: Invalid version format ("+aVersionModified+") specified for "+aModuleName+"module - N.N-X.NN is required")}_registeredModules[aModuleName]={file:aFileName,date:aDateModified,version:aVersionModified}},getVersionInfo:function(){var theDate="",theVersion="";var arrReg=_registeredModules;for(i in arrReg){if(arrReg[i].date>theDate){theDate=arrReg[i].date}if(arrReg[i].version>theVersion){theVersion=arrReg[i].version}}return{date:theDate,version:theVersion}},include:function(){var theModuleSet=[];for(var i=0;i<arguments.length;i++){var argList=arguments[i];if(typeof arguments[i]=="string"){argList=arguments[i].split(",")}else{if(!(argList instanceof Array)){throw new TypeError("Include: Java script files must be specified as strings")}}for(var j=0;j<argList.length;j++){if(argList[j] instanceof Array){throw new TypeError("Include: Arrays may only be specified at top level")}if(typeof argList[j]!="string"){throw new TypeError("Include: Java script files must be specified as strings")}theModuleSet.push(argList[j])}}for(var k=0;k<theModuleSet.length;k++){Neaux.Module.load(theModuleSet[k])}},load:function(aFileName){for(i=0;i<_loadedModules.length;++i){if(_loadedModules[i]==aFileName){throw new Error("DUPLICATE MODULE ERROR: "+aFileName)}}var theSrc=Neaux.Module.getIncludePath()+aFileName;document.write('<script type="text/javascript" src="'+theSrc+'"><\/script>');_loadedModules.push(aFileName)},toString:function(){return"[Neaux.Module]"}}})(),toString:function(){return"[Neaux]"}}
/*@cc_on            // IE Conditional Compilation directives (ignored by other browsers)
  @if (@_jscript)
    var isJSIE = true;
    var JSIE_version = @_jscript_version;   //IE8=5.8, IE7=5.7, IE6=5.6, IE5=5.5 or less
  @end
@*/
;Neaux.isJSIE=typeof(isJSIE)!="undefined"?isJSIE:false,Neaux.isWebKit=navigator.userAgent.indexOf("AppleWebKit/")>-1;Neaux.JSIE_version=typeof(JSIE_version)!="undefined"?JSIE_version:null;Neaux.register=Neaux.Module.register;Neaux.include=Neaux.Module.include;Neaux.register("neauxscript","neauxscript.js","20091208","0.5-1.01")})();
(function(){$EFN=(function(){});if(!window.Node){window.Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}}var _IECoreEnumerables=["toString","valueOf","toLocaleString"];Neaux.Object={isNative:function(aObj){return(typeof aObj=="object")&&(aObj.constructor==Object.prototype.constructor)},isCollection:function(aObj){return(typeof aObj=="object")&&(typeof aObj.length=="number")},merge:function(aObject){for(var i=1;i<arguments.length;++i){var theData=arguments[i]||{};if(typeof theData!="object"){throw new Error("Object.merge - All arguments must be objects")}for(var j in theData){aObject[j]=theData[j]}if(Neaux.isJSIE){_Object.ieEnumerableBugFix(aObject,theData)}}return aObject},Class:function(){var theConstructor=function(){var theArgs=Neaux.Object.collectionToArray(arguments);var thisConstructor=arguments.callee.prototype.__construct;thisConstructor.apply(this,theArgs)};Neaux.merge(theConstructor.prototype,{constructor:theConstructor,__construct:$EFN,__superclass:null,Super:function(){if(arguments.length<1){throw new Error("Class::Super - You must pass the arguments object")}var theProxy=arguments[0].callee;var theArgs=arguments.length>1?Neaux.Object.collectionToArray(arguments,1):[];theProxy.__cptr.__superclass.constructor.apply(this,theArgs)}});Neaux.merge(theConstructor,(function(){return{__superclass:null,Define:function(aMembers){return _Object.Define(theConstructor,aMembers)},Extends:function(aBase){return _Object.Extends(theConstructor,aBase)},Events:function(aEvents){return _Object.Events(theConstructor,aEvents)},Params:function(aParams){return _Object.Params(theConstructor,aParams)},Implements:function(){throw new Error("Class - Interfaces are not implemented")}}})());for(i=0;i<arguments.length;i++){theConstructor.Define(arguments[i])}return theConstructor},clone:function(aObject,aDeep){if(typeof aObject!="object"){throw new Error("Object.clone - All arguments must be objects")}aDeep=(aDeep===true);if(aDeep){throw new Error("Object.clone - Deep cloning has not been implemented")}var theClone={};for(var i in aObject){theClone[i]=aObject[i]}return theClone},collectionToArray:function(aCollection,aStart,aEnd){aStart=aStart||0;aEnd=aEnd||aCollection.length;var theArray=[];for(var i=aStart;i<aEnd;i++){theArray.push(aCollection[i])}return theArray},keys:function(aObj){var theKeys=[];for(var i in aObj){theKeys.push(i)}return theKeys},values:function(aObj){var theValues=[];for(var i in aObj){theValues.push(aObj[i])}return theValues},combine:function(aKeys,aValues){var theObject={};for(var i=0;i<aKeys.length;i++){theObject[aKeys[i]]=aValues?(aValues[i]?aValues[i]:null):null}return theObject},encodeJson:function(aObject){var moi=Neaux.Object.encodeJson;if(typeof aObject!="object"){throw new Error("Object.encodeJson: Argument must be an object")}var theArray=[];for(var prop in aObject){theArray.push('"'+prop+'":'+(function(){var theVal=aObject[prop];switch(typeof theVal){case"object":return(theVal instanceof Array)?"["+theVal+"]":moi(theVal);case"string":return'"'+theVal+'"';case"number":if(isFinite(theVal)){return theVal}case"boolean":return theVal?true:false}throw new Error("Object.encodeJson - Invalid json syntax (internal)")})())}return"{"+theArray.join(",")+"}"},encodeQueryString:function(aObject,aIsPhp){aIsPhp=(typeof aIsPhp=="undefined")?true:aIsPhp;var query=[],queryString,field,fieldName,value,isArray,size;var re=/%20/g;for(var i in aObject){field=i,value=aObject[i],isArray=false;if(typeof value=="function"){continue}if(typeof value=="object"){isArray=value instanceof Array;if(!isArray){continue}}fieldName=(isArray&&aIsPhp)?field+"[]":field;for(var j=0;j<(isArray?aObject[i].length:1);j++){if(isArray){value=aObject[i][j]}queryString=encodeURIComponent(fieldName).replace(re,"+")+"="+encodeURIComponent(value).replace(re,"+");query.push(queryString)}}return query.join("&")},union:function(aObject1,aObject2){var theUnion={};return Neaux.merge(theUnion,aObject1,aObject2)},intersect:function(aReference,aObject){var theIntersect={};for(var i in aObject){if(typeof aReference[i]!="undefined"){theIntersect[i]=aObject[i]}}return theIntersect},compliment:function(aReference,aObject){var theCompliment={};for(var i in aObject){if(typeof aReference[i]=="undefined"){theCompliment[i]=aObject[i]}}return theCompliment},difference:function(aObject1,aObject2){var theDifference={};for(var i in aObject1){if(typeof object2[i]=="undefined"){theDifference[i]=aObject1[i]}}for(i in aObject2){if(typeof object1[i]=="undefined"){theDifference[i]=aObject2[i]}}return theDifference},toString:function(){return"[Neaux.Object]"}};var _Object={ieEnumerableBugFix:function(aTarget,aObject){if(!Neaux.isJSIE){return}for(var i=0;i<_IECoreEnumerables.length;i++){var mthd=_IECoreEnumerables[i];if(typeof aObject[mthd]=="function"&&Object.prototype[mthd]!=aObject[mthd]){aTarget[mthd]=aObject[mthd]}}},Define:function(aConstructor,aMembers){if(typeof aMembers!="object"){throw new Error("A Class Definition must be an Object")}Neaux.Object.merge(aConstructor.prototype,aMembers);aConstructor.prototype.__construct.__cptr=aConstructor;return aConstructor},Extends:function(aConstructor,aBase){var Foo=function(){};Foo.prototype=aBase.prototype;aConstructor.prototype=new Foo;aConstructor.prototype.constructor=aConstructor;aConstructor.__superclass=aConstructor.prototype.__superclass=aBase.prototype;return aConstructor},Events:function(aConstructor,aEvents){if(!(aConstructor.prototype instanceof Neaux.Event.Dispatcher)){throw new Error("Class.Events - The specified class is not a subclass of Event.Dispatcher")}Neaux.Event.Dispatcher.initEvents.call(aConstructor.prototype,aEvents);return aConstructor},Params:function(aConstructor,aParams){if(!(aConstructor.prototype instanceof Neaux.Object.Base)){throw new Error("Class.Params - The specified lass is not a subclass of Object.Base")}return aConstructor},Implements:function(){throw new Error("Class.Implements - Interfaces are not implemented")}};Neaux.String={trim:function(aStr){return aStr.replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g)},capitalize:function(aStr){return aStr.replace(/\b[a-z]/g,function(aRes){return aRes.toUpperCase()})},nl2br:function(aStr,aIsXHtml){var brTag=(typeof aIsXHtml=="undefined"||aIsXHtml)?"<br/>":"<br>";return aStr.replace(/([^>]?)\n/g,"$1"+brTag+"\n")},decodeJson:function(aStr){var my_JSON_object=!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(aStr.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+aStr+")");return my_JSON_object},decodeQueryString:function(aQueryString){var theObj={},field,value,pair;var thePairs=aQueryString.split("&");for(var i=0;i<thePairs.length;++i){pair=thePairs[i].split("=");field=decodeURIComponent(pair[0]);value=pair[0]||decodeURIComponent(pair[1]);if(theObj[field]){if(typeof theObj[field]=="string"){theObj[field]=[theObj[field]]}theObj[field].push(value)}else{theObj[field]=value}}return theObj},toString:function(){return"[Neaux.String]"}};Neaux.Function={bind:function(aFn,aObj){var argExp=2;if(typeof aFn=="object"&&aFn instanceof Array){aObj=aFn[0];aFn=aFn[1];argExp=1}var thePassedArgs=arguments.length>argExp?Neaux.Object.collectionToArray(arguments,argExp):[];return function(){var theArgs=thePassedArgs.length>0?thePassedArgs:arguments;aFn.apply(aObj,theArgs)}},delay:function(aFn,aDelay,aObj){if(typeof aFn=="object"&&aFn instanceof Array){aObj=aFn[0];aFn=aFn[1]}return setTimeout(aObj?Neaux.Function.bind(aFn,aObj):aFn,aDelay)},Repeat:function(aFn,aInterval,aObj){if(typeof aFn=="object"&&aFn instanceof Array){aObj=aFn[0];aFn=aFn[1]}return setInterval(aObj?Neaux.Function.bind(aFn,aObj):aFn,aInterval)},toString:function(){return"[Neaux.String]"}};Neaux.Array={isInArray:function(aArr,aItm){return(Neaux.Array.indexOf(aArr,aItm)>=0)},indexOf:function(aArr,aItm,aIdx){if(aArr.indexOf){return aArr.indexOf(aItm,aIdx)}var from=aIdx||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0){from+=aArr.length}while(from<aArr.length){if(from in aArr&&aArr[from]===aItm){return from}from++}return -1},toString:function(){return"[Neaux.Array]"}},Neaux.Object.merge(Neaux,(function(){var _fnLoadList=[];var _fnUnloadList=[];var _QueueList=function(aList,aArgList){for(var i=0;i<aArgList.length;++i){aList.push(aArgList[i])}};return{onload:function(){_QueueList(_fnLoadList,arguments)},onunload:function(){_QueueList(_fnUnloadList,arguments)},_LoadHandler:function(){if(location.hostname.match(/^(\w+|.*neauxware\.com)$/i)){Neaux.show()}for(var i=0;i<_fnLoadList.length;++i){_fnLoadList[i]()}},_UnloadHandler:function(aEvt){for(var i=0;i<_fnUnloadList.length;++i){_fnUnloadList[i](aEvt)}},getSWVersion:function(){var info=Neaux.Module.getVersionInfo();var mmm=["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var theDate=info.date.substr(6,2)+"-"+mmm[parseInt(info.date.substr(4,2),10)]+"-"+info.date.substr(0,4);return Neaux.name+" V"+info.version+" ("+theDate+") "},getCopyright:function(){return" \xA92007-2009 "+Neaux.organization+" ("+Neaux.homePage+") All Rights Reserved."},show:function(){window.status=Neaux},toString:function(){return Neaux.getSWVersion()+"; "+Neaux.getCopyright()}}})());Neaux.Object.merge(Neaux,{Class:Neaux.Object.Class,merge:Neaux.Object.merge,collectionToArray:Neaux.Object.collectionToArray,encodeJson:Neaux.Object.encodeJson,decodeJson:Neaux.String.decodeJson,encodeQueryString:Neaux.Object.encodeQueryString,decodeQueryString:Neaux.String.decodeQueryString});Neaux.Object.Base=Neaux.Class({});Neaux.register("core","core.js","20091208","0.5-1.01")})();
(function(){Neaux.setNamespace("Neaux.Html");Neaux.Dom={getRoot:function(a){return a?a.documentElement:document.documentElement},getElementsById:function(){var c=[];for(var b=0;b<arguments.length;++b){var a=(typeof(arguments[b])=="string")?document.getElementById(arguments[b]):arguments[b];if(arguments.length>1){c.push(a)}}return(arguments.length==1)?a:c},toString:function(){return"[Neaux.Dom]"}};Neaux.Html.Form={getFields:function(d){if(!(d=$ID(d))){throw new Error("Form, "+d+" does not exist")}var a={};for(var b=0;b<d.elements.length;++b){if(d.elements[b].name){var c=d.elements[b];if(c.tagName.toLowerCase()=="input"&&c.type.toLowerCase()=="checkbox"){if(c.checked){if(!a[c.name]){a[c.name]=[]}a[c.name].push(c.value)}}else{a[c.name]=c.value}}}return a},getQueryString:function(b,a){return Neaux.encodeQueryString(Neaux.Html.Form.getFields(b),a)},toString:function(){return"[Neaux.Html.Form]"}};$ID=Neaux.Dom.getElementsById;Neaux.register("dom","dom.js","20091208","0.5-1.01")})();
(function(){var a=function(){throw new Error("Legacy browser detected")};var b={CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3};Neaux.Event={addListener:function(j,i,k){var g;var h=c.transformTargetArg(j);var f=c.transformEventArg(i);for(var l=0;l<h.length;l++){for(var e=0;e<f.length;e++){if(h[l].addListener){h[l].addListener(f[e],k)}else{if(g=c.registerListener(h[l],f[e],k)){c.Model.addListener(h[l],f[e],g)}}}}},removeListener:function(j,i,k){var g;var h=c.transformTargetArg(j);var f=c.transformEventArg(i);for(var l=0;l<h.length;l++){for(var e=0;e<f.length;e++){if(h[l].removeListener){h[l].removeListener(f[e],k)}else{if(g=c.unregisterListener(h[l],f[e],k)){c.Model.removeListener(h[l],f[e],g)}}}}},dispatch:function(f,e){},setCapture:function(e,g){var f=Neaux.isJSIE?e:document;c.Model.setCapture(e,g);c.savePrevMouseMove=f.onmousemove;f.onmousemove=(function(i){var j=(g instanceof Array)?aListener[1]:g;var h=(g instanceof Array)?aListener[0]:f;var k=c.getObject(i||window.event,f);j.call(h,k)})},releaseCapture:function(e,g){var f=Neaux.isJSIE?e:document;f.onmousemove=c.savePrevMouseMove;c.Model.releaseCapture(e,g)},Target:function(){},Listener:function(){},toString:function(){return"[Neaux.Event]"}};Neaux.Event.Object=Neaux.Class({_event:null,_target:null,init:function(f,e){this._event=f||null;this._target=e||null},getNativeEvent:function(){return this._event},getType:function(){return this._event.type},getTarget:function(){return this._event.target||this._event.srcElement||document},getCurrentTarget:function(){return this._event.currentTarget||this._target},getEventPhase:function(){return(this.getCurrentTarget()==this.getTarget())?b.AT_TARGET:b.BUBBLING_PHASE},getX:function(){return this._event.clientX},getY:function(){return this._event.clientY},getScreenX:function(){return this._event.screenX},getScreenY:function(){return this._event.screenX},getRelatedTarget:function(){return this._event.relatedTarget||function(){switch(this._event.type){case"mouseover":return this._event.fromElement;case"mouseout":return this._event.toElement;default:return null}}},getButton:function(){return null},getAltKey:function(){return this._event.altKey},getCtrlKey:function(){return this._event.ctrlKey},getShiftKey:function(){return this._event.shiftKey},getMetaKey:function(){return this._event.metaKey},getKeyChar:function(){return this._event.charCode||this._event.keyCode||0},getKeyCode:function(){return this._event.which||this._event.keyCode},initEvent:function(){return null},stopPropagation:function(){if(this._event.stopPropagation){return this._event.stopPropagation()}else{this._event.cancelBubble=true}},preventDefault:function(){if(this._event.preventDefault){return this._event.preventDefault}else{this._event.returnValue=false}},stopEvents:function(){this.stopPropagation();this.preventDefault()},toString:function(){return"[Class Neaux.Event.Object]"}});Neaux.merge(Neaux.Event.Object,b);Neaux.Event.ListenerList=Neaux.Class({_listeners:null,getListener:function(g,f,k){var j=Neaux.Object.isNative(f)?f:{target:f,listener:k};var e=this._listeners?this._listeners[g]:null;if(e){for(var h=0;h<e.length;h++){var l=e[h];if(l.target==j.target&&l.listener==j.listener){return l}}}return null},getListenerCount:function(g,f){if(!this._listeners){return 0}var e=arguments.length?this._listeners[g]:this._listeners;var j=0;if(g){if(!f){return e?e.length:0}for(var h=0;h<e.length;h++){if(e[h].target==f){j++}}}else{for(var h in e){j+=e[h].length}}return j},add:function(g,f,i){var h=Neaux.Object.isNative(f)?f:{target:f,listener:i};if(typeof h.target=="undefined"){throw new Error("Event.ListenerList - a target must be specified")}if(typeof h.listener=="undefined"){throw new Error("Event.ListenerList - a listener must be specified")}if(this.getListener(g,h)){return false}if(!this._listeners){this._listeners={}}var e=this._listeners[g];if(!e){e=this._listeners[g]=[]}return e.push(h)?true:false},remove:function(g,f,k){var j=Neaux.Object.isNative(f)?f:{target:f,listener:k};var e=this._listeners?this._listeners[g]:null;if(e){for(var h=0;h<e.length;h++){var l=e[h];if(l.target==j.target&&l.listener==j.listener){return this._listeners[g].splice(h,1)[0]}}}return null},toString:function(){return"[Neaux.Event.Manager]"}});Neaux.Event.Target.prototype={addListener:function(e,f){},removeListener:function(e,f){},dispatch:function(e){},hasListener:function(){},willTriger:function(){},purge:function(){},suspend:function(){},resume:function(){},toString:function(){return"[Interface Neaux.Event.Target]"}};Neaux.Event.Listener.prototype={handleEvent:function(){},toString:function(){return"[Interface Neaux.Event.Listener]"}};var c={listeners:new Neaux.Event.ListenerList,object:null,Model:null,getObject:function(f,e){if(!c.object){c.object=new Neaux.Event.Object()}if(f){e=e||null;c.object.init(f,e)}return c.object},transformTargetArg:function(e){var g=(typeof e=="string")?e.replace(/ /g,"").split(","):(e.length?e:[e]);for(var f=0;f<g.length;f++){if(typeof g[f]=="string"){g[f]=$ID(g[f])}if(!g[f]||typeof g[f]!="object"){throw new Error("Event::GetTargets - Invalid Event Target(s) specified")}}return g},transformEventArg:function(e){if(typeof e=="string"){return e.replace(/ /g,"").split(",")}else{if(e instanceof Array){return e}else{throw new Error("Event::GetEvents - Invalid Event Format Specified")}}},registerListener:function(g,f,h){if(c.listeners.getListener(g,f,h)){return null}var e=(g instanceof Neaux.Event.Target)?null:function(k){var m=c.getObject(k||window.event,g);var l=(h instanceof Array)?h[1]:h;var j=(h instanceof Array)?h[0]:g;l.call(j,m)};var i={target:g,type:f,listener:h,fauxListener:e};c.listeners.add(f,i);return e},unregisterListener:function(f,e,g){var h=c.listeners.remove(e,f,g);return h?h.fauxListener:null}};var d={Dom:{addListener:function(f,e,g){if(!f.addEventListener){throw new Error("Event:AddListener: An AddListener request was made to an object that is not an Event Target")}f.addEventListener(e,g,false)},removeListener:function(f,e,g){if(!f.removeEventListener){throw new Error("Event:RemoveListener: A RemoveListener request was made to an object that is not an Event Target")}f.removeEventListener(e,g,false)},dispatch:function(f,e){if(!f.dispatchEvent){throw new Error("Event:Dispatch: A Dispatch request was made to an object that is not an Event Target")}var g=document.createEvent("Events");g.initEvent(e,false,false);f.dispatchEvent(g)},setCapture:function(e,g){var f=function(i,h,k){var j=c.registerListener(i,h,k);i.addEventListener(h,j,true)};f(document,"mouseup",g)},releaseCapture:function(e,g){var f=function(i,h,k){var j=c.unregisterListener(i,h,k);i.removeEventListener(h,j,true)};f(document,"mouseup",g)}},IE:{addListener:function(f,e,g){if(!f.attachEvent){throw new Error("Event:AddListener: An AddListener request was made to an object that is not an Event Target")}f.attachEvent("on"+e,g)},removeListener:function(f,e,g){if(!f.detachEvent){throw new Error("Event:RemoveListener: A RemoveListener request was made to an object that is not an Event Target")}f.detachEvent("on"+e,g)},dispatch:function(f,e){if(!f.fireEvent){throw new Error("Event:Dispatch: A Dispatch request was made to an object that is not an Event Target")}var g=document.createEventObject();f.fireEvent("on"+e,g)},setCapture:function(e,f){e.setCapture();Neaux.Event.addListener(e,"mouseup,losecapture",f)},releaseCapture:function(e,f){Neaux.Event.removeListener(e,"mouseup,losecapture",f);e.releaseCapture()}},Legacy:{addListener:function(f,e,g){a()},removeListener:function(f,e,g){a()},dispatch:function(f,e){a()},setCapture:function(e,f){a()},releaseCapture:function(e,f){a()}}};if(document.addEventListener){c.Model=d.Dom}else{if(document.attachEvent){c.Model=d.IE}else{c.Model=d.Legacy}}Neaux.BaseEvent=Neaux.Class({target:null,type:null,__construct:function(f,e){this.target=f;this.type=e},getTarget:function(){return this.target},getType:function(){return this.type}});Neaux.Event.Dispatcher=Neaux.Class().Extends(Neaux.Object.Base).Define((function(){var e=new Neaux.Event.ListenerList;return{_eventTypes:null,_eventRefCount:null,addEvents:function(){if(this.constructor.prototype._eventTypes!=null){throw new Error("Event.Dispatcher: Cannot add events to this class")}if(!this._eventTypes){this._eventTypes=[]}for(var g=0;g<arguments.length;g++){var h=arguments[g];if(typeof h=="string"){h=h.split(",")}else{if(Neaux.Object.isNative(h)){h=Neaux.Object.values(h)}}for(var f=0;f<h.length;f++){if(!Neaux.Array.isInArray(this._eventTypes,h[f])){this._eventTypes.push(h[f])}}}},addListener:function(f,g){if(!Neaux.Array.isInArray(this._eventTypes,f)){throw new Error(f+" event not supported for specified object")}if(e.add(f,this,g)){if(!this._eventRefCount){this._eventRefCount={}}if(this._eventRefCount[f]=="undefined"){this._eventRefCount[f]=0}++this._eventRefCount[f]}},removeListener:function(f,g){if(e.remove(f,this,g)){--this._eventRefCount[f]}},dispatch:function(f,g){if(this.hasListener(f)){var h=g||{};h.target=this;h.type=f;e.getListener(f,this).call(this,h)}},hasListener:function(f){return this._eventRefCount&&this._eventRefCount[f]},willTrigger:function(f){throw new Event("Not Implemented")},toString:function(){return"[Class Neaux.Event.Dispatcher]"}}})());Neaux.Event.Dispatcher.initEvents=function(e){if(!e){return}if(typeof e=="string"){e=e.split(",")}else{if(Neaux.Object.isNative(e)){e=Neaux.Object.values(e)}else{if(!(e instanceof Array)){throw new Error("Event.Dispatcher.initEvents - events must be a string, array or map")}}}var g=[].concat(this._eventTypes||[]);for(var f=0;f<e.length;f++){if(!Neaux.Array.isInArray(g,e[f])){g.push(e[f])}}this.constructor.prototype._eventTypes=g};Neaux.Event.addListener(window,"load",Neaux._LoadHandler);Neaux.Event.addListener(window,"unload",Neaux._UnloadHandler);$EV=Neaux.Event;$ON=Neaux.Event.addListener;Neaux.register("event","event.js","20091205","0.5-1.01")})();
(function(){var d={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c={OK:200,NOT_FOUND:404,SERVER_ERROR:500,APP_TIMEOUT:999},e={TEXT:"text/plain",HTML:"text/html",XML:"application/xml",JSON:"application/json",FORM:"application/x-www-form-urlencoded",QUERY_STRING:"application/x-www-form-urlencoded",XHTML:"application/xhtml+xml",FILE:"multipart/form-data",UPLOAD:"multipart/form-data"},a="___NW_HTTP_IFRAME__",b="fra_nw_upload";Neaux.Http={request:function(o,p,n,k,j){p=p||"get";j=j||{};if(j&&j["content-type"]==e.UPLOAD){return Neaux.Http.ifrRequest(o,p,n,k,j)}var q=f.getObject(),h=(n?true:false);q.open(p,o,h);try{q.onreadystatechange=(function(){f.handler(n)})}catch(m){throw new Error("Http.request - Unable to connect handler to XMLHttpRequest object")}for(var l in j){q.setRequestHeader(l,j[l].toString())}if(k&&k.tagName=="FORM"){k=Neaux.Html.Form.getQueryString(k);if(k){q.setRequestHeader("content-type",e.FORM)}}q.send(k);if(!h){return f.makeResponse(q)}},ifrRequest:function(l,m,h,k,j){j=j||{};var n=g.getObject();theForm=k&&k.tagName=="FORM"?k:null;var i=(function(){g.handler(h)});n.onload=i;if(Neaux.isJSIE&&Neaux.JSIE_version<=5.7){$ON(n,"load",i)}if(theForm){theForm.target=a;theForm.method="post";theForm.action=l;theForm.enctype=e.UPLOAD;if(Neaux.isJSIE){theForm.encoding=e.UPLOAD}}if(theForm){theForm.submit()}else{throw new Error("Http.ifrRequest - Only Multipart forms are supported through iframes")}},toString:function(){return"[Neaux.Http]"}};var f={object:null,getObject:function(){if(!f.object){f.object=f.create()}return f.object},handler:function(h){if(!h){return}var i=f.getObject();if(i.readyState==d.HEADERS_RECEIVED||i.readyState==d.DONE){h.call(this,f.makeResponse(i))}if(i.readyState==d.DONE){i.onreadystatechange=null}},makeResponse:function(i){var l=i||f.Object(),j=null,h=null,k=null;if(l.readyState==d.DONE){var m=l.getResponseHeader("content-type").toLowerCase();j=l.status;h=(m=="application/xml"||m=="text/xml")?l.responseXML:null;k=(m=="application/json")?Neaux.String.decodeJson(l.responseText):null}return{isOK:function(){return(j==c.OK)?true:false},isDone:function(){return(l.readyState==d.DONE)?true:false},getStatus:function(){return j},getStatusText:function(){return j?l.statusText:null},getReadyState:function(){return l.readyState},getMatchState:function(n){return(n==l.readyState)},getText:function(){return l.responseText},getXml:function(){return h},getJson:function(){return k},getContentType:function(){return l.getResponseHeader("content-type")},toString:function(){return"[Neaux.Http.Response]"}}},create:function(){try{return new XMLHttpRequest()}catch(h){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(h){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(h){}throw new Error("Neaux::Connection - The User Agent (Browser) does not support XML Http Requests.")}};var g={object:null,getObject:function(){if(!g.object){g.object=g.create()}return g.object},handler:function(h){if(!h){return}var i=g.getObject();h.call(this,g.makeResponse(i))},makeResponse:function(h){var j=h||g.getObject(),i=j.contentWindow.document;return{isOK:function(){return true},isDone:function(){return true},getText:function(){return i.body.innerHTML},toString:function(){return"[Neaux.Http.Response]"}}},create:function(){var h=null;if(Neaux.isJSIE&&Neaux.JSIE_version<=5.7){h=document.createElement('<iframe name="'+a+'">')}else{h=document.createElement("iframe");h.name=a}h.id=b;h.style.display="none";document.body.appendChild(h);return h}};Neaux.Http.STATES=d;Neaux.Http.STATUS=c;Neaux.Http.CONTENT_TYPE=e;Neaux.register("http","http.js","20091208","0.5-1.01")})();

