
/****************************** /home/escapio/htdocs/live/public/js/drag.js ******************************/
function Drag(a,b){this.object=a;this.object.is_dragging=false;this.trigger=b;this.trigger.onmousedown=this.startDrag.bind(this);this.trigger.style.cursor="move";this.is_is_dragging=false;this.start_mouse_x=0;this.start_mouse_y=0;this.disabled_handlers=new Array()}Drag.prototype.startDrag=function(a){this.toggleHandlers("disable");a=this.fixEvent(a);this.start_mouse_x=parseInt(Event.pointerX(a));this.start_mouse_y=parseInt(Event.pointerY(a));this.is_dragging=true;this.mousemove_func=this.drag.bind(this);this.mouseup_func=this.stopDrag.bind(this);Event.observe(document,"mousemove",this.mousemove_func);Event.observe(document,"mouseup",this.mouseup_func)};Drag.prototype.disableHandler=function(c,a,d,b){this.disabled_handlers.push({observed:b,callback:d,object:a,handler:c})};Drag.prototype.toggleHandlers=function(state){for(var i=0;i<this.disabled_handlers.length;i++){if(this.disabled_handlers[i].observed){if(state=="disable"){Event.stopObserving(this.disabled_handlers[i].object,this.disabled_handlers[i].handler,this.disabled_handlers[i].callback)}else{Event.observe(this.disabled_handlers[i].object,this.disabled_handlers[i].handler,this.disabled_handlers[i].callback)}}else{if(state=="disable"){eval(this.disabled_handlers[key][i].object+"."+this.disabled_handlers[i].object+"= null;")}else{eval(this.disabled_handlers[key][i].object+"."+this.disabled_handlers[i].object+"="+this.disabled_handlers[key][i].callback)}}}};Drag.prototype.stopDrag=function(){Event.stopObserving(document,"mousemove",this.mousemove_func);Event.stopObserving(document,"mouseup",this.mouseup_func);this.toggleHandlers("enable");this.object.is_dragging=false};Drag.prototype.drag=function(c){if(this.is_dragging){c=this.fixEvent(c);var e=parseInt(Event.pointerX(c))-parseInt(this.start_mouse_x);var d=parseInt(Event.pointerY(c))-parseInt(this.start_mouse_y);var b=parseInt(this.object.getStyle("left"))+e;var a=parseInt(this.object.getStyle("top"))+d;this.object.setStyle({left:b+"px",top:a+"px"});this.start_mouse_x=parseInt(Event.pointerX(c));this.start_mouse_y=parseInt(Event.pointerY(c))}return false};Drag.prototype.fixEvent=function(a){if(a==undefined){a=window.event}return a};
/****************************** /home/escapio/htdocs/live/public/js/components/LayerWindow.js ******************************/
var _escGlobalLayerWindowStack=new Object();ESC.LayerWindow=Class.create({_options:null,_domElements:{window:null,title:null,closer:null,content:null,loader:null,shadows:{topLeft:null,topRight:null,bottomRight:null,bottomLeft:null,top:null,bottom:null,left:null,right:null}},_shader:null,_id:null,_title:null,_content:null,_drag:null,_documentClickHandler:null,_doNotHideMe:true,initialize:function(b,d,a,c){this._id=b;this._title=d;this._content=a;this._options=this._setOptions(c);this._documentClickHandler=this._documentClickHandlerCallback.bind(this);this._drag=null;this._dontHideMe=true;this._shader=null;this._domElements={window:null,title:null,closer:null,content:null,loader:null,shadows:{topLeft:null,topRight:null,bottomRight:null,bottomLeft:null,top:null,bottom:null,left:null,right:null}};this._render();this._applyListeners();this._initWindow();setTimeout(function(){this._doNotHideMe=false}.bind(this),10);_escGlobalLayerWindowStack[this._id]=this},show:function(){this._domElements.window.style.display="block";if(this._shader&&this._options.backgroundShader===true){this._shader.show()}return this},hide:function(){this._domElements.window.style.display="none";if(this._shader&&this._options.backgroundShader===true){this._shader.hide()}return this},toggle:function(){if(this.isVisible()){this.hide()}else{this.show()}},isVisible:function(){return(this._domElements.window.style.display=="block")},setTitle:function(a){this._domElements.title.innerHTML=a;return this},setContent:function(a){this._domElements.content.innerHTML=a;return this},showLoader:function(){this._domElements.loader.style.display="block";return this},hideLoader:function(){this._domElements.loader.style.display="none";return this},destroy:function(){if(this._options&&this._options.onDestroy&&typeof(this._options.onDestroy)=="function"){this._options.onDestroy();return}this.remove()},remove:function(){Element.remove(this._domElements.window);this._domElements=null;if(this._drag!=null){delete (this._drag)}if(this._options.autohide){Event.stopObserving(document,"click",this._documentClickHandler)}if(this._shader){this._shader.remove();delete (this._shader);this._shader=null}delete _escGlobalLayerWindowStack[this._id];_escGlobalLayerWindowStack[this._id]=null},getWindowDOMElement:function(){return this._domElements.window},getContentDOMElement:function(){return this._domElements.content},reloadAjaxContent:function(){this.showLoader();var a=this._content.replace(/uri:/,"");this._loadContent(a)},_initWindow:function(){this._updateWindowSize();this._updateWindowPosition()},_updateWindowSize:function(){var f=$(this._domElements.window);windowDimensions=f.getDimensions();if(windowDimensions.width>(this._domElements.dragBar.getWidth()+16)){this._domElements.dragBar.style.width=(windowDimensions.width-34)+"px"}var j=this._domElements.content.getDimensions();this._domElements.loader.style.width=j.width+"px";this._domElements.loader.style.height=j.height+"px";if(this._options.shadow){if(ESC.clientBrowser.name=="ie"&&ESC.clientBrowser.version<=6){this._domElements.shadows.bottom.style.top=(windowDimensions.height-5)+"px";this._domElements.shadows.bottomLeft.style.top=(windowDimensions.height-5)+"px";this._domElements.shadows.bottomRight.style.top=(windowDimensions.height-5)+"px"}var i=Position.positionedOffset(this._domElements.shadows.topLeft);var a=Position.positionedOffset(this._domElements.shadows.topRight);var b=Position.positionedOffset(this._domElements.shadows.bottom);var d=$(this._domElements.shadows.topLeft).getDimensions();var e=d.width;var c=d.height;var h=a[0]-(i[0]+e);var g=b[1]-(i[1]+c);this._domElements.shadows.top.style.width=h+"px";this._domElements.shadows.bottom.style.width=h+"px";this._domElements.shadows.left.style.height=g+"px";this._domElements.shadows.right.style.height=g+"px"}delete (windowDimensions);delete (j);windowDimensions=null;j=null},_updateWindowPosition:function(){if(this._options.top&&this._options.left){this._domElements.window.style.top=this._options.top;this._domElements.window.style.left=this._options.left}else{var c=document.viewport.getDimensions();var a=document.viewport.getScrollOffsets();var e=$(this._domElements.window).getDimensions();var b=Math.round((c.width-e.width)/2);var d=Math.round((c.height-e.height)/2)+a[1];if(b<0){b=0}if(d<0){d=0}this._domElements.window.style.left=b+"px";this._domElements.window.style.top=d+"px"}},_setOptions:function(a){if(!a){a=new Object}if(a.shadow===undefined){a.shadow=true}if(a.autohide===undefined){a.autohide=true}if(a.scroll===undefined){a.scroll=false}if(a.draggable===undefined){a.draggable=true}if(a.closable===undefined){a.closable=true}if(a.backgroundShader===undefined){a.backgroundShader=false}return a},_render:function(){var b=document.createElement("div");b.className="layer-window";if(this._options.simple){b.className+=" layer-window-simple"}b.id=this._id;if(this._options.insertInto!==undefined){var a=document.getElementById(this._options.insertInto);if(a){a.appendChild(b)}}else{document.body.insertBefore(b,ESC.getFrameElement())}this._renderHead(b);this._renderBody(b);this._renderFoot(b);this._domElements.window=b;this._applySizes();if(this._options.shadow===true){this._renderShadow()}if(this._options.backgroundShader===true){this._shader=new ESC.BgShader()}},_renderHead:function(e){var c=document.createElement("div");c.className="layer-window-head";var b=document.createElement("div");b.className="layer-window-head-right";var a=document.createElement("div");a.className="layer-window-head-center";var d=document.createElement("button");d.className="layer-window-title";var f=document.createElement("span");f.innerHTML=this._title;if(this._options.closable===true){var g=document.createElement("button");g.className="layer-window-closer";g.innerHTML="&nbsp;"}e.appendChild(c);c.appendChild(b);b.appendChild(a);a.appendChild(d);if(this._options.closable===true){a.appendChild(g)}d.appendChild(f);this._domElements.title=f;this._domElements.closer=g;this._domElements.dragBar=$(d)},_renderBody:function(d){var b=document.createElement("div");b.className="layer-window-body";var a=document.createElement("div");a.className="layer-window-loader";a.style.display="none";a.innerHTML="&nbsp;";var c=document.createElement("div");c.className="layer-window-content";c.id=this._id+"-content";if(this._options.scroll){c.style.overflow="auto"}d.appendChild(b);b.appendChild(a);b.appendChild(c);if(typeof(this._content)=="object"){c.appendChild(this._content)}else{if(typeof(this._content)=="string"&&this._content.search(/uri:/)!=-1){var f=document.createElement("div");f.className="margin-10 align-c";var e=document.createElement("img");e.src="/public/img/spinner2.gif";c.appendChild(f);f.appendChild(e);url=this._content.replace(/uri:/,"");this._loadContent(url)}else{c.innerHTML=this._content}}this._domElements.content=$(c);this._domElements.loader=a},_renderFoot:function(d){var c=document.createElement("div");c.className="layer-window-bottom";var b=document.createElement("div");b.className="layer-window-bottom-right";var a=document.createElement("div");a.className="layer-window-bottom-center";a.innerHTML="&nbsp;";d.appendChild(c);c.appendChild(b);b.appendChild(a)},_renderShadow:function(){var f=document.createElement("div");f.className="layer-window-shadow-top-left";f.innerHTML="&nbsp;";var e=document.createElement("div");e.className="layer-window-shadow-top-right";e.innerHTML="&nbsp;";var d=document.createElement("div");d.className="layer-window-shadow-bottom-right";d.innerHTML="&nbsp;";var b=document.createElement("div");b.className="layer-window-shadow-bottom-left";b.innerHTML="&nbsp;";var h=document.createElement("div");h.className="layer-window-shadow-top";h.innerHTML="&nbsp;";var a=document.createElement("div");a.className="layer-window-shadow-bottom";a.innerHTML="&nbsp;";var g=document.createElement("div");g.className="layer-window-shadow-left";g.innerHTML="&nbsp;";var c=document.createElement("div");c.className="layer-window-shadow-right";c.innerHTML="&nbsp;";this._domElements.window.appendChild(f);this._domElements.window.appendChild(h);this._domElements.window.appendChild(e);this._domElements.window.appendChild(c);this._domElements.window.appendChild(d);this._domElements.window.appendChild(a);this._domElements.window.appendChild(b);this._domElements.window.appendChild(g);this._domElements.shadows.topLeft=f;this._domElements.shadows.topRight=e;this._domElements.shadows.bottomRight=d;this._domElements.shadows.bottomLeft=b;this._domElements.shadows.top=h;this._domElements.shadows.bottom=a;this._domElements.shadows.left=g;this._domElements.shadows.right=c;if(ESC.clientBrowser.name=="ie"&&ESC.clientBrowser.version<=6){this._fixIE6Shadows()}},_fixIE6Shadows:function(){var a="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale', src='";a+="/public/img/portal/layer-window-shadow-";this._domElements.shadows.topLeft.style.background="none";this._domElements.shadows.topLeft.style.top="-11px";this._domElements.shadows.topLeft.style.filter=a+"top-left.png')";this._domElements.shadows.topRight.style.background="none";this._domElements.shadows.topRight.style.top="-11px";this._domElements.shadows.topRight.style.filter=a+"top-right.png')";this._domElements.shadows.bottomRight.style.background="none";this._domElements.shadows.bottomRight.style.bottom="-12px";this._domElements.shadows.bottomRight.style.filter=a+"bottom-right.png')";this._domElements.shadows.bottomLeft.style.background="none";this._domElements.shadows.bottomLeft.style.bottom="-12px";this._domElements.shadows.bottomLeft.style.filter=a+"bottom-left.png')";this._domElements.shadows.top.style.background="none";this._domElements.shadows.top.style.top="-11px";this._domElements.shadows.top.style.filter=a+"top.png')";this._domElements.shadows.bottom.style.background="none";this._domElements.shadows.bottom.style.bottom="-12px";this._domElements.shadows.bottom.style.filter=a+"bottom.png')";this._domElements.shadows.left.style.background="none";this._domElements.shadows.left.style.top="5px";this._domElements.shadows.left.style.filter=a+"left.png')";this._domElements.shadows.right.style.background="none";this._domElements.shadows.right.style.top="5px";this._domElements.shadows.right.style.filter=a+"right.png')"},_applySizes:function(){if(this._options.width){this._domElements.content.style.width=this._options.width;if(this._options.width.search(/%/)>0){var c="%";var b=parseInt(this._options.width.replace(/%/,""))}else{var c="px";var b=parseInt(this._options.width.replace(/px/,""))}var a=(this._options.simple===true)?(b+12):(b+28);this._domElements.window.style.width=a+c}if(this._options.height){this._domElements.content.style.height=this._options.height}},_applyListeners:function(){if(this._options.closable===true){Event.observe(this._domElements.closer,"click",function(a){this.destroy()}.bind(this))}if(this._options.draggable){this._drag=new Drag(this._domElements.window,this._domElements.dragBar)}if(this._options.autohide){Event.observe(document,"click",this._documentClickHandler);Event.observe(this._domElements.window,"mouseover",function(){this._doNotHideMe=true}.bind(this));Event.observe(this._domElements.window,"mouseout",function(){this._doNotHideMe=false}.bind(this))}},_documentClickHandlerCallback:function(){if(!this._doNotHideMe){this.destroy()}},_loadContent:function(url){new Ajax.Request(url,{method:"get",onSuccess:function(response){this.hideLoader();var data=false;try{data=response.responseText.evalJSON()}catch(e){}var content="";if(data&&data.html){content=data.html}else{content=response.responseText}this._domElements.content.innerHTML=content;if(data&&data.js){eval(data.js)}this._initWindow();if(typeof(this._options.onReady)=="function"){this._options.onReady(this)}}.bind(this)})}});
/****************************** /home/escapio/htdocs/live/public/js/components/Calendar.js ******************************/
Date.prototype.savedDate=null;Date.prototype.addDays=function(a){this.setDate(this.getDate()+a);this.savedDate=this.getDate()};Date.prototype.addMonths=function(a){if(this.savedDate==null){this.savedDate=this.getDate()}this.setDate(1);this.setMonth(this.getMonth()+a);this.setDate(Math.min(this.savedDate,this.getMonthLength()))};Date.prototype.addYears=function(a){if(this.savedDate==null){this.savedDate=this.getDate()}this.setDate(1);this.setFullYear(this.getFullYear()+a);this.setDate(Math.min(this.savedDate,this.getMonthLength()))};Date.prototype.getMonthLength=function(){var b,c,a;b=new Date(Date.parse(this));a=b.getMonth();c=28;do{c++;b.setDate(c)}while(b.getMonth()==a);return c-1};Date.prototype.isWeekend=function(){return(this.getDay()==0||this.getDay()==6)?true:false};if(typeof(ESC.Locale)=="object"){Date.prototype.monthNames=new Array();Date.prototype.monthNamesAbbr=new Array();for(var i=1;i<=12;i++){Date.prototype.monthNames.push(ESC.Locale.translate("month_"+i));Date.prototype.monthNamesAbbr.push(ESC.Locale.translate("month_"+i).slice(0,3))}Date.prototype.dayNames=new Array();Date.prototype.dayNamesAbbr=new Array();for(var i=0;i<=6;i++){Date.prototype.dayNames.push(ESC.Locale.translate("day_"+i));Date.prototype.dayNamesAbbr.push(ESC.Locale.translate("day_s_"+i))}}else{Date.prototype.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.prototype.monthNamesAbbr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Date.prototype.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.prototype.dayNamesAbbr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}Date.prototype.getMonthName=function(a){return a?this.monthNamesAbbr[this.getMonth()]:this.monthNames[this.getMonth()]};Date.prototype.getDayName=function(a){return a?this.dayNamesAbbr[this.getDay()]:this.dayNames[this.getDay()]};Date.setMonthNames=function(){for(i=0;i<arguments.length;i++){Date.prototype.monthNames[i]=arguments[i]}};Date.setMonthNamesAbbr=function(){for(i=0;i<arguments.length;i++){Date.prototype.monthNamesAbbr[i]=arguments[i]}};Date.setDayNames=function(){for(i=0;i<arguments.length;i++){Date.prototype.dayNames[i]=arguments[i]}};Date.setDayNamesAbbr=function(){for(i=0;i<arguments.length;i++){Date.prototype.dayNamesAbbr[i]=arguments[i]}};Date.prototype.strftime=function(n){var a=this.getMonth();var k=this.getDate();var l=this.getFullYear();var o=this.getDay();var p=this.getHours();var c=this.getMinutes();var h=this.getSeconds();var b=(p>=12);var e=(b)?(p-12):p;if(e==0){e=12}var g={};g["%a"]=this.getDayName(true);g["%A"]=this.getDayName();g["%b"]=this.getMonthName(true);g["%B"]=this.getMonthName();g["%C"]=1+Math.floor(l/100);g["%d"]=k<10?"0"+k:k;g["%e"]=k;g["%H"]=p<10?"0"+p:p;g["%I"]=e<10?"0"+e:e;g["%m"]=a<9?("0"+(a+1)):(a+1);g["%M"]=c<10?"0"+c:c;g["%n"]="\n";g["%p"]=b>=12?"PM":"AM";g["%P"]=b>=12?"pm":"am";g["%S"]=h<10?"0"+h:h;g["%t"]="\t";g["%u"]=o+1;g["%w"]=o;g["%y"]=l.toString().substring(2,4);g["%Y"]=l;g["%%"]="%";return n.replace(/%./g,function(d){return g[d]||d})};Date.parseFormattedString=function(h,p){var k=new Date();var n=0;var c=-1;var g=0;var q=0;var e=0;var f=0;var o=h.split(/\W+/);var l=p.match(/%./g);for(i=0;i<o.length;++i){if(!o[i]){continue}switch(l[i]){case"%d":case"%e":g=parseInt(o[i],10);break;case"%m":c=parseInt(o[i],10)-1;break;case"%Y":case"%y":n=parseInt(o[i],10);(n<100)&&(n+=(n>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(k.monthNames[j].substr(0,o[i].length).toLowerCase()==o[i].toLowerCase()){c=j;break}}break;case"%M":e=parseInt(o[i],10);break;case"%S":f=parseInt(o[i],10);break;case"%H":case"%I":case"%k":case"%l":q=parseInt(o[i],10);break;case"%P":case"%p":if(/pm/i.test(o[i])&&q<12){q+=12}else{if(/am/i.test(o[i])&&q>=12){q-=12}}break}}if(isNaN(n)){n=k.getFullYear()}if(isNaN(c)){c=k.getMonth()}if(isNaN(g)){g=k.getDate()}if(isNaN(q)){q=k.getHours()}if(isNaN(e)){e=k.getMinutes()}if(isNaN(f)){f=k.getSeconds()}if(n!=0&&c!=-1&&g!=0){return new Date(n,c,g,q,e,f)}n=0;c=-1;g=0;for(i=0;i<o.length;++i){if(o[i].search(/[a-zA-Z]+/)!=-1){var r=-1;for(j=0;j<12;++j){if(k.monthNames[j].substr(0,o[i].length).toLowerCase()==o[i].toLowerCase()){r=j;break}}if(r!=-1){if(c!=-1){g=c+1}c=r}}else{if(parseInt(o[i],10)<=12&&c==-1){c=o[i]-1}else{if(parseInt(o[i],10)>31&&n==0){n=parseInt(o[i],10);(n<100)&&(n+=(n>29)?1900:2000)}else{if(g==0){g=o[i]}}}}}if(n==0){n=k.getFullYear()}if(c!=-1&&g!=0){return new Date(n,c,g,q,e,0)}return k};Calendar=function(a,b){this.input=$(a);if(!this.input){return false}if(b){this.handle=$(b)}this.input.setAttribute("autocomplete","off");this.input.parse=function(){return this.parseInput()}.bind(this);this.id="Calender_"+this.input.id;this.showOtherMonthDays=true;this.dateStart=null;this.dateEnd=null;this.date=new Date();this.nav=["<<","<",">",">>","x"];this.style=["","weekend","empty","selected","disabled"];this.isShown=false;this.isCreated=false;this.smooth=false;this.onChange=null;this.useMonthNameAbbr=true;if(typeof(ESC.Locale)=="object"){this.weekStartDay=ESC.Locale.getFirstDayOfWeek();this.dateFormat=ESC.Locale.getDateFormat()}else{this.weekStartDay=0;this.dateFormat="%Y-%m-%d"}this.handle.onclick=this.toggle.bind(this);if(ESC.clientBrowser.name=="ie"&&ESC.clientBrowser.version>=6){this.handle.style.cursor="pointer"}this.document_mouseup=this.hide.bind(this,true)};Calendar.prototype.create=function(){if(this.isCreated){return}this.createCalendar();this.isCreated=true};Calendar.prototype.destroy=function(){if(!this.isCreated){return}$(this.calendar_div).remove()};Calendar.prototype.toggle=function(){this.isShown?this.hide():this.show()};Calendar.prototype.show=function(){if(this.input.tagName=="INPUT"){this.input.focus()}var a=Element.cumulativeOffset(this.input);this.calendar_div.style.left=a.left+"px";this.calendar_div.style.top=(a.top+this.input.getHeight()+4)+"px";Event.observe(document,"mouseup",this.document_mouseup);this.handle.onclick=null;if(!this.isCreated){this.create()}if(this.isShown){return}this.isShown=true;this.date=this.parseInput();this.updateCalendar();this.smooth?new Effect.Appear(this.id+"_calContainer"):Element.show(this.id+"_calContainer")};Calendar.prototype.hide=function(b){b=b==undefined?false:b;Event.stopObserving(document,"mouseup",this.document_mouseup);var c=this;var a=setTimeout(function(){c.handle.onclick=c.toggle.bind(c)},200);if(!this.isCreated){this.create()}if(!b){}this.smooth?new Effect.Fade(this.id+"_calContainer"):Element.hide(this.id+"_calContainer");this.isShown=false};Calendar.prototype.select=function(c,a){if(!this.isShown){return}var b=this.date.getMonth();this.date=new Date(Date.parse(a));this.updateCalendar();if(b==this.date.getMonth()){this.hide()}if(this.onChange!=null){this.onChange(this.date,this.date.getFullYear(),this.date.getMonth()+1,this.date.getDate(),this.date.getDay())}};Calendar.prototype.nextMonth=function(){if(!this.isShown){return}this.date.addMonths(1);this.updateCalendar()};Calendar.prototype.previousMonth=function(){if(!this.isShown){return}this.date.addMonths(-1);this.updateCalendar()};Calendar.prototype.nextYear=function(){if(!this.isShown){return}this.date.addYears(1);this.updateCalendar()};Calendar.prototype.previousYear=function(){if(!this.isShown){return}this.date.addYears(-1);this.updateCalendar()};Calendar.prototype.toTodaysDate=function(){if(!this.isShown){return}this.date=new Date();this.updateCalendar()};Calendar.prototype.getValidDate=function(a){if(this.dateStart!=null&&a<this.dateStart){return new Date(Date.parse(this.dateStart.toString()))}if(this.dateEnd!=null&&a>this.dateEnd){return new Date(Date.parse(this.dateEnd.toString()))}return a};Calendar.prototype.isValidDate=function(a){if(this.dateStart!=null&&a<this.dateStart){return false}if(this.dateEnd!=null&&a>this.dateEnd){return false}return true};Calendar.prototype.setDate=function(b,c,a){this.date=new Date(b,(c!=undefined?c-1:0),(a!=undefined?a:1))};Calendar.prototype.setStartDate=function(b,c,a){this.dateStart=new Date(b,(c!=null?c-1:0),(a!=undefined?a:1))};Calendar.prototype.setEndDate=function(b,c,a){this.dateEnd=new Date(b,(c!=null?c-1:0),(a!=undefined?a:1))};Calendar.prototype.setDateFormat=function(a){this.dateFormat=a};Calendar.prototype.setWeekStartDay=function(a){a=a%7;if(this.weekStartDay==a){return}this.weekStartDay=a};Calendar.prototype.parseInput=function(){return Date.parseFormattedString((this.input.tagName=="INPUT"?this.input.value:this.input.firstChild.nodeValue),this.dateFormat)};Calendar.prototype.updateInput=function(){if(this.input.tagName=="INPUT"){this.input.value=this.date.strftime(this.dateFormat)}else{this.input.firstChild.nodeValue=this.date.strftime(this.dateFormat)}};Calendar.prototype.updateCalendarDayNames=function(){if(!this.isCreated){this.create()}var b=$(this.id+"_calTable").getElementsByTagName("thead")[0].rows[0];for(var a=0;a<b.cells.length;a++){b.cells[a].firstChild.nodeValue=this.date.dayNamesAbbr[(a+this.weekStartDay)%7]}};Calendar.prototype.updateCalendar=function(){if(!this.isCreated){this.create()}this.date=this.getValidDate(this.date);this.updateInput();$(this.id+"_calMonthYear").firstChild.nodeValue=this.date.getMonthName(this.useMonthNameAbbr)+" "+this.date.getFullYear();var a=new Date(Date.parse(this.date));a.setDate(1);while(a.getDay()!=this.weekStartDay){a.addDays(-1)}var c=$(this.id+"_calTable");var e=c.getElementsByTagName("tbody")[0];for(var d=0;d<6;d++){cRow=e.rows[d];for(var b=0;b<cRow.cells.length;b++){cCol=cRow.cells[b];cCol=cCol.firstChild;cColValue=a.getDate();cColIsClickable=true;cColCSS="";if(a.getMonth()!=this.date.getMonth()){cColCSS=this.style[2];if(!this.showOtherMonthDays){cColValue="";cColIsClickable=false;cCol.style.cursor="default"}}else{cColCSS=(a.isWeekend())?this.style[1]:this.style[0];if(a.getDate()==this.date.getDate()){cColCSS+=" "+this.style[3]}}if(!this.isValidDate(a)){cColCSS+=" "+this.style[4];cColIsClickable=false}cCol.className=cColCSS;cCol.firstChild.nodeValue=cColValue;if(cColIsClickable){cCol.onmouseup=this.select.bindAsEventListener(this,a.toString());cCol.style.cursor="pointer"}else{cCol.onclick=null;cCol.style.cursor="default"}a.addDays(1)}}};Calendar.prototype.createCalendar=function(){if(this.isCreated){return false}var r=document.createElement("div");r.id=this.id+"_calContainer";r.className="calendar";r.style.position="absolute";r.style.display="none";var s=this;var e=document.createElement("div");e.className="calendar-head";var l=document.createElement("div");l.className="calendar-head-margin";e.appendChild(l);var c=document.createElement("table");c.cellSpacing=0;c.cellPadding=0;c.border=0;c.className="calendar-head-table";var f=document.createElement("tbody");var q=document.createElement("tr");var h=document.createElement("td");h.appendChild(document.createTextNode(this.nav[1]));Event.observe(h,"mouseup",this.previousMonth.bind(this));Event.observe(h,"mouseover",function(){Event.stopObserving(document,"mouseup",s.document_mouseup)});Event.observe(h,"mouseout",function(){Event.observe(document,"mouseup",s.document_mouseup)});h.className="calendar-head-prevnext";q.appendChild(h);var g=document.createElement("td");g.colSpan=5;g.id=this.id+"_calMonthYear";g.appendChild(document.createTextNode(""));g.style.textAlign="center";q.appendChild(g);var d=document.createElement("td");d.appendChild(document.createTextNode(this.nav[2]));Event.observe(d,"mouseup",this.nextMonth.bind(this));Event.observe(d,"mouseover",function(){Event.stopObserving(document,"mouseup",s.document_mouseup)});Event.observe(d,"mouseout",function(){Event.observe(document,"mouseup",s.document_mouseup)});d.className="calendar-head-prevnext";q.appendChild(d);f.appendChild(q);var o=document.createElement("tr");o.setAttribute("class","calendar-weekdays");var k,b,m;for(var u=0;u<7;u++){m=document.createElement("td");m.appendChild(document.createTextNode(this.date.dayNamesAbbr[(u+this.weekStartDay)%7]));o.appendChild(m)}f.appendChild(o);c.appendChild(f);l.appendChild(c);r.appendChild(e);var p=document.createElement("div");p.className="calendar-body";var v=document.createElement("table");v.cellSpacing=0;v.cellPadding=0;v.border=0;v.id=this.id+"_calTable";p.appendChild(v);var a=document.createElement("tbody");v.appendChild(a);for(var u=0;u<6;u++){b=document.createElement("tr");for(var t=0;t<7;t++){var n=document.createElement("div");var m=document.createElement("td");n.appendChild(document.createTextNode(""));m.appendChild(n);b.appendChild(m)}m.className="calendar-no-border";a.appendChild(b)}r.appendChild(p);document.getElementsByTagName("body")[0].appendChild(r);this.calendar_div=r};
/****************************** /home/escapio/htdocs/live/public/js/scriptaculous/effects.js ******************************/
String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(",");var b=0;do{a+=parseInt(c[b]).toColorPart()}while(++b<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var b=1;b<4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return a>1?1:a},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(b,a){return(-Math.cos((b*((a||5)-0.5)*2)*Math.PI)/2)+0.5},spring:function(a){return 1-(Math.cos(a*4.5*Math.PI)*Math.exp(-a*6))},none:function(a){return 0},full:function(a){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(new Element("span",{style:b}).update(d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,c){var e;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){e=b}else{e=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(e).each(function(g,f){new c(g,Object.extend(a,{delay:f*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c,a){b=$(b);c=(c||"appear").toLowerCase();return Effect[Effect.PAIRS[c][b.visible()?1:0]](b,Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},a||{}))}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var c=new Date().getTime();var a=Object.isString(b.options.queue)?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a)){return a}return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(a){if(a&&a.transition===false){a.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=(function(){function b(d,c){if(d.options[c+"Internal"]){d.options[c+"Internal"](d)}if(d.options[c]){d.options[c](d)}}return function(c){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");if(this.setup){this.setup()}b(this,"afterSetup")}if(this.state==="running"){c=(this.options.transition(c)*this.fromToDelta)+this.options.from;this.position=c;b(this,"beforeUpdate");if(this.update){this.update(c)}b(this,"afterUpdate")}}})();this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=(b*this.totalFrames).round();if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(!Object.isFunction(this[property])){a.set(property,this[property])}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(c,f,e){c=Object.isString(c)?$(c):c;var b=$A(arguments),d=b.last(),a=b.length==5?b[3]:null;this.method=Object.isFunction(d)?d.bind(c):Object.isFunction(c[d])?c[d].bind(c):function(g){c[d]=g};this.start(Object.extend({from:f,to:e},a||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(a,e){var f={};if(this.options.scaleX){f.width=e.round()+"px"}if(this.options.scaleY){f.height=a.round()+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(e-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){f.top=this.originalTop-c+"px"}if(this.options.scaleX){f.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){f.top=-c+"px"}if(this.options.scaleX){f.left=-b+"px"}}}this.element.setStyle(f)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+((this._base[d]+(this._delta[d]*a)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(c){var b=arguments[1]||{},a=document.viewport.getScrollOffsets(),d=$(c).cumulativeOffset();if(b.offset){d[1]+=b.offset}return new Effect.Tween(null,a.top,d[1],b,function(e){scrollTo(a.left,e.round())})};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:a})}},arguments[1]||{});return new Effect.Opacity(c,b)};Effect.Appear=function(b){b=$(b);var a=Object.extend({from:(b.getStyle("display")=="none"?0:b.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(b,a)};Effect.Puff=function(b){b=$(b);var a={opacity:b.getInlineOpacity(),position:b.getStyle("position"),top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};return new Effect.Parallel([new Effect.Scale(b,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(c){Position.absolutize(c.effects[0].element)},afterFinishInternal:function(c){c.effects[0].element.hide().setStyle(a)}},arguments[1]||{}))};Effect.BlindUp=function(a){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(b){b.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(b){b=$(b);var a=b.getDimensions();return new Effect.Scale(b,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:a.height,originalWidth:a.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(c){c.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(b){b=$(b);var a=b.getInlineOpacity();return new Effect.Appear(b,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(c){new Effect.Scale(c.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(d){d.element.makePositioned().makeClipping()},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned().setStyle({opacity:a})}})}},arguments[1]||{}))};Effect.DropOut=function(b){b=$(b);var a={top:b.getStyle("top"),left:b.getStyle("left"),opacity:b.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(b,{x:0,y:100,sync:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(c){c.effects[0].element.makePositioned()},afterFinishInternal:function(c){c.effects[0].element.hide().undoPositioned().setStyle(a)}},arguments[1]||{}))};Effect.Shake=function(d){d=$(d);var b=Object.extend({distance:20,duration:0.5},arguments[1]||{});var e=parseFloat(b.distance);var c=parseFloat(b.duration)/10;var a={top:d.getStyle("top"),left:d.getStyle("left")};return new Effect.Move(d,{x:e,y:0,duration:c,afterFinishInternal:function(f){new Effect.Move(f.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(g){new Effect.Move(g.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(i){new Effect.Move(i.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-e,y:0,duration:c,afterFinishInternal:function(k){k.element.undoPositioned().setStyle(a)}})}})}})}})}})}})};Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.SlideUp=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};Effect.Grow=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var g=c.getDimensions();var h,f;var e,d;switch(b.direction){case"top-left":h=f=e=d=0;break;case"top-right":h=g.width;f=d=0;e=-g.width;break;case"bottom-left":h=e=0;f=g.height;d=-g.height;break;case"bottom-right":h=g.width;f=g.height;e=-g.width;d=-g.height;break;case"center":h=g.width/2;f=g.height/2;e=-g.width/2;d=-g.height/2;break}return new Effect.Move(c,{x:h,y:f,duration:0.01,beforeSetup:function(i){i.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(i){new Effect.Parallel([new Effect.Opacity(i.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(i.element,{x:e,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(i.element,100,{scaleMode:{originalHeight:g.height,originalWidth:g.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(j){j.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(j){j.effects[0].element.undoClipping().undoPositioned().setStyle(a)}},b))}})};Effect.Shrink=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var f=c.getDimensions();var e,d;switch(b.direction){case"top-left":e=d=0;break;case"top-right":e=f.width;d=0;break;case"bottom-left":e=0;d=f.height;break;case"bottom-right":e=f.width;d=f.height;break;case"center":e=f.width/2;d=f.height/2;break}return new Effect.Parallel([new Effect.Opacity(c,{sync:true,to:0,from:1,transition:b.opacityTransition}),new Effect.Scale(c,window.opera?1:0,{sync:true,transition:b.scaleTransition,restoreAfterFinish:true}),new Effect.Move(c,{x:e,y:d,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(g){g.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(g){g.effects[0].element.hide().undoClipping().undoPositioned().setStyle(a)}},b))};Effect.Pulsate=function(c){c=$(c);var b=arguments[1]||{},a=c.getInlineOpacity(),e=b.transition||Effect.Transitions.linear,d=function(f){return 1-e((-Math.cos((f*(b.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(c,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(f){f.element.setStyle({opacity:a})}},b),{transition:d}))};Effect.Fold=function(b){b=$(b);var a={top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};b.makeClipping();return new Effect.Scale(b,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(c){new Effect.Scale(b,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(a)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(c){this.element=$(c);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(a.style)){this.style=$H(a.style)}else{if(a.style.include(":")){this.style=a.style.parseStyle()}else{this.element.addClassName(a.style);this.style=$H(this.element.getStyles());this.element.removeClassName(a.style);var b=this.element.getStyles();this.style=this.style.reject(function(d){return d.value==b[d.key]});a.afterFinishInternal=function(d){d.element.addClassName(d.options.style);d.transforms.each(function(e){d.element.style[e.style]=""})}}}this.start(a)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b)){b="#ffffff"}b=b.parseColor();return $R(0,2).map(function(c){return parseInt(b.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(g){var f=g[0],e=g[1],d=null;if(e.parseColor("#zzzzzz")!="#zzzzzz"){e=e.parseColor();d="color"}else{if(f=="opacity"){e=parseFloat(e);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(e)){var c=e.match(/^([\+\-]?[0-9\.]+)(.*)$/);e=parseFloat(c[1]);d=(c.length==3)?c[2]:null}}}var b=this.element.getStyle(f);return{style:f.camelize(),originalValue:d=="color"?a(b):parseFloat(b||0),targetValue:d=="color"?a(e):e,unit:d}}.bind(this)).reject(function(b){return((b.originalValue==b.targetValue)||(b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))))})},update:function(a){var d={},b,c=this.transforms.length;while(c--){d[(b=this.transforms[c]).style]=b.unit=="color"?"#"+(Math.round(b.originalValue[0]+(b.targetValue[0]-b.originalValue[0])*a)).toColorPart()+(Math.round(b.originalValue[1]+(b.targetValue[1]-b.originalValue[1])*a)).toColorPart()+(Math.round(b.originalValue[2]+(b.targetValue[2]-b.originalValue[2])*a)).toColorPart():(b.originalValue+(b.targetValue-b.originalValue)*a).toFixed(3)+(b.unit===null?"":b.unit)}this.element.setStyle(d,true)}});Effect.Transform=Class.create({initialize:function(a){this.tracks=[];this.options=arguments[1]||{};this.addTracks(a)},addTracks:function(a){a.each(function(b){b=$H(b);var c=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:c}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var d=a.get("ids"),c=a.get("effect"),b=a.get("options");var e=[$(d)||$$(d)].flatten();return e.map(function(f){return new c(f,Object.extend({sync:true},b))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var b,a=$H();if(Prototype.Browser.WebKit){b=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';b=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(c){if(b[c]){a.set(c,b[c])}});if(Prototype.Browser.IE&&this.include("opacity")){a.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return a};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(b){var a=document.defaultView.getComputedStyle($(b),null);return Element.CSS_PROPERTIES.inject({},function(c,d){c[d]=a[d];return c})}}else{Element.getStyles=function(b){b=$(b);var a=b.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(d,e){d[e]=a[e];return d});if(!c.opacity){c.opacity=b.getOpacity()}return c}}Effect.Methods={morph:function(a,b){a=$(a);new Effect.Morph(a,Object.extend({style:b},arguments[2]||{}));return a},visualEffect:function(c,e,b){c=$(c);var d=e.dasherize().camelize(),a=d.charAt(0).toUpperCase()+d.substring(1);new Effect[a](c,b);return c},highlight:function(b,a){b=$(b);new Effect.Highlight(b,a);return b}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(c,b){c=$(c);Effect[a.charAt(0).toUpperCase()+a.substring(1)](c,b);return c}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
/****************************** /home/escapio/htdocs/live/public/js/help.js ******************************/
PortalHelp=function(a,b){this.id="help-"+b;this.help_id=b;this.object=$(this.id);this.trigger=a;if(this.object){this.toggle();return}this.object=this.createHTML();this.loadContent();this.show()};PortalHelp.prototype.createHTML=function(){var b='<div id="'+this.id+'" class="help-overlay" style="display:none;">';b+='<div class="help-overlay-top-right">';b+='<div class="help-overlay-bottom-right">';b+='<div class="help-overlay-bottom-left">';b+='<div class="help-overlay-center1">';b+='<div id="'+this.id+'-content" class="help-overlay-center2">';b+="</div></div></div></div></div>";b+='<div><div class="help-overlay-i" onclick="esc_help('+this.object+", "+this.help_id+');">&nbsp;</div></div>';var a=document.getElementsByTagName("body")[0];new Insertion.Bottom(a,b);return $(this.id)};PortalHelp.prototype.position=function(){var a=Position.page(this.trigger);var b=Position.realOffset(this.trigger);this.object.setStyle({left:(a[0]+b[0]-34)+"px",top:(a[1]+b[1]-this.object.getHeight()+20)+"px"})};PortalHelp.prototype.toggle=function(){if(this.object.visible()){this.hide()}else{this.show()}};PortalHelp.prototype.show=function(){this.object.show()};PortalHelp.prototype.hide=function(){this.object.hide()};PortalHelp.prototype.loadContent=function(){var a=$(this.id+"-content");a.innerHTML='<img src="/public/img/spinner.gif" alt="loading..." />';new Ajax.Request("/ajax/portal_help",{parameters:{id:this.help_id},onSuccess:this.loadContentCallback.bind(this)});this.position()};PortalHelp.prototype.loadContentCallback=function(a){var c=a.responseText.evalJSON();if(!c){return}var b=$(this.id+"-content");b.innerHTML=c.content;this.position()};