/*
 * 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.JSIE_version=typeof(JSIE_version)!="undefined"?JSIE_version:null;var theAgent=navigator.userAgent;Neaux.isMSIE=
/*@cc_on!@*/
false;Neaux.isWebKit=/AppleWebKit/.test(theAgent);Neaux.isGecko=!Neaux.isWebKit&&/Gecko/.test(theAgent);Neaux.isPresto=/Presto/.test(theAgent);Neaux.register=Neaux.Module.register;Neaux.include=Neaux.Module.include;Neaux.register("neauxscript","neauxscript.js","20100126","0.5-1.02")})();
(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"&&!aObj.tagName)&&(typeof aObj.length=="number")},isHtmlElement:function(aObj){return Boolean(typeof aObj=="object"&&aObj.tagName)},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;if(theArgs&&this._params){if(!Neaux.Object.isNative(theArgs[0])){var tmpArg={};for(var i=0;i<this._params.length&&i<theArgs.length;i++){tmpArg[this._params[i]]=theArgs[i]}theArgs=new Array(tmpArg)}this.applyParams(theArgs[0]);theArgs=[]}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)},WithEvents: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")}Neaux.Object.Base.initParams.call(aConstructor.prototype,aParams);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)},call:function(aFn,aObj){var theArgs=arguments.length>2?Neaux.Object.collectionToArray(arguments,2):null;return Neaux.Function.apply(aFn,aObj,theArgs)},apply:function(aFn,aObj,aArgs){var theFn=aFn instanceof Array?aFn[1]:aFn;var theObj=aFn instanceof Array?aFn[0]:aObj;theObj=theObj||window;var theArgs=aArgs||[];return theFn.apply(theObj,theArgs)},toString:function(){return"[Neaux.Function]"}};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-2010 "+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({_params:null,applyParams:function(aParams){Neaux.merge(this,aParams)},toString:function(){return"[Class Neaux.Object.Base]"}});Neaux.Object.Base.initParams=function(aParams){aParams=aParams||"";if(typeof aParams!="string"){throw new Error("Neaux.Object.Base - parameters must be specified as a comma-delimited string")}aParams=aParams.split(",");var theParams=[].concat(this._params||[]);for(var i=0;i<aParams.length;i++){if(!Neaux.Array.isInArray(theParams,aParams[i])){theParams.push(aParams[i])}}this.constructor.prototype._params=theParams};Neaux.register("core","core.js","20100307","0.5-1.02")})();
(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},getComputedStyle:function(a,d){var b=$ID(a),e;if(window.getComputedStyle){var c=getComputedStyle(b,null);e=c?c.getPropertyValue(d):null}else{if(d=="float"){d="styleFloat"}else{if(d=="opacity"){d="filter"}else{d=d.replace(/-\D/g,function(){return arguments[0].charAt(1).toUpperCase()})}}e=b.currentStyle[d]?b.currentStyle[d]:null;if(d=="filter"){e=(e!=null)?e.match(/\d+(\.\d+)?/)[0]/100:1}}return e},getElementPosition:function(b){var c=$ID(aID);if(typeof c!="object"){throw new Error("Dom.getElementPosition: Invalid element specified")}var a=y=0;while(c!=null){a+=c.offsetLeft;y+=c.offsetTop;c=c.offsetParent}return Neaux.Dom.Point(a,y)},getElementSize:function(b){b=$ID(b);if(typeof b!="object"){throw new Error("Dom.getElementSize: Invalid element specified")}var c=b.offsetWidth,a=b.offsetHeight;return Neaux.Dom.Size(c,a)},getElementRect:function(a){var b=$ID(aID);if(typeof b!="object"){throw new Error("Dom.getElementRect: Invalid element specified")}var d=Neaux.Dom.getElementPosition(a),c=Neaux.Dom.getElementSize(a);return Neaux.Dom.Rectangle(d.x,d.y,c.width,c.height)},getViewport:function(){var e=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;var b=window.pageXOffset||e.scrollLeft;var g=window.pageYOffset||e.scrollTop;var d=window.innerWidth||e.clientWidth;var a=window.innerHeight||e.clientHeight;var f=document.documentElement.offsetHeight;var c=document.documentElement.offsetWidth;return{x:b,y:g,width:d,height:a,pageWidth:c,pageHeight:f}},Rectangle:function(c,b,d,a){return{top:c,left:b,width:d,height:a}},Point:function(b,a){return{top:b,left:a}},Dimension:function(b,a){return{width:b,height:a}},setOpacity:function(a,c){var b=$ID(a);if(!b){return null}if(Neaux.isJSIE){c*=100;if(!b.currentStyle||!b.currentStyle.hasLayout){b.style.zoom=1}b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity:"+c+")"}else{b.style.opacity=c}return b},setStyle:function(d,f,k){var j=$ID(d);if(!j){return null}if(!k){j.style.cssText=""}if(f){if(typeof f=="string"){if(!k){j.cssText=f}else{var a=Neaux.String.trim;var c=f.split(";");f={};for(var e=0;e<c.length;++e){var h=c[e].split(":");f[a(h[0])]=a(h[1])}}}if(typeof f=="object"){for(var g in f){var b=f[g];if(g=="opacity"){Neaux.Dom.setOpacity(j,b)}else{if(g=="float"||g=="cssFloat"||g=="styleFloat"){g=typeof j.style.cssFloat=="string"?"cssFloat":"styleFloat"}else{g=g.replace(/-\D/g,function(){return arguments[0].charAt(1).toUpperCase()})}j.style[g]=b}}}}return j},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","20091217","0.5-1.02")})();
(function(){var c={CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3};Neaux.Event={addListener:function(m,j,n){var l=e.transformTargetArg(m);var k=e.transformEventArg(j);for(var o=0;o<l.length;o++){for(var i=0;i<k.length;i++){if(l[o].addListener){l[o].addListener(k[i],n)}else{if(theListener=e.registerListener(l[o],k[i],n)){e.model.addListener(l[o],k[i],theListener)}}}}},removeListener:function(m,j,n){var l=e.transformTargetArg(m);var k=e.transformEventArg(j);for(var o=0;o<l.length;o++){for(var i=0;i<k.length;i++){if(l[o].removeListener){l[o].removeListener(k[i],n)}else{if(theListener=e.unregisterListener(l[o],k[i],n)){e.model.removeListener(l[o],k[i],theListener)}}}}},dispatch:function(n,j){var m=e.transformTargetArg(n);var k=e.transformEventArg(j);var o=(arguments.length>2)?Neaux.Object.collectionToArray(arguments,2):null;for(var p=0;p<m.length;p++){for(var i=0;i<k.length;i++){if(m[p].dispatch){var l=[k[i]];if(o){l=l.concat(o)}m[p].dispatch.apply(m[p],o)}else{e.model.dispatch(m[p],k[i])}}}},setCapture:function(i,j){h()},releaseCapture:function(i,j){h()},toString:function(){return"[Neaux.Event]"}};Neaux.Event.ListenerTable=Neaux.Class({name:null,_listeners:null,__construct:function(i){if(i){this.name=i}},getListener:function(k,m,o){var j=this._listeners?this._listeners[k]:null;if(j){for(var l=0;l<j.length;l++){var n=j[l];if(n.target==m&&n.listener==o){return n}}}return null},getListeners:function(k,m){var o=[];if(this._listeners&&this._listeners[k]){var j=this._listeners[k];for(var l=0;l<j.length;l++){var n=j[l];if(n.target==m){o.push(n.listener)}}}return o},getListenerCount:function(m,p,k){if(!this._listeners){return k?false:0}var i=m?this._listeners[m]:this._listeners;var o=function(t){var s=0;var r=i?i.length:0;if(!p){return k?(r?true:false):r}for(var j=0;j<r;++j){if(i[j].target==p){if(k){return true}s++}}return k?false:s};if(m){return o(m)}var q=0;for(var n in i){if(p){var l=o(n);if(l&&typeof l=="boolean"){return l}q+=l}else{q+=i[n].length}}return(p&&k)?false:q},add:function(j,l,n,k){if(!j){throw new Error("ListenerTable::Add - An event type must be specified")}if(!l){throw new Error("ListenerTable::Add - A target must be specified")}if(!n){throw new Error("ListenerTable::Add - A listener must be specified")}if(this.getListener(j,l,n)){return false}var m={target:l,listener:n,proxy:k};if(!this._listeners){this._listeners={}}var i=this._listeners[j];if(!i){i=this._listeners[j]=[]}return i.push(m)?true:false},remove:function(k,m,o){var j=this._listeners[k];for(var l=0;l<j.length;l++){var n=j[l];if(n.target==m&&n.listener==o){return this._listeners[k].splice(l,1)[0].proxy}}return null},toString:function(){return"[Neaux.Event.ListenerTable]"}});var e={model:null,nativeListeners:new Neaux.Event.ListenerTable("W3C"),isValidTarget:function(i){return Neaux.Object.isHtmlElement(i)||(i instanceof Neaux.Event.Dispatcher)||(i==window)||(!!i.implementation)},transformTargetArg:function(l){var k;if(typeof l=="string"){k=l.replace(/ /g,"").split(",")}else{if(l instanceof Array){k=l}else{if(e.isValidTarget(l)){k=[l]}else{if(Neaux.Object.isCollection(l)){k=Neaux.Object.collectionToArray(l)}else{f()}}}}for(var j=0;j<k.length;j++){if(typeof k[j]=="string"){k[j]=$ID(k[j])}if(!k[j]||!e.isValidTarget(k[j])){f()}}return k},transformEventArg:function(i){if(typeof i=="string"){return i.replace(/ /g,"").split(",")}else{if(i instanceof Array){return i}else{d()}}},registerListener:function(k,j,l){if(e.nativeListeners.getListener(k,j,l)){return null}var i=function(m){var n=new Neaux.Event.Object(m||window.event,k);if(Neaux.Function.call(l,k,n)==false){n.preventDefault()}};e.nativeListeners.add(j,k,l,i);return i},unregisterListener:function(j,i,k){return e.nativeListeners.remove(i,j,k)},DomModel:{addListener:function(j,i,k){if(!j.addEventListener){g()}j.addEventListener(i,k,false)},removeListener:function(j,i,k){if(!j.removeEventListener){a()}j.removeEventListener(i,k,false)},dispatch:function(j,i){if(!j.dispatchEvent){throw new Error("Event:dispatch: A Dispatch request was made to an object that is not an Event Target")}var k=document.createEvent("Events");k.initEvent(i,false,false);j.dispatchEvent(k)},setCapture:function(i,j){h()},releaseCapture:function(i,j){h()}},IEModel:{addListener:function(j,i,k){if(!j.attachEvent){g()}j.attachEvent("on"+i,k)},removeListener:function(j,i,k){if(!j.detachEvent){a()}j.detachEvent("on"+i,k)},dispatch:function(j,i){if(!j.fireEvent){throw new Error("Event:dispatch: A Dispatch request was made to an object that is not an Event Target")}var k=document.createEventObject();j.fireEvent("on"+i,k)},setCapture:function(i,j){h()},releaseCapture:function(i,j){h()}},LegacyModel:{addListener:function(j,i,k){b()},removeListener:function(j,i,k){b()},dispatch:function(j,i){b()},setCapture:function(i,j){b()},releaseCapture:function(i,j){b()}}};if(document.addEventListener){e.model=e.DomModel}else{if(document.attachEvent){e.model=e.IEModel}else{e.model=e.LegacyModel}}Neaux.Event.Object=Neaux.Class({_event:null,_target:null,__construct:function(i,j){this._event=i||null;this._target=j||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())?c.AT_TARGET:c.BUBBLING_PHASE},stopPropagation:function(){if(this._event.stopPropagation){return this._event.stopPropagation()}else{this._event.cancelBubble=true}},preventDefault:function(){if(this._event.preventDefault){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,c);Neaux.Event.Dispatcher=Neaux.Class().Extends(Neaux.Object.Base).Define((function(){var i=new Neaux.Event.ListenerTable("NWC");return{_eventTypes: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 l=0;l<arguments.length;l++){var m=arguments[l];if(typeof m=="string"){m=m.split(",")}else{if(Neaux.Object.isNative(m)){m=Neaux.Object.values(m)}}for(var k=0;k<m.length;k++){if(!Neaux.Array.isInArray(this._eventTypes,m[k])){this._eventTypes.push(m[k])}}}},addListener:function(j,k){if(!Neaux.Array.isInArray(this._eventTypes,j)){throw new Error(j+" event not supported for specified object")}i.add(j,this,k)},removeListener:function(j,k){i.remove(j,this,k)},dispatch:function(j,l){l=l||{};var o={target:this,type:j,getType:function(){return this.type},getTarget:function(){return this.target},isCancelled:function(){return this.cancelled||false},preventDefault:function(){if(this.cancelable){this.cancelled=true}}};Neaux.merge(o,l);if(this.hasListener(j)){var m=i.getListeners(j,this);for(var k=0;k<m.length&&!o.cancelled;++k){if(Neaux.Function.call(m[k],this,o)===false){o.preventDefault()}}}var n=this["on"+j];if(n&&!o.cancelled){if(Neaux.Function.call(n,this,o)===false){o.preventDefault()}}if(l){l=o}return !o.isCancelled()},hasListener:function(l,k){var j=(k&&this["on"+l])?true:false;return j||i.getListenerCount(l,this,true)},willTrigger:function(j){h()},toString:function(){return"[Class Neaux.Event.Dispatcher]"}}})());Neaux.Event.Dispatcher.initEvents=function(j){if(!j){return}if(typeof j=="string"){j=j.split(",")}else{if(Neaux.Object.isNative(j)){j=Neaux.Object.values(j)}else{if(!(j instanceof Array)){throw new Error("Event.Dispatcher.initEvents - events must be a string, array or map")}}}var l=[].concat(this._eventTypes||[]);for(var k=0;k<j.length;k++){if(!Neaux.Array.isInArray(l,j[k])){l.push(j[k])}}this.constructor.prototype._eventTypes=l};var b=function(){throw new Error("Legacy browser detected")};var g=function(){throw new Error("Event:addListener: An addListener request was made to an object that is not an Event Target")};var a=function(){throw new Error("Event:removeListener: A removeListener request was made to an object that is not an Event Target")};var f=function(){throw new Error("Event::transformTargetArg - Invalid Event Target(s) specified")};var d=function(){throw new Error("Event::GetEvents - Invalid Event Format Specified")};var h=function(){throw new Error("Functionality not implemented")};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","20100316","0.5-1.02")})();
(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(q,r,p,k,j){j=j||{};var n=(k&&k.tagName=="FORM");if(n&&!r){r=k.method||"get"}if(n&&!q){q=k.action||null}r=r||"get";if(!q){throw new Error("Http.request - A URL was not specified")}if(j&&j["content-type"]==e.UPLOAD){return Neaux.Http.ifrRequest(q,r,p,k,j)}var s=f.getObject(),h=(p?true:false);if(n){k=Neaux.Html.Form.getQueryString(k);if(k){j["content-type"]=e.FORM}}if(r=="get"&&k){var o=q.indexOf("?");if(o>=0){q=q.substr(0,o)}q+="?"+k;k=null}s.open(r,q,h);try{s.onreadystatechange=(function(){f.handler(p)})}catch(m){throw new Error("Http.request - Unable to connect handler to XMLHttpRequest object")}if(!j["content-type"]){j["content-type"]="plain/text"}for(var l in j){s.setRequestHeader(l,j[l].toString())}s.send(k);if(!h){return f.makeResponse(s)}},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");m=m?m.toLowerCase():"text/plain";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","20100312","0.5-1.02")})();

