if(typeof infosoftglobal=="undefined"){var infosoftglobal=new Object()}if(typeof infosoftglobal.FusionChartsUtil=="undefined"){infosoftglobal.FusionChartsUtil=new Object()}infosoftglobal.FusionCharts=function(C,A,I,F,K,D,G,J,B,E,H){if(!document.getElementById){return }this.initialDataSet=false;this.params=new Object();this.variables=new Object();this.attributes=new Array();if(C){this.setAttribute("swf",C)}if(A){this.setAttribute("id",A)}if(I){this.setAttribute("width",I)}if(F){this.setAttribute("height",F)}if(G){this.addParam("bgcolor",G)}this.addParam("quality","high");this.addParam("allowScriptAccess","always");this.addVariable("chartWidth",I);this.addVariable("chartHeight",F);K=K?K:0;this.addVariable("debugMode",K);this.addVariable("DOMId",A);D=D?D:0;this.addVariable("registerWithJS",D);J=J?J:"noScale";this.addVariable("scaleMode",J);B=B?B:"EN";this.addVariable("lang",B);this.detectFlashVersion=E?E:1;this.autoInstallRedirect=H?H:1;this.installedVer=infosoftglobal.FusionChartsUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){infosoftglobal.FusionCharts.doPrepUnload=true}};infosoftglobal.FusionCharts.prototype={setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(A,B){this.params[A]=B},getParams:function(){return this.params},addVariable:function(A,B){this.variables[A]=B},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var A=new Array();var B;var C=this.getVariables();for(B in C){A.push(B+"="+C[B])}return A},getSWFHTML:function(){var D="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){D='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"  ';D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var C=this.getParams();for(var A in C){D+=[A]+'="'+C[A]+'" '}var B=this.getVariablePairs().join("&");if(B.length>0){D+='flashvars="'+B+'"'}D+="/>"}else{D='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';D+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var A in C){D+='<param name="'+A+'" value="'+C[A]+'" />'}var B=this.getVariablePairs().join("&");if(B.length>0){D+='<param name="flashvars" value="'+B+'" />'}D+="</object>"}return D},setDataURL:function(A){if(this.initialDataSet==false){this.addVariable("dataURL",A);this.initialDataSet=true}else{var B=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));B.setDataURL(A)}},setDataXML:function(A){if(this.initialDataSet==false){this.addVariable("dataXML",A);this.initialDataSet=true}else{var B=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));B.setDataXML(A)}},render:function(A){if((this.detectFlashVersion==1)&&(this.installedVer.major<8)){if(this.autoInstallRedirect==1){var B=window.confirm("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same.");if(B){window.location="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"}else{return false}}else{return false}}else{var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();return true}}};infosoftglobal.FusionChartsUtil.getPlayerVersion=function(){var C=new infosoftglobal.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){C=new infosoftglobal.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var D=1;var B=3;while(D){try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new infosoftglobal.PlayerVersion([B,0,0])}catch(E){D=null}}}else{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new infosoftglobal.PlayerVersion([6,0,21]);D.AllowScriptAccess="always"}catch(E){if(C.major==6){return C}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(D!=null){C=new infosoftglobal.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","))}}}return C};infosoftglobal.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};infosoftglobal.FusionChartsUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};if(infosoftglobal.FusionCharts.doPrepUnload){if(!infosoftglobal.unloadSet){infosoftglobal.FusionChartsUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",infosoftglobal.FusionChartsUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",infosoftglobal.FusionChartsUtil.prepUnload);infosoftglobal.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}if(Array.prototype.push==null){Array.prototype.push=function(A){this[this.length]=A;return this.length}}infosoftglobal.FusionChartsUtil.getChartObject=function(A){if(window.document[A]){return window.document[A]}if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[A]){return document.embeds[A]}}else{return document.getElementById(A)}};var getChartFromId=infosoftglobal.FusionChartsUtil.getChartObject;var FusionCharts=infosoftglobal.FusionCharts
if(typeof document.attachEvent!="undefined"){window.attachEvent("onload",init);document.attachEvent("onmousemove",moveMouse);document.attachEvent("onclick",checkMove)}else{window.addEventListener("load",init,false);document.addEventListener("mousemove",moveMouse,false);document.addEventListener("click",checkMove,false)}var oDv=document.createElement("div");var dvHdr=document.createElement("div");var dvBdy=document.createElement("div");var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;boxOpen=false;ox=10;oy=10;lockX=0;lockY=0;function init(){oDv.appendChild(dvHdr);oDv.appendChild(dvBdy);oDv.style.position="absolute";oDv.style.visibility="hidden";oDv.style.zIndex="9600";document.body.appendChild(oDv)}function defHdrStyle(){dvHdr.innerHTML='<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;'+dvHdr.innerHTML;dvHdr.style.fontWeight="bold";dvHdr.style.width="212px";dvHdr.style.fontFamily="arial";dvHdr.style.border="1px solid #aaa";dvHdr.style.padding="2px";dvHdr.style.fontSize="11px";dvHdr.style.color="#333";dvHdr.style.background="#ccc";dvHdr.style.textAlign="center";dvHdr.style.filter="alpha(opacity=85)";dvHdr.style.opacity="0.85"}function defBdyStyle(){dvBdy.style.border="2px solid #00665C";dvBdy.style.width="auto";dvBdy.style.fontFamily="Tahoma";dvBdy.style.fontSize="12px";dvBdy.style.padding="4px 7px 4px 7px";dvBdy.style.color="#231F20";dvBdy.style.background="#fff"}function checkElemBO(A){if(!A||typeof (A)!="string"){return false}if((A.indexOf("header")>-1)&&(A.indexOf("body")>-1)&&(A.indexOf("[")>-1)&&(A.indexOf("[")>-1)){return true}else{return false}}function scanBO(A){if(checkElemBO(A.title)){A.boHDR=getParam("header",A.title);A.boBDY=getParam("body",A.title);A.boCSSBDY=getParam("cssbody",A.title);A.boCSSHDR=getParam("cssheader",A.title);A.IEbugfix=(getParam("hideselects",A.title)=="on")?true:false;A.fixX=parseInt(getParam("fixedrelx",A.title));A.fixY=parseInt(getParam("fixedrely",A.title));A.absX=parseInt(getParam("fixedabsx",A.title));A.absY=parseInt(getParam("fixedabsy",A.title));A.offY=(getParam("offsety",A.title)!="")?parseInt(getParam("offsety",A.title)):10;A.offX=(getParam("offsetx",A.title)!="")?parseInt(getParam("offsetx",A.title)):10;A.fade=(getParam("fade",A.title)=="on")?true:false;A.fadespeed=(getParam("fadespeed",A.title)!="")?getParam("fadespeed",A.title):0.04;A.delay=(getParam("delay",A.title)!="")?parseInt(getParam("delay",A.title)):0;if(getParam("requireclick",A.title)=="on"){A.requireclick=true;document.all?A.attachEvent("onclick",showHideBox):A.addEventListener("click",showHideBox,false);document.all?A.attachEvent("onmouseover",hideBox):A.addEventListener("mouseover",hideBox,false)}else{if(getParam("doubleclickstop",A.title)!="off"){document.all?A.attachEvent("ondblclick",pauseBox):A.addEventListener("dblclick",pauseBox,false)}if(getParam("singleclickstop",A.title)=="on"){document.all?A.attachEvent("onclick",pauseBox):A.addEventListener("click",pauseBox,false)}}A.windowLock=getParam("windowlock",A.title).toLowerCase()=="off"?false:true;A.title="";A.hasbox=1}else{A.hasbox=2}}function getParam(E,D){var C=new RegExp("([^a-zA-Z]"+E+"|^"+E+")\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]");var B=C.exec(D);var A;if(B){return B[2].replace("[[","[").replace("]]","]")}else{return""}}function Left(B){var A=0;if(B.calcLeft){return B.calcLeft}var C=B;while(B){if((B.currentStyle)&&(!isNaN(parseInt(B.currentStyle.borderLeftWidth)))&&(A!=0)){A+=parseInt(B.currentStyle.borderLeftWidth)}A+=B.offsetLeft;B=B.offsetParent}C.calcLeft=A;return A}function Top(B){var A=0;if(B.calcTop){return B.calcTop}var C=B;while(B){if((B.currentStyle)&&(!isNaN(parseInt(B.currentStyle.borderTopWidth)))&&(A!=0)){A+=parseInt(B.currentStyle.borderTopWidth)}A+=B.offsetTop;B=B.offsetParent}C.calcTop=A;return A}var ah,ab;function applyStyles(){if(ab){oDv.removeChild(dvBdy)}if(ah){oDv.removeChild(dvHdr)}dvHdr=document.createElement("div");dvBdy=document.createElement("div");CBE.boCSSBDY?dvBdy.className=CBE.boCSSBDY:defBdyStyle();CBE.boCSSHDR?dvHdr.className=CBE.boCSSHDR:defHdrStyle();dvHdr.innerHTML=CBE.boHDR;dvBdy.innerHTML=CBE.boBDY;ah=false;ab=false;if(CBE.boHDR!=""){oDv.appendChild(dvHdr);ah=true}if(CBE.boBDY!=""){oDv.appendChild(dvBdy);ab=true}}var CSE,iterElem,LSE,CBE,LBE,totalScrollLeft,totalScrollTop,width,height;var ini=false;function SHW(){if(document.body&&(document.body.clientWidth!=0)){width=document.body.clientWidth;height=document.body.clientHeight}if(document.documentElement&&(document.documentElement.clientWidth!=0)&&(document.body.clientWidth+20>=document.documentElement.clientWidth)){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight}return[width,height]}var ID=null;function moveMouse(A){A?evt=A:evt=event;CSE=evt.target?evt.target:evt.srcElement;if(!CSE.hasbox){iElem=CSE;while((iElem.parentNode)&&(!iElem.hasbox)){scanBO(iElem);iElem=iElem.parentNode}}if((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){if(!CSE.boxItem){iterElem=CSE;while((iterElem.hasbox==2)&&(iterElem.parentNode)){iterElem=iterElem.parentNode}CSE.boxItem=iterElem}iterElem=CSE.boxItem;if(CSE.boxItem&&(CSE.boxItem.hasbox==1)){LBE=CBE;CBE=iterElem;if(CBE!=LBE){applyStyles();if(!CBE.requireclick){if(CBE.fade){if(ID!=null){clearTimeout(ID)}ID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay)}else{if(ID!=null){clearTimeout(ID)}COL=1;ID=setTimeout("oDv.style.visibility='visible';ID=null;",CBE.delay)}}if(CBE.IEbugfix){hideSelects()}fixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;fixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;lockX=0;lockY=0;boxMove=true;ox=CBE.offX?CBE.offX:10;oy=CBE.offY?CBE.offY:10}}else{if(!isChild(CSE,dvHdr)&&!isChild(CSE,dvBdy)&&(boxMove)){if((!isChild(CBE,CSE))||(CSE.tagName!="TABLE")){CBE=null;fadeOut();showSelects()}}}LSE=CSE}else{if(((isChild(CSE,dvHdr)||isChild(CSE,dvBdy))&&(boxMove))){totalScrollLeft=0;totalScrollTop=0;iterElem=CSE;while(iterElem){if(!isNaN(parseInt(iterElem.scrollTop))){totalScrollTop+=parseInt(iterElem.scrollTop)}if(!isNaN(parseInt(iterElem.scrollLeft))){totalScrollLeft+=parseInt(iterElem.scrollLeft)}iterElem=iterElem.parentNode}if(CBE!=null){boxLeft=Left(CBE)-totalScrollLeft;boxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;boxTop=Top(CBE)-totalScrollTop;boxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;doCheck()}}}if(boxMove&&CBE){bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;mouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;mouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;if((CBE)&&(CBE.windowLock)){mouseY<-oy?lockY=-mouseY-oy:lockY=0;mouseX<-ox?lockX=-mouseX-ox:lockX=0;mouseY>(SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;mouseX>(SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX}oDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";oDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px"}}function doCheck(){if((mouseX<boxLeft)||(mouseX>boxRight)||(mouseY<boxTop)||(mouseY>boxBottom)){if(!CBE.requireclick){fadeOut()}if(CBE.IEbugfix){showSelects()}CBE=null}}function pauseBox(A){A?evt=A:evt=event;boxMove=false;evt.cancelBubble=true}function showHideBox(A){oDv.style.visibility=(oDv.style.visibility!="visible")?"visible":"hidden"}function hideBox(A){oDv.style.visibility="hidden"}var COL=0;var stopfade=false;function fadeIn(A){ID=null;COL=0;oDv.style.visibility="visible";fadeIn2(A)}function fadeIn2(A){COL=COL+A;COL=(COL>1)?1:COL;oDv.style.filter="alpha(opacity="+parseInt(100*COL)+")";oDv.style.opacity=COL;if(COL<1){setTimeout("fadeIn2("+A+")",20)}}function fadeOut(){oDv.style.visibility="hidden"}function isChild(A,B){while(A){if(A==B){return true}A=A.parentNode}return false}var cSrc;function checkMove(A){A?evt=A:evt=event;cSrc=evt.target?evt.target:evt.srcElement;if((!boxMove)&&(!isChild(cSrc,oDv))){fadeOut();if(CBE&&CBE.IEbugfix){showSelects()}boxMove=true;CBE=null}}function showSelects(){var A=document.getElementsByTagName("select");for(i=0;i<A.length;i++){A[i].style.visibility="visible"}}function hideSelects(){var A=document.getElementsByTagName("select");for(i=0;i<A.length;i++){A[i].style.visibility="hidden"}}
function checkSubmit(A){if(submitStarted){no_submit_block=false;return false}else{if(!no_submit_block){submitStarted=true;window.setTimeout("submitStarted=false",A*1000)}no_submit_block=false;return true}}
function selectall(B){for(var A=0;A<document.forms[B].elements.length;A++){if(document.forms[B].elements[A].type=="checkbox"){document.forms[B].elements[A].checked=true}}}function unselectall(B){for(var A=0;A<document.forms[B].elements.length;A++){if(document.forms[B].elements[A].type=="checkbox"){document.forms[B].elements[A].checked=false}}}
function CookieLib(){}CookieLib.COOKIE_DELIM=";";CookieLib.COOKIE_KEYVAL="=";CookieLib.ATTRIB_DELIM=";";CookieLib.ATTRIB_KEYVAL="=";function CookieLib_getRawCookie(A){var B=A+CookieLib.COOKIE_KEYVAL;if(document.cookie){if(document.cookie.length>0){offset=document.cookie.indexOf(B);if(offset!=-1){offset+=B.length;end=document.cookie.indexOf(CookieLib.COOKIE_DELIM,offset);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(offset,end))}}}return null}CookieLib.getRawCookie=CookieLib_getRawCookie;function CookieLib_setCookieAttrib(D,B,A){var C=CookieLib.getCookie(D);C[B]=A;CookieLib.setCookie(D,C)}CookieLib.setCookieAttrib=CookieLib_setCookieAttrib;function CookieLib_getCookieAttrib(C,A){var B=CookieLib.getCookie(C);return B[A]}CookieLib.getCookieAttrib=CookieLib_getCookieAttrib;function CookieLib_getCookie(H){var G=new Array();var D=CookieLib.getRawCookie(H);if(typeof (D)!="undefined"&&D!=null){var E=D.split(CookieLib.ATTRIB_DELIM);for(var C=0;C<E.length;C++){var B=E[C].indexOf(CookieLib.ATTRIB_KEYVAL);var A=E[C].substring(0,B);var F=E[C].substring(B+1);G[A]=F}}return G}CookieLib.getCookie=CookieLib_getCookie;function CookieLib_setCookie(E,D){var C="";for(var A in D){var B=D[A];if(typeof (B)!="undefined"&&B!=null&&B!=""&&typeof (B)!="function"){if(A.indexOf(CookieLib.ATTRIB_KEYVAL)<0&&B.indexOf(CookieLib.ATTRIB_KEYVAL)<0&&A.indexOf(CookieLib.ATTRIB_DELIM)<0&&B.indexOf(CookieLib.ATTRIB_DELIM)<0){C+=((C=="")?"":CookieLib.ATTRIB_DELIM);C+=(A+CookieLib.ATTRIB_KEYVAL+B)}else{alert("Cookie attribute name and/or value contains a delimeter ("+CookieLib.ATTRIB_KEYVAL+" or "+CookieLib.ATTRIB_DELIM+").")}}}document.cookie=E+CookieLib.COOKIE_KEYVAL+escape(C)}CookieLib.setCookie=CookieLib_setCookie
org_apache_myfaces_DateFormatSymbols=function(){this.eras=new Array("BC","AD");this.months=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Undecimber");this.shortMonths=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Und");this.weekdays=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");this.shortWeekdays=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");this.ampms=new Array("AM","PM");this.zoneStrings=new Array(new Array(0,"long-name","short-name"));var A=new Date();A.setYear(A.getYear()-80);this.twoDigitYearStart=A};org_apache_myfaces_SimpleDateFormatParserContext=function(){this.newIndex=0;this.retValue=0;this.year=0;this.ambigousYear=false;this.month=0;this.day=0;this.dayOfWeek=0;this.hour=0;this.min=0;this.sec=0;this.ampm=0;this.dateStr=""};org_apache_myfaces_SimpleDateFormat=function(A,B){this.pattern=A;this.dateFormatSymbols=B?B:new org_apache_myfaces_DateFormatSymbols()};org_apache_myfaces_SimpleDateFormat.prototype._handle=function(D,C,F){var E=0;var K=0;var G=false;var I=0;var J=0;var B=0;var H=null;var A=new org_apache_myfaces_SimpleDateFormatParserContext();if(C!=null){A.year=this._fullYearFromDate(C.getYear());A.month=C.getMonth();A.day=C.getDate();A.dayOfWeek=C.getDay();A.hour=C.getHours();A.min=C.getMinutes();A.sec=C.getSeconds()}while(E<this.pattern.length){J=this.pattern.charAt(E);if(E<(this.pattern.length-1)){B=this.pattern.charAt(E+1)}else{B=0}if(J=="'"&&I!="\\"){G=!G;E++}else{if(!G){if(J=="\\"&&I!="\\"){E++}else{if(H==null){H=""}H+=J;if(J!=B){this._handlePatternSub(A,H,D,K,F);H=null;if(A.newIndex<0){break}K=A.newIndex}E++}}else{if(F){if(this.pattern.charAt(E)!=D.charAt(K)){return null}}else{A.dateStr+=this.pattern.charAt(E)}E++;K++}}I=J}this._handlePatternSub(A,H,D,K,F);return A};org_apache_myfaces_SimpleDateFormat.prototype.parse=function(A){if(!A||A.length==0){return null}var B=this._handle(A,null,true);if(B.retValue==-1){return null}this._adjustTwoDigitYear(B);return this._createDateFromContext(B)};org_apache_myfaces_SimpleDateFormat.prototype._createDateFromContext=function(A){return new Date(A.year,A.month,A.day,A.hour,A.min,A.sec)};org_apache_myfaces_SimpleDateFormat.prototype.format=function(A){var B=this._handle(null,A,false);return B.dateStr};org_apache_myfaces_SimpleDateFormat.prototype._parseString=function(F,C,B,A){var E=C.substr(B);var D=this._prefixOf(A,E);if(D!=-1){F.retValue=D;F.newIndex=B+A[D].length;return F}F.retValue=-1;F.newIndex=-1;return F};org_apache_myfaces_SimpleDateFormat.prototype._parseNum=function(D,B,E,A){for(var C=Math.min(E,B.length-A);C>0;C--){var F=B.substring(A,A+C);D.retValue=this._parseInt(F);if(D.retValue==-1){continue}D.newIndex=A+C;return D}D.retValue=-1;D.newIndex=-1;return D};org_apache_myfaces_SimpleDateFormat.prototype._handlePatternSub=function(F,E,B,A,G){if(E==null||E.length==0){return }if(E.charAt(0)=="y"){if(G){this._parseNum(F,B,4,A);if((F.newIndex-A)<4){F.year=F.retValue+1900;F.ambigousYear=true}else{F.year=F.retValue}}else{this._formatNum(F,F.year,E.length<=3?2:4,true)}}else{if(E.charAt(0)=="M"){if(G){if(E.length==3){var D=B.substr(A,3);var C=this._indexOf(this.dateFormatSymbols.shortMonths,D);if(C!=-1){F.month=C;F.newIndex=A+3}}else{if(E.length>=4){var D=B.substr(A);var C=this._prefixOf(this.dateFormatSymbols.months,D);if(C!=-1){F.month=C;F.newIndex=A+this.dateFormatSymbols.months[C].length}}else{this._parseNum(F,B,2,A);F.month=F.retValue-1}}}else{if(E.length==3){F.dateStr+=this.dateFormatSymbols.shortMonths[F.month]}else{if(E.length>=4){F.dateStr+=this.dateFormatSymbols.months[F.month]}else{this._formatNum(F,F.month+1,E.length)}}}}else{if(E.charAt(0)=="d"){if(G){this._parseNum(F,B,2,A);F.day=F.retValue}else{this._formatNum(F,F.day,E.length)}}else{if(E.charAt(0)=="E"){if(G){if(E.length<=3){var D=B.substr(A,3);var C=this._indexOf(this.dateFormatSymbols.shortWeekdays,D);if(C!=-1){F.dayOfWeek=C;F.newIndex=A+3}}else{var D=B.substr(A);var C=this._prefixOf(this.dateFormatSymbols.weekdays,D);if(C!=-1){F.dayOfWeek=C;F.newIndex=A+this.dateFormatSymbols.weekdays[C].length}}}else{if(E.length<=3){F.dateStr+=this.dateFormatSymbols.shortWeekdays[F.dayOfWeek]}else{F.dateStr+=this.dateFormatSymbols.weekdays[F.dayOfWeek]}}}else{if(E.charAt(0)=="H"||E.charAt(0)=="h"){if(G){this._parseNum(F,B,2,A);F.hour=F.retValue}else{this._formatNum(F,F.hour,E.length)}}else{if(E.charAt(0)=="m"){if(G){this._parseNum(F,B,2,A);F.min=F.retValue}else{this._formatNum(F,F.min,E.length)}}else{if(E.charAt(0)=="s"){if(G){this._parseNum(F,B,2,A);F.sec=F.retValue}else{this._formatNum(F,F.sec,E.length)}}else{if(E.charAt(0)=="a"){if(G){this._parseString(F,B,A,this.dateFormatSymbols.ampms);F.ampm=F.retValue}else{F.dateStr+=this.dateFormatSymbols.ampms[F.ampm]}}else{if(G){F.newIndex=A+E.length}else{F.dateStr+=E}}}}}}}}}};org_apache_myfaces_SimpleDateFormat.prototype._formatNum=function(B,A,C,E){var D=A+"";while(D.length<C){D="0"+D}if(E&&D.length>C){D=D.substr(D.length-C)}B.dateStr+=D};org_apache_myfaces_SimpleDateFormat.prototype._indexOf=function(C,B){for(var A=0;A<C.length;++A){if(C[A]==B){return A}}return -1};org_apache_myfaces_SimpleDateFormat.prototype._prefixOf=function(C,B){for(var A=0;A<C.length;++A){if(B.indexOf(C[A])==0){return A}}return -1};org_apache_myfaces_SimpleDateFormat.prototype._parseInt=function(C){var B=0;for(var A=0;A<C.length;A++){var D=C.charAt(A);if(D<"0"||D>"9"){return -1}B=B*10+(D-"0")}return B};org_apache_myfaces_SimpleDateFormat.prototype._fullYearFromDate=function(B){var A=B+"";if(A.length<4){return B+1900}return B};org_apache_myfaces_SimpleDateFormat.prototype._adjustTwoDigitYear=function(C){if(C.ambigousYear){var B=this._createDateFromContext(C);var A=this.dateFormatSymbols.twoDigitYearStart;if(B.getTime()<A.getTime()){C.year+=100}}}
function scrollToElement(A){var B=document.getElementById(A);if(B!=null){window.scrollTo(findPosX(B),findPosY(B))}else{return }}function findPosX(A){var B=0;if(A.offsetParent){while(A.offsetParent){B+=A.offsetLeft;A=A.offsetParent}}else{if(A.x){B+=A.x}}return B}function findPosY(B){var A=0;if(B.offsetParent){while(B.offsetParent){A+=B.offsetTop;B=B.offsetParent}}else{if(B.y){A+=B.y}}return A}
var win=null;function NewWindow(F,D,A,C,E,B){if(E=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-A)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-C)-75)):100}if(E=="center"){myleft=(screen.width)?(screen.width-A)/2:100;mytop=(screen.height)?(screen.height-C)/2:100}if(E=="right"){myleft=(screen.width)?(screen.width-A-20):100;mytop=20}else{if((E!="center"&&E!="random")||E==null){myleft=0;mytop=20}}settings="width="+A+",height="+C+",top="+mytop+",left="+myleft+",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(F,D,settings);win.focus()}
function myfaces_picklist_addToSelected(A,B,D){var C=document.getElementById(A);var E=document.getElementById(B);myfaces_picklist_move(C,E,D);myfaces_picklist_updateHidden(E,D)}function myfaces_picklist_removeFromSelected(A,B,D){var C=document.getElementById(A);var E=document.getElementById(B);myfaces_picklist_move(E,C,D);myfaces_picklist_updateHidden(E,D)}function myfaces_picklist_move(E,C,D){var A=E.selectedIndex;if(A<0){return }for(var B=E.length-1;B>=0;B--){if(E.options.item(B).selected){C.appendChild(E.options.item(B))}}}function myfaces_picklist_moveUp(B,E){var D=document.getElementById(B);var A=D.selectedIndex;if(A<0){return }for(var C=1;C<D.length;C++){if(D.options.item(C).selected){myfaces_picklist_swapElements(D,C,C-1)}}myfaces_picklist_updateHidden(D,E)}function myfaces_picklist_moveDown(B,E){var D=document.getElementById(B);var A=D.selectedIndex;if(A<0){return }for(var C=D.length-2;C>=0;C--){if(D.options.item(C).selected){myfaces_picklist_swapElements(D,C,C+1)}}myfaces_picklist_updateHidden(D,E)}function myfaces_picklist_swapElements(B,E,D){var C=B.options[E].innerHTML;B.options[E].innerHTML=B.options[D].innerHTML;B.options[D].innerHTML=C;var A=B.options[E].value;B.options[E].value=B.options[D].value;B.options[D].value=A;B.options.item(E).selected=false;B.options.item(D).selected=true}function myfaces_picklist_updateHidden(E,D){var A=document.getElementById(D);var C=new Array(E.options.length);for(var B=0;B<E.options.length;B++){C[B]=E.options[B].value}A.value=C.join()}
calendarDir="/aqua/html/themes/aqua/images/calendar/";org_apache_myfaces_CalendarInitData=function(){this.fixedX=-1;this.fixedY=-1;this.startAt=1;this.showWeekNumber=1;this.showToday=1;this.imgDir=calendarDir;this.themePrefix="jscalendar-DB";this.gotoString="Go To Current Month";this.todayString="Today is";this.todayDateFormat=null;this.weekString="Wk";this.scrollLeftMessage="Click to scroll to previous month. Hold mouse button to scroll automatically.";this.scrollRightMessage="Click to scroll to next month. Hold mouse button to scroll automatically.";this.selectMonthMessage="Click to select a month.";this.selectYearMessage="Click to select a year.";this.selectDateMessage="Select [date] as date.";this.popupLeft=true;this.monthName=new Array("January","February","March","April","May","June","July","August","September","October","November","December");this.dayName=this.startAt==0?new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"):new Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun")};org_apache_myfaces_DateParts=function(E,C,A,B,F,D){this.sec=E;this.min=C;this.hour=A;this.date=B;this.month=F;this.year=D};org_apache_myfaces_HolidayRec=function(C,A,D,B){this.d=C;this.m=A;this.y=D;this.desc=B};org_apache_myfaces_PopupCalendar=function(){this.idPrefix="org_apache_myfaces_PopupCalendar";this.selectedDate=new org_apache_myfaces_DateParts(0,0,0,0,0,0);this.saveSelectedDate=new org_apache_myfaces_DateParts(0,0,0,0,0,0);this.monthConstructed=false;this.yearConstructed=false;this.intervalID1;this.intervalID2;this.timeoutID1;this.timeoutID2;this.ctlToPlaceValue;this.ctlNow;this.containerCtl;this.dateFormat="MM/dd/yyyy";this.nStartingYear;this.bPageLoaded=false;this.ie=document.all;this.dom=document.getElementById;this.ns4=document.layers;this.dateFormatSymbols=new org_apache_myfaces_DateFormatSymbols();this.initData=new org_apache_myfaces_CalendarInitData();this.today=new Date();this.dateNow=this.today.getDate();this.monthNow=this.today.getMonth();this.yearNow=this.today.getYear();this.imgSrc=new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif");this.img=new Array();this.calendarDiv;this.selectMonthDiv;this.selectYearDiv;this.todaySpan=null;this.captionSpan=null;this.contentSpan=null;this.closeCalendarSpan=null;this.monthSpan=null;this.yearSpan=null;this.changeMonthImg=null;this.changeYearImg=null;this.holidaysCounter=0;this.holidays=new Array();this.bClickOnCalendar=true;this.bCalendarHidden=true;this.myFacesCtlType="x:inputCalendar";this.inputDateClientId};org_apache_myfaces_PopupCalendar.prototype._hideElement=function(B){if(document.all){var A=document.getElementById(B.id+"_IFRAME");if(A==null){A=document.createElement("<iframe id='"+B.id+"_IFRAME' style='visibility:hidden; position: absolute; top:0px;left:0px;'/>");this.containerCtl.appendChild(A)}this._recalculateElement(B)}};org_apache_myfaces_PopupCalendar.prototype._recalculateElement=function(C){if(document.all){var B=document.getElementById(C.id+"_IFRAME");if(B){var A=C;A.style.zIndex=98;B.style.zIndex=A.style.zIndex-1;B.style.width=A.offsetWidth;B.style.height=A.offsetHeight;B.style.top=A.style.top;B.style.left=A.style.left;B.style.display="block";B.style.visibility="visible"}}};org_apache_myfaces_PopupCalendar.prototype._showElement=function(B){var A=document.getElementById(B.id+"_IFRAME");if(document.all&&A){A.style.display="none"}};org_apache_myfaces_PopupCalendar.prototype.addHoliday=function(C,A,D,B){this.holidays[this.holidaysCounter++]=new org_apache_myfaces_HolidayRec(C,A,D,B)};org_apache_myfaces_PopupCalendar.prototype._swapImage=function(B,A){if(B){B.setAttribute("src",calendarDir+A)}};org_apache_myfaces_PopupCalendar.prototype._keypresshandler=function(){try{if(event&&event.keyCode==27){this._hideCalendar()}}catch(A){}};org_apache_myfaces_PopupCalendar.prototype._clickhandler=function(){if(!this.bClickOnCalendar){this._hideCalendar()}this.bClickOnCalendar=false};org_apache_myfaces_PopupCalendar.prototype.init=function(E){if(this.dom){if(!this.calendarDiv){for(i=0;i<this.imgSrc.length;i++){this.img[i]=new Image}this.containerCtl=E;this.calendarDiv=document.createElement("div");this.calendarDiv.id=E.id+"_calendarDiv";this.calendarDiv.className=this.initData.themePrefix+"-div-style";Event.observe(this.calendarDiv,"click",function(){this.bClickOnCalendar=true}.bind(this),false);this.containerCtl.appendChild(this.calendarDiv);var C=document.createElement("table");C.setAttribute("style","width:"+((this.initData.showWeekNumber==1)?250:220)+"px;");C.className=this.initData.themePrefix+"-table-style";this.calendarDiv.appendChild(C);var K=document.createElement("tbody");C.appendChild(K);var F=document.createElement("tr");F.className=this.initData.themePrefix+"-title-background-style";K.appendChild(F);var O=document.createElement("td");F.appendChild(O);var P=document.createElement("table");P.setAttribute("style","width:"+((this.initData.showWeekNumber==1)?248:218)+"px;");var N=document.createElement("tbody");P.appendChild(N);O.appendChild(P);var M=document.createElement("tr");N.appendChild(M);var I=document.createElement("td");I.className=this.initData.themePrefix+"-title-style";M.appendChild(I);this.captionSpan=document.createElement("span");I.appendChild(this.captionSpan);var H=document.createElement("td");H.setAttribute("style","text-align:right;");M.appendChild(H);var R=document.createElement("a");R.setAttribute("href","#");Event.observe(R,"click",function(S){this._hideCalendar();Event.stop(S)}.bindAsEventListener(this),false);H.appendChild(R);this.closeCalendarSpan=document.createElement("span");R.appendChild(this.closeCalendarSpan);var G=document.createElement("tr");K.appendChild(G);var B=document.createElement("td");B.className=this.initData.themePrefix+"-body-style";G.appendChild(B);this.contentSpan=document.createElement("span");B.appendChild(this.contentSpan);if(this.initData.showToday==1){var D=document.createElement("tr");D.className=this.initData.themePrefix+"-today-style";K.appendChild(D);var A=document.createElement("td");A.className=this.initData.themePrefix+"-today-lbl-style";D.appendChild(A);this.todaySpan=document.createElement("span");A.appendChild(this.todaySpan)}this.selectMonthDiv=document.createElement("div");this.selectMonthDiv.id=this.containerCtl.id+"_selectMonthDiv";this.selectMonthDiv.className=this.initData.themePrefix+"-div-style";this.containerCtl.appendChild(this.selectMonthDiv);this.selectYearDiv=document.createElement("div");this.selectYearDiv.id=this.containerCtl.id+"_selectYearDiv";this.selectYearDiv.className=this.initData.themePrefix+"-div-style";this.containerCtl.appendChild(this.selectYearDiv);Event.observe(document,"keypress",this._keypresshandler.bind(this),false);Event.observe(document,"click",this._clickhandler.bind(this),false)}}if(!this.ns4){if(!this.ie){this.yearNow+=1900}this._hideCalendar();this.monthConstructed=false;this.yearConstructed=false;if(this.initData.showToday==1){this.todaySpan.appendChild(document.createTextNode(this.initData.todayString+" "));var Q=document.createElement("a");Q.className=this.initData.themePrefix+"-today-style";Q.setAttribute("title",this.initData.gotoString);Q.setAttribute("href","#");Q.appendChild(document.createTextNode(this._todayIsDate()));Event.observe(Q,"click",function(S){this.selectedDate.month=this.monthNow;this.selectedDate.year=this.yearNow;this._constructCalendar();Event.stop(S)}.bindAsEventListener(this),false);Event.observe(Q,"mousemove",function(){window.status=this.initData.gotoString}.bind(this),false);Event.observe(Q,"mouseout",function(){window.status=""}.bind(this),false);this.todaySpan.appendChild(Q)}this._appendNavToCaption("left");this._appendNavToCaption("right");this.monthSpan=document.createElement("span");this.monthSpan.className=this.initData.themePrefix+"-title-control-normal-style";Event.observe(this.monthSpan,"mouseover",function(S){this._swapImage(this.changeMonthImg,"drop2.gif");this.monthSpan.className=this.initData.themePrefix+"-title-control-select-style";window.status=this.selectMonthMessage}.bindAsEventListener(this),false);Event.observe(this.monthSpan,"mouseout",function(S){this._swapImage(this.changeMonthImg,"drop1.gif");this.monthSpan.className=this.initData.themePrefix+"-title-control-normal-style";window.status=""}.bindAsEventListener(this),false);Event.observe(this.monthSpan,"click",function(S){this._popUpMonth();Event.stop(S)}.bind(this),false);this.captionSpan.appendChild(this.monthSpan);this._appendNbsp(this.captionSpan);this.yearSpan=document.createElement("span");this.yearSpan.className=this.initData.themePrefix+"-title-control-normal-style";Event.observe(this.yearSpan,"mouseover",function(S){this._swapImage(this.changeYearImg,"drop2.gif");this.yearSpan.className=this.initData.themePrefix+"-title-control-select-style";window.status=this.selectYearMessage}.bindAsEventListener(this),false);Event.observe(this.yearSpan,"mouseout",function(S){this._swapImage(this.changeYearImg,"drop1.gif");this.yearSpan.className=this.initData.themePrefix+"-title-control-normal-style";window.status=""}.bindAsEventListener(this),false);Event.observe(this.yearSpan,"click",function(S){this._popUpYear();Event.stop(S)}.bind(this),false);this.captionSpan.appendChild(this.yearSpan);this._appendNbsp(this.captionSpan);this.bPageLoaded=true}};org_apache_myfaces_PopupCalendar.prototype._appendNavToCaption=function(B){var C=document.createElement("img");C.setAttribute("src",calendarDir+B+"1.gif");C.setAttribute("width","10px");C.setAttribute("height","11px");C.setAttribute("style","border:0px;");var A=document.createElement("span");this._createControl(B,A,C);this._appendNbsp(A);A.appendChild(C);this._appendNbsp(A);this.captionSpan.appendChild(A);this._appendNbsp(A)};org_apache_myfaces_PopupCalendar.prototype._createControl=function(B,A,C){A.className=this.initData.themePrefix+"-title-control-normal-style";Event.observe(A,"mouseover",function(D){this._swapImage(C,B+"2.gif");A.className=this.initData.themePrefix+"-title-control-select-style";if(B=="left"){window.status=this.scrollLeftMessage}else{window.status=this.scrollRightMessage}}.bindAsEventListener(this),false);Event.observe(A,"click",function(){if(B=="left"){this._decMonth()}else{this._incMonth()}}.bind(this),false);Event.observe(A,"mouseout",function(D){clearInterval(this.intervalID1);this._swapImage(C,B+"1.gif");A.className=""+this.initData.themePrefix+"-title-control-normal-style";window.status=""}.bindAsEventListener(this),false);Event.observe(A,"mousedown",function(){clearTimeout(this.timeoutID1);this.timeoutID1=setTimeout((function(){if(B=="left"){this._startDecMonth()}else{this._startIncMonth()}}).bind(this),500)}.bind(this),false);Event.observe(A,"mouseup",function(){clearTimeout(this.timeoutID1);clearInterval(this.intervalID1)}.bind(this),false)};org_apache_myfaces_PopupCalendar.prototype._appendNbsp=function(A){if(A){A.appendChild(document.createTextNode(String.fromCharCode(160)))}};org_apache_myfaces_PopupCalendar.prototype._todayIsDate=function(){var A=new org_apache_myfaces_SimpleDateFormat(this.initData.todayDateFormat?this.initData.todayDateFormat:this.dateFormat,this.dateFormatSymbols);return A.format(this.today)};org_apache_myfaces_PopupCalendar.prototype._hideCalendar=function(){this.calendarDiv.style.visibility="hidden";this.bCalendarHidden=true;if(this.selectMonthDiv.style!=null){this.selectMonthDiv.style.visibility="hidden"}if(this.selectYearDiv.style!=null){this.selectYearDiv.style.visibility="hidden"}this._showElement(this.selectMonthDiv);this._showElement(this.selectYearDiv);this._showElement(this.calendarDiv)};org_apache_myfaces_PopupCalendar.prototype._padZero=function(A){return(A<10)?"0"+A:A};org_apache_myfaces_PopupCalendar.prototype._constructDate=function(C,A,D){var B=new org_apache_myfaces_SimpleDateFormat(this.dateFormat,this.dateFormatSymbols);return B.format(new Date(D,A,C,this.selectedDate.hour,this.selectedDate.min,this.selectedDate.sec))};org_apache_myfaces_PopupCalendar.prototype._closeCalendar=function(){this._hideCalendar();if(this.myFacesCtlType!="x:inputDate"){this.ctlToPlaceValue.value=this._constructDate(this.selectedDate.date,this.selectedDate.month,this.selectedDate.year);var A=this.ctlToPlaceValue.getAttribute("onchange");if(A){this.ctlToPlaceValue.onchange()}}else{document.getElementById(this.myFacesInputDateClientId+".day").value=this.selectedDate.date;document.getElementById(this.myFacesInputDateClientId+".month").value=this.selectedDate.month+1;document.getElementById(this.myFacesInputDateClientId+".year").value=this.selectedDate.year}};org_apache_myfaces_PopupCalendar.prototype._startDecMonth=function(){this.intervalID1=setInterval((function(){this._decMonth}).bind(this),80)};org_apache_myfaces_PopupCalendar.prototype._startIncMonth=function(){this.intervalID1=setInterval((function(){this._incMonth}).bind(this),80)};org_apache_myfaces_PopupCalendar.prototype._incMonth=function(){this.selectedDate.month=this.selectedDate.month+1;if(this.selectedDate.month>11){this.selectedDate.month=0;this.selectedDate.year++}this._constructCalendar()};org_apache_myfaces_PopupCalendar.prototype._decMonth=function(){this.selectedDate.month=this.selectedDate.month-1;if(this.selectedDate.month<0){this.selectedDate.month=11;this.selectedDate.year--}this._constructCalendar()};org_apache_myfaces_PopupCalendar.prototype._removeAllChildren=function(A){while(A&&A.hasChildNodes()){A.removeChild(A.lastChild)}};org_apache_myfaces_PopupCalendar.prototype._constructMonth=function(){this._popDownYear();if(!this.monthConstructed){var B=document.createElement("table");B.setAttribute("style","width:70px;border-collapse:collapse;");B.className=this.initData.themePrefix+"-dropdown-style";this._removeAllChildren(this.selectMonthDiv);this.selectMonthDiv.appendChild(B);Event.observe(B,"mouseover",function(){clearTimeout(this.timeoutID1)}.bind(this),false);Event.observe(B,"mouseout",function(G){clearTimeout(this.timeoutID1);this.timeoutID1=setTimeout((function(){this._popDownMonth()}).bind(this),100);Event.stop(G)}.bindAsEventListener(this),false);var F=document.createElement("tbody");B.appendChild(F);for(i=0;i<12;i++){var C=this.initData.monthName[i];var E=null;if(i==this.selectedDate.month){E=document.createElement("span");E.setAttribute("style","font-weight:bold;");E.appendChild(document.createTextNode(C));E.setAttribute("userData",i)}else{E=document.createTextNode(C)}var A=document.createElement("tr");F.appendChild(A);var D=document.createElement("td");D.setAttribute("userData",i);A.appendChild(D);Event.observe(D,"mouseover",function(G){Event.element(G).className=this.initData.themePrefix+"-dropdown-select-style"}.bind(this),false);Event.observe(D,"mouseout",function(G){Event.element(G).className=this.initData.themePrefix+"-dropdown-normal-style"}.bind(this),false);Event.observe(D,"click",function(G){this.monthConstructed=false;this.selectedDate.month=parseInt(Event.element(G).getAttribute("userData"),10);this._constructCalendar();this._popDownMonth();Event.stop(G)}.bindAsEventListener(this),false);this._appendNbsp(D);D.appendChild(E);this._appendNbsp(D)}this.monthConstructed=true}};org_apache_myfaces_PopupCalendar.prototype._popUpMonth=function(){this._constructMonth();this.selectMonthDiv.style.visibility=(this.dom||this.ie)?"visible":"show";this.selectMonthDiv.style.left=this.calendarDiv.offsetLeft+50+"px";this.selectMonthDiv.style.top=this.calendarDiv.offsetTop+26+"px";this._hideElement(this.selectMonthDiv)};org_apache_myfaces_PopupCalendar.prototype._popDownMonth=function(){this.selectMonthDiv.style.visibility="hidden";this._showElement(this.selectMonthDiv)};org_apache_myfaces_PopupCalendar.prototype._incYear=function(){for(i=0;i<7;i++){newYear=(i+this.nStartingYear)+1;this._createAndAddYear(newYear,i)}this.nStartingYear++;this.bClickOnCalendar=true};org_apache_myfaces_PopupCalendar.prototype._createAndAddYear=function(B,C){var A=document.getElementById(this.containerCtl.getAttribute("id")+"y"+C);this._removeAllChildren(A);if(B==this.selectedDate.year){this._appendNbsp(A);var D=document.createElement("span");D.setAttribute("userData",B);D.appendChild(document.createTextNode(B));A.appendChild(D);this._appendNbsp(A)}else{this._appendNbsp(A);A.appendChild(document.createTextNode(B));this._appendNbsp(A)}A.setAttribute("userData",B)};org_apache_myfaces_PopupCalendar.prototype._decYear=function(){for(i=0;i<7;i++){newYear=(i+this.nStartingYear)-1;this._createAndAddYear(newYear,i)}this.nStartingYear--;this.bClickOnCalendar=true};org_apache_myfaces_PopupCalendar.prototype._constructYear=function(){this._popDownMonth();var E="";if(!this.yearConstructed){var K=document.createElement("table");K.setAttribute("style","width:44px;border-collapse:collapse;");K.className=this.initData.themePrefix+"-dropdown-style";this._removeAllChildren(this.selectYearDiv);this.selectYearDiv.appendChild(K);Event.observe(K,"mouseover",function(){clearTimeout(this.timeoutID2)}.bind(this),false);Event.observe(K,"mouseout",function(O){clearTimeout(this.timeoutID2);this.timeoutID2=setTimeout((function(){this._popDownYear()}).bind(this),100);Event.stop(O)}.bindAsEventListener(this),false);var D=document.createElement("tbody");K.appendChild(D);var B=document.createElement("tr");D.appendChild(B);var N=document.createElement("td");N.setAttribute("align","center");N.appendChild(document.createTextNode("-"));B.appendChild(N);Event.observe(N,"mouseover",function(O){Event.element(O).className=this.initData.themePrefix+"-dropdown-select-style"}.bindAsEventListener(this),false);Event.observe(N,"mouseout",function(O){clearInterval(this.intervalID1);Event.element(O).className=this.initData.themePrefix+"-dropdown-normal-style"}.bindAsEventListener(this),false);Event.observe(N,"mousedown",function(O){clearInterval(this.intervalID1);this.intervalID1=setInterval((function(){this._decYear()}).bind(this),30);Event.stop(O)}.bindAsEventListener(this),false);Event.observe(N,"mouseup",function(O){clearInterval(this.intervalID1);Event.stop(O)}.bindAsEventListener(this),false);this.nStartingYear=this.selectedDate.year-3;var F=0;for(i=this.selectedDate.year-3;i<=(this.selectedDate.year+3);i++){var G=i;var M=null;if(i==this.selectedDate.year){M=document.createElement("span");M.setAttribute("style","font-weight:bold;");M.appendChild(document.createTextNode(G));M.setAttribute("userData",G)}else{M=document.createTextNode(G)}var I=document.createElement("tr");D.appendChild(I);var A=document.createElement("td");A.setAttribute("userData",G);A.setAttribute("id",this.containerCtl.getAttribute("id")+"y"+F);I.appendChild(A);Event.observe(A,"mouseover",function(O){Event.element(O).className=this.initData.themePrefix+"-dropdown-select-style"}.bind(this),false);Event.observe(A,"mouseout",function(O){Event.element(O).className=this.initData.themePrefix+"-dropdown-normal-style"}.bind(this),false);Event.observe(A,"click",function(P){var O=Event.element(P);var Q=null;this.selectedDate.year=parseInt(this._formatInt(O.getAttribute("userData"),10));this.yearConstructed=false;this._popDownYear();this._constructCalendar();Event.stop(P)}.bindAsEventListener(this),false);this._appendNbsp(A);A.appendChild(M);this._appendNbsp(A);F++}var H=document.createElement("tr");D.appendChild(H);var C=document.createElement("td");C.setAttribute("align","center");C.appendChild(document.createTextNode("+"));H.appendChild(C);Event.observe(C,"mouseover",function(O){Event.element(O).className=this.initData.themePrefix+"-dropdown-select-style"}.bindAsEventListener(this),false);Event.observe(C,"mouseout",function(O){clearInterval(this.intervalID2);Event.element(O).className=this.initData.themePrefix+"-dropdown-normal-style"}.bindAsEventListener(this),false);Event.observe(C,"mousedown",function(O){clearInterval(this.intervalID2);this.intervalID2=setInterval((function(){this._incYear()}).bind(this),30)}.bindAsEventListener(this),false);Event.observe(C,"mouseup",function(O){clearInterval(this.intervalID2)}.bindAsEventListener(this),false);this.yearConstructed=true}};org_apache_myfaces_PopupCalendar.prototype._popDownYear=function(){clearInterval(this.intervalID1);clearTimeout(this.timeoutID1);clearInterval(this.intervalID2);clearTimeout(this.timeoutID2);this.selectYearDiv.style.visibility="hidden";this._showElement(this.selectYearDiv)};org_apache_myfaces_PopupCalendar.prototype._popUpYear=function(){var A;this._constructYear();this.selectYearDiv.style.visibility=(this.dom||this.ie)?"visible":"show";A=this.calendarDiv.offsetLeft+this.yearSpan.offsetLeft;if(this.ie){A+=6}this.selectYearDiv.style.left=A+"px";this.selectYearDiv.style.top=this.calendarDiv.offsetTop+26+"px";this._hideElement(this.selectYearDiv)};org_apache_myfaces_PopupCalendar.prototype._weekNbr=function(A){year=A.getFullYear();month=A.getMonth()+1;if(this.initData.startAt==0){day=A.getDate()+1}else{day=A.getDate()}a=Math.floor((14-month)/12);y=year+4800-a;m=month+12*a-3;b=Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);J=day+Math.floor((153*m+2)/5)+365*y+b-32045;d4=(((J+31741-(J%7))%146097)%36524)%1461;L=Math.floor(d4/1460);d1=((d4-L)%365)+L;week=Math.floor(d1/7)+1;return week};org_apache_myfaces_PopupCalendar.prototype._appendCell=function(B,C){var A=document.createElement("td");A.setAttribute("style","text-align:right;");if(C&&C!=""){A.appendChild(document.createTextNode(C))}else{this._appendNbsp(A)}B.appendChild(A)};org_apache_myfaces_PopupCalendar.prototype._getDateStyle=function(A){var B=this.initData.themePrefix+"-normal-day-style";if((A==this.dateNow)&&(this.selectedDate.month==this.monthNow)&&(this.selectedDate.year==this.yearNow)){B=this.initData.themePrefix+"-current-day-style"}else{if(dayPointer%7==(this.initData.startAt*-1)+1){B=this.initData.themePrefix+"-end-of-weekday-style"}}if((A==this.saveSelectedDate.date)&&(this.selectedDate.month==this.saveSelectedDate.month)&&(this.selectedDate.year==this.saveSelectedDate.year)){B+=" "+this.initData.themePrefix+"-selected-day-style"}for(k=0;k<this.holidaysCounter;k++){if((parseInt(this._formatInt(this.holidays[k].d),10)==A)&&(parseInt(this._formatInt(this.holidays[k].m),10)==(this.selectedDate.month+1))){if((parseInt(this._formatInt(this.holidays[k].y),10)==0)||((parseInt(this._formatInt(this.holidays[k].y),10)==this.selectedDate.year)&&(parseInt(this._formatInt(this.holidays[k].y),10)!=0))){B+=" "+this.initData.themePrefix+"-holiday-style"}}}return B};org_apache_myfaces_PopupCalendar.prototype._getHolidayHint=function(B){var A="";for(k=0;k<this.holidaysCounter;k++){if((parseInt(this._formatInt(this.holidays[k].d),10)==B)&&(parseInt(this._formatInt(this.holidays[k].m),10)==(this.selectedDate.month+1))){if((parseInt(this._formatInt(this.holidays[k].y),10)==0)||((parseInt(this._formatInt(this.holidays[k].y),10)==this.selectedDate.year)&&(parseInt(this._formatInt(this.holidays[k].y),10)!=0))){A+=A==""?this.holidays[k].desc:"\n"+this.holidays[k].desc}}}return A};org_apache_myfaces_PopupCalendar.prototype._constructCalendar=function(){var K=Array(31,0,31,30,31,30,31,31,30,31,30,31);var N;var C=new Date(this.selectedDate.year,this.selectedDate.month,1);var Q;if(this.selectedDate.month==1){Q=new Date(this.selectedDate.year,this.selectedDate.month+1,1);Q=new Date(Q-(24*60*60*1000));numDaysInMonth=Q.getDate()}else{numDaysInMonth=K[this.selectedDate.month]}datePointer=0;dayPointer=C.getDay()-this.initData.startAt;if(dayPointer<0){dayPointer=6}this._removeAllChildren(this.contentSpan);var R=document.createElement("table");R.setAttribute("style","border:0px;");R.className=this.initData.themePrefix+"-body-style";this.contentSpan.appendChild(R);var B=document.createElement("tbody");R.appendChild(B);var H=document.createElement("tr");B.appendChild(H);if(this.initData.showWeekNumber==1){var E=document.createElement("td");E.setAttribute("style","width:27px;font-weight:bold;");H.appendChild(E);E.appendChild(document.createTextNode(this.initData.weekString));var I=document.createElement("td");I.setAttribute("style","width:1px;");I.setAttribute("rowSpan","7");I.className=this.initData.themePrefix+"-weeknumber-div-style";H.appendChild(I);var T=document.createElement("img");T.setAttribute("src",calendarDir+"divider.gif");T.setAttribute("style","width:1px;");I.appendChild(T)}for(P=0;P<7;P++){var S=document.createElement("td");S.setAttribute("style","width:27px;text-align:right;font-weight:bold;");H.appendChild(S);S.appendChild(document.createTextNode(this.initData.dayName[P]))}var U=document.createElement("tr");B.appendChild(U);if(this.initData.showWeekNumber==1){this._appendCell(U,this._weekNbr(C)+" ")}for(var P=1;P<=dayPointer;P++){this._appendCell(U)}for(datePointer=1;datePointer<=numDaysInMonth;datePointer++){dayPointer++;var A=document.createElement("td");A.setAttribute("style","text-align:right;");U.appendChild(A);var D=this._getDateStyle(datePointer);var O=this._getHolidayHint(datePointer);var V=D+" "+this.initData.themePrefix+"-would-be-selected-day-style";var M=D;var G=document.createElement("a");G.className=D;G.setAttribute("href","#");G.setAttribute("title","sHint");G.sNormalStyle=M;G.sSelectStyle=V;G.datePointer=datePointer;A.appendChild(G);Event.observe(G,"mousemove",function(W){window.status=this.initData.selectDateMessage.replace("[date]",this._constructDate(datePointer,this.selectedDate.month,this.selectedDate.year))}.bindAsEventListener(this),false);Event.observe(G,"mouseout",function(X){var W=Event.element(X);W.className=W.sNormalStyle;window.status=""}.bindAsEventListener(this),false);Event.observe(G,"click",function(X){var W=Event.element(X);this.selectedDate.date=W.datePointer;this._closeCalendar();Event.stop(X)}.bindAsEventListener(this),false);Event.observe(G,"mouseover",function(X){var W=Event.element(X);W.className=W.sSelectStyle}.bindAsEventListener(this),false);this._appendNbsp(G);G.appendChild(document.createTextNode(datePointer));this._appendNbsp(G);if((dayPointer+this.initData.startAt)%7==this.initData.startAt){U=document.createElement("tr");B.appendChild(U);if((this.initData.showWeekNumber==1)&&(datePointer<numDaysInMonth)){this._appendCell(U,this._weekNbr(new Date(this.selectedDate.year,this.selectedDate.month,datePointer+1))+" ")}}}this._removeAllChildren(this.monthSpan);this._appendNbsp(this.monthSpan);this.monthSpan.appendChild(document.createTextNode(this.initData.monthName[this.selectedDate.month]));this._appendNbsp(this.monthSpan);this.changeMonthImg=document.createElement("img");this.changeMonthImg.setAttribute("src",calendarDir+"drop1.gif");this.changeMonthImg.setAttribute("width","12px");this.changeMonthImg.setAttribute("height","10px");this.changeMonthImg.setAttribute("style","border:0px;");this.monthSpan.appendChild(this.changeMonthImg);this._removeAllChildren(this.yearSpan);this._appendNbsp(this.yearSpan);this.yearSpan.appendChild(document.createTextNode(this.selectedDate.year));this._appendNbsp(this.yearSpan);this.changeYearImg=document.createElement("img");this.changeYearImg.setAttribute("src",calendarDir+"drop1.gif");this.changeYearImg.setAttribute("width","12px");this.changeYearImg.setAttribute("height","10px");this.changeYearImg.setAttribute("style","border:0px;");this.yearSpan.appendChild(this.changeYearImg);this._removeAllChildren(this.closeCalendarSpan);var F=document.createElement("img");F.setAttribute("src",calendarDir+"close.gif");F.setAttribute("width","15px");F.setAttribute("height","13px");F.setAttribute("style","border:0px;");F.setAttribute("alt","Close the calendar");this.closeCalendarSpan.appendChild(F);this._recalculateElement(this.calendarDiv)};org_apache_myfaces_PopupCalendar.prototype._popUpCalendar=function(A,F,E){if(this.bPageLoaded){if(this.calendarDiv.style.visibility=="hidden"){this.ctlToPlaceValue=F;this.dateFormat=E;var D=new org_apache_myfaces_SimpleDateFormat(this.dateFormat,this.dateFormatSymbols);var C=D.parse(F.value);if(C){this.selectedDate.sec=C.getSeconds();this.selectedDate.min=C.getMinutes();this.selectedDate.hour=C.getHours();this.selectedDate.date=C.getDate();this.selectedDate.month=C.getMonth();var B=C.getYear()+"";if(B.length<4){B=(parseInt(B,10)+1900)+""}this.selectedDate.year=parseInt(B,10)}else{this.selectedDate.date=this.dateNow;this.selectedDate.month=this.monthNow;this.selectedDate.year=this.yearNow}this._popUpCalendar_Show(A)}else{this._hideCalendar();if(this.ctlNow!=A){this._popUpCalendar(A,F,E)}}this.ctlNow=A}};org_apache_myfaces_PopupCalendar.prototype._popUpCalendarForInputDate=function(A,B){if(this.bPageLoaded){this.myFacesCtlType="x:inputDate";this.myFacesInputDateClientId=A;this.dateFormat=B;this.selectedDate.date=parseInt(this._formatInt(document.getElementById(A+".day").value),10);this.selectedDate.month=parseInt(this._formatInt(document.getElementById(A+".month").value),10)-1;this.selectedDate.year=parseInt(this._formatInt(document.getElementById(A+".year").value),10);this.ctlNow=document.getElementById(A+".day");this._popUpCalendar_Show(document.getElementById(A+".day"))}};org_apache_myfaces_PopupCalendar.prototype._popUpCalendar_Show=function(F){this.saveSelectedDate.date=this.selectedDate.date;this.saveSelectedDate.month=this.selectedDate.month;this.saveSelectedDate.year=this.selectedDate.year;var D=0;var E=0;var K=F;try{do{K=K.offsetParent;D+=K.offsetLeft;E+=K.offsetTop}while(K.tagName!="BODY")}catch(H){}var G=0;var B=0;K=F;try{do{G+=K.scrollLeft;B+=K.scrollTop;K=K.parentNode}while(K.tagName!="BODY")}catch(H){}var M=this._getVisibleBodyRectangle();var A=this.calendarDiv;var I=F.offsetTop+E-B+F.offsetHeight+2;var C=F.offsetLeft+D-G;if(this.initData.popupLeft){C-=A.offsetWidth}if(C+A.offsetWidth>M.right){C=M.right-A.offsetWidth}if(I+A.offsetHeight>M.bottom){I=M.bottom-A.offsetHeight}if(C<M.left){C=M.left}if(I<M.top){I=M.top}this._constructCalendar(1,this.selectedDate.month,this.selectedDate.year);this.calendarDiv.style.visibility=(this.dom||this.ie)?"visible":"show";this.bCalendarHidden=false;setTimeout((function(){this._hideElement(this.calendarDiv)}).bind(this),200);this._hideElement(this.calendarDiv);this.bClickOnCalendar=true};org_apache_myfaces_PopupCalendar.prototype._getVisibleBodyRectangle=function(){var A=new org_apache_myfaces_Rectangle();if(window.pageYOffset!=undefined){A.top=window.pageYOffset;A.left=window.pageXOffset}else{if(document.body&&document.body.scrollTop){A.top=document.body.scrollTop;A.left=document.body.scrollLeft}else{if(document.documentElement&&document.documentElement.scrollTop){A.top=document.documentElement.scrollTop;A.left=document.documentElement.scrollLeft}}}if(window.innerWidth!=undefined){A.right=A.left+window.innerWidth;A.bottom=A.top+window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){A.right=A.left+document.documentElement.clientWidth;A.bottom=A.top+document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){A.right=A.left+document.body.clientWidth;A.bottom=A.top+document.body.clientHeight}}}return A};function org_apache_myfaces_Rectangle(){this.top=0;this.left=0;this.bottom=0;this.right=0}org_apache_myfaces_PopupCalendar.prototype._formatInt=function(A){if(typeof A=="string"){if(A.charAt&&A.charAt(0)=="0"){return A.charAt(1)}}return A}
var Prototype={Version:"1.4.0_pre11",emptyFunction:function(){},K:function(A){return A}};Class.create=function(){return function(){this.initialize.apply(this,arguments)}};var Abstract=new Object();Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Function.prototype.bind=function(B){var A=this;return function(){return A.apply(B,arguments)}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){return A.call(B,C||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0;B<arguments.length;B++){var A=arguments[B];try{C=A();break}catch(D){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?A.childNodes[0].nodeValue:""},toQueryParams:function(){var A=this.match(/^\??(.*)$/)[1].split("&");return A.inject({},function(D,B){var C=B.split("=");D[C[0]]=C[1];return D})},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(D){try{B(D,A++)}catch(E){if(E!=$continue){throw E}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){if(!(A&=(B||Prototype.K)(D,C))){throw $break}});return A},any:function(B){var A=true;this.each(function(D,C){if(A&=(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push(B(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.collect(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D>=(A||D)){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D<=(A||D)){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){B(E=C.pluck(D));return E})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(C){if(C.toArray){return C.toArray()}else{var B=[];for(var A=0;A<C.length;A++){B.push(C[A])}return B}};Object.extend(Array.prototype,Enumerable);Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(A){for(key in this){var B=this[key];if(typeof B=="function"){continue}var C=[key,B];C.key=key;C.value=B;A(C)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject($H(this),function(B,C){B[C.key]=C.value;return B})},toQueryString:function(){return this.map(function(A){return A.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(A){var B=Object.extend({},A||{});Object.extend(B,Enumerable);Object.extend(B,Hash);return B}var Range=Class.create();Object.extend(Range.prototype,Enumerable);Object.extend(Range.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;do{A(B);B=B.succ()}while(this.include(B))},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new Range(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(E[D]&&typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,A||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(B){var C=this.options.parameters||"";if(C.length>0){C+="&_="}try{this.url=B;if(this.options.method=="get"){this.url+="?"+C}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var A=this.options.postBody?this.options.postBody:C;this.transport.send(this.options.method=="post"?A:null)}catch(D){}},setRequestHeaders:function(){var B=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){B.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType){B.push("Connection","close")}}if(this.options.requestHeaders){B.push.apply(B,this.options.requestHeaders)}for(var A=0;A<B.length;A+=2){this.transport.setRequestHeader(B[A],B[A+1])}},onStateChange:function(){var A=this.transport.readyState;if(A!=1){this.respondToReadyState(this.transport.readyState)}},evalJSON:function(){try{var json=this.transport.getResponseHeader("X-JSON"),object;object=eval(json);return object}catch(e){}},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var D=this.transport,B=this.evalJSON();if(C=="Complete"){(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(D,B)}(this.options["on"+C]||Prototype.emptyFunction)(D,B);Ajax.Responders.dispatch("on"+C,this,D,B);if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}}});Ajax.Updater=Class.create();Ajax.Updater.ScriptFragment="(?:<script.*?>)((\n|.)*?)(?:<\/script>)";Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var receiver=this.responseIsSuccess()?this.containers.success:this.containers.failure;var match=new RegExp(Ajax.Updater.ScriptFragment,"img");var response=this.transport.responseText.replace(match,"");var scripts=this.transport.responseText.match(match);if(receiver){if(this.options.insertion){new this.options.insertion(receiver,response)}else{receiver.innerHTML=response}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}if(this.options.evalScripts&&scripts){match=new RegExp(Ajax.Updater.ScriptFragment,"im");setTimeout((function(){for(var i=0;i<scripts.length;i++){eval(scripts[i].match(match)[1])}}).bind(this),10)}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=1;this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Ajax.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(C,A){var B=(document.body||$(A)).getElementsByTagName("*");return $A(B).inject([],function(D,E){if(Element.hasClassName(E,C)){D.push(E)}return D})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(A){return $(A).style.display!="none"},toggle:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);Element[Element.visible(A)?"show":"hide"](A)}},hide:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display="none"}},show:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display=""}},remove:function(A){A=$(A);A.parentNode.removeChild(A)},getHeight:function(A){A=$(A);return A.offsetHeight},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).include(B)},addClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).add(B)},removeClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).remove(B)},cleanWhitespace:function(B){B=$(B);for(var A=0;A<B.childNodes.length;A++){var C=B.childNodes[A];if(C.nodeType==3&&!/\S/.test(C.nodeValue)){Element.remove(C)}}},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},scrollTo:function(B){B=$(B);var A=B.x?B.x:B.offsetLeft,C=B.y?B.y:B.offsetTop;window.scrollTo(A,C)}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(A,B){this.element=$(A);this.content=B;if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(C){if(this.element.tagName.toLowerCase()=="tbody"){this.fragment=this.contentFromAnonymousTable();this.insertContent()}else{throw C}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.fragment=this.range.createContextualFragment(this.content);this.insertContent()}},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return A.childNodes[0].childNodes[0].childNodes[0]}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(){this.element.parentNode.insertBefore(this.fragment,this.element)}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(){this.element.insertBefore(this.fragment,this.element.firstChild)}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(){this.element.appendChild(this.fragment)}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(){this.element.parentNode.insertBefore(this.fragment,this.element.nextSibling)}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){$(A).focus();$(A).select()}};var Form={serialize:function(D){var E=Form.getElements($(D));var C=new Array();for(var B=0;B<E.length;B++){var A=Form.Element.serialize(E[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(B){var B=$(B);var C=new Array();for(tagName in Form.Element.Serializers){var D=B.getElementsByTagName(tagName);for(var A=0;A<D.length;A++){C.push(D[A])}}return C},getInputs:function(F,C,D){var F=$(F);var A=F.getElementsByTagName("input");if(!C&&!D){return A}var G=new Array();for(var E=0;E<A.length;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}G.push(B)}return G},disable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.blur();A.disabled="true"}},enable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.disabled=""}},focusFirstElement:function(C){var C=$(C);var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];if(A.type!="hidden"&&!A.disabled){Field.activate(A);break}}},reset:function(A){$(A).reset()}};Form.Element={serialize:function(A){var A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return encodeURIComponent(B[0])+"="+encodeURIComponent(B[1])}},getValue:function(A){var A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return B[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(C){var D="",B,A=C.selectedIndex;if(A>=0){B=C.options[A];D=B.value;if(!D&&!("value" in B)){D=B.text}}return[C.name,D]},selectMany:function(C){var D=new Array();for(var B=0;B<C.length;B++){var A=C.options[B];if(A.selected){var E=A.value;if(!E&&!("value" in A)){E=A.text}D.push(E)}}return[C.name,D]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":A.target=this;A.prev_onclick=A.onclick||Prototype.emptyFunction;A.onclick=function(){this.prev_onclick();this.target.onElementEvent()};break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":A.target=this;A.prev_onchange=A.onchange||Prototype.emptyFunction;A.onchange=function(){this.prev_onchange();this.target.onElementEvent()};break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},clone:function(B,C){B=$(B);C=$(C);C.style.position="absolute";var A=this.cumulativeOffset(B);C.style.top=A[1]+"px";C.style.left=A[0]+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"}}
var tb_pathToImage="/bite/html/themes/bite/images/loading.gif";jQuery(document).ready(function(){imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(A){jQuery(A).click(function(){var C=this.title||this.name||null;var B=this.href||this.alt;var D=this.rel||false;tb_show(C,B,D);this.blur();return false})}function tb_show(I,B,G){try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{jQuery("#TB_overlay").addClass("TB_overlayBG")}if(I===null){I=""}jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");jQuery("#TB_load").show();var C;if(B.indexOf("?")!==-1){C=B.substr(0,B.indexOf("?"))}else{C=B}var E=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var J=C.toLowerCase().match(E);if(J==".jpg"||J==".jpeg"||J==".png"||J==".gif"||J==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(G){TB_TempArray=jQuery("a[@rel="+G+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var F=TB_TempArray[TB_Counter].href.toLowerCase().match(E);if(!(TB_TempArray[TB_Counter].href==B)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var N=tb_getPageSize();var L=N[0]-150;var Q=N[1]-150;var M=imgPreloader.width;var K=imgPreloader.height;if(M>L){K=K*(L/M);M=L;if(K>Q){M=M*(Q/K);K=Q}}else{if(K>Q){M=M*(Q/K);K=Q;if(M>L){K=K*(L/M);M=L}}}TB_WIDTH=M+30;TB_HEIGHT=K+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+B+"' width='"+M+"' height='"+K+"' alt='"+I+"'/></a><div id='TB_caption'>"+I+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");jQuery("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function P(){if(jQuery(document).unbind("click",P)){jQuery(document).unbind("click",P)}jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,G);return false}jQuery("#TB_prev").click(P)}if(!(TB_NextHTML==="")){function O(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,G);return false}jQuery("#TB_next").click(O)}document.onkeydown=function(R){if(R==null){keycode=event.keyCode}else{keycode=R.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";O()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";P()}}}}};tb_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(tb_remove);jQuery("#TB_window").css({display:"block"})};imgPreloader.src=B}else{var A=B.replace(/^[^\?]+\??/,"");var D=tb_parseQuery(A);TB_WIDTH=(D["width"]*1)+30||630;TB_HEIGHT=(D["height"]*1)+40||440;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT;if(B.indexOf("TB_iframe")!=-1){urlNoQuery=B.split("TB_");jQuery("#TB_iframeContent").remove();if(D["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+I+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if(jQuery("#TB_window").css("display")!="block"){if(D["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+I+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";jQuery("#TB_ajaxContent")[0].scrollTop=0;jQuery("#TB_ajaxWindowTitle").html(I)}}jQuery("#TB_closeWindowButton").click(tb_remove);if(B.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").append(jQuery("#"+D["inlineId"]).children());jQuery("#TB_window").unload(function(){jQuery("#"+D["inlineId"]).append(jQuery("#TB_ajaxContent").children())});tb_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}else{if(B.indexOf("TB_iframe")!=-1){tb_position();if(jQuery.browser.safari){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}}else{jQuery("#TB_ajaxContent").load(B+="&random="+(new Date().getTime()),function(){tb_position();jQuery("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");jQuery("#TB_window").css({display:"block"})})}}}if(!D["modal"]){document.onkeyup=function(K){if(K==null){keycode=event.keyCode}else{keycode=K.which}if(keycode==27){tb_remove()}}}}catch(H){}}function tb_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}function tb_remove(){jQuery("#TB_imageOff").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").fadeOut("fast",function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove();AjaxExtUtil.blockRequests=false});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){jQuery("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){jQuery("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(D){var E={};if(!D){return E}var A=D.split(/[;&]/);for(var C=0;C<A.length;C++){var G=A[C].split("=");if(!G||G.length!=2){continue}var B=unescape(G[0]);var F=unescape(G[1]);F=F.replace(/\+/g," ");E[B]=F}return E}function tb_getPageSize(){var C=document.documentElement;var A=window.innerWidth||self.innerWidth||(C&&C.clientWidth)||document.body.clientWidth;var B=window.innerHeight||self.innerHeight||(C&&C.clientHeight)||document.body.clientHeight;arrayPageSize=[A,B];return arrayPageSize}function tb_detectMacXFF(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("mac")!=-1&&A.indexOf("firefox")!=-1){return true}}
Liferay.Portlet.ready(function(A,B){B.find("input[@title]").each(function(C){if(jQuery(this).val()==""||jQuery(this).val()==jQuery(this).attr("title")){jQuery(this).attr("value",jQuery(this).attr("title"));jQuery(this).addClass("gray")}}).focus(function(C){$field=jQuery(C.target);if($field.val()==$field.attr("title")){$field.val("");$field.removeClass("gray")}}).blur(function(C){$field=jQuery(C.target);if($field.val()==""){$field.val($field.attr("title"));$field.addClass("gray")}})});function caClearTitledInput(A){jQuery(A).parents("table:first").find("input[@title]").each(function(B,D){var C=jQuery(D);if(C.val()==C.attr("title")){C.val("")}})}
function treeNavClick(F,L,H,G,K,I,C,J,D){var E=document.getElementById(F);var M=E.style.display;if(M=="none"){M="block";CookieLib.setCookieAttrib(J,D,"x")}else{M="none";CookieLib.setCookieAttrib(J,D,"c")}E.style.display=M;var B=document.getElementById(L);if(B.src.indexOf(H)>=0){B.src=G}else{B.src=H}if(K!=""){var A=document.getElementById(K);if(A.src.indexOf(I)>=0){A.src=C}else{A.src=I}}}
function display(id) {
     if (document.getElementById(id).style.display == 'none') {
         document.getElementById(id).style.display = 'block';
         // hide all flash objects
         _$J("object").css("visibility","hidden");
     }
	 else {
		 document.getElementById(id).style.display = 'none';
	 	 // show all flash objects
	 	 _$J("object").css("visibility","visible");
	 }
}

function showElem(id) {
	document.getElementById(id).style.display = 'block';
	// hide all flash objects
	_$J("object").css("visibility","hidden");
}

function hideElem(id) {
	 document.getElementById(id).style.display = 'none';
	 // show all flash objects
	 _$J("object").css("visibility","visible");
}

function displayTable(id) {
     if (document.getElementById(id).style.display == 'none') {
         document.getElementById(id).style.display = 'table';
     }
	 else {
		 document.getElementById(id).style.display = 'none';
	 }
}

function foldUnfold(idDiv, idFold) {
	display(idDiv); 
	if (document.getElementById(idDiv).style.display == 'none') {
		document.getElementById(idFold.id + "_foldUnfold").className = "unfold"
	}
	else document.getElementById(idFold.id + "_foldUnfold").className = "fold"

}

function AppearFade(id) {
	if (document.getElementById(id).style.display == 'none') {
			if (jQuery.browser.msie)
				document.getElementById(id).style.display = 'block';
			else
				document.getElementById(id).style.display = 'table-row';
	  }
}

document.getByClassName=function(c){
      var NL=document.getElementsByTagName("*");
      var C=null;
      var elements=new Array();
      for(var i=0;i<NL.length;i++){
        C=NL[i].className.split(/\s+/);
        for(var j=0;j<C.length;j++)
          if(C[j]==c)
            elements.push(NL[i]);
      }
      return (elements.length) ?
               elements : null;
} 


function changeClassProperty(className, propertyName, propertyValue) {
	var elem=document.getByClassName(className);
	for(var i=0;i<elem.length;i++)
	  elem[i].style[propertyName]=propertyValue;
} 


function print_div(div_id) {
        var d = document.getElementById(div_id);
        var w = window.open("", "Printing", "toolbar=no,menubar=no,location=no");
        w.document.write(d.innerHTML);
        w.document.close();
		w.print();
        w.close();
} 


function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}



function stretch_div(id) {
      var d = document.getElementById(id);
		  d.style.width = document.body.scrollWidth + 'px';
		  d.style.height = document.body.scrollHeight + 'px';
}

function sizeCopy(res, dest) {
      var from = document.getElementById(res);
      var to = document.getElementById(dest);
		  to.style.width =  from.style.width;
		  to.style.height =  from.style.height;
}


function center_div(className, popWidth, popHeight) {
	var elem=document.getByClassName(className);
	if (elem)
	for(var i=0;i<elem.length;i++) {
		elem[i].style.left = (screen.availWidth-popWidth)/2 + 'px';
		elem[i].style.top = (screen.availHeight-popHeight)/2 + f_scrollTop() + 'px';
	} 
}

function selectElement(d) {
		
	if	(d.className=='selected') {
		d.className='';
	}
	else {
		d.className='selected';
	}
			
		
}



function radioUncheck(formID)
{
	f=getElementsByName(formID);
	for (var i = 0; i < f.elements.length; i++) 
	{
		if(f.elements[i].type == 'radio')
		{
		f.elements[i].checked = false;
		}
	}
}
			
			
function getParent(element, parent){
if(typeof element=="string"){element=document.getElementById(element);};
if(!element){return null;};
var elements=[];
if(typeof parent!="string"){
	while(element.parentNode){
	element=element.parentNode;
	elements.unshift(element);
		if(element==parent){return elements;};
	}
}
else{
parent=parent.toUpperCase();
	while(element.parentNode){
	element=element.parentNode;
	elements.unshift(element);
		if(element.nodeName && element.nodeName.toUpperCase()==parent){return elements;};
	}
};
return elements;
}




function form_overlay(id)
{
	$("#"+id).prependTo("body");	
	var objOverlay = document.getElementById('overlay');
	var objForm = document.getElementById(id);
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	objOverlay.style.height = (arrayPageSize[1] + 'px');
	objOverlay.style.display = 'block';
	$('#loadingImage').hide();
	var formTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - $("#"+id).height()) / 2);
	var formLeft = ((arrayPageSize[0] - 20 - $("#"+id).width()) / 2);
	objForm.style.top = (formTop < 0) ? "0px" : formTop + "px";
	objForm.style.left = (formLeft < 0) ? "0px" : formLeft + "px";
}

function removeSelects(exception) {
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++) {
  if (elements[i].title!=exception && elements[i].className != exception) {
   elements[i].style.visibility='hidden';
  }
 }
}
function restoreSelects() {
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++) {
  elements[i].style.visibility='visible';
 }
}

function caSaveAutoScroll(link) {
	var form = jQuery(link).parents('form');
	if (form.length == 0)
		return;
	var autoScroll = form.find('input.autoScroll');
	if (autoScroll.length == 0)
		return;
	var autoScrollInputName = autoScroll.get(0).name;
	var divScroll = caGetScrolledNode(form);
	if (!divScroll)
		return;
	form.get(0).elements[autoScrollInputName].value = divScroll.scrollTop;
}

function caRestoreAutoScroll(comp, value) {
	var form = jQuery('#' + comp.substring(0, comp.indexOf(':')));
	if (form.length == 0)
		return;
	var divScroll = caGetScrolledNode(form);
	if (!divScroll)
		return;
	divScroll.scrollTop = value;
}

function caGetScrolledNode(form) {
	var divScroll = form.find('div.scrolledTable');
	if (divScroll.length == 0)
		return null;
	return divScroll.get(0);
}

function caHideFusionCharts(portletId, jQueryObj) {
	jQueryObj.find(".fusionChartDiv").css("visibility", "hidden");
}

function caShowFusionCharts(portletId, jQueryObj) {
	jQueryObj.find(".fusionChartDiv").css("visibility", "visible");
}

function caToggleTopElements(jQueryObj, show) {
  if (show) {
    caShowFusionCharts(0, jQueryObj);
	jQueryObj.find("select").css("visibility", "hidden");
  } else {
    caHideFusionCharts(0, jQueryObj);
	jQueryObj.find("select").css("visibility", "visible");
  }
}

function caHideTopElementsIfPopupVisible(jQueryObj) {
  if (jQuery("#TB_window").length == 0) {
    var overlay = jQuery("#overlay");
    if (overlay.length == 0 || overlay[0].style.display == "none")
      return;
  }
  caToggleTopElements(jQueryObj, false);    
}

function caShowPopup(caption, url, imageGroup) {
  caToggleTopElements(jQuery(), false);
  return tb_show(caption, url, imageGroup);
}

function caHidePopup() {
  tb_remove();
  caToggleTopElements(jQuery(), true);
}

function caHideLoginButton() {
}

function inputTitles() {
	var elem=jQuery(".loginInput").eq(0);
	jQuery(elem).each(
		 function (i) {
			  if (jQuery(this).val() == '' || jQuery(this).val() == jQuery(this).attr('title')) {
			  jQuery(this).attr('value', jQuery(this).attr('title'));
			  jQuery(this).addClass("gray");
		 }
	}
	).focus(
		 function (event) {
			  $field  = jQuery(event.target);
			  if ($field.val() == $field.attr('title')) {
					$field.val('');
					$field.removeClass("gray");
			  }
		 }
	).blur(
		 function (event) {
			  $field  = jQuery(event.target);
			  if ($field.val() == '') {
					$field.val($field.attr('title'));
					$field.addClass("gray");
			  }
		 }
	);
	
	var elem2=jQuery(".loginInput").eq(1);
	jQuery(elem2).after("<div id='passHint' style='color:#959595; font-size:10px; margin-top:-18px; margin-left: 6px;'></div>");
	jQuery("#passHint").text(jQuery(elem2).attr('title'));
	jQuery("#passHint").click(function () { 
      jQuery(this).hide(); 
      jQuery(elem2).focus(); 
    });
	if ( (jQuery(elem2).val() != '') && (jQuery(elem2).val() != jQuery(elem2).attr('title')) ) {
		jQuery("#passHint").hide();
	}

	jQuery(elem2).each(
		 function (i) {
			  if (jQuery(this).val() == '' || jQuery(this).val() == jQuery(this).attr('title')) {
				jQuery(this).val('');
				jQuery("#passHint").text(jQuery(this).attr('title'));
		 }
	}
	).focus(
		 function (event) {
				jQuery("#passHint").hide();
			  $field  = jQuery(event.target);
			  if ($field.val() == $field.attr('title')) {
					$field.val('');
			  }
		 }
	).blur(
		 function (event) {
			  $field  = jQuery(event.target);
			  if ($field.val() == '') {
				jQuery("#passHint").text(jQuery(this).attr('title'));
					jQuery("#passHint").show();
			  }
		 }
	);	
}

function faqShowHide(sender) {
    sender = jQuery(sender);
    list = sender.parents('ul:first');
    list.find('a').removeClass('active');
    list.find('div').hide();

    selected = sender.parents('li:first');
    selected.find('a').addClass('active');
    selected.find('div').show();
}

function scrollNext(scrollable, step) {
    if (step == undefined) {
        step = 1;
    }
    
    list=jQuery(scrollable);
    
    while (step > 0) {
        first=list.children(':visible:first');
        last=list.children(':visible:last');
    
        if (last.next().length > 0) {
            last.next().show();
            first.hide();
    
            nextClass=first.attr('class');
            list.children(':visible').each(function(i) {
                iter=jQuery(this);
                tempClass = iter.attr('class');
                iter.attr('class', nextClass);
                nextClass=tempClass;
            });

            step--;
        } else {
            return;
        }

    }
}

function scrollPrev(scrollable, step) {
    if (step == undefined) {
        step = 1;
    }
    
    list=jQuery(scrollable);

    while (step > 0) {
        first=list.children(':visible:first');
        last=list.children(':visible:last');
    
        if (first.prev().length > 0) {
            first.prev().show();
            last.hide();
    
            list.children(':visible').each(function(i) {
                iter=jQuery(this);
                iter.attr('class', iter.next().attr('class'));
            });
            
            step--;
        } else {
            return;
        }
    }
}


function closeFlash(elemID) {
	jQuery('#'+elemID).remove()
}