/* From Server */
/* Generated on Tue Aug 25 19:31:33 EDT 2009 */

/* /includes/jslib/wsdom/wsdom.js */
Function.getClassName=function(){return"Function";};Function.prototype.Extend=function(superClass){this.prototype=new superClass();this.prototype.getSuperClass=function(){return superClass;};this.getSuperClass=this.prototype.getSuperClass;return this;};Function.prototype.Super=function(context,methodName,args){if(null!=methodName){var method=this.getSuperClass().prototype[methodName];}
else{var method=this.getSuperClass();}
if(!args){return method.call(context);}
else{return method.apply(context,args);}};Function.prototype.Implements=function(obj,members){if(typeof obj=="function"){obj=obj.prototype;}
var tObj={}
for(var i=0,len=members.length;i<len;++i){tObj[members[i]]=obj[members[i]]||null;}
var o=WSDOM.Util.copyObject(tObj);for(var i in o){this.prototype[i]=o[i];}};Function.prototype.Context=function(obj){var fnReference=this;return function(){return typeof fnReference=="function"?fnReference.apply(obj,arguments):obj[fnReference].apply(obj,arguments);};};Function.prototype.EmptyFunction=function(){};WSDOM=new function(){var loadedClasses={};var usingReferences=[];this.defineClass=function(className,superClass,constructor){loadedClasses[className]=constructor;if(null!=superClass){loadedClasses[className].Extend(superClass);}
loadedClasses[className].prototype.getClassName=function(){return className;};loadedClasses[className].getClassName=loadedClasses[className].prototype.getClassName;return loadedClasses[className];};this.loadClass=function(className){var classDef=parseClassName(className);var o=this.getClass(classDef.className);if(o){this[o.getClassName()]=o;this[o.getClassName()].prototype.namespace=classDef.namespace;this[o.getClassName()].prototype.version=classDef.version;};};this.loadSingleton=function(className){var classDef=parseClassName(className);var o=this.getClass(classDef.className);if(o){this[o.getClassName()]=new o();this[o.getClassName()].namespace=classDef.namespace;this[o.getClassName()].version=classDef.version;};};this.getClass=function(className){return loadedClasses[className];};this.getLoadedClasses=function(){return loadedClasses;};this.using=function(originatingClassName,className){usingReferences.push({originatingClassName:originatingClassName,className:className});}
this._processUsingReferences=function(){var usingErrors=false;for(var x=0;x<usingReferences.length;x++){var originatingClassName=usingReferences[x].originatingClassName;var className=usingReferences[x].className;var classDef=parseClassName(className);if(!this[classDef.className]){if(this.Console){this.Console.warn("Missing class definition for "+className+".  Called from "+originatingClassName+".");};usingErrors=true;}else if(this[classDef.className].version!=classDef.version&&(!this[classDef.className].prototype||this[classDef.className].prototype.version!=classDef.version)){if(this.Console){this.Console.warn("Version incompatibility for loaded class, "+classDef.className+"."+this[classDef.className].version+", versus requested class, version "+classDef.version+".  Called from "+originatingClassName+".");};usingErrors=false;};};if(!usingErrors){this.Console.log("WSDOM Framework loaded successfully.");};};this._onload=function(){var element=window;var eventType="load";var fnHandler=this._processUsingReferences.Context(this);if(element.addEventListener){element.addEventListener(eventType,fnHandler,false);}
else if(element.attachEvent){element.attachEvent("on"+eventType,fnHandler);};};this._onload();function parseClassName(className){var tokens=className.split('.');var classDef={namespace:tokens[0],className:tokens[1],version:tokens[2]};return classDef;};this.identity=function(x){return x};}();WSDOM.using("WSDOM","WSDOM.Console.1");

/* /includes/jslib/wsdom/console/console.1.js */
Console_class=function(){this._isEnabled=false;this._origConsole;if(("console"in window)&&("firebug"in console)){this._origConsole=console;};this._stub();};Console_class.prototype.enable=function(){if(!this._origConsole&&(!("console"in window)||!("firebug"in console))){this._origConsole=this._createBackupConsole();};for(var i in this._origConsole){if(!i.match(/firebug/i)){this[i]=this._origConsole[i];};};i=null;delete i;delete this.group;delete this.groupEnd;this.startGroup=this._origConsole.group;this.endGroup=this._origConsole.groupEnd;delete this.time;delete this.timeEnd;this.startTime=this._origConsole.time;this.endTime=this._origConsole.timeEnd;};Console_class.prototype.disable=function(){for(var i in this){if(typeof this[i]=="function"&&!this.constructor.prototype[i]){this[i]=function(){};};};};Console_class.prototype._stub=function(){var methods=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd","clear","open","close","startGroup","endGroup","startTime","endTime"];for(var x=0;x<methods.length;x++){this[methods[x]]=function(){};};};Console_class.prototype.link=function(){if(arguments.length==2){var description=arguments[0];var link=arguments[1];}else if(arguments.length==1){var description='';var link=arguments[0];}else{return false;}
var a=document.createElement('a');a.setAttribute('href',link);this.log(description,a);}
Console_class.prototype._createBackupConsole=function(){var backupConsole=new function(){this.log=function()
{logFormatted(arguments,"");}
this.link=this.log
this.debug=function()
{logFormatted(arguments,"debug");}
this.info=function()
{logFormatted(arguments,"info");}
this.warn=function()
{logFormatted(arguments,"warning");}
this.error=function()
{logFormatted(arguments,"error");}
this.assert=function(truth,message)
{if(!truth)
{var args=[];for(var i=1;i<arguments.length;++i)
args.push(arguments[i]);logFormatted(args.length?args:["Assertion Failure"],"error");throw message?message:"Assertion Failure";}}
this.dir=function(object)
{var html=[];var pairs=[];for(var name in object)
{try
{pairs.push([name,object[name]]);}
catch(exc)
{}}
pairs.sort(function(a,b){return a[0]<b[0]?-1:1;});html.push('<table>');for(var i=0;i<pairs.length;++i)
{var name=pairs[i][0],value=pairs[i][1];html.push('<tr>','<td class="propertyNameCell"><span class="propertyName">',escapeHTML(name),'</span></td>','<td><span class="propertyValue">');appendObject(value,html);html.push('</span></td></tr>');}
html.push('</table>');logRow(html,"dir");}
this.dirxml=function(node)
{var html=[];appendNode(node,html);logRow(html,"dirxml");}
this.group=function()
{logRow(arguments,"group",pushGroup);}
this.groupEnd=function()
{logRow(arguments,"",popGroup);}
this.time=function(name)
{timeMap[name]=(new Date()).getTime();}
this.timeEnd=function(name)
{if(name in timeMap)
{var delta=(new Date()).getTime()-timeMap[name];logFormatted([name+":",delta+"ms"]);delete timeMap[name];}}
this.count=function()
{this.warn(["count() not supported."]);}
this.trace=function()
{this.warn(["trace() not supported."]);}
this.profile=function()
{this.warn(["profile() not supported."]);}
this.profileEnd=function()
{}
this.clear=function()
{consoleBody.innerHTML="";}
this.open=function()
{toggleConsole(true);}
this.close=function()
{if(frameVisible)
toggleConsole();}
var consoleFrame=null;var consoleBody=null;var commandLine=null;var frameVisible=false;var messageQueue=[];var groupStack=[];var timeMap={};var clPrefix=">>> ";var isFirefox=navigator.userAgent.indexOf("Firefox")!=-1;var isIE=navigator.userAgent.indexOf("MSIE")!=-1;var isOpera=navigator.userAgent.indexOf("Opera")!=-1;var isSafari=navigator.userAgent.indexOf("AppleWebKit")!=-1;function toggleConsole(forceOpen)
{frameVisible=forceOpen||!frameVisible;if(consoleFrame)
consoleFrame.style.visibility=frameVisible?"visible":"hidden";else
waitForBody();}
function focusCommandLine()
{toggleConsole(true);if(commandLine)
commandLine.focus();}
function waitForBody()
{if(document.body)
createFrame();else
setTimeout(waitForBody,200);}
function createFrame()
{if(consoleFrame)
return;window.onFirebugReady=function(doc)
{window.onFirebugReady=null;var toolbar=doc.getElementById("toolbar");toolbar.onmousedown=onSplitterMouseDown;commandLine=doc.getElementById("commandLine");addEvent(commandLine,"keydown",onCommandLineKeyDown);addEvent(doc,isIE||isSafari?"keydown":"keypress",onKeyDown);consoleBody=doc.getElementById("log");layout();flush();}
var baseURL=window._WSDOM_Console_URL||"/includes/jslib/WSDOM/firebug";consoleFrame=document.createElement("iframe");consoleFrame.setAttribute("src",baseURL+"/firebug.html");consoleFrame.setAttribute("frameBorder","0");consoleFrame.style.visibility=(frameVisible?"visible":"hidden");consoleFrame.style.zIndex="2147483647";consoleFrame.style.position="fixed";consoleFrame.style.width="100%";consoleFrame.style.left="0";consoleFrame.style.bottom="0";consoleFrame.style.height="200px";document.body.appendChild(consoleFrame);}
function getFirebugURL()
{var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;++i)
{if(scripts[i].src.indexOf("firebug.js")!=-1)
{var lastSlash=scripts[i].src.lastIndexOf("/");return scripts[i].src.substr(0,lastSlash);}}}
function evalCommandLine()
{var text=commandLine.value;commandLine.value="";logRow([clPrefix,text],"command");var value;try
{value=eval(text);}
catch(exc)
{}
WSDOM.Console.log(value);}
function layout()
{var toolbar=consoleBody.ownerDocument.getElementById("toolbar");var height=consoleFrame.offsetHeight-(toolbar.offsetHeight+commandLine.offsetHeight);consoleBody.style.top=toolbar.offsetHeight+"px";consoleBody.style.height=height+"px";commandLine.style.top=(consoleFrame.offsetHeight-commandLine.offsetHeight)+"px";}
function logRow(message,className,handler)
{if(consoleBody)
writeMessage(message,className,handler);else
{messageQueue.push([message,className,handler]);waitForBody();}}
function flush()
{var queue=messageQueue;messageQueue=[];for(var i=0;i<queue.length;++i)
writeMessage(queue[i][0],queue[i][1],queue[i][2]);}
function writeMessage(message,className,handler)
{var isScrolledToBottom=consoleBody.scrollTop+consoleBody.offsetHeight>=consoleBody.scrollHeight;if(!handler)
handler=writeRow;handler(message,className);if(isScrolledToBottom)
consoleBody.scrollTop=consoleBody.scrollHeight-consoleBody.offsetHeight;}
function appendRow(row)
{var container=groupStack.length?groupStack[groupStack.length-1]:consoleBody;container.appendChild(row);}
function writeRow(message,className)
{var row=consoleBody.ownerDocument.createElement("div");row.className="logRow"+(className?" logRow-"+className:"");row.innerHTML=message.join("");appendRow(row);}
function pushGroup(message,className)
{logFormatted(message,className);var groupRow=consoleBody.ownerDocument.createElement("div");groupRow.className="logGroup";var groupRowBox=consoleBody.ownerDocument.createElement("div");groupRowBox.className="logGroupBox";groupRow.appendChild(groupRowBox);appendRow(groupRowBox);groupStack.push(groupRowBox);}
function popGroup()
{groupStack.pop();}
function logFormatted(objects,className)
{var html=[];var format=objects[0];var objIndex=0;if(typeof(format)!="string")
{format="";objIndex=-1;}
var parts=parseFormat(format);for(var i=0;i<parts.length;++i)
{var part=parts[i];if(part&&typeof(part)=="object")
{var object=objects[++objIndex];part.appender(object,html);}
else
appendText(part,html);}
for(var i=objIndex+1;i<objects.length;++i)
{appendText(" ",html);var object=objects[i];if(typeof(object)=="string")
appendText(object,html);else
appendObject(object,html);}
logRow(html,className);}
function parseFormat(format)
{var parts=[];var reg=/((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;var appenderMap={s:appendText,d:appendInteger,i:appendInteger,f:appendFloat};for(var m=reg.exec(format);m;m=reg.exec(format))
{var type=m[8]?m[8]:m[5];var appender=type in appenderMap?appenderMap[type]:appendObject;var precision=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);parts.push(format.substr(0,m[0][0]=="%"?m.index:m.index+1));parts.push({appender:appender,precision:precision});format=format.substr(m.index+m[0].length);}
parts.push(format);return parts;}
function escapeHTML(value)
{function replaceChars(ch)
{switch(ch)
{case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&#39;";case'"':return"&quot;";}
return"?";};return String(value).replace(/[<>&"']/g,replaceChars);}
function objectToString(object)
{try
{return object+"";}
catch(exc)
{return null;}}
function appendText(object,html)
{if(objectToString(object).match(/href/gi)){html.push(objectToString(object));}else{html.push(escapeHTML(objectToString(object)));}}
function appendNull(object,html)
{html.push('<span class="objectBox-null">',escapeHTML(objectToString(object)),'</span>');}
function appendString(object,html)
{html.push('<span class="objectBox-string">&quot;',escapeHTML(objectToString(object)),'&quot;</span>');}
function appendInteger(object,html)
{html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),'</span>');}
function appendFloat(object,html)
{html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),'</span>');}
function appendFunction(object,html)
{var reName=/function ?(.*?)\(/;var m=reName.exec(objectToString(object));var name=m?m[1]:"function";html.push('<span class="objectBox-function">',escapeHTML(name),'()</span>');}
function appendObject(object,html)
{try
{if(object==undefined)
appendNull("undefined",html);else if(object==null)
appendNull("null",html);else if(typeof object=="string")
appendString(object,html);else if(typeof object=="number")
appendInteger(object,html);else if(typeof object=="function")
appendFunction(object,html);else if(object.nodeType==1)
appendSelector(object,html);else if(typeof object=="object")
appendObjectFormatted(object,html);else
appendText(object,html);}
catch(exc)
{}}
function appendObjectFormatted(object,html)
{var text=objectToString(object);var reObject=/\[object (.*?)\]/;var m=reObject.exec(text);html.push('<span class="objectBox-object">',m?m[1]:text,'</span>')}
function appendSelector(object,html)
{html.push('<span class="objectBox-selector">');html.push('<span class="selectorTag">',escapeHTML(object.nodeName.toLowerCase()),'</span>');if(object.id)
html.push('<span class="selectorId">#',escapeHTML(object.id),'</span>');if(object.className)
html.push('<span class="selectorClass">.',escapeHTML(object.className),'</span>');html.push('</span>');}
function appendNode(node,html)
{if(node.nodeType==1)
{html.push('<div class="objectBox-element">','&lt;<span class="nodeTag">',node.nodeName.toLowerCase(),'</span>');for(var i=0;i<node.attributes.length;++i)
{var attr=node.attributes[i];if(!attr.specified)
continue;html.push('&nbsp;<span class="nodeName">',attr.nodeName.toLowerCase(),'</span>=&quot;<span class="nodeValue">',escapeHTML(attr.nodeValue),'</span>&quot;')}
if(node.firstChild)
{html.push('&gt;</div><div class="nodeChildren">');for(var child=node.firstChild;child;child=child.nextSibling)
appendNode(child,html);html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',node.nodeName.toLowerCase(),'&gt;</span></div>');}
else
html.push('/&gt;</div>');}
else if(node.nodeType==3)
{html.push('<div class="nodeText">',escapeHTML(node.nodeValue),'</div>');}}
function addEvent(object,name,handler)
{if(document.all)
object.attachEvent("on"+name,handler);else
object.addEventListener(name,handler,false);}
function removeEvent(object,name,handler)
{if(document.all)
object.detachEvent("on"+name,handler);else
object.removeEventListener(name,handler,false);}
function cancelEvent(event)
{if(document.all)
event.cancelBubble=true;else
event.stopPropagation();}
function onError(msg,href,lineNo)
{var html=[];var lastSlash=href.lastIndexOf("/");var fileName=lastSlash==-1?href:href.substr(lastSlash+1);html.push('<span class="errorMessage">',msg,'</span>','<div class="objectBox-sourceLink">',fileName,' (line ',lineNo,')</div>');logRow(html,"error");};function onKeyDown(event)
{if(event.keyCode==123)
toggleConsole();else if((event.keyCode==108||event.keyCode==76)&&event.shiftKey&&(event.metaKey||event.ctrlKey))
focusCommandLine();else
return;cancelEvent(event);}
function onSplitterMouseDown(event)
{if(isSafari||isOpera)
return;addEvent(document,"mousemove",onSplitterMouseMove);addEvent(document,"mouseup",onSplitterMouseUp);for(var i=0;i<frames.length;++i)
{addEvent(frames[i].document,"mousemove",onSplitterMouseMove);addEvent(frames[i].document,"mouseup",onSplitterMouseUp);}}
function onSplitterMouseMove(event)
{var win=document.all?event.srcElement.ownerDocument.parentWindow:event.target.ownerDocument.defaultView;var clientY=event.clientY;if(win!=win.parent)
clientY+=win.frameElement?win.frameElement.offsetTop:0;var height=consoleFrame.offsetTop+consoleFrame.clientHeight;var y=height-clientY;consoleFrame.style.height=y+"px";layout();}
function onSplitterMouseUp(event)
{removeEvent(document,"mousemove",onSplitterMouseMove);removeEvent(document,"mouseup",onSplitterMouseUp);for(var i=0;i<frames.length;++i)
{removeEvent(frames[i].document,"mousemove",onSplitterMouseMove);removeEvent(frames[i].document,"mouseup",onSplitterMouseUp);}}
function onCommandLineKeyDown(event)
{if(event.keyCode==13)
evalCommandLine();else if(event.keyCode==27)
commandLine.value="";}
window.onerror=onError;addEvent(document,isIE||isSafari?"keydown":"keypress",onKeyDown);toggleConsole(true);}();return backupConsole;};WSDOM.defineClass("Console",null,Console_class);WSDOM.loadSingleton("WSDOM.Console.1");

/* /includes/jslib/browser.js */
function browserObj(){this.platform='';this.version=0;this.isNav4=false;this.isNav6=false;this.isIE4=false;this.isIE=false;this.isMoz=false;this.isSafari=false;this.isMajor=false;this.isMinor=false;this.agent=navigator.appName.toLowerCase();if(navigator.appVersion.indexOf('Mac')!=-1){this.platform="mac";}else{this.platform="pc";}
if(this.agent.indexOf('safari')!=-1){this.isMajor=true;this.isSafari=true;}else if(this.agent.indexOf('gecko')>-1){if(this.agent.indexOf('netscape')>-1){this.isNav6=true;this.isMajor=true;this.isGood=true;}else{this.isMajor=true;this.isMoz=true;this.isGood=true;}}else if(this.agent.indexOf('gecko')>-1){if(this.agent.indexOf('netscape')>-1){this.isNav6=true;this.isMajor=true;this.isGood=true;}else{this.isMajor=true;this.isMoz=true;this.isGood=true;}}else if(this.agent.indexOf('netscape')>-1){if(navigator.appVersion.charAt(0)>"4"){this.version=6;this.isNav6=true;this.isMajor=true;}else{this.version=4;this.isNav4=true;this.isMinor=true;}}else{this.isIE=true;var uA=navigator.userAgent.toLowerCase();var ind=uA.indexOf("msie");uA=uA.substr(ind,uA.length);ind=uA.indexOf(";");uA=parseFloat(uA.substr(0,ind).replace("msie",""));if(uA>=5){this.version=uA;this.isMajor=true;}else{this.version=uA;this.isIE4=true;this.isMinor=true;}}}

/* /includes/jslib/wsdom/events/events.3.js */
var EventSource=function(type){this.listeners=[];this.type=type;};EventSource.prototype.addListener=function(listener,context){if(listener instanceof Function){listener={handler:listener,context:context}}
if(!listener.context){listener.context=window;}
this.listeners.push(listener);return listener;};EventSource.prototype.removeListener=function(listener){for(var i=0;i<this.listeners.length;i++){if(listener==this.listeners[i]){this.listeners.splice(i,1);}}};EventSource.prototype.removeAll=function(){this.listeners=[];};EventSource.prototype.fire=function(){Array.prototype.unshift.call(arguments,this.type);for(var i=0;i<this.listeners.length;i++){this.listeners[i].handler.apply(this.listeners[i].context,arguments);}};var DOMEventSource=function(type){DOMEventSource.Super(this,null,arguments);this.delayTimeouts=[];this.typeIE="on"+this.type;this.elements=[];};DOMEventSource.Extend(EventSource);DOMEventSource.prototype._getBrowserEventName=function(){switch(this.type){case"load":case"change":case"reset":case"select":case"submit":case"blur":case"focus":case"resize":case"scroll":case"abort":case"error":case"unload":return"HTMLEvents";case"mouseover":case"mouseout":case"click":case"dblclick":case"mouseup":case"mousedown":case"mouseenter":case"mouseleave":case"mousemove":case"contextmenu":case"dragstart":case"selectstart":return"MouseEvents";case"keypress":case"keydown":case"keyup":return"UIEvents";default:return null;}};DOMEventSource.prototype._validateEvent=function(e,listener){if(listener.keyCode&&"UIEvents"==this._getBrowserEventName()){return listener.keyCode==e.nativeEvent.keyCode;}
return true;};DOMEventSource.prototype._createDOMHandlerClosure=function(listener,element){var theDOMEventSource=this;for(var i=0,DOMHandler;i<element.length;i++){DOMHandler=function(){var el=element[i].node;if(listener.delay){return function(){var e=window.event||arguments[0];var newEvt={};for(var i in e){newEvt[i]=e[i];}
e=new DOMEvent(newEvt);theDOMEventSource.clearDelayTimeouts();theDOMEventSource.delayTimeouts.push(window.setTimeout(function(){if(theDOMEventSource._validateEvent(e,listener)){listener.handler.call(listener.context,e,el,listener.data);}},listener.delay));}}
else{return function(){var e=new DOMEvent(window.event||arguments[0]);if(theDOMEventSource._validateEvent(e,listener)){listener.handler.call(listener.context,e,el,listener.data);}}}}();this._addEventListener(element[i].node,DOMHandler);element[i].registeredListeners.push({DOMHandler:DOMHandler,listener:listener});}};DOMEventSource.prototype.addElement=function(element,removeIfExisting){if(!(element instanceof Array)){element=[element];}
if(removeIfExisting){this.removeElement(element);}
var elements=[];for(var i=0;i<element.length;i++){elements.push({node:element[i],registeredListeners:[]});}
for(var i=0;i<this.listeners.length;i++){this._createDOMHandlerClosure(this.listeners[i],elements);}
this.elements=this.elements.concat(elements);};DOMEventSource.prototype.removeElement=function(element){var element=[].concat(element);for(var i=0,elWrapper;i<this.elements.length;i++){elWrapper=this.elements[i];if(!element.length){break;}
for(var j=0,el;j<element.length;j++){el=element[j];if(elWrapper.node===el){for(var k=0;k<elWrapper.registeredListeners.length;k++){this._removeEventListener(el,elWrapper.registeredListeners[k].DOMHandler);}
element.splice(j,1);this.elements.splice(i,1);j--;i--;}}}};DOMEventSource.prototype.removeAll=function(){this.removeAllElements();this.listeners=[];};DOMEventSource.prototype.removeAllElements=function(){for(var i=0,el;i<this.elements.length;i++){el=this.elements[i];for(var j=0;j<el.registeredListeners.length;j++){this._removeEventListener(el.node,el.registeredListeners[j].DOMHandler);}}
this.elements=[];};DOMEventSource.prototype.addListener=function(listener,context,delay){if(listener instanceof Function){listener={handler:listener,context:context,delay:delay}}
if(!listener.context){listener.context=window;}
this._createDOMHandlerClosure(listener,this.elements);this.listeners.push(listener);return listener;};DOMEventSource.prototype.removeListener=function(listener){for(var i=0,el;i<this.elements.length;i++){el=this.elements[i];for(var j=0,rl;j<el.registeredListeners.length;j++){rl=el.registeredListeners[j];if(rl.listener==listener){this._removeEventListener(el.node,rl.DOMHandler);el.registeredListeners.splice(j,1);break;}}}
for(var i=0,listener;i<this.listeners.length;i++){if(listener==this.listeners[i]){this.listeners.splice(i,1);break;}}};DOMEventSource.prototype.fire=function(element){if(undefined==element){for(var i=0;i<this.elements.length;i++){this._dispatchEvent(this.elements[i].node);}}
else{if(!(element instanceof Array)){element=[element];}
for(var i=0;i<element.length;i++){this._dispatchEvent(element[i]);}}};DOMEventSource.prototype._addEventListener=function(el,handler){if(document.attachEvent){DOMEventSource.prototype._addEventListener=function(el,handler){el.attachEvent(this.typeIE,handler);};}
else if(document.addEventListener){DOMEventSource.prototype._addEventListener=function(el,handler){el.addEventListener(this.type,handler,false);};}
this._addEventListener=DOMEventSource.prototype._addEventListener;this._addEventListener(el,handler);};DOMEventSource.prototype._removeEventListener=function(el,handler){if(el.detachEvent){DOMEventSource.prototype._removeEventListener=function(el,handler){el.detachEvent(this.typeIE,handler);};}
else if(el.removeEventListener){DOMEventSource.prototype._removeEventListener=function(el,handler){el.removeEventListener(this.type,handler,false);};}
this._removeEventListener=DOMEventSource.prototype._removeEventListener;this._removeEventListener(el,handler);};DOMEventSource.prototype._dispatchEvent=function(el){if(document.createEventObject){DOMEventSource.prototype._dispatchEvent=function(el){var event=document.createEventObject();event.srcElement=el;event.type=this.type;el.fireEvent(this.typeIE,event);};}
else{DOMEventSource.prototype._dispatchEvent=function(el){var event=document.createEvent(this._getBrowserEventName(this.type));event.initEvent(this.type,true,true);el.dispatchEvent(event);};}
this._dispatchEvent=DOMEventSource.prototype._dispatchEvent;this._dispatchEvent(el);};DOMEventSource.prototype.clearDelayTimeouts=function(){for(var i=0;i<this.delayTimeouts.length;i++){window.clearTimeout(this.delayTimeouts[i]);}
this.delayTimeouts=[];};var DOMEvent=function(nativeEvent){this.nativeEvent=nativeEvent;};DOMEvent.prototype.cancel=function(){if(this.nativeEvent.stopPropagation){this.nativeEvent.stopPropagation();}
else{try{this.nativeEvent.cancelBubble=true;}catch(e){}}
if(this.nativeEvent.preventDefault){this.nativeEvent.preventDefault();}
else{try{this.nativeEvent.returnValue=false;}catch(e){}}
return this.nativeEvent;};DOMEvent.prototype.getTarget=function(){var target=this.nativeEvent.srcElement||this.nativeEvent.target;this.getTarget=function(){return target;}
return this.getTarget();};var EventManager=function(){this.events=[];this.add(window,"unload",this.removeAll,this);};EventManager.prototype.KEYCODES={Backspace:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS:20,ESCAPE:27,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,SPACE:32,COMMAND:224}
EventManager.prototype.add=function(element,type,handler,context,data,delay,keyCode){if(arguments.length>1){var inputs={element:element,type:type,handler:handler,context:context,data:data,delay:delay,keyCode:keyCode}}
else if(arguments[0]instanceof Object){var inputs=arguments[0];}
else{var inputs={type:arguments[0]}}
var listener={handler:inputs.handler,context:inputs.context,delay:inputs.delay,data:inputs.data,keyCode:inputs.keyCode};if(this._isDomEventType(inputs.type)){var e=this._addDOMEvent(inputs.type,listener,inputs.element);}
else{var e=this._addCustomEvent(inputs.type,listener);}
this.events.push(e);return e;};EventManager.prototype._isDomEventType=function(type){if(null==DOMEventSource.prototype._getBrowserEventName.apply({type:type})){return false;}
return true;};EventManager.prototype._addDOMEvent=function(type,listener,element){var e=new DOMEventSource(type);if(listener.handler){e.addListener(listener);}
if(element){e.addElement(element);}
return e;};EventManager.prototype._addCustomEvent=function(type,listener){var e=new EventSource(type);if(listener.handler){e.addListener(listener);}
return e;};EventManager.prototype.remove=function(e,listener){if(e instanceof EventSource){this._removeEvent(e,listener);}
else if(e.nodeName||e instanceof Array){this._removeElement(e,listener);}};EventManager.prototype._removeEvent=function(e,listener){if(undefined==listener){e.removeAll();}else{e.removeListener(listener);}
for(var i=0;i<this.events.length;i++){if(e==this.events[i]){this.events.splice(i,1);break;}}};EventManager.prototype._removeElement=function(el,eventType){for(var i=0,event;i<this.events.length;i++){event=this.events[i];if(event instanceof DOMEventSource){if(!eventType||(event.type==eventType)){event.removeElement(el);}}}};EventManager.prototype.removeAll=function(){for(var i=0;i<this.events.length;i++){this.events[i].removeAll();}
this.events=[];};EventManager.prototype.cancel=function(e){if(!e){return;}
if(e instanceof DOMEvent){e.cancel();}
else if(e.srcElement||e.target){DOMEvent.prototype.cancel.apply({nativeEvent:e});}};if(window["WSDOM"]){WSDOM.defineClass("Events",null,EventManager);WSDOM.loadSingleton("WSDOM.Events.3");}else{var Events=new EventManager();}

/* /includes/jslib/element/Element.3.js */

var Element_class=function(){}
Element_class.prototype.get=function(el){if(typeof el=="string"||typeof el=="number")el=document.getElementById(el);return el;};Element_class.prototype.create=function(tag,attributes,children,parent,ElementObjectInstance){var element=document.createElement(tag);var attributeMap={"for":["htmlFor"],"colspan":["colSpan"],"usemap":["useMap"]}
for(var i in attributes)
{if(i=="className"||i=="class")
{element.className=attributes[i];}
else if(document.all&&attributeMap[i])
{for(var j=0;j<attributeMap[i].length;j++){element.setAttribute(attributeMap[i][j],attributes[i]);}
element.setAttribute(i,attributes[i]);}
else if(i=="style")
{this.setStyle(element,attributes[i]);}
else if(i=="Events")
{if(typeof Events!="undefined"){var elEvents=attributes[i];if(!this.isArray(elEvents)){elEvents=[elEvents]}
for(var j=0;j<elEvents.length;j++){elEvents[j].element=element;Events.add(elEvents[j]);}}
else{alert(":: DEV ERROR :: \n Location: Element.3.js -- Element_class.prototype.create \n Type: Dependency \n Message: Expecting Events Lib for use of Events in Element.create")}}
else
{element.setAttribute(i,attributes[i]);};};if(tag.match(/^map$/i)&&attributes&&attributes.name&&!attributes.id){element.setAttribute("id",attributes.name);}
if(arguments.length>2&&children!=undefined&&children!==""){this.addChild(element,children);};if(parent){this.addChild(parent,element);}
return(ElementObjectInstance)?new ElementObject(element):element;};Element_class.prototype.addChild=function(el,child){el=this.get(el);if(!this.isArray(child)){child=[child]}
for(var i=0;i<child.length;i++){if(typeof child[i]=="object"){el.appendChild(child[i]);}
else if(typeof child[i]=="string"||typeof child[i]=="number"){el.innerHTML+=child[i];};}};Element_class.prototype.remove=function(el){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].parentNode.removeChild(el[i])}};Element_class.prototype.setDisplay=function(el,d){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].style.display=d;}};Element_class.prototype.setVisibility=function(el,d){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].style.visibility=d;}};Element_class.prototype.removeChildNodes=function(el){el=this.get(el);while(el.childNodes.length){el.removeChild(el.firstChild);}
return el;};Element_class.prototype.cloneNode=function(el,cloneChildren){var cloneChildNodes=(cloneChildren)?cloneChildren:false;if(document.all){var node=el.outerHTML;if(cloneChildNodes&&el.innerHTML){node.innerHTML=el.innerHTML;}
var container=document.createElement("DIV");container.innerHTML=node;node=container.firstChild;}else{var node=el.cloneNode(cloneChildNodes);}
return node;};Element_class.prototype.getParent=function(el,tag,includeSelf){var el=this.get(el);if(!tag){tag=el.tagName;}
if(!includeSelf&&el.parentNode){el=el.parentNode;}
if(el.tagName&&el.tagName.match(/^BODY$/i)&&!tag.match(/^BODY$/i)){return null;}
if(el.nodeType==1&&el.tagName.toLowerCase()==tag.toLowerCase()){return el;}
else{return this.getParent(el.parentNode,tag,true);}}
Element_class.prototype.setHTML=function(el,v,appendV){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].innerHTML=(appendV)?(el[i].innerHTML+v):v;}};Element_class.prototype.parseSelector=function(){var context=this;var SEPERATOR=/\s*,\s*/;function parseSelector(selector,node,num){node=node||document.documentElement;node=this.get(node);var argSelectors=selector.split(SEPERATOR);var result=[];for(var i=0;i<argSelectors.length;i++){if(node==document.documentElement){var matches=argSelectors[i].match(/^\s*#([^\s.:@[~+>]*)\s+(.*)$/);if(matches){node=document.getElementById(matches[1])||[];argSelectors[i]=matches[2];}}
var stream=toStream(argSelectors[i]),prevToken;if(this.isArray(node)){var nodes=node;if(!argSelectors[i].match(/^[A-Za-z1-9]/)){while(stream[0]&&stream[0].match(/[* ]/)){stream.shift();}}}
else{var nodes=[node]}
for(var j=0;j<stream.length;){var token=stream[j++];var args='';if(token=="["){args=stream[j];while(stream[j++]!=']'&&j<stream.length){args+=stream[j]};args=args.slice(0,-1);var filter="";}
else{var filter=stream[j++];}
if(stream[j]=='('){while(stream[j++]!=')'&&j<stream.length)args+=stream[j];args=args.slice(0,-1);}
prevToken=token;nodes=select(nodes,token,filter,args);}
result=result.concat(nodes);}
if(num!=undefined){if(result.length){var REMatch;if(num=="first"){return result[0]}
else if(num=="last"){return result[result.length-1]}
else if(REMatch=String(num).match(/nth\((.*)\)/)||num=="even"){if(num=="even")num=2;else num=REMatch[1];var result2=[];for(var i=0,len=result.length;i<len;i++){if(i%num==0){result2.push(result[i]);}}
return result2;}
else if(num=="odd"){var result2=[];for(var i=0,len=result.length;i<len;i++){if(i%2!=0){result2.push(result[i]);}}
return result2;}
else if(!isNaN(num)&&result.length>=num){return result[num]}
else{return null;}}
else{return null;}}
return result;}
var WHITESPACE=/\s*([\s>+~(),]|^|$)\s*/g;var IMPLIED_ALL=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var STANDARD_SELECT=/^[^\s>+~]/;var STREAM=/[\s#.:>+~[\]()@!]|[^\s#.:>+~[\]()@!]+/g;function toStream(selector){var stream=selector.replace(WHITESPACE,'$1').replace(IMPLIED_ALL,'$1*$2');if(STANDARD_SELECT.test(stream)){stream=' '+stream;}
return stream.match(STREAM)||[];}
function select(nodes,token,filter,args){return(selectors[token])?selectors[token](nodes,filter,args):[];}
var util={toArray:function(enumerable){var a=[];for(var i=0;i<enumerable.length;i++)a.push(enumerable[i]);return a;},push:function(arr,val){arr.push(val)
return arr.length;}};var dom={isTag:function(node,tag){return(tag=='*')||(tag.toLowerCase()==node.nodeName.toLowerCase().replace(':html',''));},previousSiblingElement:function(node){do node=node.previousSibling;while(node&&node.nodeType!=1);return node;},nextSiblingElement:function(node){do node=node.nextSibling;while(node&&node.nodeType!=1);return node;},hasClass:function(name,node){return(node.className||'').match('(^|\\s)'+name+'(\\s|$)');},getByTag:function(tag,node){if(tag=='*'){var nodes=node.getElementsByTagName(tag);if(nodes.length==0&&node.all!=null)return node.all
return nodes;}
return node.getElementsByTagName(tag);}};var selectors={'#':function(nodes,filter){for(var i=0;i<nodes.length;i++){if(nodes[i].getAttribute('id')==filter)return[nodes[i]];}
return[];},' ':function(nodes,filter){var result=[];for(var i=0;i<nodes.length;i++){result=result.concat(util.toArray(dom.getByTag(filter,nodes[i])));}
return result;},'>':function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];for(var j=0,child;j<node.childNodes.length;j++){child=node.childNodes[j];if(child.nodeType==1&&dom.isTag(child,filter)){result.push(child);}}}
return result;},'.':function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];if(dom.hasClass([filter],node))result.push(node);}
return result;},'!':function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];if(!dom.hasClass([filter],node))result.push(node);}
return result;},':':function(nodes,filter,args){return(pseudoClasses[filter])?pseudoClasses[filter](nodes,args):[];},'+':function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];var sibling=parseSelector.dom.nextSiblingElement(node);if(sibling&&parseSelector.dom.isTag(sibling,filter)){result.push(sibling);}}
return result;},'~':function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];var sibling=parseSelector.dom.previousSiblingElement(node);if(parseSelector.dom.isTag(sibling,filter))result.push(sibling);}
return result;},'[':function(nodes,filter,args){args=args.replace(/'/g,'"');var attributeProps=[];if(!/[<>=]/.test(args)){attributeProps=["",args,"",""];}
else{var params=args.match(/([^!^$*\/.<>=]*)(!\*=|\*=|\$=|!\$=|\^=|\/=|!\/=|<=|>=|<|>|!=|=)(\.*)(i?)(["'`])([^\5]*)(\5)/);if(params){attributeProps=params;}}
attributeProps={name:attributeProps[1],operator:attributeProps[2],isStyle:attributeProps[3]=="..",isProperty:attributeProps[3]==".",casei:attributeProps[4]?true:false,value:attributeProps[6],isValue:(attributeProps[5]=="`")};if(attributeProps.casei){attributeProps.value=attributeProps.value.toLowerCase();}
var result=[];for(var i=0,node,att,val,el;i<nodes.length;i++){node=el=nodes[i];if(attributeProps.isStyle){att=context.getStyle(node,attributeProps.name);if(!att)continue;}
else if(attributeProps.isProperty){if(node[attributeProps.name]!=undefined){var att=node[attributeProps.name];}
else{continue;}}
else{att=node.getAttribute(attributeProps.name);if(!att)continue;}
if(/[*^$\/]/.test(attributeProps.operator)){att=String(att)}
if(attributeProps.casei){att=att.toLowerCase();}
val=attributeProps.value;if(attributeProps.isValue){val=eval(val.replace(/`/g,"'"));}
if(!attributeProps.operator){result.push(nodes[i])}
else{switch(attributeProps.operator){case'=':if(att==val)result.push(node);break;case'!=':if(att!=val)result.push(node);break;case'*=':if(att.match(val))result.push(node);break;case'!*=':if(!att.match(val))result.push(node);break;case'^=':if(att.match('^'+val))result.push(node);break;case'!^=':if(!att.match('^'+val))result.push(node);break;case'$=':if(att.match(val+'$'))result.push(node);break;case'!$=':if(!att.match(val+'$'))result.push(node);break;case'/=':if(att.match(val))result.push(node);break;case'!/=':if(!att.match(val))result.push(node);break;case'>=':if(att>=val)result.push(node);break;case'>':if(att>val)result.push(node);break;case'<=':if(att<=val)result.push(node);break;case'<':if(att<val)result.push(node);break;}}}
return result;}};parseSelector.selectors=selectors;var pseudoClasses={};parseSelector.pseudoClasses=pseudoClasses;parseSelector.util=util;parseSelector.dom=dom;return parseSelector.apply(this,arguments);};Element_class.prototype.is=function(domNode,selector,parent,propagate){parent=parent||domNode.parentNode;var queriedEls=this.parseSelector(selector,parent);var i,l=queriedEls.length;while(domNode&&domNode!==parent){for(i=0;i<l;i++){if(domNode===queriedEls[i]){return true;}}
if(propagate){domNode=domNode.parentNode;continue;}
break;}
return false;};Element_class.prototype.forEach=function(el,callback,context){var returnEls=[];if(typeof el=="string"){el=this.parseSelector(el);}
else if(!this.isArray(el)){el=[el]}
var success;for(var i=0,elLen=el.length;i<elLen;i++){success=context?callback.call(context,el[i],i,el):callback(el[i],i,el)
if(success===false){break;}
returnEls.push(el[i]);}
return returnEls;}
Element_class.prototype.insertBefore=function(el,sibling){el=this.get(el);if(!el)return;sibling=this.get(sibling);if(!el||!sibling||!sibling.parentNode)
{return null;};sibling.parentNode.insertBefore(el,sibling);};Element_class.prototype.insertAfter=function(el,sibling){el=this.get(el);if(!el)return;sibling=this.get(sibling);if(!el||!sibling||!sibling.parentNode)
{return null;};return sibling.nextSibling?sibling.parentNode.insertBefore(el,sibling.nextSibling):sibling.parentNode.appendChild(el);};Element_class.prototype.nextElement=function(el,tagName){tagName=tagName?String(tagName).toLowerCase():null;var sibling=this.get(el);while(sibling=sibling.nextSibling){if(sibling.nodeType==1&&(tagName==null||sibling.tagName.toLowerCase()==tagName)){return sibling;}}
return null;}
Element_class.prototype.previousElement=function(el,tagName){tagName=tagName?String(tagName).toLowerCase():null;var sibling=this.get(el);while(sibling=sibling.previousSibling){if(sibling.nodeType==1&&(tagName==null||sibling.tagName.toLowerCase()==tagName)){return sibling;}}
return null;}
Element_class.prototype.getXY=function(el){el=this.get(el);if(!el)return;var x=0,y=0;while(el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;el=el.offsetParent;}
return{x:x,y:y};};Element_class.prototype.setXY=function(el,x,y){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){if(x!==null)el[i].style.left=x+"px";if(y!==null)el[i].style.top=y+"px";}};Element_class.prototype.getSize=function(el){el=this.get(el);if(!el)return;var height=el.offsetHeight;var width=el.offsetWidth;return{height:height,width:width};};Element_class.prototype.getSizeXY=function(el){var size=this.getSize(el);return{x:size.width,y:size.height};};Element_class.prototype.setSize=function(el,width,height){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){this.setWidth(el[i],width);this.setHeight(el[i],height);}};Element_class.prototype.setWidth=function(el,width){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].style.width=width+"px";}};Element_class.prototype.setHeight=function(el,height){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].style.height=height+"px";}};Element_class.prototype.getBorderSize=function(el){el=this.get(el);var height=el.offsetHeight-el.clientHeight;var width=el.offsetWidth-el.clientWidth;return{height:height,width:width};}
Element_class.prototype.switchClass=function(el,classname,b){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
if(b){this.addClass(el,classname);}
else{this.removeClass(el,classname);}
if(el.length){return el[0].className;}};Element_class.prototype.replaceClass=function(el,sClassNameOld,sClassNameNew,bConditional){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
if(bConditional){for(var i=0;i<el.length;i++){if(this.hasClass(el[i],sClassNameOld)){this.removeClass(el[i],sClassNameOld);this.addClass(el[i],sClassNameNew);}}}else{this.removeClass(el,sClassNameOld);this.addClass(el,sClassNameNew);}
if(el.length){return el[0].className;}};Element_class.prototype.addClass=function(el,classname){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){if(!this.hasClass(el[i],classname)){el[i].className+=(el[i].className?" ":"")+classname;}}
if(el.length){return el[0].className;}};Element_class.prototype.removeClass=function(el,classname){el=this.get(el);if(!this.isArray(el)){el=[el]}
var re=this._getClassnameRegEx(classname);for(var i=0;i<el.length;i++){el[i].className=el[i].className.replace(re,"$1$3");}
if(el.length){return el[0].className;}};Element_class.prototype.toggleClass=function(el,classname){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){if(this.hasClass(el[i],classname)){this.removeClass(el[i],classname);}else{this.addClass(el[i],classname);}}
if(el.length){return el[0].className;}};Element_class.prototype.hasClass=function(el,classname){el=this.get(el);return(el.className&&el.className.match(this._getClassnameRegEx(classname))!=null);};Element_class.prototype._getClassnameRegEx=function(classname){return new RegExp("(\\s|^)("+classname+")(\\s|$)","g")};Element_class.prototype.getStyle=function(el,styleProp){el=this.get(el);if(!el)return;if(document.defaultView&&document.defaultView.getComputedStyle){var computedStyle=document.defaultView.getComputedStyle(el,null);return(computedStyle)?computedStyle.getPropertyValue(styleProp):null;}else if(el.currentStyle){styleProp=styleProp.replace(/\-(.)/g,function(){return arguments[1].toUpperCase();});return el.currentStyle[styleProp];}
return null;}
Element_class.prototype.setStyle=function(el,styles){el=this.get(el);if(!el)return;var pairs=[];styles=styles.split(";");for(var i=0;i<styles.length;i++){var nv=styles[i].replace(":","{:}").split("{:}");if(nv.length>1){nv[0]=nv[0].replace(/\-(.)/g,function(){return arguments[1].toUpperCase();}).replace(/\s/g,"");pairs.push({n:nv[0],v:nv[1].replace(/^\s*|\s*$/g,"")});}}
if(!this.isArray(el)){el=[el]}
var attributeMap={"float":["cssFloat","styleFloat"]}
for(var i=0;i<el.length;i++){for(var j=0;j<pairs.length;j++){if(attributeMap[pairs[j].n]){for(var k=0;k<attributeMap[pairs[j].n].length;k++){pairs.push({n:attributeMap[pairs[j].n][k],v:pairs[j].v});}}
el[i].style[pairs[j].n]=pairs[j].v;}}}
Element_class.prototype.isArray=function(o){return(o instanceof Array);};if(typeof WSDOM!="undefined"){WSDOM.using("WSDOM.Element.3","WSDOM.Events.2");WSDOM.defineClass("Element",null,Element_class);WSDOM.loadSingleton("WSDOM.Element.3");}
else{Element=new Element_class();}

/* /includes/jslib/element/element.3extras.js */

Element_class.prototype.getParentBySelector=function(el,selector,includeSelf){el=this.get(el);var pNode=includeSelf?el:el.parentNode;selector=selector.replace(/\s+/," ").split(" ");var levels=selector.length;var level=0;var selectorType,isMatch,isTag,isClass;function getSelectorType(){var sel=selector[level];selectorType={tag:sel};if(sel.match(/(\D*)\#(\D*)/)){selectorType.tag=RegExp.$1;selectorType.id=RegExp.$2;}
else if(sel.match(/(.*)\[([^^$*]*?)((\*=|\$=|\^=|=)+["'](.*)["'])?]/)){selectorType.tag=RegExp.$1;selectorType.attribute=RegExp.$2;selectorType.operator=RegExp.$4;selectorType.value=RegExp.$5;}
else if(sel.match(/(\D*)\.(\D*)/)){selectorType.tag=RegExp.$1;selectorType.className=RegExp.$2;}}
getSelectorType();while(pNode&&!pNode.tagName.match(/^BODY$/i)){isMatch=false;isTag=pNode.tagName.match(new RegExp("^"+selectorType.tag.replace(/([*])/,"\\$1")+"$","i"))||selectorType.tag=="*"||selectorType.tag=="";isClass=selectorType.className&&this.hasClass(pNode,selectorType.className);if(isTag&&selectorType.attribute){var att=pNode.getAttribute(selectorType.attribute);if(!selectorType.operator){if(att)isMatch=true;}
else{switch(selectorType.operator){case'*=':;if(att.match(selectorType.value))isMatch=true;break;case'=':if(att==selectorType.value)isMatch=true;break;case'^=':if(att.match('^'+selectorType.value))isMatch=true;break;case'$=':if(att.match(selectorType.value+'$'))isMatch=true;}}}
else if(isTag){if(isClass){isMatch=true;}
else if(selectorType.tag&&!selectorType.className){isMatch=true;}
else if(selectorType.id&&pNode.getAttribute("id")==selectorType.id){isMatch=true;}}
else if(isTag&&isClass){isMatch=true;}
if(isMatch){if(level==levels-1){return pNode;}
level++;getSelectorType();}
pNode=pNode.parentNode||null;}
return null;}
Element_class.prototype.isOnScreen=function(el,considerPosition){el=Element.get(el);if(!el){return false;}
var pNode=el;while(pNode&&pNode.tagName.toUpperCase()!="HTML"){var curStyle=Element.getStyle(pNode,"display");if(curStyle=="none"||curStyle==null||Element.getStyle(pNode,"visibility")=="hidden"){return false;}
pNode=pNode.parentNode;}
if(considerPosition){var elPos=Element.getXY(el);if(elPos.x<0||elPos.y<0){return false;}}
return true;}
Element_class.prototype.isInsideOf=function(pos,x,y,width,height){if(this.isInsideOfEW(pos,width,x)&&this.isInsideOfNS(pos,height,y)){return true;}
return false;};Element_class.prototype.isInsideOfEW=function(pos,width,x){if(x>pos.x&&x<pos.x+width){return true;}
return false;};Element_class.prototype.isInsideOfNS=function(pos,height,y){if(y>pos.y&&y<pos.y+height){return true;}
return false;};Element_class.prototype.setOpacity=function(el,opacity){el=this.get(el);if(!el)return;if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].style.filter="alpha(opacity:"+opacity+")";el[i].style.KHTMLOpacity=opacity/100;el[i].style.MozOpacity=opacity/100;el[i].style.opacity=opacity/100;}};Element_class.prototype.setProperty=function(el,prop,val){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i][prop]=val;}};Element_class.prototype.setAttribute=function(el,prop,val){el=this.get(el);if(!this.isArray(el)){el=[el]}
for(var i=0;i<el.length;i++){el[i].setAttribute(prop,val);}};Element_class.prototype.setDisabled=function(el,bool){this.setProperty(el,"disabled",!!bool);};Element_class.prototype.debug=function(el,ElementObjectInstance){var output=[];output.push("---------------------------");if(ElementObjectInstance){output.push("Selector: "+ElementObjectInstance.selector);}
var els=(el instanceof Array)?el:[el];var pos,size;for(var i=0;i<els.length;i++){if(els.length>1){output.push(i+": "+(els[i].tagName||""));}
pos=this.getXY(els[i]);size=this.getSize(els[i]);output.push("  x: "+pos.x+" y: "+pos.y+" / w: "+size.width+" h: "+size.height);if(els[i].className){output.push("  Class: "+(els[i].className))};if(els[i].id){output.push("  Id: "+(els[i].id));}
output.push("");}
return output.join("\n")+"\n";}
Element=new Element_class();function ElementObject(el){this.selector=(typeof el=="string")?el:"element";this.elementInstance=new Element_class();this.el=this.elementInstance.isArray(el)?el:this.elementInstance.get(el);if(!this.el){this.el=this.elementInstance.parseSelector(arguments[0],arguments[1]||null,arguments[2]||null);}
var noChangeMethodsRE=new RegExp(/_getClassnameRegEx|isArray|isInsideOf/);var mName;for(var i in this.elementInstance){mName=i;if(noChangeMethodsRE.test(i)){this[mName]=hitch(this.elementInstance,mName,false);}
else if(/parseSelector/.test(i)){this[mName]=hitchAppend(this.elementInstance,mName,false,this.el);}
else if(/create|debug/.test(i)){this[mName]=hitchAppend(this.elementInstance,mName,false,this.el,this)}
else{this[mName]=hitchAppend(this.elementInstance,mName,true,this.el)}}
function hitch(obj,methodName){return function(){return obj[methodName].apply(obj,arguments);};}
function hitchAppend(obj,methodName,bAppend){var args=[];for(var i=3;i<arguments.length;i++){args.push(arguments[i]);}
return function(){var args2=[];for(var i=0;i<arguments.length;i++){args2.push(arguments[i]);}
return obj[methodName].apply(obj,bAppend?args.concat(args2):args2.concat(args));};}}
ElementObject.prototype.toString=function(){return this.debug();}

/* /includes/jslib/wsdom/util/util.1.js */

function Util_class(){};Util_class.prototype.StringBuilder=function(){this.s=[];};Util_class.prototype.StringBuilder.prototype.append=function(who){this.s.push(who);};Util_class.prototype.StringBuilder.prototype.toString=function(who){return this.s.join("");};Util_class.prototype.copyObject=function(obj){var Copy;if(obj!=null){Copy=new obj.constructor;for(var property in obj){if(typeof(obj[property])=="object"){Copy[property]=this.copyObject(obj[property]);}else{Copy[property]=obj[property];};};};return Copy;};Util_class.prototype.MINUTES_IN_DAY=60*24;Util_class.prototype.MILLISECONDS_IN_DAY=1000*60*60*24;Util_class.prototype.MS_DAYS=25569;Util_class.prototype.msToJsDate=function(msDate){var jO=new Date(((msDate-this.MS_DAYS)*this.MILLISECONDS_IN_DAY));var tz=jO.getTimezoneOffset();var jO=new Date(((msDate-this.MS_DAYS+(tz/(this.MINUTES_IN_DAY)))*this.MILLISECONDS_IN_DAY));return jO;};Util_class.prototype.jsToMsDate=function(jsdate){var timezoneOffset=jsdate.getTimezoneOffset()/this.MINUTES_IN_DAY;var msDateObj=(jsdate.getTime()/this.MILLISECONDS_IN_DAY)+(this.MS_DAYS-timezoneOffset);return msDateObj;}
String.prototype.gsub=function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
return result;};String.prototype.sub=function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});};String.prototype.truncate=function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;};String.prototype.scan=function(pattern,iterator){this.gsub(pattern,iterator);return this;};String.prototype.truncate=function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;};String.prototype.strip=function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,'');};String.prototype.escapeHTML=function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;};String.prototype.unescapeHTML=function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?new WSDOM.Enumerable(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';};String.prototype.toQueryParams=function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var name=decodeURIComponent(pair[0]);var value=pair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!==undefined){if(hash[name].constructor!=Array)
hash[name]=[hash[name]];if(value)hash[name].push(value);}
else hash[name]=value;}
return hash;});};String.prototype.toArray=function(){return this.split('');};String.prototype.succ=function(){return this.slice(0,this.length-1)+
String.fromCharCode(this.charCodeAt(this.length-1)+1);};String.prototype.camelize=function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++)
camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);return camelized;};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();};String.prototype.underscore=function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();};String.prototype.dasherize=function(){return this.gsub(/_/,'-');};String.prototype.inspect=function(useDoubleQuotes){var escapedString=this.replace(/\\/g,'\\\\');if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"';}else{return"'"+escapedString.replace(/'/g,'\\\'')+"'";};};Util_class.prototype.toEnumerable=function(arr){return new WSDOM.Util.Enumerable(arr);};Util_class.prototype.Enumerable=function(){var arrayConstructor=[];for(var i in this){arrayConstructor[i]=this[i];}
if(arguments[0]&&(arguments[0].length||arguments[0].length==0)){for(var x=0;x<arguments[0].length;x++){arrayConstructor.push(arguments[0][x]);};}else{for(var x=0;x<arguments.length;x++){arrayConstructor.push(arguments[x]);};};return arrayConstructor;};Util_class.prototype.Enumerable.prototype.$break={};Util_class.prototype.Enumerable.prototype.$continue={};Util_class.prototype.Enumerable.prototype.each=function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=this.$continue)throw e;}});}catch(e){if(e!=this.$break)throw e;}
return this;};Util_class.prototype.Enumerable.prototype._each=function(iterator){for(var i=0,length=this.length;i<length;i++)
iterator(this[i]);};Util_class.prototype.Enumerable.prototype.eachSlice=function(number,iterator){var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length){slices.push(array.slice(index,index+number));};return slices.map(iterator);};Util_class.prototype.Enumerable.prototype.all=function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||WSDOM.identity)(value,index);if(!result)throw this.$break;});return result;};Util_class.prototype.Enumerable.prototype.any=function(iterator){var result=false;this.each(function(value,index){if(result=!!(iterator||WSDOM.identity)(value,index))
throw this.$break;});return result;};Util_class.prototype.arrayFrom=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0,length=iterable.length;i<length;i++)
results.push(iterable[i]);return results;}};Util_class.prototype.Enumerable.prototype.collect=function(iterator){var results=[];this.each(function(value,index){results.push((iterator||WSDOM.identity)(value,index));});return results;};Util_class.prototype.Enumerable.prototype.detect=function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw this.$break;}});return result;};Util_class.prototype.Enumerable.prototype.findAll=function(iterator){var results=new WSDOM.Util.Enumerable();this.each(function(value,index){if(iterator(value,index))
results.push(value);});return results;};Util_class.prototype.Enumerable.prototype.grep=function(pattern,iterator){var results=new WSDOM.Util.Enumerable();this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))
results.push((iterator||WSDOM.identity)(value,index));})
return results;};Util_class.prototype.Enumerable.prototype.include=function(object){var found=false;this.each(function(value){if(value==object){found=true;throw this.$break;}});return found;};Util_class.prototype.Enumerable.prototype.inGroupsOf=function(number,fillWith){fillWith=fillWith===undefined?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});};Util_class.prototype.Enumerable.prototype.inject=function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;};Util_class.prototype.Enumerable.prototype.invoke=function(method){var args=new WSDOM.Enumerable(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});};Util_class.prototype.Enumerable.prototype.max=function(iterator){var result;this.each(function(value,index){value=(iterator||WSDOM.identity)(value,index);if(result==undefined||value>=result)
result=value;});return result;};Util_class.prototype.Enumerable.prototype.min=function(iterator){var result;this.each(function(value,index){value=(iterator||WSDOM.identity)(value,index);if(result==undefined||value<result)
result=value;});return result;};Util_class.prototype.Enumerable.prototype.partition=function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||WSDOM.identity)(value,index)?trues:falses).push(value);});return[trues,falses];};Util_class.prototype.Enumerable.prototype.pluck=function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;};Util_class.prototype.Enumerable.prototype.reject=function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))
results.push(value);});return results;};Util_class.prototype.Enumerable.prototype.sortBy=function(iterator){return this.map(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');};Util_class.prototype.Enumerable.prototype.sortByField=function(sortField,sortOrder,caseSensitive){function Sort(a,b){var aField=a[sortField];var bField=b[sortField];if(!caseSensitive&&typeof(aField)=="string")aField=aField.toLowerCase();if(!caseSensitive&&typeof(bField)=="string")bField=bField.toLowerCase();if(aField<bField)return(sortOrder>0)?-1:1;if(aField>bField)return(sortOrder>0)?1:-1;return 0;}
if(!sortField)return this.sort();if(!sortOrder)sortOrder=1;this.sort(Sort);return this;};Util_class.prototype.Enumerable.prototype.toArray=function(){return this.map();};Util_class.prototype.Enumerable.prototype.zip=function(){var iterator=WSDOM.identity,args=new WSDOM.Util.Enumerable(arguments);if(typeof args.last()=='function')
iterator=args.pop();var collections=[this].concat(args).map(new WSDOM.Util.Enumerable());return this.map(function(value,index){return iterator(collections.pluck(index));});};Util_class.prototype.Enumerable.prototype.size=function(){return this.toArray().length;};Util_class.prototype.Enumerable.prototype.clear=function(){this.length=0;return this;};Util_class.prototype.Enumerable.prototype.first=function(){return this[0];};Util_class.prototype.Enumerable.prototype.last=function(){return this[this.length-1];};Util_class.prototype.Enumerable.prototype.compact=function(){return this.select(function(value){return value!=null;});};Util_class.prototype.Enumerable.prototype.flatten=function(){return this.inject([],function(array,value){return array.concat(value&&value.constructor==Array?value.flatten():[value]);});};Util_class.prototype.Enumerable.prototype.without=function(){var values=new WSDOM.Enumerable(arguments);return this.select(function(value){return!values.include(value);});};Util_class.prototype.Enumerable.prototype.indexOf=function(object){for(var i=0,length=this.length;i<length;i++)
if(this[i]==object)return i;return-1;};Util_class.prototype.Enumerable.prototype.reverse=function(inline){return(inline!==false?this:this.toArray())._reverse();};Util_class.prototype.Enumerable.prototype.reduce=function(){return this.length>1?this:this[0];};Util_class.prototype.Enumerable.prototype.uniq=function(){return this.inject([],function(array,value){return array.include(value)?array:array.concat([value]);});};Util_class.prototype.Enumerable.prototype.clone=function(){return[].concat(this);};Util_class.prototype.Enumerable.prototype.size=function(){return this.length;};Util_class.prototype.Enumerable.prototype.toArray=Util_class.prototype.Enumerable.prototype.clone;Util_class.prototype.Enumerable.prototype.map=Util_class.prototype.Enumerable.prototype.collect;Util_class.prototype.Enumerable.prototype.find=Util_class.prototype.Enumerable.prototype.detect;Util_class.prototype.Enumerable.prototype.select=Util_class.prototype.Enumerable.prototype.findAll;Util_class.prototype.Enumerable.prototype.member=Util_class.prototype.Enumerable.prototype.include;Util_class.prototype.Enumerable.prototype.entries=Util_class.prototype.Enumerable.prototype.toArray;Util_class.prototype.toHash=function(o){return new this.Hash(o);};Util_class.prototype.Hash=function(){var objectConstructor={};for(var i in this){objectConstructor[i]=this[i];}
if(arguments[0]){for(var i in arguments[0]){objectConstructor[i]=arguments[0][i];};};return objectConstructor;};Util_class.prototype.Hash.prototype.toQueryString=function(){Console.log("here");var parts=[];this._each(function(pair){if(!pair.key)return;if(pair.value){pair.value=new WSDOM.Util.Enumerable(pair.value);var values=pair.value.compact();if(values.length<2)pair.value=values.reduce();else{key=encodeURIComponent(pair.key);values.each(function(value){value=value!=undefined?encodeURIComponent(value):'';parts.push(key+'='+encodeURIComponent(value));});return;}}
if(pair.value==undefined)pair[1]='';parts.push(pair.map(encodeURIComponent).join('='));});return parts.join('&');};Util_class.prototype.Hash.prototype._each=function(iterator){for(var key in this){var value=this[key];if(value&&value==Util_class.prototype.Hash.prototype[key])continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}};Util_class.prototype.Hash.prototype.keys=function(){return this.pluck('key');};Util_class.prototype.Hash.prototype.values=function(){return this.pluck('value');};Util_class.prototype.Hash.prototype.merge=function(hash){return new WSDOM.Hash(hash).inject(this,function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});};Util_class.prototype.Hash.prototype.remove=function(){var result;for(var i=0,length=arguments.length;i<length;i++){var value=this[arguments[i]];if(value!==undefined){if(result===undefined)result=value;else{if(result.constructor!=Array)result=[result];result.push(value)}}
delete this[arguments[i]];}
return result;};WSDOM.defineClass("Util",null,Util_class);WSDOM.loadSingleton("WSDOM.Util.1");

/* /includes/jslib/wsdom/remoting/remoting.1.js */
function Remoting_class()
{this.connections=[];this.connectionsMax=100;this.connectionsActive=0;this.connectionsPending=[];this.debug=false;this.context;this.connectionId=0;if(arguments.length&&typeof arguments[0]=="object")
{this.context=arguments[0];};};Remoting_class.prototype.load=function(contentPackage)
{try
{contentPackage.method=contentPackage.method.toLowerCase();if(contentPackage.method!="get"&&contentPackage.method!="post")
{contentPackage.method="post";};}
catch(e)
{contentPackage.method="post";};contentPackage.params=contentPackage.params||{};if(document.location.search.match(/\.\.nocache\.\.=on/i))
{contentPackage.params["..nocache.."]="on";};var dbgChartSrv=document.location.search.match(/\.\.debugchartsrv\.\.=([a-zA-Z]+)/i);if(dbgChartSrv){contentPackage.params["..debugchartsrv.."]=dbgChartSrv[1];}
if(contentPackage.protocolType&&contentPackage.protocolType.toString().match(/JsonRPC/gi)){return new JsonRPC_Connection_class(this,this.connectionId++,contentPackage);}else{return new Connection_class(this,this.connectionId++,contentPackage);}};Remoting_class.prototype._loadXMLHTTP=function(connection){var thisConnection=connection;var contentPackage=thisConnection.contentPackage;function stateMonitor(){thisBuffer._monitorConnectionState(thisConnection);};this.connectionsActive++;var dataPackage=null;var thisBuffer=this;thisConnection.active=true;if(typeof contentPackage.contentType=="string"){contentPackage.params["..contenttype.."]=contentPackage.contentType;};if(this.debug||contentPackage.debug){WSDOM.Console.startGroup("Remoting");};contentPackage.params["..requester.."]="ContentBuffer";if(contentPackage.method=="post"){dataPackage="";WSDOM.Console.dir(contentPackage);dataPackage="inputs="+this.encode(WSDOM.Serializer.serialize(contentPackage.data));for(var i in contentPackage.params){dataPackage+=(dataPackage.length?"&":"")+this.encode(i)+"="+this.encode(contentPackage.params[i]);};if(this.debug||contentPackage.debug){WSDOM.Console.log("ContentBuffer post data",dataPackage);};}else{contentPackage.url+=(contentPackage.url.indexOf("?")==-1?"?":"&")+"data="+this.encode(WSDOM.Serializer.serialize(contentPackage.data));};if(this.debug||contentPackage.debug){WSDOM.Console.log("ContentBuffer loading ["+thisConnection.connectionId+"]",contentPackage.url+" ["+contentPackage.method+"]");};if(this.debug||contentPackage.debug){var debugUrl=contentPackage.url;if(dataPackage){debugUrl+=(debugUrl.indexOf("?")==-1?"?":"&")+dataPackage;};debugUrl=debugUrl.replace(/\&?\.\.[^\=\&]*\.\.\=[^\&]*/g,"");if(debugUrl.indexOf("/")!=0&&debugUrl.indexOf("http")!=0){var path=String(window.location).replace(/https*:\/\//,"");debugUrl=path.substr(path.indexOf("/"),path.lastIndexOf("/")+1-path.indexOf("/"))+debugUrl;}
WSDOM.Console.link("ContentBuffer URL",debugUrl);};try{thisConnection.c.open(contentPackage.method.toUpperCase(),contentPackage.url,true);thisConnection.c.onreadystatechange=stateMonitor;}catch(e){};if(contentPackage.method=="post"){thisConnection.c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");};thisConnection.c.send(dataPackage);if(this.debug||contentPackage.debug){WSDOM.Console.endGroup("Remoting");};};Remoting_class.prototype._monitorConnectionState=function(connection){try{if(connection.c.readyState==4){if(connection.c.status!=200){var r={}
try{var result=connection.c.responseText;try{eval(result);}catch(err){}}catch(e){var result=null;};if(r.error){connection.contentPackage.error=r.error;}
connection.contentPackage.result=result;if(typeof connection.contentPackage.onerror=="function"){connection.contentPackage.onerror.apply(connection.context||window,[connection]);};this.finishConnection(connection);return;};var responseType=connection.contentPackage.contentType||connection.c.getResponseHeader("Content-Type");var result=null;if(responseType.match(/text\/html/g)||responseType.match(/text\/plain/g)){result=connection.c.responseText;}else if(responseType.match(/text\/xml/g)){result=connection.c.responseXML;}else if(responseType.match(/text\/javascript/g)){try{result=connection.c.responseText;if(!connection.contentPackage.preventEval){connection.context.__evalBuffer=function(){eval(result);}
connection.context.__evalBuffer();};}catch(e){if(this.debug||connection.contentPackage.debug){WSDOM.Console.error("Remoting javascript eval error",e.message);WSDOM.Console.dir(e);};};}else if(responseType.match(/application\/json/gi)){try{result=connection.c.responseText;result=WSDOM.Serializer.deserialize(result);}catch(e){if(this.debug||connection.contentPackage.debug){WSDOM.Console.error("Remoting Serializer Error",e.message);WSDOM.Console.dir(e);};};};connection.contentPackage.result=result;if(this.debug||connection.contentPackage.debug){};if(typeof connection.contentPackage.onload=="function"){connection.contentPackage.onload.apply(connection.context||window,[connection]);};this.finishConnection(connection);};}catch(e){if(this.debug||connection.contentPackage.debug){WSDOM.Console.error("state monitoring error",e.message);WSDOM.Console.dir(e);};this.finishConnection(connection);};};Remoting_class.prototype.isActive=function(){for(var i=0;i<this.connections.length;i++){if(this.connections[i].active){return true;}}
return false;}
Remoting_class.prototype.abortRequests=function(){for(var i=0;i<this.connections.length;i++){this.connections[i].abort();};}
Remoting_class.prototype.abortRequests=function(){for(var i=0;i<this.connections.length;i++){this.connections[i].abort();};}
Remoting_class.prototype.encode=function(str){return encodeURIComponent(str);};Remoting_class.prototype.finishConnection=function(connection)
{if(connection.active)
{this.connectionsActive--;connection.active=false;}
if(this.connectionsPending.length)
{this._loadXMLHTTP(this.connectionsPending.shift());}
for(var x=0;x<this.connections.length;x++){if(connection===this.connections[x]){this.connections.splice(x,1);break;}}}
function RemotingBase_class(){};RemotingBase_class.Extend(Remoting_class);function Connection_class(contentBuffer,id,contentPackage){this.active=false;this.parent=contentBuffer;this.connectionId=id;this.contentPackage=contentPackage;this.context=(contentPackage&&contentPackage.context)||(this.parent&&this.parent.context);this._init();};Connection_class.prototype._init=function(){var c=false;try{c=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{c=new ActiveXObject("Microsoft.XMLHTTP");}catch(f){c=false;};};if(!c&&typeof XMLHttpRequest!="undefined"){c=new XMLHttpRequest();};if(c){this.c=c;}else{WSDOM.Console.log("Remoting initialization error.","Not supported by this browser","red");};if(this.parent){if(this.parent.connectionsActive<this.parent.connectionsMax){this.parent.connections.push(this);this.parent._loadXMLHTTP(this);}else{WSDOM.Console.log("queuing request");this.parent.connectionsPending.push(this);};};};Connection_class.prototype.getResult=function(){return this.contentPackage.result;};Connection_class.prototype.status=function(){return(this.c.readyState==4&&this.c.status==200);};Connection_class.prototype.abort=function(){if(this.active){try{this.c.onreadystatechange=function(){};this.c.abort();}catch(e){WSDOM.Console.log("connection abort failed",e,"red");};this.parent.finishConnection(this);};};function JsonRPC_Connection_class(contentBuffer,id,contentPackage){this.protocolType="JsonRPC";this.active=false;this.parent=contentBuffer;this.connectionId=id;this.contentPackage=contentPackage;this.context=(contentPackage&&contentPackage.context)||(this.parent&&this.parent.context);this._init();};JsonRPC_Connection_class.Extend(Connection_class);WSDOM.using("WSDOM.Remoting.1","WSDOM.Console.1");WSDOM.using("WSDOM.Remoting.1","WSDOM.Serializer.3");WSDOM.defineClass("Remoting",null,Remoting_class);WSDOM.loadClass("WSDOM.Remoting.1");

/* /includes/jslib/wsdom/serializer/serializer.3.js */

function Serializer_class(){this._nameExclusions={};this._typeExclusions={};this._encode=true;this._strictJson=true;this._safeDeserialize=false;this._sBase64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";};Serializer_class.prototype.serialize=function(o){this._data=[];this._serializeNode([o],o,0);this._data=this._data.join("");this._data=this._data.replace(/,}/g,"}");this._data=this._data.replace(/,]/g,"]");this._data=this._data.substr(0,this._data.length-1);if(this.allowEncoding()){this._data=this.base64encode(this._data);}
return this._data;}
Serializer_class.prototype.addNameExclusion=function(){var l=arguments.length;for(var i=0;i<l;i++){this._nameExclusions[arguments[i]]=true;}}
Serializer_class.prototype.removeNameExclusion=function(){var l=arguments.length;for(var i=0;i<l;i++){this._nameExclusions[arguments[i]]=false;}}
Serializer_class.prototype.addTypeExclusion=function(){var l=arguments.length;for(var i=0;i<l;i++){this._typeExclusions[arguments[i].toLowerCase()]=true;}}
Serializer_class.prototype.removeTypeExclusion=function(){var l=arguments.length;for(var i=0;i<l;i++){this._typeExclusions[arguments[i].toLowerCase()]=false;}}
Serializer_class.prototype.requireStrictJson=function(value){if(typeof(value)!="undefined"){this._strictJson=value;}
return this._strictJson;}
Serializer_class.prototype.requireSafeDeserialize=function(value){if(typeof(value)!="undefined"){this._safeDeserialize=value;}
return this._safeDeserialize;}
Serializer_class.prototype.allowEncoding=function(value){if(typeof(value)!="undefined"){this._encode=value;}
return this._encode;}
Serializer_class.prototype._unicodeEscape=function(str){var dec=str.charCodeAt(0);var hexStr="\\u";var hexVals=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];var hexPlace;hexPlace=4096
hexStr+=hexVals[Math.floor(dec/hexPlace)];dec=dec%hexPlace;hexPlace=256
hexStr+=hexVals[Math.floor(dec/hexPlace)];dec=dec%hexPlace;hexPlace=16
hexStr+=hexVals[Math.floor(dec/hexPlace)];dec=dec%hexPlace;hexPlace=1
hexStr+=hexVals[Math.floor(dec/hexPlace)];dec=dec%hexPlace;return hexStr;}
Serializer_class.prototype._serializeNode=function(o,startObj,depth,parentType){var t,f,d1,d2;for(var i in o){if(o[i]===null){t="null";}else{t=typeof(o[i]);}
f=t=="object"?true:false;t=t=="object"&&typeof(o[i].length)!="undefined"&&o[i].constructor==Array?"array":t;if(!this._typeExclusions[t]&&!this._nameExclusions[i]&&!(this._strictJson&&t=="function")){switch(t){case"string":d1="\"";d2="\"";break;case"object":d1="{";d2="}";break;case"array":d1="[";d2="]";break;default:d1="";d2="";break;}
if(isFinite(i)&&!(parentType&&parentType=="object")){this._data.push(d1);}else{var n=typeof(i)=="string"?"\""+i+"\"":i;this._data.push(n+":"+d1);}
if(f){if(depth==0||o[i]!==startObj){this._serializeNode(o[i],null,null,t);}}else{if(t=="string"){this._data.push(o[i].replace(/[^ -~]|[\"\\]/g,this._unicodeEscape));}else if(t=="undefined"||t=="null"){this._data.push(t);}else{this._data.push(o[i]);}}
this._data.push(d2+",");}}}
Serializer_class.prototype.deserialize=function(o){try{if(this.hasEncodingLeader(o)){var indexR=o.indexOf('\r');var indexN=o.indexOf('\n');var index=Math.min(indexR+1||indexN+1,indexN+1||indexR+1)-1;if(index==-1){o=this.base64decode(o);}
else{o=this.base64decode(o.substring(0,index))+o.substring(index);}}
if(this._safeDeserialize){return this.safeDeserialize(o);}else{return this.unsafeDeserialize(o);}}catch(e){WSDOM.Console.log("Serializer.deserialize() error","","red");WSDOM.Console.dir(e);WSDOM.Console.log("Serializer Source",o);var x="";}
return x;}
Serializer_class.prototype.safeDeserialize=function(o){try{var p=new JsonParser_class();p.parse(o);eval("var x = "+o);}catch(e){var x=null;}
return x;}
Serializer_class.prototype.unsafeDeserialize=function(o){try{eval("var x = "+o);}catch(e){WSDOM.Console.dir(e);var x=null;}
return x;}
Serializer_class.prototype.hasEncodingLeader=function(s){return s.indexOf("B64ENC")==0?true:false;}
Serializer_class.prototype.stripLeader=function(s){return s.substr(6,s.length);}
Serializer_class.prototype.prependLeader=function(s){return"B64ENC"+s;}
Serializer_class.prototype.base64decode=function(sIn){var i;var iBits;var sOut=[];if(this.hasEncodingLeader(sIn)){sIn=this.stripLeader(sIn);}else{return sIn;}
sIn=sIn.replace(/=/g,"");for(i=0;i<sIn.length;i+=4){iBits=(this._sBase64.indexOf(sIn.charAt(i))<<18)|(this._sBase64.indexOf(sIn.charAt(i+1))<<12)|((this._sBase64.indexOf(sIn.charAt(i+2))&0xff)<<6)|(this._sBase64.indexOf(sIn.charAt(i+3))&0xff);sOut.push(String.fromCharCode(iBits>>16&0xff));sOut.push((i>sIn.length-3)?"":String.fromCharCode(iBits>>8&0xff));sOut.push((i>sIn.length-4)?"":String.fromCharCode(iBits&0xff));}
return sOut.join("");}
Serializer_class.prototype.base64encode=function(sIn){var i;var iBits;var sOut=[];for(i=0;i<sIn.length;i+=3){iBits=(sIn.charCodeAt(i)<<16)+
((sIn.charCodeAt(i+1)&0xff)<<8)+
(sIn.charCodeAt(i+2)&0xff);sOut.push(this._sBase64.charAt(iBits>>18&0x3f));sOut.push(this._sBase64.charAt(iBits>>12&0x3f));sOut.push((i>sIn.length-2)?"=":this._sBase64.charAt(iBits>>6&0x3f));sOut.push((i>sIn.length-3)?"=":this._sBase64.charAt(iBits&0x3f));}
sOut=this.prependLeader(sOut.join(""));return sOut;}
function JsonParser_class(){this.lexer=null;this.tokens=[];}
JsonParser_class.prototype.parse=function(str){this.lexer=new JsonLexer_class(str);return this._json();}
JsonParser_class.prototype.lookAhead=function(k){while(this.tokens.length<=k){this.tokens.push(this.lexer.nextToken());}
return this.tokens[k].type;}
JsonParser_class.prototype.consume=function(type){if(this.tokens.length==0){this.tokens.push(this.lexer.nextToken());}
if(this.tokens[0].type==type){this.tokens.shift();}else{throw{message:'JSON: invalid token encountered validating string; Expected '+type+', got '+this.tokens[0].type};}}
JsonParser_class.prototype._json=function(){this._value();this.consume('_EOF');}
JsonParser_class.prototype._value=function(){switch(this.lookAhead(0)){case'_OBJ_OPEN':this._object();break;case'_ARR_OPEN':this._array();break;case'_DIGITS':case'_NEG':this._number();break;case'_STRING':this.consume('_STRING');break;case'_TRUE':this.consume('_TRUE');break;case'_FALSE':this.consume('_FALSE');break;case'_NULL':this.consume('_NULL');break;}}
JsonParser_class.prototype._object=function(){this.consume('_OBJ_OPEN');if(this.lookAhead(0)!='_OBJ_CLOSE'){this._member();}
while(this.lookAhead(0)!='_OBJ_CLOSE'){this.consume('_SEP');this._member();}
this.consume('_OBJ_CLOSE');}
JsonParser_class.prototype._member=function(){this.consume('_STRING');this.consume('_ASSIGN');this._value();}
JsonParser_class.prototype._array=function(){this.consume('_ARR_OPEN');if(this.lookAhead(0)!='_ARR_CLOSE'){this._value();}
while(this.lookAhead(0)!='_ARR_CLOSE'){this.consume('_SEP');this._value();}
this.consume('_ARR_CLOSE');}
JsonParser_class.prototype._number=function(){if(this.lookAhead(0)=='_NEG'){this.consume('_NEG');}
this.consume('_DIGITS');if(this.lookAhead(0)=='_DOT'){this.consume('_DOT');this.consume('_DIGITS');}
if(this.lookAhead(0)=='_EXP'){this.consume('_EXP');if(this.lookAhead(0)=='_POS'){this.consume('_POS');}else if(this.lookAhead(0)=='_NEG'){this.consume('_NEG');}
this.consume('_DIGITS');}}
function JsonLexer_class(input){input=input.replace(/"([^"\\]|\\"|\\)*"/g,'S');input=input.replace(/[0-9]+/g,'0');this.input=input;}
JsonLexer_class.prototype.charTokens={'{':'_OBJ_OPEN','}':'_OBJ_CLOSE','[':'_ARR_OPEN',']':'_ARR_CLOSE',':':'_ASSIGN',',':'_SEP','.':'_DOT','-':'_NEG','+':'_POS','e':'_EXP','E':'_EXP','S':'_STRING','0':'_DIGITS'};JsonLexer_class.prototype.nextToken=function(){if(this.input.length==0){return new JsonToken_object("_EOF",null);}
var first=this.input.substr(0,1);if(this.charTokens[first]){this.input=this.input.substr(1);return new JsonToken_object(this.charTokens[first],first);}
switch(first){case't':case'T':if(this.input.substr(0,4).toLowerCase()=='true'){this.input=this.input.substr(4);return new JsonToken_object('_TRUE',true);}
break;case'f':case'F':if(this.input.substr(0,5).toLowerCase()=='false'){this.input=this.input.substr(5);return new JsonToken_object('_FALSE',true);}
break;case'n':if(this.input.substr(0,4)=='null'){this.input=this.input.substr(4);return new JsonToken_object('_NULL',true);}
break;}
throw{message:'JSON: Unexpected character ('+first+') encountered validating string'};}
function JsonToken_object(type,value){this.type=type;this.value=value;}
WSDOM.using("WSDOM.Serializer.3","WSDOM.Console.1");WSDOM.defineClass("Serializer",null,Serializer_class);WSDOM.loadSingleton("WSDOM.Serializer.3");

/* /includes/jslib/wsdom/viewport/viewport.1.js */
function Viewport_Class(){};Viewport_Class.prototype.getWindowSize=function(){if(self.innerHeight){var width=self.innerWidth;var height=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;}else if(document.body){var width=document.body.clientWidth;var height=document.body.clientHeight;};return{width:width,height:height};};Viewport_Class.prototype.getWindowScrollOffset=function(){if(typeof window.pageYOffset=='number'){var x=window.pageXOffset;var y=window.pageYOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){var x=document.body.scrollLeft;var y=document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){var x=document.documentElement.scrollLeft;var y=document.documentElement.scrollTop;};return{x:x||0,y:y||0};};Viewport_Class.prototype.get=function(){var windowSize=this.getWindowSize();var scrollOffset=this.getWindowScrollOffset();var top=scrollOffset.y;var bottom=scrollOffset.y+windowSize.height;var left=scrollOffset.x;var right=scrollOffset.x+windowSize.width;return{top:top,left:left,bottom:bottom,right:right,width:windowSize.width,height:windowSize.height};};WSDOM.defineClass("Viewport",null,Viewport_Class);WSDOM.loadSingleton("WSDOM.Viewport.1");

/* /includes/jslib/wsdom/imageLoader/imageLoader.1.js */
function ImageLoaderClass(){this._serializer=WSDOM.Serializer;this._remoting=new WSDOM.Remoting();};ImageLoaderClass.prototype.path=function(sPath){if(sPath!==undefined){this._sPath=sPath;};return this._sPath;};ImageLoaderClass.prototype.inputs=function(oInputs){if(oInputs!==undefined){this._oInputs=oInputs;};return this._oInputs;};ImageLoaderClass.prototype.context=function(context){if(context!==undefined){this._context=context;};return this._context;};ImageLoaderClass.prototype.onload=function(fOnload){if(fOnload!==undefined){this._fOnload=fOnload;};return this._fOnload;};ImageLoaderClass.prototype.container=function(oContainer){if(oContainer!==undefined){this._oContainer=oContainer;}
return this._oContainer;};ImageLoaderClass.prototype.load=function(){if(this.path()&&this.inputs()){this.showLoading();var oBuffer=this._remoting.load({debug:true,url:this.path(),method:"post",contentType:"text/javascript",preventEval:true,context:this,data:this.inputs(),onload:this._handle,onerror:this._handleError});}else{dbg("ImageLoaderClass.load() -> missing .path() or .inputs()");};};ImageLoaderClass.prototype.showLoading=function(){if(this.container()){var c=this.container();WSDOM.Element.removeChildNodes(c);WSDOM.Element.addClass(c,"loading");};};ImageLoaderClass.prototype._handle=function(buffer){var result=this._serializer.deserialize(buffer.getResult());if(!result||result.Status!=1){this._handleError();return;};if(this.container()){var c=this.container();WSDOM.Element.removeChildNodes(c);WSDOM.Element.removeClass(c,"loading");WSDOM.Element.create("img",{src:result.path},null,c);};if(this.onload()){var f=this.onload();var c=this.context();f=f.Context(c);f(result,this.container());};};ImageLoaderClass.prototype._handleError=function(){if(this.container()){var c=this.container();WSDOM.Element.removeClass(c,"loading");WSDOM.Element.setHTML(c,"Chart not available.");};if(this.onerror){this.onerror(result,this.container());}};WSDOM.using("WSDOM.ImageLoader.1","WSDOM.Console.1");WSDOM.using("WSDOM.ImageLoader.1","WSDOM.Serializer.3");WSDOM.using("WSDOM.ImageLoader.1","WSDOM.Remoting.1");WSDOM.using("WSDOM.ImageLoader.1","WSDOM.Element.3");WSDOM.defineClass("ImageLoader",null,ImageLoaderClass);WSDOM.loadClass("WSDOM.ImageLoader.1");

/* /includes/jslib/wsdom/form/Form.1.js */
var Form_class=function(){};Form_class.prototype.reset=function(form){WSDOM.Element.get(form).reset();return form;};Form_class.prototype.serializeElements=function(elements,selector){elements=new WSDOM.Util.Enumerable(elements);var data=elements.inject({},function(result,element){if(element&&!element.disabled&&(element.name||element.getAttribute(selector))){var key=element.name||element.getAttribute(selector);var value=WSDOM.Form.Element.getValue(element);if(value!=undefined){if(result[key]){if(result[key].constructor!=Array){result[key]=[result[key]];};result[key].push(value);}else{result[key]=value;};};};return result;});return data;};Form_class.prototype.serialize=function(form){var o=this.serializeElements(this.getElements(form));return o;};Form_class.prototype.getElements=function(form){var elements=new WSDOM.Util.Enumerable(WSDOM.Element.get(form).getElementsByTagName('*'));var formElements=new WSDOM.Util.Enumerable();elements.each(function(item,index){if(item.tagName&&WSDOM.Form.Element.Serializers[item.tagName.toLowerCase()]){formElements.push(item);};return elements;});return formElements;};Form_class.prototype.getInputs=function(form,typeName,name){form=WSDOM.Element.get(form);var inputs=WSDOM.Element.parseSelector("input");if(!typeName&&!name){return WSDOM.Util.toEnumerable(inputs).map(ElementObject);};for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name)){continue;};matchingInputs.push(new ElementObject(input));};return matchingInputs;};Form_class.prototype.disable=function(form){form=WSDOM.Element.get(form);this.getElements().each(function(element){element.blur();element.disabled='true';});return form;};Form_class.prototype.enable=function(form){form=WSDOM.Element.get(form);this.getElements().each(function(element){element.disabled='';});return form;};Form_class.prototype.findFirstElement=function(form){return WSDOM.Element.get(form).getElements().find(function(element){return element.type!='hidden'&&!element.disabled&&new WSDOM.Util.Enumerable('input','select','textarea').include(element.tagName.toLowerCase());});};Form_class.prototype.focusFirstElement=function(form){form=WSDOM.Element.get(form);this.findFirstElement().activate();return form;};Form_class.prototype.Element=function(){};Form_class.prototype.Element.focus=function(element){WSDOM.Element.get(element).focus();return element;};Form_class.prototype.Element.select=function(element){WSDOM.Element.get(element).select();return element;}
Form_class.prototype.Element.serialize=function(element){element=WSDOM.Element.get(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return new WSDOM.Util.Hash(pair).toQueryString();};};return'';};Form_class.prototype.Element.getValue=function(element){element=WSDOM.Element.get(element);var method=element.tagName.toLowerCase();return WSDOM.Form.Element.Serializers[method](element);};Form_class.prototype.Element.clear=function(element){WSDOM.Element.get(element).value='';return element;};Form_class.prototype.Element.present=function(element){return WSDOM.Element.get(element).value!='';};Form_class.prototype.Element.activate=function(element){element=WSDOM.Element.get(element);element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!new WSDOM.Util.Enumerable('button','reset','submit').include(element.type))){element.select();};return element;};Form_class.prototype.Element.disable=function(element){element=WSDOM.Element.get(element);element.disabled=true;return element;};Form_class.prototype.Element.enable=function(element){element=WSDOM.Element.get(element);element.blur();element.disabled=false;return element;};Form_class.prototype.Element.Serializers=function(){};Form_class.prototype.Element.Serializers.input=function(element){switch(element.type.toLowerCase()){case'checkbox':case'radio':return WSDOM.Form.Element.Serializers.inputSelector(element);default:return WSDOM.Form.Element.Serializers.textarea(element);};};Form_class.prototype.Element.Serializers.inputSelector=function(element){return element.checked?element.value:null;}
Form_class.prototype.Element.Serializers.textarea=function(element){return element.value;}
Form_class.prototype.Element.Serializers.select=function(element){return this[element.type=='select-one'?'selectOne':'selectMany'](element);}
Form_class.prototype.Element.Serializers.selectOne=function(element){var index=element.selectedIndex;return index>=0?this.optionValue(element.options[index]):null;}
Form_class.prototype.Element.Serializers.selectMany=function(element){var values,length=element.length;if(!length){return null;};for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected){values.push(this.optionValue(opt));};};return values;};Form_class.prototype.Element.Serializers.option=function(opt){var v;if(opt.getAttributeNode){v=opt.getAttributeNode('value');}
var returnValue=opt.text;if(v||v==""){if(v.specified){returnValue=opt.value;}}else{if(opt.value||opt.value==""){returnValue=opt.value;}}
return returnValue;};Form_class.prototype.Element.Serializers.optionValue=Form_class.prototype.Element.Serializers.option;WSDOM.using("WSDOM.Form.1","WSDOM.Element.3");WSDOM.using("WSDOM.Form.1","WSDOM.Util.1");WSDOM.defineClass("Form",null,Form_class);WSDOM.loadSingleton("WSDOM.Form.1");

/* /includes/jslib/wsdom/designPatterns/moduleClass.js */
function ModuleClass(){};ModuleClass.prototype.load=function(){}
ModuleClass.prototype.result=function(r){if(r){this._result=r;}
return this._result;}
ModuleClass.prototype.handle=function(response){var result=WSDOM.Serializer.deserialize(response.getResult());this.result(result);this.draw();}
ModuleClass.prototype.handleError=function(){}
ModuleClass.prototype.draw=function(){}

/* /includes/jslib/table/TableSort.1.js */
var TableSort_Class=function(tableEl,oConfig){this._table=Element.get(tableEl);this._config=oConfig||{};this._init();}
TableSort_Class.prototype.DEFAULT_CONFIG={controlClassName:"tsControl",rawAttribute:"tsraw",rawAttribute2:false,sortDirAttribute:"tsdirection",ascClassName:"tsAscending",descClassName:"tsDescending",defaultSortIndex:0,tdSortedClassname:"tsSorted",sortDescending:false,alternateRowClassName:false,useTBody:false,lastRowClassName:false}
TableSort_Class.prototype._init=function(){this._fields=[];this._sortableRows=[];this._controlRow=false;this._rowOrder=[];this._setFields();this._setSortableRows();this._activateControls();var iDefaultSortIndex=this._getConfigValue("defaultSortIndex");if(iDefaultSortIndex!==undefined&&iDefaultSortIndex!==null&&iDefaultSortIndex!==false){this._sortAction(iDefaultSortIndex.toString());}}
TableSort_Class.prototype._reset=function(){this._fields=[];this._sortableRows=[];this._controlRow=false;this._rowOrder=[];this._setFields();this._setSortableRows();}
TableSort_Class.prototype._activateControls=function(){for(var sKey in this._fields){var oControl=this._fields[sKey].control;Events.add({element:oControl,type:"click",handler:this.handleControlAction,context:this,data:{key:sKey}})}}
TableSort_Class.prototype._setFields=function(){var rControls=Element.parseSelector("."+this._getConfigValue("controlClassName"),this._table);this._setControlRowFromControl(rControls[0]);for(var i=0;i<rControls.length;i++){var oControl=rControls[i];this._fields.push({cellIndex:oControl.cellIndex,control:oControl,bIsDescending:this._getSortDirectionFromControl(oControl)});}}
TableSort_Class.prototype._getSortDirectionFromControl=function(oControl){var sDirAttr=oControl.getAttribute(this._getConfigValue("sorDirAttribute"));if(sDirAttr){return sDirAttr=="asc"?false:true;}
return this._getConfigValue("sortDescending");}
TableSort_Class.prototype._setControlRowFromControl=function(oTd){if(oTd){this._controlRow=Element.getParent(oTd,"tr");}}
TableSort_Class.prototype._setSortableRows=function(){var rRows=Element.parseSelector("tr",this._getConfigValue("useTBody")||this._table);for(var i=0;i<rRows.length;i++){if(rRows[i]!=this._controlRow){var iRowIndex=rRows[i].rowIndex;this._sortableRows.push({rowElement:rRows[i],sortableValues:this._getSortableValuesFromRow(rRows[i])});}}}
TableSort_Class.prototype._getSortableElementsFromRow=function(oRow){var oElements={};for(var sField in this._fields){var rTds=Element.parseSelector("td",oRow);var iIndex=this._fields[sField].cellIndex;oElements[sField]=rTds[iIndex];}
return oElements;}
TableSort_Class.prototype._getSortableValuesFromRow=function(oRow){var oValues={};var elements=this._getSortableElementsFromRow(oRow);for(var sField in elements){oTd=elements[sField];oValues[sField]=this._getValueFromElement(oTd);}
return oValues;}
TableSort_Class.prototype._getValueFromElement=function(oEl){var retObj=[];if(oEl.getAttribute(this._getConfigValue("rawAttribute"))!==null){retObj.push(oEl.getAttribute(this._getConfigValue("rawAttribute")));}else{retObj.push(oEl.innerHTML);}
if(this._getConfigValue("rawAttribute2")){retObj.push(oEl.getAttribute(this._getConfigValue("rawAttribute2")));}
return retObj;}
TableSort_Class.prototype._getConfigValue=function(sName){var val=this._config[sName];if(val===null||val===undefined){val=this.DEFAULT_CONFIG[sName];}
return val;}
TableSort_Class.prototype._getRowOrder=function(sField,iSortOrder,bIsCaseSensitive){var eRows=new WSDOM.Util.Enumerable(this._sortableRows);var _tryNumber=function(sValue){var retVal=sValue;if(retVal=="--"){retVal=Number.NEGATIVE_INFINITY;}
if(String(sValue).match(/[\+\-\$]*[0-9,.\%]+/)){sValue=sValue.toString().replace(/[\+\$\,\%]*/gi,'');var fValue=parseFloat(sValue);retVal=(isNaN(fValue)?sValue:fValue);}
return retVal;}
var fFieldMap=function(oItem,index){return{baseIndex:index,value:_tryNumber(oItem.sortableValues[sField][0]),value2:(oItem.sortableValues[sField][1]?_tryNumber(oItem.sortableValues[sField][1]):null)}};var fOrderMap=function(oItem,index){return oItem.baseIndex;};var mySortByField=function(aObj,sortField,sortField2,sortOrder,caseSensitive){function Sort(a,b){var retVal=0;var aField=a[sortField];var bField=b[sortField];var aField2=(sortField2?a[sortField2]:null);var bField2=(sortField2?b[sortField2]:null);if(!caseSensitive&&typeof(aField)=="string")aField=aField.toLowerCase();if(!caseSensitive&&typeof(bField)=="string")bField=bField.toLowerCase();if(!caseSensitive&&typeof(aField2)=="string")aField2=aField2.toLowerCase();if(!caseSensitive&&typeof(bField2)=="string")bField2=bField2.toLowerCase();if(aField<bField){retVal=(sortOrder>0?-1:1);}
else if(aField>bField){retVal=(sortOrder>0?1:-1);}
else if(aField==bField){if(aField2&&bField2){if(aField2<bField2){retVal=(sortOrder>0?-1:1);}
else if(aField2>bField2){retVal=(sortOrder>0?1:-1);}}}
return retVal;}
if(!sortField)return aObj.sort();if(!sortOrder)sortOrder=1;try{aObj.sort(Sort);}
catch(exp){WSDOM.Console.log("caught exception: "+exp.toString());}
return aObj;};var eMapped=new WSDOM.Util.Enumerable(eRows.map(fFieldMap));eMapped=mySortByField(eMapped,"value","value2",iSortOrder,bIsCaseSensitive);return eMapped.map(fOrderMap);}
TableSort_Class.prototype._setCurrentRowOrder=function(rOrder){if(rOrder){return this._currentRowOrder=rOrder;}
this._currentRowOrder=[];for(var i=0;i<this._sortableRows.length;i++){this._currentRowOrder.push(i);}}
TableSort_Class.prototype._modifyControlClassNames=function(oField){var oControl=oField.control;var sDesc=this._getConfigValue("descClassName");var sAsc=this._getConfigValue("ascClassName");var rControls=Element.parseSelector("."+this._getConfigValue("controlClassName"),this._controlRow);Element.removeClass(rControls,sDesc);Element.removeClass(rControls,sAsc);var tds=Element.parseSelector("td",this._getConfigValue("useTBody")||this._table);Element.removeClass(tds,this._getConfigValue("tdSortedClassname"));Element.addClass(oControl,oField.bIsDescending?sDesc:sAsc);for(var i=0;i<this._sortableRows.length;i++){var oTD=this._sortableRows[i].rowElement.childNodes[oField.cellIndex];Element.addClass(oTD,this._getConfigValue("tdSortedClassname"));}
this._updateAlternateRowClassNames();this._updateLastRowClassNames();}
TableSort_Class.prototype._updateAlternateRowClassNames=function(){var sAlternateRow=this._getConfigValue("alternateRowClassName");if(sAlternateRow){for(var i=0;i<this._sortableRows.length;i++){if(this._sortableRows[i].rowElement.rowIndex%2==1){Element.removeClass(this._sortableRows[i].rowElement,sAlternateRow);}else{Element.addClass(this._sortableRows[i].rowElement,sAlternateRow);}}}}
TableSort_Class.prototype._updateLastRowClassNames=function(){var sLast=this._getConfigValue("lastRowClassName");if(sLast){var oContainer=this._getConfigValue("useTBody")||this._table;var oTrs=Element.parseSelector("tr",oContainer);Element.removeClass(oTrs,sLast);Element.addClass(oTrs[oTrs.length-1],sLast);}}
TableSort_Class.prototype._resetControlDirections=function(sActiveField){for(var sField in this._fields){if(sActiveField!=sField){this._fields[sField].bIsDescending=this._getSortDirectionFromControl(this._fields[sField].control);}}}
TableSort_Class.prototype.setConfigValue=function(sConfigKey,value){this._config[sConfigKey]=value;}
TableSort_Class.prototype.setConfig=function(oConfig){for(var sName in oConfig){this._config[sName]=oConfig[sName];}}
TableSort_Class.prototype.resetActiveContent=function(oTBody){if(oTBody){this.setConfigValue("useTBody",oTBody);}
this._reset();}
TableSort_Class.prototype.sort=function(sField,iSortOrder,bIsCaseSensitive){var rRowOrder=this._getRowOrder(sField,iSortOrder,bIsCaseSensitive);this._setCurrentRowOrder(rRowOrder);var oParent=this._getConfigValue("useTBody")||this._table;for(var i=0;i<this._sortableRows.length;i++){var oRow=this._sortableRows[rRowOrder[i]].rowElement;Element.addChild(oParent,oRow);oLastAdded=oRow;}}
TableSort_Class.prototype.handleControlAction=function(oEvent,oEl,oData){var sKey=oData.key;this._sortAction(sKey);}
TableSort_Class.prototype._sortAction=function(sKey){var bSortOrder=this._fields[sKey].bIsDescending?-1:1;this.sort(sKey,bSortOrder);this._modifyControlClassNames(this._fields[sKey]);this._resetControlDirections(sKey);this._fields[sKey].bIsDescending=!this._fields[sKey].bIsDescending;}

/* /includes/jslib/wsdom/effects/selectHider.1.js */
var SelectHider_Class=function(){if(!(document.all&&document.getElementById&&!window.opera&&navigator.userAgent.toLowerCase().indexOf("mac")==-1)){this.Apply=function(){};this.Discard=function(){};return;}
var _bIE55=false;var _bIE6=false;var _oRule=null;var _bSetup=true;var _oSelf=this;this.Apply=function(vLayer,vContainer,bResize){if(_bSetup)_Setup();if((_bIE55||_bIE6)&&(oIframe=_Hider(vLayer,vContainer,bResize))){oIframe.style.visibility="visible";}else if(_oRule!=null){_oRule.style.visibility="hidden";}};this.Discard=function(vLayer,vContainer){if((_bIE55||_bIE6)&&(oIframe=_Hider(vLayer,vContainer,false))){oIframe.style.visibility="hidden";}else if(_oRule!=null){_oRule.style.visibility="visible";}};function _Hider(vLayer,vContainer,bResize){var oLayer=_GetObj(vLayer);var oContainer=((oTmp=_GetObj(vContainer))?oTmp:document.getElementsByTagName("body")[0]);if(!oLayer||!oContainer)return;var oIframe=document.getElementById("SelectHider"+oLayer.id);if(!oIframe){var sFilter=(_bIE6)?"filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);":"";var zIndex=oLayer.style.zIndex;if(zIndex=="")zIndex=oLayer.currentStyle.zIndex;zIndex=parseInt(zIndex);if(isNaN(zIndex))return null;if(zIndex<2)return null;zIndex--;var sHiderID="SelectHider"+oLayer.id;oContainer.insertAdjacentHTML("afterBegin",'<iframe class="SelectHiderIframe" src="javascript:false;" id="'+sHiderID+'" scroll="no" frameborder="0" style="position:absolute;visibility:hidden;'+sFilter+'border:0;top:0;left;0;width:0;height:0;background-color:#ccc;z-index:'+zIndex+';"></iframe>');oIframe=document.getElementById(sHiderID);_SetPos(oIframe,oLayer);}else if(bResize){_SetPos(oIframe,oLayer);}
return oIframe;};function _SetPos(oIframe,oLayer){oIframe.style.width=oLayer.offsetWidth+"px";oIframe.style.height=oLayer.offsetHeight+"px";oIframe.style.left=oLayer.offsetLeft+"px";oIframe.style.top=oLayer.offsetTop+"px";};function _GetObj(vObj){var oObj=null;switch(typeof(vObj)){case"object":oObj=vObj;break;case"string":oObj=document.getElementById(vObj);break;}
return oObj;};function _Setup(){_bIE55=(typeof(document.body.contentEditable)!="undefined");_bIE6=(typeof(document.compatMode)!="undefined");if(!_bIE55){if(document.styleSheets.length==0)
document.createStyleSheet();var oSheet=document.styleSheets[0];oSheet.addRule(".SelectHider","visibility:visible");_oRule=oSheet.rules(oSheet.rules.length-1);}
_bSetup=false;};};WSDOM.defineClass("SelectHider",null,SelectHider_Class);WSDOM.loadClass("WSDOM.SelectHider.1");

/* /includes/jslib/wsdom/format/format.js */
if(WSDOM==undefined)var WSDOM={};WSDOM.Format={};WSDOM.Format.formatNumber=function(value,format){value=Number(value);if(isNaN(value))throw new Error('Input value is not a number.');var type='default';if(format instanceof Array){if(value==0&&format.length>2&&format[2]){return format[2];}else if(value<0&&format.length>1&&format[1]){format=format[1];type='neg';}else{format=format[0];}}
var parsedFormat=format.match(/([^#0]*)([#0][#0,]*)(\.?)([#0]*)([\s\S]*)/);var headFormat=parsedFormat[1];var leftFormat=parsedFormat[2];var rightFormat=parsedFormat[4];var tailFormat=parsedFormat[5];var negative=(value<0);if(negative)value*=-1;var reComma=/,/g;var showCommas=reComma.test(leftFormat);if(showCommas)
{leftFormat=leftFormat.replace(reComma,'');reComma.lastIndex=0;}
var isPercentage=/^\s*%/.test(tailFormat);if(isPercentage)value*=100;var magSuffixes=tailFormat.match(/^\s*\[([\w\s\\|]+)\]/);var magBase=1000,suffix='';if(magSuffixes){if(value){magSuffixes=magSuffixes[1];if(magSuffixes.toLowerCase()=='bytes'){magSuffixes=['b','KB','MB','GB','TB','PB','EB','ZB'];magBase=1024;}else{magSuffixes=magSuffixes.split('|');}
var mag=Math.floor(Math.log(value)/Math.log(magBase));mag=Math.max(0,Math.min(magSuffixes.length-1,mag));suffix=magSuffixes[mag];if(suffix.length)value/=Math.pow(magBase,mag);}
tailFormat=tailFormat.replace(/\[([\w\s|]+)\]/,suffix);}
var unescape=/\\([\s\S])/g;tailFormat=tailFormat.replace(unescape,'$1');headFormat=headFormat.replace(unescape,'$1');var leftFixed=leftFormat.match(/0*$/)[0].length;parsedFormat=rightFormat.match(/^(0*)#*/);var rightAllowed=parsedFormat[0].length;var rightFixed=parsedFormat[1].length;value=value.toFixed(rightAllowed);var result=[headFormat];var leftValue=parseInt("0"+value,10).toString();if(leftValue=='0'&&leftFixed<1){leftValue='';}else{while(leftValue.length<leftFixed)leftValue='0'+leftValue;if(showCommas){var reCommatize=/(\d+)(\d{3}[\d,]*)$/g;while(reCommatize.test(leftValue)){leftValue=leftValue.replace(reCommatize,'$1,$2');reCommatize.lastIndex=0;}}}
result.push(negative&&type!='neg'?'-':'',leftValue);if(rightFixed>0||(rightAllowed>0&&(value%1)!=0)){var rightValue=value.match(/\.\d*$/)[0];if(rightFixed<rightAllowed)rightValue=rightValue.replace(new RegExp('0{0,'+(rightAllowed-rightFixed)+'}$'),'');result.push(rightValue);}
result.push(tailFormat);return result.join('');};WSDOM.Format.formatDate=function(value,format){var result=[];var hasAMPM=/A(M?)\/?P\1/i.test(format);var nextToken=/^(?:([DM])\1{0,3}|(?:Y{4}|YY?)|([WHNS])\2?|Q|(A)(M?)\/?P\4|\\?([^\\]))/i;function fixCase(value,token){var checkCase=/^(?:([MD]+)|([md]+))$/;var result=token.match(checkCase);if(!result)return value;if(result[1])return value.toUpperCase();return value.toLowerCase();}
var parsedToken,curVal;while(parsedToken=format.match(nextToken)){if(parsedToken[5]){result.push(parsedToken[5]);}else if(parsedToken[3]){if(value.getHours()<12){curVal='a'+parsedToken[4];}else{curVal='p'+parsedToken[4];}
result.push(parsedToken[3]=='A'?curVal.toUpperCase():curVal.toLowerCase());}else{parsedToken=parsedToken[0];switch(parsedToken.toLowerCase()){case'd':result.push(value.getDate());break;case'dd':curVal=value.getDate();if(curVal<10)result.push('0');result.push(curVal);break;case'ddd':result.push(fixCase(WSDOM.Format._days[value.getDay()].substring(0,3),parsedToken));break;case'dddd':result.push(fixCase(WSDOM.Format._days[value.getDay()],parsedToken));break;case'm':result.push(value.getMonth()+1);break;case'mm':curVal=value.getMonth()+1;if(curVal<10)result.push('0');result.push(curVal);break;case'mmm':result.push(fixCase(WSDOM.Format._months[value.getMonth()].substring(0,3),parsedToken));break;case'mmmm':result.push(fixCase(WSDOM.Format._months[value.getMonth()],parsedToken));break;case'y':curVal=new Date(value.getFullYear(),0,1);result.push(Math.ceil((value-curVal)/86400000)+1);break;case'yy':curVal=value.getFullYear().toString();result.push(curVal.substring(curVal.length-2));break;case'yyyy':result.push(value.getFullYear());break;case'w':result.push(value.getDay()+1);break;case'ww':curVal=new Date(value.getFullYear(),0,1);result.push(Math.ceil(((value-curVal)/86400000+curVal.getDay()+1)/7));break;case'h':curVal=value.getHours();if(hasAMPM){if(curVal==0){curVal=12;}else if(curVal>12){curVal-=12;}}
result.push(curVal);break;case'hh':curVal=value.getHours();if(hasAMPM){if(curVal==0){curVal=12;}else if(curVal>12){curVal-=12;}}
if(curVal<10)result.push('0');result.push(curVal);break;case'n':result.push(value.getMinutes());break;case'nn':curVal=value.getMinutes();if(curVal<10)result.push('0');result.push(curVal);break;case's':result.push(value.getSeconds());break;case'ss':curVal=value.getSeconds();if(curVal<10)result.push('0');result.push(curVal);break;case'q':result.push(Math.floor(value.getMonth()/3)+1);break;default:result.push(parsedToken);}}
format=format.replace(nextToken,'');}
return result.join('');};WSDOM.Format._days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];WSDOM.Format._months=['January','February','March','April','May','June','July','August','September','October','November','December'];

/* /intuit/quicken/public/resources/js/behaviour.3.beta.js */
Behaviour_class=function(){this.timingEnabled=false;this._stackEvents=false;this.events;if(window["WSDOM"]){this.Events=WSDOM.Events;}else{this.Events=Events;}}
Behaviour_class.prototype.apply=function(map,parentEl,timingEnabled){if(timingEnabled!==undefined){this.timingEnabled=!!timingEnabled;}
this.walkMap(map,parentEl||null);}
Behaviour_class.prototype.applyRules=Behaviour_class.prototype.apply;Behaviour_class.prototype.walkMap=function(map,parentEl){var totalTime=0;var startTime,endTime,selectorTime;var rElements,rule,i,el;for(var address in map){startTime=new Date();rElements=Element.parseSelector(address,parentEl||null);if(typeof map[address]=="function"){for(i=0;el=rElements[i];i++){map[address](el,i);}}else{this.applyEventRule.apply(this,[map[address],rElements]);}
endTime=new Date();selectorTime=endTime-startTime;this.outputTiming(selectorTime,"Behaviour timing for "+address+" ("+rElements.length+")");totalTime+=selectorTime;}
this.outputTiming(totalTime,"Total Behaviour timing");}
Behaviour_class.prototype.applyEventRule=function(rule,el){var evtArgs,prop;for(var eventType in rule){eventDesc=rule[eventType];var evtArgs={label:eventType+": "+rule,element:el,type:eventType,handler:eventDesc,data:new Object(),context:window,trace:false}
if(typeof(eventDesc)=="object"){evtArgs.handler=null;if(this.validEventParameter(eventDesc)){for(prop in eventDesc){evtArgs[prop]=eventDesc[prop];}}else{var elementDbg=el.tagName+((el.id)?"#"+el.id:"")+((el.className)?"."+el.className:"");WSDOM.Console.dir("Invalid event parameter for eventType: "+eventType,elementDbg);}}
if(this.Events.remove&&!this._stackEvents){this.Events.remove(el,eventType);}
this.Events.add(evtArgs);}}
Behaviour_class.prototype.validEventParameter=function(o){return(o.handler!==undefined);}
Behaviour_class.prototype.outputTiming=function(timing,desc){if(this.timingEnabled){try{console.info((desc?desc+": ":"")+timing);}catch(e){}}}
Behaviour_class.prototype.setEventStacking=function(bStackEvents){this._stackEvents=bStackEvents;}
if(window["WSDOM"]){WSDOM.using("WSDOM.Behaviour.3","WSDOM.Events.3");WSDOM.defineClass("Behaviour",null,Behaviour_class);WSDOM.loadSingleton("WSDOM.Behaviour.3");}else{var Behaviour=new Behaviour_class();}

/* /includes/jslib/wsdom/wsdom.deployment.classic.js */
var Element=WSDOM.Element;var Events=WSDOM.Events;var Console=WSDOM.Console;var Behaviour=WSDOM.Behaviour;var Util=WSDOM.Util;var Remoting=WSDOM.Remoting;var Serializer=WSDOM.Serializer;var Effects=WSDOM.Effects;var UnitTester=WSDOM.UnitTester;

/* /intuit/quicken/public/resources/js/common.js */
function Common(){};Common.prototype.getRemoting=function(){if(!this.gRemoting){this.gRemoting=new Remoting();}
return this.gRemoting;}
Common.prototype.loadRemoting=function(argsObj){var cb=this.getRemoting();var conn=cb.load({debug:true,url:Config.siteRoot+"/resources/buffer/"+argsObj.page,method:"post",contentType:"text/javascript",context:argsObj.context,preventEval:true,data:argsObj.data,onload:argsObj.onload,onerror:argsObj.onerror});}
Common.prototype.handleError=function(){alert("An error has occurred with your request.");}
Common.prototype.behaviour=function(){WSDOM.Behaviour.apply({"#addToWatchlistBtn":{"click":function(e,el){e.cancel();Common.addToWatchlist([gSymbol]);}}});}
Common.prototype.drawDialog=function(title,body,width,el){var viewport=WSDOM.Viewport.getWindowSize();var mainDiv=WSDOM.Element.getSize("main");this.smokeDiv=WSDOM.Element.create("div",{id:"div-smoke"},"&nbsp;");WSDOM.Element.insertBefore(this.smokeDiv,WSDOM.Element.get("navContainer"));WSDOM.Element.setSize(this.smokeDiv,viewport.width,mainDiv.height);WSDOM.Element.setOpacity(this.smokeDiv,25);this.dialogDiv=WSDOM.Element.create("div",{id:"div-dialog"});WSDOM.Element.insertBefore(this.dialogDiv,this.smokeDiv);var imageURLEle=Element.parseSelector("img",null,"first");if(imageURLEle){var path=(imageURLEle.src.indexOf("/resources")>-1)?imageURLEle.src.split("/resources")[0]:"..";}
var innerDialogDiv=WSDOM.Element.create("div",{id:"div-dialog-inner",className:"hasLayout"},[WSDOM.Element.create("div",{id:"div-dialog-header"},[WSDOM.Element.create("div",{id:"div-dialog-headerbarLeft"},title),WSDOM.Element.create("div",{id:"div-dialog-headerbarRight"},[WSDOM.Element.create("a",{id:"a-close-button",href:"javascript:void(0);"},[WSDOM.Element.create("img",{src:path+"/resources/img/btn_alert_set_close.gif",width:"7px",height:"7px"})])]),WSDOM.Element.create("br",{className:"clear"}),])],this.dialogDiv);if(body){WSDOM.Element.addChild(innerDialogDiv,body);}
WSDOM.Element.setWidth(this.dialogDiv,width);var size=WSDOM.Element.getSize(this.dialogDiv);if(el){var pos=WSDOM.Element.getXY(el);WSDOM.Element.setXY(this.dialogDiv,pos.x,pos.y-size.height);}else{WSDOM.Element.setXY(this.dialogDiv,mainDiv.width/2-size.width/4,viewport.height/2-size.height+document.documentElement.scrollTop);}
Behaviour.apply({'a#a-close-button':{'click':function(e,el){e.cancel();this.closeDialog();}.Context(this)}},innerDialogDiv);if(navigator.userAgent.indexOf('MSIE')!=-1){this.selectHider=new WSDOM.SelectHider();this.selectHider.Apply(this.dialogDiv);}
return innerDialogDiv;}
Common.prototype.closeDialog=function(){if(navigator.userAgent.indexOf('MSIE')!=-1){this.selectHider.Discard(this.dialogDiv);}
WSDOM.Element.remove(this.smokeDiv);WSDOM.Element.remove(this.dialogDiv);}
Common.prototype.handlePopWin=function(e,el,vars){var url=el.getAttribute("url");var width=el.getAttribute("popW")||600;var height=el.getAttribute("popH")||610;if(url){newWin=window.open(url+(vars?vars:""),"newWin","height="+height+", width="+width+", left=30, top=30, toolbar=no, statusbar=no, resizable=yes, scrollbars=yes, menubar=no");try{newWin.focus();}catch(e){}}else{return false;}}
Common.prototype.addToWatchlist=function(rSymbols){var saveLink;Common.drawDialog("<strong>Add To Watchlist</strong>",[Element.create("div",{id:"div-addToWatchlist-dialog"},[Element.create("p",{},["Select a watchlist to which you would like to add ",Element.create("strong",{},rSymbols.join(", ")),", or create a new watchlist."]),Element.create("table",{},[Element.create("tbody",{},[Element.create("tr",{},[Element.create("th",{},[WSDOM.Element.createInput({type:"radio",name:"input-addToWatchlist",value:"existing",checked:"checked",className:"input-radio"}),"Add to Watchlist"]),Element.create("td",{},Element.create("select",{id:"select-watchlistName"}))]),Element.create("tr",{},[Element.create("th",{},[WSDOM.Element.createInput({type:"radio",name:"input-addToWatchlist",value:"new",className:"input-radio"}),"Create New Watchlist"]),Element.create("td",{},Element.create("input",{id:"input-addToWatchlist-name",maxlength:35,value:"Enter Watchlist Name"}))])])]),Element.create("div",{id:"div-addToWatchlist-dialog-buttons",className:"hasLayout"},[Element.create("div",{className:"button blue"},[saveLink=Element.create("a",{id:"a-addToWatchlistSave",href:"javascript:void(0)"},"Save Changes")]),Element.create("div",{className:"button"},[Element.create("a",{id:"a-addToWatchlistCancel",href:"javascript:void(0)"},"Cancel")])])])],550);saveLink.symbols=rSymbols;Common.loadRemoting({page:"Watchlist.getNames.asp",data:{},onload:function(buffer){var result=WSDOM.Serializer.deserialize(buffer.getResult());if(result){var names=WSDOM.Util.toEnumerable(result.watchlists);var select=WSDOM.Element.get("select-watchlistName");names.each(function(watchlist,index){Element.create("option",{value:watchlist.Name},watchlist.Name,select);});}}});Events.add({element:WSDOM.Element.get("a-addToWatchlistSave"),type:"click",handler:function(e,el){e.cancel();var symbols=el.symbols;var saveType;var radios=WSDOM.Element.parseSelector("input[name='input-addToWatchlist']","div-addToWatchlist-dialog");if(radios[0].checked){saveType="existing";}else{saveType="new";}
if(saveType=="new"){var watchlist=WSDOM.Form.Element.getValue(WSDOM.Element.get("input-addToWatchlist-name"));Common.loadRemoting({page:"Edit.createPortfolio.asp",data:{portfolioName:watchlist,portfolioType:Config.watchlistType},onload:function(buffer){this._addToWatchlist(watchlist,symbols);},context:this});}else{var watchlist=WSDOM.Form.Element.getValue(WSDOM.Element.get("select-watchlistName"));this._addToWatchlist(watchlist,symbols);}
this.closeDialog();},context:this});Events.add({element:WSDOM.Element.get("a-addToWatchlistCancel"),type:"click",handler:function(e,el){e.cancel();this.closeDialog();},context:this});}
Common.prototype._addToWatchlist=function(watchlist,symbols){Common.loadRemoting({page:"Edit.addWatchlistSymbol.asp",data:{portfolioName:watchlist,portfolioType:Config.watchlistType,symbols:symbols}});}
Common.prototype.transactionLabelMap={'buy':'<span class="positive">Purchase</span>','sell':'<span class="negative">Sale</span>','sellout':'<span class="negative">Sale</span>','sellshort':'Short Sale','covershort':'Cover Short','open':'<span class="positive">Open Account</span>','credit':'<span class="positive">Credit</span>','debit':'<span class="negative">Debit</span>','interest':'<span class="positive">Interest</span>','close':'<span class="negative">Close</span>','dividend':'<span class="positive">Dividend</span>','split':'Split'};Common.prototype.sectorLabelMap={'ConsumerDurables':'Cons. Durables','Energy':'Energy','Finance':'Finance','Health':'Health','IndustrialCyclical':'Industrial Cyc.','NonDurable':'Non Durable','OtherAllocation':'Other','RetailTrade':'Retail Trade','Services':'Services','Technology':'Technology','Utilities':'Utilities'};WSDOM.Element.createInput=function(args){var input;if(document.all){var htmlStr=new WSDOM.Util.StringBuilder();htmlStr.append('<input ');for(var i in args){var n=(i=="className")?"class":i;htmlStr.append(n+'="'+args[i]+'" ');}
htmlStr.append(' />');input=document.createElement(htmlStr.toString());}else{input=WSDOM.Element.create("input",args);}
return input;}
var Common=new Common();

/* /intuit/quicken/public/resources/js/config.js */
function Config(){};Config.prototype.setParams=function(serParams){var oParams=WSDOM.Serializer.deserialize(serParams);for(var i in oParams){this[i]=oParams[i];};}
var Config=new Config();

/* /intuit/quicken/public/resources/js/loaderclass.js */
function LoaderClass(container){this.container=container;}
LoaderClass.prototype.show=function(){var size=Element.getSize(this.container);var coords=Element.getXY(this.container);this.loaderElement=Element.create("div",{className:"div-loader"},"",document.body);if(size.height<50){size.height=50;}
Element.setSize(this.loaderElement,size.width,size.height);Element.setXY(this.loaderElement,coords.x,coords.y);Element.setOpacity(this.loaderElement,70);}
LoaderClass.prototype.hide=function(){if(this.loaderElement){Element.remove(this.loaderElement);this.loaderElement=null;}}
LoaderClass.prototype.isLoading=function(){if(this.loaderElement){return true;}
return false;}

/* excanvas.1.1.js */
if(!document.createElement('canvas').getContext){(function(){var m=Math;var mr=m.round;var ms=m.sin;var mc=m.cos;var abs=m.abs;var sqrt=m.sqrt;var Z=10;var Z2=Z/2;function getContext(){return this.context_||(this.context_=new CanvasRenderingContext2D_(this));}
var slice=Array.prototype.slice;function bind(f,obj,var_args){var a=slice.call(arguments,2);return function(){return f.apply(obj,a.concat(slice.call(arguments)));};}
var G_vmlCanvasManager_={init:function(opt_doc){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var doc=opt_doc||document;doc.createElement('canvas');doc.attachEvent('onreadystatechange',bind(this.init_,this,doc));}},init_:function(doc){if(!doc.namespaces['g_vml_']){doc.namespaces.add('g_vml_','urn:schemas-microsoft-com:vml','#default#VML');}
if(!doc.namespaces['g_o_']){doc.namespaces.add('g_o_','urn:schemas-microsoft-com:office:office','#default#VML');}
if(!doc.styleSheets['ex_canvas_']){var ss=doc.createStyleSheet();ss.owningElement.id='ex_canvas_';ss.cssText='canvas{display:inline-block;overflow:hidden;'+'text-align:left;width:300px;height:150px}'+'g_vml_\\:*{behavior:url(#default#VML)}'+'g_o_\\:*{behavior:url(#default#VML)}';}
var els=doc.getElementsByTagName('canvas');for(var i=0;i<els.length;i++){this.initElement(els[i]);}},initElement:function(el){if(!el.getContext){el.getContext=getContext;el.attachEvent('onpropertychange',onPropertyChange);el.attachEvent('onresize',onResize);var attrs=el.attributes;if(attrs.width&&attrs.width.specified){var sWidth=attrs.width.nodeValue;if(!(String(sWidth).indexOf("px")>-1)){sWidth=String(sWidth)+"px";}
el.style.width=sWidth;}else{el.width=el.clientWidth;}
if(attrs.height&&attrs.height.specified){var sHeight=attrs.height.nodeValue;if(!(String(sHeight).indexOf("px")>-1)){sHeight=String(sHeight)+"px";}
el.style.height=sHeight;}else{el.height=el.clientHeight;}}
return el;}};function onPropertyChange(e){var el=e.srcElement;switch(e.propertyName){case'width':el.style.width=el.attributes.width.nodeValue+'px';el.getContext().clearRect();break;case'height':el.style.height=el.attributes.height.nodeValue+'px';el.getContext().clearRect();break;}}
function onResize(e){var el=e.srcElement;if(el.firstChild){el.firstChild.style.width=el.clientWidth+'px';el.firstChild.style.height=el.clientHeight+'px';}}
G_vmlCanvasManager_.init();var dec2hex=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){dec2hex[i*16+j]=i.toString(16)+j.toString(16);}}
function createMatrixIdentity(){return[[1,0,0],[0,1,0],[0,0,1]];}
function matrixMultiply(m1,m2){var result=createMatrixIdentity();for(var x=0;x<3;x++){for(var y=0;y<3;y++){var sum=0;for(var z=0;z<3;z++){sum+=m1[x][z]*m2[z][y];}
result[x][y]=sum;}}
return result;}
function copyState(o1,o2){o2.fillStyle=o1.fillStyle;o2.lineCap=o1.lineCap;o2.lineJoin=o1.lineJoin;o2.lineWidth=o1.lineWidth;o2.miterLimit=o1.miterLimit;o2.shadowBlur=o1.shadowBlur;o2.shadowColor=o1.shadowColor;o2.shadowOffsetX=o1.shadowOffsetX;o2.shadowOffsetY=o1.shadowOffsetY;o2.strokeStyle=o1.strokeStyle;o2.globalAlpha=o1.globalAlpha;o2.arcScaleX_=o1.arcScaleX_;o2.arcScaleY_=o1.arcScaleY_;o2.lineScale_=o1.lineScale_;}
function processStyle(styleString){var str,alpha=1;styleString=String(styleString);if(styleString.substring(0,3)=='rgb'){var start=styleString.indexOf('(',3);var end=styleString.indexOf(')',start+1);var guts=styleString.substring(start+1,end).split(',');str='#';for(var i=0;i<3;i++){str+=dec2hex[Number(guts[i])];}
if(guts.length==4&&styleString.substr(3,1)=='a'){alpha=guts[3];}}else{str=styleString;}
return{color:str,alpha:alpha};}
function processLineCap(lineCap){switch(lineCap){case'butt':return'flat';case'round':return'round';case'square':default:return'square';}}
function CanvasRenderingContext2D_(surfaceElement){this.m_=createMatrixIdentity();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle='#000';this.fillStyle='#000';this.lineWidth=1;this.lineJoin='miter';this.lineCap='butt';this.miterLimit=Z*1;this.globalAlpha=1;this.canvas=surfaceElement;var el=surfaceElement.ownerDocument.createElement('div');if(surfaceElement.id!="canvas"&&surfaceElement.id!="pieChartCanvas"){el.style.width=surfaceElement.clientWidth+'px';el.style.height=surfaceElement.clientHeight+'px';el.style.overflow='hidden';el.style.position='absolute';surfaceElement.appendChild(el);}else{el.style.overflow='hidden';el.style.position='absolute';el.style.width=surfaceElement.width+'px';el.style.height=surfaceElement.height+'px';el.style.top=surfaceElement.style.top;el.style.left=surfaceElement.style.left;el.className="vml-canvas";surfaceElement.parentNode.insertBefore(el,surfaceElement);var sId=el.parentNode.id||"fart";window[sId]=el;}
this.element_=el;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1;}
var contextPrototype=CanvasRenderingContext2D_.prototype;contextPrototype.clearRect=function(){this.element_.innerHTML='';this.currentPath_=[];};contextPrototype.beginPath=function(){this.currentPath_=[];};contextPrototype.moveTo=function(aX,aY){var p=this.getCoords_(aX,aY);this.currentPath_.push({type:'moveTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y;};contextPrototype.lineTo=function(aX,aY){var p=this.getCoords_(aX,aY);this.currentPath_.push({type:'lineTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y;};contextPrototype.bezierCurveTo=function(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){var p=this.getCoords_(aX,aY);var cp1=this.getCoords_(aCP1x,aCP1y);var cp2=this.getCoords_(aCP2x,aCP2y);bezierCurveTo(this,cp1,cp2,p);};function bezierCurveTo(self,cp1,cp2,p){self.currentPath_.push({type:'bezierCurveTo',cp1x:cp1.x,cp1y:cp1.y,cp2x:cp2.x,cp2y:cp2.y,x:p.x,y:p.y});self.currentX_=p.x;self.currentY_=p.y;}
contextPrototype.quadraticCurveTo=function(aCPx,aCPy,aX,aY){var cp=this.getCoords_(aCPx,aCPy);var p=this.getCoords_(aX,aY);var cp1={x:this.currentX_+2.0/3.0*(cp.x-this.currentX_),y:this.currentY_+2.0/3.0*(cp.y-this.currentY_)};var cp2={x:cp1.x+(p.x-this.currentX_)/3.0,y:cp1.y+(p.y-this.currentY_)/3.0};bezierCurveTo(this,cp1,cp2,p);};contextPrototype.arc=function(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){aRadius*=Z;var arcType=aClockwise?'at':'wa';var xStart=aX+mc(aStartAngle)*aRadius-Z2;var yStart=aY+ms(aStartAngle)*aRadius-Z2;var xEnd=aX+mc(aEndAngle)*aRadius-Z2;var yEnd=aY+ms(aEndAngle)*aRadius-Z2;if(xStart==xEnd&&!aClockwise){xStart+=0.125;}
var p=this.getCoords_(aX,aY);var pStart=this.getCoords_(xStart,yStart);var pEnd=this.getCoords_(xEnd,yEnd);this.currentPath_.push({type:arcType,x:p.x,y:p.y,radius:aRadius,xStart:pStart.x,yStart:pStart.y,xEnd:pEnd.x,yEnd:pEnd.y});};contextPrototype.rect=function(aX,aY,aWidth,aHeight){this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();};contextPrototype.strokeRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.stroke();this.currentPath_=[];};contextPrototype.fillRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.fill();this.currentPath_=[];};contextPrototype.createLinearGradient=function(aX0,aY0,aX1,aY1){var gradient=new CanvasGradient_('gradient');gradient.x0_=aX0;gradient.y0_=aY0;gradient.x1_=aX1;gradient.y1_=aY1;return gradient;};contextPrototype.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){var gradient=new CanvasGradient_('gradientradial');gradient.x0_=aX0;gradient.y0_=aY0;gradient.r0_=aR0;gradient.x1_=aX1;gradient.y1_=aY1;gradient.r1_=aR1;return gradient;};contextPrototype.drawImage=function(image,var_args){var dx,dy,dw,dh,sx,sy,sw,sh;var oldRuntimeWidth=image.runtimeStyle.width;var oldRuntimeHeight=image.runtimeStyle.height;image.runtimeStyle.width='auto';image.runtimeStyle.height='auto';var w=image.width;var h=image.height;image.runtimeStyle.width=oldRuntimeWidth;image.runtimeStyle.height=oldRuntimeHeight;if(arguments.length==3){dx=arguments[1];dy=arguments[2];sx=sy=0;sw=dw=w;sh=dh=h;}else if(arguments.length==5){dx=arguments[1];dy=arguments[2];dw=arguments[3];dh=arguments[4];sx=sy=0;sw=w;sh=h;}else if(arguments.length==9){sx=arguments[1];sy=arguments[2];sw=arguments[3];sh=arguments[4];dx=arguments[5];dy=arguments[6];dw=arguments[7];dh=arguments[8];}else{throw Error('Invalid number of arguments');}
var d=this.getCoords_(dx,dy);var w2=sw/2;var h2=sh/2;var vmlStr=[];var W=10;var H=10;vmlStr.push(' <g_vml_:group',' coordsize="',Z*W,',',Z*H,'"',' coordorigin="0,0"',' style="width:',W,'px;height:',H,'px;position:absolute;');if(this.m_[0][0]!=1||this.m_[0][1]){var filter=[];filter.push('M11=',this.m_[0][0],',','M12=',this.m_[1][0],',','M21=',this.m_[0][1],',','M22=',this.m_[1][1],',','Dx=',mr(d.x/Z),',','Dy=',mr(d.y/Z),'');var max=d;var c2=this.getCoords_(dx+dw,dy);var c3=this.getCoords_(dx,dy+dh);var c4=this.getCoords_(dx+dw,dy+dh);max.x=m.max(max.x,c2.x,c3.x,c4.x);max.y=m.max(max.y,c2.y,c3.y,c4.y);vmlStr.push('padding:0 ',mr(max.x/Z),'px ',mr(max.y/Z),'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',filter.join(''),", sizingmethod='clip');")}else{vmlStr.push('top:',mr(d.y/Z),'px;left:',mr(d.x/Z),'px;');}
vmlStr.push(' ">','<g_vml_:image src="',image.src,'"',' style="width:',Z*dw,'px;',' height:',Z*dh,'px;"',' cropleft="',sx/w,'"',' croptop="',sy/h,'"',' cropright="',(w-sx-sw)/w,'"',' cropbottom="',(h-sy-sh)/h,'"',' />','</g_vml_:group>');this.element_.insertAdjacentHTML('BeforeEnd',vmlStr.join(''));};contextPrototype.stroke=function(aFill){var lineStr=[];var lineOpen=false;var a=processStyle(aFill?this.fillStyle:this.strokeStyle);var color=a.color;var opacity=a.alpha*this.globalAlpha;var W=10;var H=10;lineStr.push('<g_vml_:shape',' filled="',!!aFill,'"',' style="position:absolute;width:',W,'px;height:',H,'px;"',' coordorigin="0 0" coordsize="',Z*W,' ',Z*H,'"',' stroked="',!aFill,'"',' path="');var newSeq=false;var min={x:null,y:null};var max={x:null,y:null};for(var i=0;i<this.currentPath_.length;i++){var p=this.currentPath_[i];var c;switch(p.type){case'moveTo':c=p;lineStr.push(' m ',mr(p.x),',',mr(p.y));break;case'lineTo':lineStr.push(' l ',mr(p.x),',',mr(p.y));break;case'close':lineStr.push(' x ');p=null;break;case'bezierCurveTo':lineStr.push(' c ',mr(p.cp1x),',',mr(p.cp1y),',',mr(p.cp2x),',',mr(p.cp2y),',',mr(p.x),',',mr(p.y));break;case'at':case'wa':lineStr.push(' ',p.type,' ',mr(p.x-this.arcScaleX_*p.radius),',',mr(p.y-this.arcScaleY_*p.radius),' ',mr(p.x+this.arcScaleX_*p.radius),',',mr(p.y+this.arcScaleY_*p.radius),' ',mr(p.xStart),',',mr(p.yStart),' ',mr(p.xEnd),',',mr(p.yEnd));break;}
if(p){if(min.x==null||p.x<min.x){min.x=p.x;}
if(max.x==null||p.x>max.x){max.x=p.x;}
if(min.y==null||p.y<min.y){min.y=p.y;}
if(max.y==null||p.y>max.y){max.y=p.y;}}}
lineStr.push(' ">');if(!aFill){var lineWidth=this.lineScale_*this.lineWidth;if(lineWidth<1){opacity*=lineWidth;}
lineStr.push('<g_vml_:stroke',' opacity="',opacity,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',processLineCap(this.lineCap),'"',' weight="',lineWidth,'px"',' color="',color,'" />');}else if(typeof this.fillStyle=='object'){var fillStyle=this.fillStyle;var angle=0;var focus={x:0,y:0};var shift=0;var expansion=1;if(fillStyle.type_=='gradient'){var x0=fillStyle.x0_/this.arcScaleX_;var y0=fillStyle.y0_/this.arcScaleY_;var x1=fillStyle.x1_/this.arcScaleX_;var y1=fillStyle.y1_/this.arcScaleY_;var p0=this.getCoords_(x0,y0);var p1=this.getCoords_(x1,y1);var dx=p1.x-p0.x;var dy=p1.y-p0.y;angle=Math.atan2(dx,dy)*180/Math.PI;if(angle<0){angle+=360;}
if(angle<1e-6){angle=0;}}else{var p0=this.getCoords_(fillStyle.x0_,fillStyle.y0_);var width=max.x-min.x;var height=max.y-min.y;focus={x:(p0.x-min.x)/width,y:(p0.y-min.y)/height};width/=this.arcScaleX_*Z;height/=this.arcScaleY_*Z;var dimension=m.max(width,height);shift=2*fillStyle.r0_/dimension;expansion=2*fillStyle.r1_/dimension-shift;}
var stops=fillStyle.colors_;stops.sort(function(cs1,cs2){return cs1.offset-cs2.offset;});var length=stops.length;var color1=stops[0].color;var color2=stops[length-1].color;var opacity1=stops[0].alpha*this.globalAlpha;var opacity2=stops[length-1].alpha*this.globalAlpha;var colors=[];for(var i=0;i<length;i++){var stop=stops[i];colors.push(stop.offset*expansion+shift+' '+stop.color);}
lineStr.push('<g_vml_:fill type="',fillStyle.type_,'"',' method="none" focus="100%"',' color="',color1,'"',' color2="',color2,'"',' colors="',colors.join(','),'"',' opacity="',opacity2,'"',' g_o_:opacity2="',opacity1,'"',' angle="',angle,'"',' focusposition="',focus.x,',',focus.y,'" />');}else{lineStr.push('<g_vml_:fill color="',color,'" opacity="',opacity,'" />');}
lineStr.push('</g_vml_:shape>');this.element_.insertAdjacentHTML('beforeEnd',lineStr.join(''));};contextPrototype.fill=function(){this.stroke(true);}
contextPrototype.closePath=function(){this.currentPath_.push({type:'close'});};contextPrototype.getCoords_=function(aX,aY){var m=this.m_;return{x:Z*(aX*m[0][0]+aY*m[1][0]+m[2][0])-Z2,y:Z*(aX*m[0][1]+aY*m[1][1]+m[2][1])-Z2}};contextPrototype.save=function(){var o={};copyState(this,o);this.aStack_.push(o);this.mStack_.push(this.m_);this.m_=matrixMultiply(createMatrixIdentity(),this.m_);};contextPrototype.restore=function(){copyState(this.aStack_.pop(),this);this.m_=this.mStack_.pop();};contextPrototype.translate=function(aX,aY){var m1=[[1,0,0],[0,1,0],[aX,aY,1]];this.m_=matrixMultiply(m1,this.m_);};contextPrototype.rotate=function(aRot){var c=mc(aRot);var s=ms(aRot);var m1=[[c,s,0],[-s,c,0],[0,0,1]];this.m_=matrixMultiply(m1,this.m_);};contextPrototype.scale=function(aX,aY){this.arcScaleX_*=aX;this.arcScaleY_*=aY;var m1=[[aX,0,0],[0,aY,0],[0,0,1]];var m=this.m_=matrixMultiply(m1,this.m_);var det=m[0][0]*m[1][1]-m[0][1]*m[1][0];this.lineScale_=sqrt(abs(det));};contextPrototype.clip=function(){};contextPrototype.arcTo=function(){};contextPrototype.createPattern=function(){return new CanvasPattern_;};function CanvasGradient_(aType){this.type_=aType;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[];}
CanvasGradient_.prototype.addColorStop=function(aOffset,aColor){aColor=processStyle(aColor);this.colors_.push({offset:aOffset,color:aColor.color,alpha:aColor.alpha});};function CanvasPattern_(){}
G_vmlCanvasManager=G_vmlCanvasManager_;CanvasRenderingContext2D=CanvasRenderingContext2D_;CanvasGradient=CanvasGradient_;CanvasPattern=CanvasPattern_;})();}

/*ChartData_class.js*/
function ChartData_class(){};ChartData_class.Extend(ModuleClass);ChartData_class.prototype.load=function(symbol,days,intradayDays){this.publicContent=this.publicContent||Element.get("wsod-content");var data={symbol:symbol,days:days||(365*1),intradayDays:intradayDays||5};if(this.publicContent){var serializedInputs=WSDOM.Serializer.serialize(data);Element.create("script", {src: Config.protocol + Config.apiURL + Config.siteRoot + "/resources/buffer/ChartData.load.asp?inputs=" + serializedInputs}, null, this.publicContent);}else{Common.loadRemoting({page:"ChartData.load.asp",data:data,context:this,onload:this.handle});}}
ChartData_class.prototype.draw=function(){WSDOM.Console.dir(this.result());}

/* axisManager.js */
var NumericAxis=function(destStart,destSize,minValue,maxValue,invert,padBottom){this.padBottom=padBottom||false;this.destStart=destStart;this.destSize=destSize;this.minValue=minValue;this.maxValue=maxValue;this.invert=!!invert;this.interval=null;this.gridMin=minValue;this.gridMax=maxValue;this.resetGridlines();};NumericAxis.prototype.transform=function(value){if(this.invert){if(this.gridMin==this.gridMax){return 0;}else{var nValue=(this.gridMin-value)*this.destSize/(this.gridMax-this.gridMin)+this.destStart+this.destSize;return nValue;}}else{if(this.gridMin==this.gridMax){return 0;}else{return(value-this.gridMin)*this.destSize/(this.gridMax-this.gridMin)+this.destStart;}}};NumericAxis.prototype.t=function(value){return this.transform(value);};NumericAxis.prototype.gridlines=[];NumericAxis.prototype.targetGridlines=5;NumericAxis.prototype.minGridlines=3;NumericAxis.prototype.intervals=[0.005,0.01,0.02,0.05,0.10,0.25,0.50,1,2.5,5,10,25,50,100,250,500,1000,2500,5000,10000,25000,50000,100000,250000,500000,1000000,1250000,1500000,2500000,5000000,7500000,10000000,12500000,15000000,50000000,100000000,250000000,500000000,1000000000,2500000000,5000000000,1000000000,250000000000,500000000000,1000000000000];NumericAxis.prototype.resetGridlines=function(){var top,bottom,n,diff,lastDiff=999999999999,lastInterval;for(var i=this.intervals.length-1;i>=0;i--){this.interval=this.intervals[i];bottom=Math.floor(this.minValue/this.interval)*this.interval;top=Math.ceil(this.maxValue/this.interval)*this.interval;n=(top-bottom)/this.interval-1;diff=Math.abs(n-this.targetGridlines);if(diff>lastDiff){this.interval=lastInterval;break;}
if(n>=this.minGridlines){lastInterval=this.interval;lastDiff=diff;}}
this.gridMin=Math.floor(this.minValue/this.interval)*this.interval;this.gridMax=Math.ceil(this.maxValue/this.interval)*this.interval;this.gridlines=[];var numGridlines=Math.round((this.gridMax-this.gridMin)/this.interval)-1;if(Math.abs(this.transform(this.gridMax)-this.transform(this.maxValue))<5){this.gridMax+=this.interval;numGridlines++;}
if(this.padBottom){if(this.transform(this.gridMin)-this.transform(this.minValue)<5){this.gridMin-=this.interval;numGridlines++;}}
for(var i=1;i<=numGridlines;i++){var fixed=this.gridMin+i*this.interval;if(this.interval<0.01){this.gridlines.push(fixed.toFixed(3));}else if(this.interval<100){this.gridlines.push(fixed.toFixed(2));}else{this.gridlines.push(fixed.toFixed(0));}}};var InterdayAxis=function(destStart,destSize,firstPeriod,periods,invert){this.destStart=destStart;this.destSize=destSize;this.firstPeriod=firstPeriod;this.periods=periods;this.invert=!!invert;};InterdayAxis.prototype.transform=function(period){if(this.invert){var nValue=(this.firstPeriod-period)*this.destSize/this.periods+this.destStart+this.destSize;if(isNaN(nValue)){return 0;}
return nValue;}else{return(period-this.firstPeriod)*this.destSize/this.periods+this.destStart;}};var DateAxis=function(destStart,destSize,invert){this.destStart=parseInt(destStart);this.destSize=parseInt(destSize);this._dates={};this._datesArray=[];this.invert=!!invert;};DateAxis.prototype.transform=function(date){return this._axis.transform(this._dates[date]);};DateAxis.prototype.t=function(date){return this.transform(date);};DateAxis.prototype.addTimeseries=function(data){var d=null;for(var i=0;i<data.length;i++){d=data[i].Date;if(this._dates[d]===undefined){this._dates[d]=1;this._datesArray.push(d);}}};DateAxis.prototype.setScale=function(){this._datesArray.sort();for(var i=0;i<this._datesArray.length;i++){this._dates[this._datesArray[i]]=i;}
this._axis=new InterdayAxis(this.destStart,this.destSize,0,this._datesArray.length-1,this.invert);};

/*canvasBackground.js*/
Events.add({type:'load',element:window,handler:canvasBackground});function canvasBackground(){var listCanvas=Element.parseSelector(".canvas",Element.get("WSOD_page"));var defaultColors={startBG:"#F3F3F3",endBG:"#FFFFFF"};for(var x=0,len=listCanvas.length;x<len;x++){var currentCanvasArea=listCanvas[x];var canvasInfo={size:Element.getSize(currentCanvasArea),local:Element.getXY(currentCanvasArea),parentWSOD:Element.getXY("wsod-main"),startBG:currentCanvasArea.getAttribute("canvasStartBG")||defaultColors.startBG,endBG:currentCanvasArea.getAttribute("canvasEndBG")||defaultColors.endBG};var currentCanvas=Element.create("canvas",{width:canvasInfo.size.width,height:canvasInfo.size.height});Element.insertBefore(currentCanvas,currentCanvasArea);if(!currentCanvas.getContext){G_vmlCanvasManager.initElement(currentCanvas);}
if(currentCanvas.getContext){var ctx=currentCanvas.getContext("2d");var grad=ctx.createLinearGradient(0,0,0,canvasInfo.size.height);grad.addColorStop(0,canvasInfo.startBG);grad.addColorStop(1,canvasInfo.endBG);ctx.fillStyle=grad;ctx.rect(0,0,canvasInfo.size.width,canvasInfo.size.height);ctx.fill();Element.setStyle(currentCanvasArea,"z-index:2;position:relative;");if(!Element.hasClass(currentCanvasArea,"publicShowMeLink")){Element.setXY(currentCanvas,canvasInfo.local.x-canvasInfo.parentWSOD.x,null);}}}}

/* ThickBox.js */
ThickBox=function(){var elShowMeLinks=Element.parseSelector("div.publicShowMeLink a");Events.add({element:elShowMeLinks,type:"click",handler:this.eventFire,context:this});Events.add({element:window,type:"resize",handler:this.resizeEvent,context:this});Events.add({element:window,type:"scroll",handler:this.resizeEvent,context:this});};ThickBox.prototype.eventFire=function(e,el,data){var contentAreaLocal = Element.getXY("wsod-main");scrollTo(contentAreaLocal.x + 100, contentAreaLocal.y + 150);var pageNum=el.getAttribute("pageNum");this.draw((pageNum||0)*1);};ThickBox.prototype.init=function(){if(!this.image){this.image={path:Config.siteRoot+"/resources/img/",close:{src:"btn_close.gif",alt:"Close Box"},back:{src:"btn_left_arrow.png",alt:"Back: "},next:{src:"btn_right_arrow.png",alt:"Next: "},quickenpremier:{src:"btn_QuickenPremier.png",alt:"Create Quicken Premier Account"}};}
this.browserObj=this.browserObj||new browserObj();if(!this.thickboxArea){this.thickboxArea=Element.get("wsod_thickbox");this.thickboxLocation=Element.getXY("wsod_thickbox");}
if(!this.page){this.page=[];this.page[0]={name:"Create an Online Investing Center Account After Purchasing Premier",linkName:"Create an Account",intro:"If you don't have a Member ID at Quicken.com, purchase Quicken Premier to create an account and get access to these exclusive benefits:",callout:["Track your Quicken.com Investing Portfolio wherever you use the web.","New charts and graphs make managing your investments easy.","Evaluate stocks with step-by-step tools such as One-Click Scorecard, which lets you analyze investments based on leading strategies such as Robert Hagstrom's The Warren Buffet Way."],image:{src:"screen_CreateAccount.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[1]={name:"Track Your Portfolio Performance Online With Flexible Tools",linkName:"Portfolio Performance",callout:["Track the performance of any of your portfolios.","Chart your portfolio and compare it to up to 10 other stocks, mutual funds, or benchmarks.","Analyze individual holding performance grouped by asset class."],calloutY:[116,189,295],redArrow:[0,0,-183],image:{src:"screen_PortfolioPerformance.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[2]={name:"Assess Your Risk vs. Return Potential Against Multiple Models",linkName:"Risk vs. Return",callout:["Get detailed analysis of the risks and returns for all of your portfolios.","Compare your portfolio's asset allocation to the model portfolio of your choice.","Optimize your portfolio by maintaining the most efficient ratio of risk to returns with your asset allocation."],calloutY:[75,166,301],redArrow:[-170,-170,-170],image:{src:"screen_RiskVReturn.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[3]={name:"Assess Your Sector Exposure for One or More Portfolio Holdings",linkName:"Sector Exposure",callout:["See the sector distrubution of your portfolio and compare it to the model portfolio of your choice.","Read a concise summary of the areas where your portfolio differs most from the model.","Review a detailed sector breakdown for all assets in your portfolio."],calloutY:[132,261,357],image:{src:"screen_SectorExposure.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[4]={name:"Check Your Portfolios for Holding Overlap and View Options for Changes",linkName:"Holdings Overlap",callout:["Select a portfolio to see how its holdings overlap with all of your holdings or a specific portfolio.","The Top 10 Holdings takes into account mutual fund assets giving you a clear idea of your exposure to an individual security."],calloutY:[132,307],image:{src:"screen_HoldingsOverlap.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[5]={name:"Set Alerts to Monitor Your Portfolios",linkName:"Portfolio Alerts",callout:["Select the portfolios or watchlists to monitor market changes throughout the day.","Set alerts when the value rises or falls to a specific level, or when the percent change is greater than the specified amount."],calloutY:[153,204],redArrow:[-187,-99],image:{src:"screen_PortfolioAlerts.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[6]={name:"Track Security Performance by Using Symbol Alerts",linkName:"Stock Alerts",callout:["Receive alerts on Stocks, Mutual Funds, ETFs, and Indices by entering a symbol.","Customize alerts by price, volume, or specific events like dividends, splits or earnings."],calloutY:[96,205],redArrow:[0,-99],image:{src:"screen_SymbolAlerts.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[7]={name:"Proprietary One-Click Scorecard Methodology Provides In-Depth Company Analysis",linkName:"One-Click Scorecard",callout:["Get opinions and detailed analysis from multiple independent sources.","Evaluate potential investment candidates and eliminate those equities that aren't up to snuff.","Learn more about the criteria and see how the company measures up in each category against its industry average."],calloutY:[90,157,237],redArrow:[0,-69,0],image:{src:"screen_OneClick.png",alt:"Quicken Premier Investment Center Screen Shots"}};this.page[8]={name:"Analyze Companies by Evaluating Various Company Fundamentals",linkName:"Stock Evaluator",callout:["Assess the growth, financial health, management performance, market multiples and intrinsic value of a company.","Compare each fundamental against the industry average and learn more about what performance in each fundamental means."],calloutY:[93,193],redArrow:[0,-75],image:{src:"screen_IndustryPosition.png",alt:"Quicken Premier Investment Center Screen Shots"}};}};ThickBox.prototype.draw=function(pageNum){this.init();var pageNum=pageNum||0;var currentPage=this.page[pageNum];var priorNum=(pageNum==0)?this.page.length-1:pageNum-1;var nextNum=(pageNum==this.page.length-1)?0:pageNum+1;this.pageNum=pageNum;this.priorNum=priorNum;this.nextNum=nextNum;this.wsodContent=this.wsodContent||Element.get("wsod-content");this.content=[],contentStart=0;if(currentPage.intro){this.content.push(Element.create("div",{className:"intro"},currentPage.intro));contentStart=1;}
for(var x=0,len=currentPage.callout.length;x<len;x++){this.content.push(Element.create("p",{},Element.create("div",{},currentPage.callout[x])));}
if(pageNum==0){this.content.push(Element.create("p",{},Element.create("a",{href:"javascript:void(0);"},Element.create("img",{src:this.image.path+this.image.quickenpremier.src,alt:this.image.quickenpremier.alt}))));}
this.content.push(Element.create("div",{},"&nbsp;"));this.previousPage=Element.create("a",{href:"javascript:void(0)",className:"previous"},[Element.create("img",{src:this.image.path+this.image.back.src,alt:this.image.back.alt+this.page[priorNum].linkName}),Element.create("span",{},this.image.back.alt+this.page[priorNum].linkName)]);this.nextPage=Element.create("a",{href:"javascript:void(0)",className:"next"},[Element.create("span",{},this.image.next.alt+this.page[nextNum].linkName),Element.create("img",{src:this.image.path+this.image.next.src,alt:this.image.next.alt+this.page[nextNum].linkName})]);if(!this.thickbox){this.closeEle=Element.create("a",{href:"javascript:void(0);",id:"wsod_thickbox_close"},["Close",Element.create("img",{src:this.image.path+this.image.close.src,alt:this.image.close.alt})]);this.headerEle=Element.create("h3",{id:"wsod_thickbox_head"},currentPage.name);this.contentEle=Element.create("div",((pageNum!=0)?{id:"wsod_thickbox_content",className:"position"}:{id:"wsod_thickbox_content"}),this.content);this.imageEle=Element.create("img",{src:this.image.path+currentPage.image.src,id:"wsod_thickbox_img",alt:currentPage.image.alt});this.paging=Element.create("div",{className:"paging hasLayout"},[this.previousPage,this.nextPage]);this.thickbox=Element.create("div",{id:"wsod_thickbox"},[Element.create("b",{className:"rtop"},"<b class='r1'></b> <b class='r2'></b> <b class='r3'></b> <b class='r4'></b> <b class='r5'></b> <b class='r6'></b> <b class='r7'></b> <b class='r8'></b>"),this.closeEle,Element.create("div",{className:"inner"},[Element.create("div",{className:"innerPad"},[this.headerEle,Element.create("div",{id:"wsod_thickbox_contentArea",className:"hasLayout"},[this.contentEle,this.imageEle]),this.paging])]),Element.create("b",{className:"rbottom"},"<b class='r8'></b> <b class='r7'></b> <b class='r6'></b> <b class='r5'></b> <b class='r4'></b> <b class='r3'></b> <b class='r2'></b> <b class='r1'></b>")],document.body);this.coverArea=Element.create("div",{id:"wsod_coverArea"},null,document.body);var contentArea=Element.getSize(Element.get("wsod-content"));Element.setSize(this.coverArea,contentArea.width+25,contentArea.height+25);Events.add({element:this.closeEle,type:"click",handler:this.toggleThickBox,context:this});}else{Element.setHTML(this.contentEle,"");Element.setHTML(this.paging,"");Element.setHTML(this.headerEle,currentPage.name);Element.create("div",{},this.content,this.contentEle);if(pageNum!=0){Element.addClass(this.contentEle,"position");}else if(Element.hasClass(this.contentEle,"position")){Element.removeClass(this.contentEle,"position");}
Element.create("div",{},[this.previousPage,this.nextPage],this.paging);this.imageEle.src=this.image.path+currentPage.image.src;Element.setAttribute(this.imageEle,"alt",currentPage.image.alt);}
var calloutHeightAddition=-19;if(currentPage.calloutY){var tempContentStart=contentStart;for(var x=0,len=currentPage.calloutY.length;x<len;x++){Element.setXY(this.content[contentStart],null,currentPage.calloutY[x]+calloutHeightAddition);contentStart++;}}
if(currentPage.redArrow){contentStart=tempContentStart;for(var x=0,len=currentPage.redArrow.length;x<len;x++){if(currentPage.redArrow[x]!=0){Element.setStyle(this.content[contentStart],"background-position: "+currentPage.redArrow[x]+"px 2px;");}
contentStart++;}}
Events.remove(this.previousPage);Events.remove(this.nextPage);Events.add({element:this.previousPage,type:"click",handler:this.pagingEvent,context:this,data:{move:"previous"}});Events.add({element:this.nextPage,type:"click",handler:this.pagingEvent,context:this,data:{move:"next"}});this.resizeEvent();Element.setDisplay(this.thickbox,"block");Element.setDisplay(this.coverArea,"block");};ThickBox.prototype.toggleThickBox=function(e,el,data){Element.setDisplay(this.thickbox,"none");Element.setDisplay(this.coverArea,"none");};ThickBox.prototype.pagingEvent=function(e,el,data){if(data&&data.move){this.draw((data.move=="previous")?this.priorNum:this.nextNum);}};ThickBox.prototype.resizeEvent=function(e,el,data){if(this.thickbox){var winWidth=0,winHeight=0;if(typeof(window.innerWidth)=='number'){winWidth=window.innerWidth;winHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){winWidth=document.documentElement.clientWidth;winHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){winWidth=document.body.clientWidth;winHeight=document.body.clientHeight;}
var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
var contentAreaLocal=Element.getXY("wsod-main");Element.setXY(this.thickbox,contentAreaLocal.x+100,contentAreaLocal.y+135);var contentArea=Element.getSize(Element.get("wsod-content"));var totalWidth=2100;var totalHeight=contentArea.height+1000;if(winWidth<totalWidth&&winWidth+scrOfX<totalWidth){totalWidth=winWidth+scrOfX;}
if(winHeight<totalHeight&&winHeight+scrOfY<totalHeight){totalHeight=winHeight+scrOfY;}
Element.setSize(this.coverArea,totalWidth,totalHeight);}};var thickBox=new ThickBox();