// prototype.js
var Prototype={Version:'1.6.0',Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf('AppleWebKit/')>-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement('div').__proto__&&document.createElement('div').__proto__!==document.createElement('form').__proto__},ScriptFragment:'";var commentFound=false;var s=elt.firstChild;while(s){if(s.nodeType==Node.ELEMENT_NODE){var c=s.firstChild;while(c){if(c.nodeType==Node.COMMENT_NODE){commentFound=true;break;}
c=c.nextSibling;}
break;}
s=s.nextSibling;}
if(commentFound){this._xhtmlScriptMode=2;}else{this._xhtmlScriptMode=1;}}
return this._xhtmlScriptMode>1;}
A4J.AJAX._scriptEvaluated=false;A4J.AJAX.TestScriptEvaluation=function(){if((!document.all||window.opera)&&!A4J.AJAX._scriptTested){try{var oDomDoc=Sarissa.getDomDocument();var _span=document.createElement("span");document.body.appendChild(_span);var xmlString="A4J.AJAX._scriptEvaluated=true;";oDomDoc=(new DOMParser()).parseFromString(xmlString,"text/xml");var _script=oDomDoc.getElementsByTagName("script")[0];if(!window.opera&&_span.outerHTML){_span.outerHTML=new XMLSerializer().serializeToString(_script);}else{var importednode;importednode=window.document.importNode(_script,true);document.body.replaceChild(importednode,_span);}}catch(e){};}
A4J.AJAX._scriptTested=true;}
if(!window.LOG){window.LOG={};}
LOG.Level=function(name,priority,color){this.name=name;this.priority=priority;if(color){this.color=color;}}
LOG.OFF=new LOG.Level("off",1000);LOG.FATAL=new LOG.Level("fatal",900,"red");LOG.ERROR=new LOG.Level("error",800,"red");LOG.WARN=new LOG.Level("warn",500,"yellow");LOG.INFO=new LOG.Level("info",400,"blue");LOG.DEBUG=new LOG.Level("debug",300,"darkblue");LOG.ALL=new LOG.Level("all",100);LOG.A4J_DEBUG=new LOG.Level("a4j_debug",0,"green");LOG.LEVEL=LOG.OFF;LOG._window=null;LOG.transmitToServer=true;LOG.consoleDivId="logConsole";LOG.styles={a4j_debug:"green",debug:"darkblue",info:"blue",warn:"yellow",error:"red",fatal:"red"};LOG.a4j_debug=function(msg,pre)
{LOG._log(msg,LOG.A4J_DEBUG,pre);}
LOG.debug=function(msg,pre)
{LOG._log(msg,LOG.DEBUG,pre);}
LOG.info=function(msg,pre)
{LOG._log(msg,LOG.INFO,pre);}
LOG.warn=function(msg,pre)
{LOG._log(msg,LOG.WARN,pre);}
LOG.error=function(msg,pre)
{LOG._log(msg,LOG.ERROR,pre);}
LOG.fatal=function(msg,pre)
{LOG._log(msg,LOG.FATAL,pre);}
LOG.registerPopup=function(hotkey,name,width,height,level){if(!LOG._onkeydown){LOG._onkeydown=document.onkeydown;}
var key=hotkey.toUpperCase();document.onkeydown=function(e){if(window.event){e=window.event;};if(String.fromCharCode(e.keyCode)==key&e.shiftKey&e.ctrlKey){LOG.LEVEL=level;LOG.openWindow(name,'width='+width+',height='+height+',toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,left = '+((screen.width-width)/2)+',top ='+((screen.height-height)/2));}else{if(LOG._onkeydown)LOG._onkeydown(e);};}}
LOG.clear=function(){if(LOG._window&&LOG._window.document){consoleDiv=LOG._window.document.body;}else{consoleDiv=window.document.getElementById(LOG.consoleDivId);}
consoleDiv.innerHTML='
';}
LOG.openWindow=function(name,features){if(LOG._window){LOG._window.focus();}else{LOG._window=window.open("",name,features);LOG._window.LOG=LOG;LOG.clear();var _LOG=LOG;LOG._window.onunload=function(){_LOG._window.LOG=null;_LOG._window=null;_LOG.LEVEL=_LOG.OFF;_LOG=undefined;}}}
LOG._log=function(msg,logLevel,pre)
{if(logLevel.priority>=LOG.LEVEL.priority){LOG._logToConsole(msg,logLevel,pre);if(LOG.transmitToServer)
{LOG._logToServer(msg,logLevel);}}}
LOG._time=function(){var currentTime=new Date();var hours=currentTime.getHours();var minutes=currentTime.getMinutes();if(minutes<10){minutes="0"+minutes;}
var seconds=currentTime.getSeconds();if(seconds<10){seconds="0"+seconds;}
var millisec=currentTime.getTime()%1000;if(millisec<100){millisec="0"+millisec;}
if(millisec<10){millisec="0"+millisec;}
return hours+":"+minutes+":"+seconds+","+millisec;}
LOG._logToConsole=function(msg,logLevel,preformat)
{var consoleDiv;var doc;if(LOG._window&&LOG._window.document){doc=LOG._window.document;consoleDiv=LOG._window.document.body;}else{doc=window.document;consoleDiv=window.document.getElementById(LOG.consoleDivId);}
if(consoleDiv)
{var span=doc.createElement("span");span.style.color=logLevel.color;span.appendChild(doc.createTextNode(logLevel.name+"["+LOG._time()+"]: "));var div=doc.createElement("div");var textnode=doc.createTextNode(msg);div.appendChild(span);div.appendChild(textnode);if(preformat){var pre=doc.createElement("span");textnode=doc.createTextNode(preformat);pre.appendChild(textnode);div.appendChild(pre);}
consoleDiv.appendChild(div);}
else
{}}
LOG._logToServer=function(msg,logLevel)
{var data=logLevel.name.substring(0,1)+msg;}
LOG._requestCallBack=function()
{}
if(!window.RichFaces){window.RichFaces={};}
if(!window.RichFaces.Memory){window.RichFaces.Memory={cleaners:{},addCleaner:function(name,cleaner){this.cleaners[name]=cleaner;},applyCleaners:function(node){for(var name in this.cleaners){this.cleaners[name](node);}},clean:function(oldNode){if(oldNode){this.applyCleaners(oldNode);var all=oldNode.all;if(all){var counter=0;var length=all.length;for(var counter=0;counter=0&&oy>=0&&theBest.square=0&&oy>=0&&theBest.square=0&&oy>=0&&theBest.squares){ox=theBest.x;oy=theBest.y}}}}}}
element.style.left=ox+'px';element.style.top=oy+'px';};Richfaces.Position.getOffsetDimensions=function(element){element=$(element);var display=$(element).getStyle('display');if(display!='none'&&display!=null)
return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='block';var originalWidth=element.offsetWidth;var originalHeight=element.offsetHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};};Richfaces.Position.checkCollision=function(elementRect,windowRect,windowOffset)
{if(elementRect.left>=windowRect.left&&elementRect.top>=windowRect.top&&elementRect.right<=windowRect.right&&elementRect.bottom<=windowRect.bottom)
return 0;var rect={left:(elementRect.left>windowRect.left?elementRect.left:windowRect.left),top:(elementRect.top>windowRect.top?elementRect.top:windowRect.top),right:(elementRect.right=0||userAgent.indexOf("explorer")>=0)
return RichFaces.MSIE;if(userAgent.indexOf("firefox")>=0||userAgent.indexOf("iceweasel")>=0)
return RichFaces.FF;if(userAgent.indexOf("opera")>=0)
return RichFaces.OPERA;if(userAgent.indexOf("netscape")>=0)
return RichFaces.NETSCAPE;if(userAgent.indexOf("safari")>=0)
return RichFaces.SAFARI;if(userAgent.indexOf("konqueror")>=0)
return RichFaces.KONQ;return"OTHER";}
RichFaces.getOperaVersion=function(){var userAgent=navigator.userAgent.toLowerCase();var index=userAgent.indexOf("opera");if(index==-1)return;return parseFloat(userAgent.substring(index+6));}
RichFaces.getIEVersion=function(){var searchString="msie";var agent=navigator.userAgent.toLowerCase();var idx=agent.indexOf(searchString);if(idx!=-1){var versIdx=agent.indexOf(";",idx);var versString;if(versIdx!=-1){versString=agent.substring(idx+searchString.length,versIdx);}else{versString=agent.substring(idx+searchString.length);}
return parseFloat(versString);}else{return undefined;}}