/*
 * NeauxScript V0.3 (neauxscript.js)
 * Copyright (c) 2007-2008  NeauxWare Technologies
 * All rights reserved.
 * License @ http://www.opensource.org/licenses/mit-license.php
 * --- Easing equations based on Robert Penner's work (http://www.robertpenner.com/easing)
 * --- Open source under BSD License (http://www.robertpenner.com/easing_terms_of_use.html)
 * --- Copyright (c) 2001 Robert Penner. All Rights Reserved.
 */

// Declare global namespace object (only define once)
if (typeof(Neaux) == 'undefined') {
  // This is the master module, which defines the build information
  // The Version is <major>.<minor>-<release>.<build> (<optional-text>)
  // The build process is managed by the Builder Application (Vincent)
  // Major, minor & release #s are manually maintained, the build number
  // is incremented by the Builder Application.
  var Neaux = {
    name: 'NeauxScript',
    version: '0.3-0.00 (Alpha)',
    date: '13-Nov-2008',
/*@cc_on    // IE Conditional Compilation (ignored by other browsers)
  @if (@_jscript)
    isJSIE: true,
    JSIE_version: @_jscript_version   //IE7=5.7, IE6=5.6, IE5=5.5 or less
  @else @*/
    isJSIE: false
/*@end
@*/
  }
}
Neaux.Module={modules:null,Modules:function(){return Neaux.Module.modules},Register:function(C,A,B){},RegisterDependency:function(A){return A},toString:function(){return"[Neaux.Module]"}};Neaux.Register=Neaux.Module.Register;Neaux.Require=Neaux.Module.RegisterDependency;(function(){var A=["core.js","dom.js","event.js","http.js","xml.js"];Neaux.Module.Loader={_includePath:null,IncludePath:function(){var B=Neaux.Module.Loader._includePath;var D=document.getElementsByTagName("script");for(var C=0;C<D.length&&!B;++C){var E=D[C].src.search(/neauxscript\.js$/gi);if(E>=0){B=D[C].src.substring(0,E)}}Neaux.Module.Loader._includePath=B;return B},Include:function(E){var B=Neaux.Module.Loader._includePath||Neaux.Module.Loader.IncludePath();var D=B+E;var F=document.getElementsByTagName("head");if((navigator.userAgent.indexOf("Safari")==-1)&&F&&F.length>0){var C=F[0].appendChild(document.createElement("script"));C.type="text/javascript";C.src=D}else{document.write('<script type="text/javascript" src="'+D+'"><\/script>')}},Load:function(){var B,C;if(arguments.length>1){C=[];for(B=0;B<arguments.length;B++){C.push(arguments[B])}}else{if(typeof arguments[0]=="string"){C=arguments[0].split(",")}else{if(arguments[0] instanceof Array){C=arguments[0]}}}Neaux.Module.modules=C;for(var B in C){Neaux.Module.Loader.Include(C[B])}},toString:function(){return"[Neaux.Module.Loader]"}}})();
(function(){Neaux.Register("core","core.js","11-Nov-2008");Neaux.Require(Neaux);var A=["toString"];Neaux.Merge=function(D,H,B){B=B||{};var J=B.properties!==false;var G=B.methods!==false;var C=B.override!==false;var L=B.ifexists===true;for(var I in H){if((typeof H[I]=="function"&&G)||(typeof H[I]!="function"&&J)){D[I]=H[I]}}if(Neaux.isJSIE){var F=A,K;for(var E in F){K=F[E];if(typeof H[K]=="function"&&Object.prototype[K]!=H[K]&&G){D[K]=H[K]}}}};Neaux.Merge(Neaux,{author:"H.G.Laffler",organization:"Neauxware Technologies",home:"http://www.neauxware.com",SWVersion:function(){return Neaux.name+" V"+Neaux.version+" ("+Neaux.date+") "},Copyright:function(){return" \xA92007-2008 "+Neaux.organization+" ("+Neaux.home+") All Rights Reserved."},Show:function(){window.status=Neaux},toString:function(){return Neaux.SWVersion()+"; "+Neaux.Copyright()}});Neaux.Core={Array:{IndexOf:function(D,B,C){var E=C||0;E=(E<0)?Math.ceil(E):Math.floor(E);if(E<0){E+=D.length}while(E<length){if(E in D&&D[E]===B){return E}E++}return -1},LastIndexOf:function(D,B,C){var E;if(C){E=(E<0)?Math.ceil(E):Math.floor(E);if(E<0){E+=D.length}else{if(E>=D.length){E=D.length-1}}}else{E=D.length-1}while(E>-1){if(E in D&&D[E]===B){return E}E--}return -1},Every:function(B,D,E){if(typeof D!="function"){throw new TypeError()}for(var C=0;C<B.length;C++){if(C in B&&!D.call(aCtx,B[C],C,B)){return false}}return true},Filter:function(C,E,G){if(typeof E!="function"){throw new TypeError()}var B=new Array;for(var D=0;D<C.length;D++){if(D in C){var F=C[D];if(E.call(aCtx,C[D],D,C)){B.push(F)}}}return B},ForEach:function(B,E,C){if(typeof E!="function"){throw new TypeError()}for(var D=0;D<B.length;D++){if(D in B){E.call(C,B[D],D,B)}}},Map:function(C,E,F){if(typeof E!="function"){throw new TypeError()}var B=new Array;for(var D=0;D<C.length;D++){if(D in C){B[D]=E.call(aCtx,C[D],D,C)}}return B},Some:function(B,D,E){if(typeof D!="function"){throw new TypeError()}for(var C=0;C<B.length;C++){if(C in B&&D.call(aCtx,B[C],C,B)){return true}}return false},SortOn:function(B,C,D){},toString:function(){return"[Neaux.Core.Array]"}},String:{Trim:function(B){return B.replace(/^\s+/,"").replace(/\s+$/,"")},Collapse:function(B){return B.trim().replace(/\s+/g," ")},toString:function(){return"[Neaux.Core.String]"}},toString:function(){return"[Neaux.Core]"}};Neaux.Merge(Neaux,{Extend:function(B,D,C){},Implement:function(C,B){},_startupFn:[],AddStartup:function(){for(var B=0;B<arguments.length;++B){Neaux._startupFn.push(arguments[B])}},_RunStartup:function(){for(var B=0;B<Neaux._startupFn.length;++B){Neaux._startupFn[B]()}},__end:null})})();String.prototype.trim=function(){return Neaux.Core.String.Trim(this)};String.prototype.collapse=function(){return Neaux.Core.String.Collapse(this)};
(function(){Neaux.Register("dom","dom.js","06-Nov-2008");Neaux.Require(Neaux.Core);Neaux.Dom={GetElementsById:function(){var C,B=[];for(var A=0;A<arguments.length;++A){C=(typeof(arguments[A])=="string")?document.getElementById(arguments[A]):arguments[A];if(arguments.length>1){B.push(C)}}return(arguments.length==1)?C:B},GetElementsByClassName:function(G,E){var F=null;if(E){var C=E.element;if(!C&&E.id){C=document.getElementById(E.id);if(!C){return null}}if(E.tag){var D=C||document;F=D.getElementsByTagName(E.tag);if(F.length==0){return null}}if(!F&&C){F=[C]}}else{F=document.getElementsByTagName("*")}var B=[];for(var A=0;A<F.length;++A){if(F[A].className==G){B.push(F[A])}}return B.length?B:null},SetOpacity:function(C,B){var A=$ID(C);if(!A){return null}if(document.all&&document.body.style.filter!=undefined){if(!A.currentStyle||!A.currentStyle.hasLayout){A.style.zoom=1}aValue*=100;A.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity:"+aValue+")"}else{A.style.opacity=aValue}return A},SetStyle:function(C,B){var A=$ID(C);if(A){for(theStyle in B){if(theStyle=="opacity"){Neaux.Dom.SetOpacity(A,B[theStyle])}else{if(theStyle=="float"||theStyle=="cssFloat"){theStyle=typeof A.style.cssFloat=="string"?"cssFloat":"styleFloat"}A.style[theStyle]=B[theStyle]}}}return A},GetElementRect:function(E){var C=$ID(aElement);if(C==null){throw new Error("Dom::GetElementRect: Invalid element specified")}var B=y=0,D=C.offsetWidth,A=C.offsetHeight;while(C!=null){B+=C.offsetLeft;y+=C.offsetTop;C=C.offsetParent}return{x:B,y:y,width:D,height:A}},toString:function(){return"[Neaux.Dom]"}}})();$ID=Neaux.Dom.GetElementsById;$CLS=Neaux.Dom.GetElementsByClassName;
(function(){Neaux.Register("event","event.js","04-Nov-2008");Neaux.Require(Neaux.Dom);Neaux.Event={Add:function(A,E,G){var D=Neaux.Event._GetTargets(A);var C=typeof E=="string"?E.split(","):E;for(var B in D){for(var F in C){if(document.addEventListener){D[B].addEventListener(C[F],G,false)}else{if(document.attachEvent){Neaux.Event._IEAttachEvent(D[B],C[F],G)}else{B["on"+C[F]]=G}}}}},Remove:function(A,E,G){var D=Neaux.Event._GetTargets(A);var C=typeof E=="string"?E.split(","):E;for(var B in D){for(var F in C){if(document.removeEventListener){D[B].removeEventListener(C[F],G,false)}else{if(document.detachEvent){Neaux.Event._IEDetachEvent(D[B],C[F],G)}else{B["on"+C[F]]=G}}}}},_GetTargets:function(A){var D=null;if(typeof A=="string"){D=A.split(",");for(var C in D){D[C]=$ID(D[C])}}else{if(A instanceof Array){D=[];for(var B in A){D.push($ID(A[B]))}}else{D=[A]}}return D},_IEAttachEvent:function(D,B,F){if(Neaux.Event._IELookupEvent(D,B,F)>=0){return}var C=function(){Neaux.Event._IEHandler(D,F)};D.attachEvent("on"+B,C);var E={element:D,event:B,handler:F,fauxHandler:C};var A=D.document||document;if(!A.parentWindow.__nwEventRegistry){A.parentWindow.__nwEventRegistry=[]}A.parentWindow.__nwEventRegistry.push(E)},_IEDetachEvent:function(B,A,C){},_IELookupEvent:function(D,C,F){var A=D.document||document;var G=A.parentWindow.__nwEventRegistry;if(!G||G.length==0){return -1}var E;for(var B=G.length-1;B>=0;B--){E=G[B];if(E.element==D&&E.event==C&&E.handler==F){return B}}return -1},_IEHandler:function(B,D){var A=window.event;var C={type:A.type,target:A.srcElement||document,currentTarget:B,CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3,eventPhase:(this.target==this.currentTarget)?this.AT_TARGET:this.BUBBLING_PHASE,bubbles:undefined,cancelable:undefined,timeStamp:undefined,screenX:A.screenX,screenY:A.screenY,clientX:A.clientX,clientY:A.clientY,ctrlKey:A.ctrlKey,shiftKey:A.shiftKey,altKey:A.altKey,metaKey:undefined,button:undefined,relatedTarget:null,keyCode:A.keyCode,charCode:0,stopPropagation:function(){A.cancelBubble=true},preventDefault:function(){A.returnValue=false}};switch(C.type){case"mouseover":C.relatedTarget=A.fromElement;break;case"mouseout":C.relatedTarget=A.toElement;break;case"keypress":case"keyup":case"keydown":C.charCode=A.keyCode;C.keyCode=0;break}D.call(B,C)},SetTimeout:function(D,B,A){var C=A?function(){D.call(A)}:D;return setTimeout(C,B)},ClearTimeout:function(A){clearTimeout(A)},SetInterval:function(D,B,A){var C=A?function(){D.call(A)}:D;return setInterval(C,B)},ClearInterval:function(A){clearInterval(A)},toString:function(){return"[Neaux.Event]"}}})();$EV=Neaux.Event.Add;Neaux.Event.Add(window,"load",Neaux._RunStartup);
(function(){Neaux.Register("http","http.js","11-Nov-2008");var A=Neaux.Require(Neaux.Event);Neaux.AjaxState={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};Neaux.HttpStatus={INITIALIZED:0,OK:200,CREATED:201,ACCEPTED:202,NO_RESPONSE:204,BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,SERVER_ERROR:500,APP_TIMEOUT:999};Neaux.Http={Cookie:{Get:function(E){var C=null;if(document.cookie.length>0){var B=document.cookie.indexOf(E+"=");if(B>=0){B+=(E.length+1);var D=document.cookie.indexOf(";",B);if(D<=0){D=document.cookie.length}C=decodeURIComponent(document.cookie.substring(B,D))}}return C},Set:function(F,C,E){var B="";if(E){var D=new Date();D.setTime(D.getTime()+E*60*60*1000);B="; expires="+D.toGMTString()}document.cookie=F+"="+encodeURIComponent(C)+B},Remove:function(B){Neaux.Http.Cookie.Set(B,"",0)},toString:function(){return"[Neaux.Http.Cookie]"}},EncodeQueryString:function(F){var C=[];var E;var B=/%20/g;for(var D in F){E=encodeURIComponent(D).replace(B,"+")+"="+encodeURIComponent(F[D]).replace(B,"+");C.push(E)}return C.join("&")},DecodeQueryString:function(B){},Ajax:function(C,B){this.httpRequest=this._CreateNewRequest();if(typeof C=="function"){this.SetHandler(C)}else{if(typeof C=="object"){B=C}}if(B){this.Set(B)}},toString:function(){return"[Neaux.Http]"}};Neaux.Http.Ajax.prototype={httpRequest:null,timerID:null,options:{contentType:"application/x-www-form-urlencoded",data:null,method:"post",action:null,asynchronous:true,immediate:false,timeout:null,onchange:function(){},onload:function(){},onerror:function(){throw new Error(this.DefaultErrorText())},onprogress:function(){},ontimeout:function(){},onabort:function(){}},OK:function(){return(this.httpRequest.status==Neaux.HttpStatus.OK)?true:false},Status:function(){return this.httpRequest.status},StatusText:function(){return this.httpRequest.statusText},ReadyState:function(){return this.httpRequest.readyState},MatchState:function(B){return(B==this.httpRequest.readyState)},Text:function(){return this.httpRequest.responseText},Xml:function(){return this.httpRequest.responseXML},DefaultErrorText:function(){return"Neaux::Ajax Unhandled Error: "+this.Status()+" ("+this.StatusText()+")"},Set:function(B){Neaux.Merge(this.options,B);if(this.options.immediate){this.Send()}},SetContentType:function(B){this.options.contentType=B},SetSynchronous:function(B){this.options.asynchronous=(B===false)?true:false},SetTimeout:function(B){this.options.timeout=B?B:null;if(!this.options.timeout&&this.timerID){this.timerID=A.ClearTimeout()}},SetHandler:function(B,C){C=C||"onload";this.options[C]=B},Get:function(B,C){this.Send(B,"GET",C)},Post:function(C,B){this.Send(C,"POST",{data:B})},Send:function(B,F,C){C=C||{};if(typeof B=="object"){C=B}else{if(typeof F=="object"){C=F}}var E=typeof B=="string"?B:null;var H=typeof F=="string"?F:null;Neaux.Merge(this.options,C);E=E||this.options.action;H=H||this.options.method;if(this.httpRequest==null){this.httpRequest=this._CreateNewRequest()}this.httpRequest.open(H,E,this.options.asynchronous);if(F=="POST"){this.httpRequest.setRequestHeader("Content-Type",this.options.contentType)}else{if(F=="GET"&&E.indexOf("?")<0&&!this.options.data){throw new Error("Ajax::Send - No Data provided for GET request")}}if(this.options.asynchronous){try{var G=this;this.httpRequest.onreadystatechange=function(){G._AjaxHandler()}}catch(D){throw new Error("Ajax::Send - Unable to connect handler to XMLHttpRequest object")}if(this.options.timeout){this.timerID=A.SetTimeout(this._TimeoutHandler,this.options.timeout,this)}}this.httpRequest.send(this.options.data)},_CreateNewRequest:function(){try{return new XMLHttpRequest()}catch(B){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(B){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(B){}throw new Error("The User Agent (Browser) does not support XML Http Requests.")},_AjaxHandler:function(){if(this.MatchState(Neaux.AjaxState.DONE)&&this.timerID){this.timerID=A.ClearTimeout(this.timerID)}this.options.onchange();switch(this.httpRequest.readyState){case Neaux.AjaxState.DONE:if(this.OK()){this.options.onload.apply(this)}else{if(this.Status()==Neaux.HttpStatus.APP_TIMEOUT){this.options.ontimeout.apply(this)}else{this.options.onerror.apply(this)}}this.httpRequest.onreadystatechange=null;break;case Neaux.AjaxState.LOADING:this.options.onprogress.apply(this);break}},_TimeoutHandler:function(){this.httpRequest.abort();this.httpRequest.readyState=Neaux.AjaxState.DONE;this.httpRequest.status=Neaux.HttpStatus.APP_TIMEOUT;this.timerID=null;this._AjaxHandler()},toString:function(){return"[Neaux::Request]"}};Neaux.Request=Neaux.Http.Ajax})();
(function(){Neaux.Register("xml","xml.js","05-Nov-2008");Neaux.Require(Neaux.Ajax);Neaux.Xml={xhr:null,Create:function(){var A=null;if(document.implementation&&document.implementation.createDocument){A=document.implementation.createDocument("","",null)}else{if(window.ActiveXObject){A=new ActiveXObject("Microsoft.XMLDOM")}else{throw new Error("Your browser does not support XML")}}A.async=false;return A},Load:function(B,D){var A=D||Neaux.Xml.Create();try{A.load(B)}catch(C){if(!Neaux.Xml.xhr){Neaux.Xml.xhr=new Neaux.Ajax()}Neaux.Xml.xhr.Get(B,{async:false});if(Neaux.Xml.xhr.OK()){Neaux.Xml.xmlDoc=this.xhr.Xml()}else{if(this.xhr.Status()!=0){throw new Error(this.xhr.Status())}else{throw new Error("XMLDocument::Load: Cannot load XML File")}}}return A},Parse:function(D){var B=null;if(document.implementation&&document.implementation.createDocument){try{var A=new DOMParser();B=A.parseFromString(D,"text/xml")}catch(C){throw new Error("Xml.Parse: Your browser does not support XML")}}else{B=Neaux.Xml.Create();B.loadXML(D)}return B},Serialize:function(C){var E;var B=C.documentElement?C.documentElement:C;try{var A=new XMLSerializer();theXMLstring=A.serializeToString(B)}catch(D){theXMLstring=B.xml}return theXMLstring},Decode:function(A,B){throw new Error("Xml.Decode is not implemented")},Encode:function(A){throw new Error("Xml.Encode is not implemented")},toString:function(){return"[Neaux.Xml]"}};Neaux.XmlDocument=function(A){if(!A){return}if(typeof A=="object"){this.Set(A)}else{if(A.search(/\.xml$/i)>0){this.Load(A)}else{this.Parse(A)}}};Neaux.XmlDocument.prototype={xmlDoc:null,Doc:function(){return this.xmlDoc},Root:function(){return this.xmlDoc.documentElement},Set:function(A){this.xmlDoc=A;return this.xmlDoc},Load:function(A){this.xmlDoc=Neaux.Xml.Load(A);return this.xmlDoc},Parse:function(A){this.xmlDoc=Neaux.Xml.Parse(A);return this.xmlDoc},Serialize:function(){return Neaux.Xml.Serialize(this.xmlDoc)},Encode:function(){return Neaux.Xml.Encode(this.xmlDoc)},Decode:function(){return Neaux.Xml.Decode(this.xmlDoc)},toString:function(){return"[Neaux::XmlDocument]"}}})();

