diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-20 17:28:43 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-20 17:56:51 +0100 |
commit | 73b2bff83aa9fcac6fe1985ddccd76d62a246f2f (patch) | |
tree | e47b64284e8df14c8dc61decd212cc048f4cd15d /sonar-server | |
parent | d77865e9b9a496a2b17a4166ef039e51cd8bd3dc (diff) | |
download | sonarqube-73b2bff83aa9fcac6fe1985ddccd76d62a246f2f.tar.gz sonarqube-73b2bff83aa9fcac6fe1985ddccd76d62a246f2f.zip |
SONAR-3006 Remove the old TimeMachine page & all related code
Diffstat (limited to 'sonar-server')
8 files changed, 0 insertions, 2307 deletions
diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index ec297f7c517..dad74aa3a27 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -263,7 +263,6 @@ <aggregation> <includes> <include>**/yui-2.6.0-min.css</include> - <include>**/calendar-min.css</include> <include>**/style-min.css</include> <include>**/sonar-colorizer-min.css</include> <include>**/dashboard-min.css</include> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb deleted file mode 100644 index 271849f291f..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb +++ /dev/null @@ -1,96 +0,0 @@ - # - # Sonar, entreprise quality control tool. - # Copyright (C) 2008-2012 SonarSource - # mailto:contact AT sonarsource DOT com - # - # Sonar is free software; you can redistribute it and/or - # modify it under the terms of the GNU Lesser General Public - # License as published by the Free Software Foundation; either - # version 3 of the License, or (at your option) any later version. - # - # Sonar is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # Lesser General Public License for more details. - # - # You should have received a copy of the GNU Lesser General Public - # License along with Sonar; if not, write to the Free Software - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - # -class TimemachineController < ApplicationController - - before_filter :admin_required, :only => [ :set_default_chart_metrics ] - verify :method => :post, :only => [ :set_default_chart_metrics ], :redirect_to => { :action => :index } - - SECTION=Navigation::SECTION_RESOURCE - CONFIGURATION_DEFAULT_CHART_METRICS='timemachine.chartMetrics' - - MAX_SNAPSHOTS = 5 - - def index - init_resource_for_user_role - - if params[:sid] - @sids = params[:sid].split(',').collect {|s| s.to_i} - - # - # see the explanation of the conditions on scope/qualifier in the method Snapshot.for_timemachine_matrix() - # - @snapshots=Snapshot.find(:all, - :include => 'events', - :conditions => {:id => @sids, :project_id => @resource.id, :scope => @resource.scope, :qualifier => @resource.qualifier}, :order => 'snapshots.created_at ASC') - else - @snapshots=Snapshot.for_timemachine_matrix(@resource) - @sids = @snapshots.collect{|s| s.id}.uniq - end - - snapshot_by_id={} - @snapshots.each do |s| - snapshot_by_id[s.id]=s - end - - measures=ProjectMeasure.find(:all, :conditions => {:rule_id => nil, :rule_priority => nil, :snapshot_id => @sids, :characteristic_id => nil, :person_id => nil}) - - rows_by_metric_id={} - @rows=[] - - measures.each do |measure| - next unless measure.metric - - if measure.metric.timemachine? && (measure.value || measure.text_value) - row=rows_by_metric_id[measure.metric_id] - unless row - row=Sonar::TimemachineRow.new(measure.metric) - @rows<<row - rows_by_metric_id[measure.metric_id]=row - end - - #optimization : avoid eager loading of snapshots - measure.snapshot=snapshot_by_id[measure.snapshot_id] - row.add_measure(measure) - end - end - - @rows.sort! - - if params[:metrics] - @metric_keys=params[:metrics].split(',') - else - @metric_keys=Property.value(CONFIGURATION_DEFAULT_CHART_METRICS) - if @metric_keys.blank? - @metric_keys=Metric.default_time_machine_metrics - else - @metric_keys=@metric_keys.split(',') - end - end - end - - - def set_default_chart_metrics - metric_keys=params[:metrics] - Property.set(CONFIGURATION_DEFAULT_CHART_METRICS, metric_keys) - flash['notice']='Default metrics on chart are updated.' - redirect_to :overwrite_params => { :action => 'index' } - end - -end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb deleted file mode 100644 index 599585929a1..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb +++ /dev/null @@ -1,22 +0,0 @@ -# -# Sonar, entreprise quality control tool. -# Copyright (C) 2008-2012 SonarSource -# mailto:contact AT sonarsource DOT com -# -# Sonar is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 3 of the License, or (at your option) any later version. -# -# Sonar is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with Sonar; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 -# -module TimemachineHelper - -end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb index f51f6564063..ab826232405 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb @@ -55,8 +55,6 @@ <a href="<%= ApplicationController.root_context -%>/components/index/<%= @project.id -%>"><%= message('components.page') -%></a></li> <li class="<%= 'selected' if request.request_uri.include?('/drilldown/violations') -%>"> <a href="<%= ApplicationController.root_context -%>/drilldown/violations/<%= @project.id -%><%= "?"+period_param if period_param -%>"><%= message('violations_drilldown.page') -%></a></li> - <li class="<%= 'selected' if controller.controller_path=='timemachine' -%>"> - <a href="<%= ApplicationController.root_context -%>/timemachine/index/<%= @project.id -%>"><%= message('timemachine.page') -%></a></li> <li class="<%= 'selected' if request.request_uri.include?('/cloud/index') -%>"> <a href="<%= ApplicationController.root_context -%>/cloud/index/<%= @project.id -%>"><%= message('clouds.page') -%></a></li> <% controller.java_facade.getPages(Navigation::SECTION_RESOURCE, @project.scope, @project.qualifier, @project.language).each do |page| %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/timemachine/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/timemachine/index.html.erb deleted file mode 100644 index 97a323568ae..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/timemachine/index.html.erb +++ /dev/null @@ -1,268 +0,0 @@ -<%= javascript_include_tag 'calendar/yahoo-dom-event-min.js' -%> -<%= javascript_include_tag 'calendar/calendar-min.js' -%> - -<div id="timemachine"> -<style type="text/css"> - #calContainer { display:none; position:absolute; } -</style> - -<script type="text/javascript"> - var selectedSnapshots = new Array(); - - function selectTimeMachineSnapshot(id) { - if (id != null && id != '' && selectedSnapshots.indexOf(id) == -1) { - var snapshotDate = snapshots[id]; - snapshotsCalendar.select(snapshotDate); - snapshotsCalendar.render(); - selectSnapshot(id, false); - } - if ($('select_label')) { - $('select_label').options[0].selected = true; - } - } - - function selectSnapshot(id, refresh) { - if (id != null && id != '') { - selectedSnapshots = selectedSnapshots.without(id); - selectedSnapshots.push(id); - if (refresh) { - refreshTimeMachinePage(); - } - } - } - - function unselectSnapshot(id, refresh) { - selectedSnapshots = selectedSnapshots.without(id); - if (refresh) { - refreshTimeMachinePage(); - } - } - - function collectSelectedMetrics() { - var metrics_tab = new Array(); - for (var i = 0; i < $('metrics_form').metric.length; i++) { - if ($('metrics_form').metric[i].checked) { - metrics_tab.push($('metrics_form').metric[i].value); - } - } - $('timemachine_form_metrics').value = metrics_tab; - $('chart_defaults_form_metrics').value = metrics_tab; - return metrics_tab; - } - - function refreshTimeMachinePage() { - $('sid').value = selectedSnapshots; - $('timemachine_form').submit(); - } - - function refreshTimeMachineChart(jumpToChart) { - var url="<%= url_for :controller => 'charts', :action => 'trends', :id => @resource.id, :locale => I18n.locale -%>&sids=" + selectedSnapshots + "&metrics=" + collectSelectedMetrics() + "&format=png&ts=" + (new Date()).getTime(); - - $('timemachine_chart').src=url; - if (jumpToChart) { - location.href='#chart_anchor'; - } - return false; - } -</script> -<center> -<a name="chart_anchor" class="nolink"><img id="timemachine_chart" src="" alt="" height="<%= ChartsController::DEFAULT_TRENDS_HEIGHT -%>px" width="<%= ChartsController::DEFAULT_TRENDS_WIDTH -%>px"/></a> -</center> -<br/><br/> - -<% form_for( :compare, :html => { :id => 'timemachine_form', :method => 'get' }, :url => { :controller => 'timemachine', :action => 'index', :id => @resource.id}) do |form| %> - <input type="hidden" name="sid" id="sid" value=""/> - <input type="hidden" name="metrics" id="timemachine_form_metrics" value=""/> -<% end %> -<% form_for( :compare, :html => { :id => 'chart_defaults_form', :method => 'post' }, :url => { :controller => 'timemachine', :action => 'set_default_chart_metrics', :id => @resource.id}) do |form| %> - <input type="hidden" name="metrics" id="chart_defaults_form_metrics" value=""/> -<% end %> -<table id="timemachine_matrix" class="matrix"> -<thead> - <tr> - <th valign="top" nowrap="nowrap" style="text-align: left"> - <%= message('time_machine.show_date') -%> - <div class="yui-skin-sam" style="display: inline;"> - <a href="#" id="calendar_link" class="nolink"><%= image_tag('calendar_view_day.png', :alt => message('calendar')) %></a> - <div id="calContainer"> </div> - </div><br/> - <% - selectable_events = @resource.events_with_snapshot.select{|event| !(@sids.include?(event.snapshot_id))} - unless selectable_events.empty? - %> - <%= message('time_machine.show_event') -%> - <select id="select_label" onchange="selectSnapshot(this.options[this.selectedIndex].value, true)"> - <option value=""> </option> - <% - selectable_events.each do |event| - - %> - <option value="<%= event.snapshot_id -%>"><%= event.fullname %></option> - <% end %> - </select> - <% end %> - </th> - <% @snapshots.each do |snapshot| %> - <th nowrap="nowrap" align="right" valign="top"> - <%= l snapshot.created_at.to_date %> - <br/> - <% snapshot.user_events.each do |event| %> - <b><%= event.fullname %></b> - <br/> - <% end %> - <a href="#" onClick="unselectSnapshot(<%= snapshot.id -%>, true)" class="action"><%= message('hide').downcase -%></a> - </th> - <% end %> - <th> </th> - </tr> -</thead> - - <form name="metrics_form" id="metrics_form" onsubmit="refreshTimeMachineChart(true);return false;"> - <tbody> - <% - previous_domain='' - @rows.select{|row| row.metric.val_type != Metric::VALUE_TYPE_DISTRIB}.each do |row| - if previous_domain != row.domain %> - <tr> - <td class="title" colspan="<%= @snapshots.size + 2 -%>" align="left"><br/><%= row.domain %></td> - </tr> - <% end - previous_domain = row.domain %> - <tr class="<%= cycle("even", "odd", :name => row.domain) -%>"> - <td width="1%" nowrap="nowrap" valign="top"> - <% if row.metric.numeric? %> - <input type="checkbox" name="metric" value="<%= row.metric.key -%>" <%= 'checked' if @metric_keys.include?(row.metric.key) -%>/> - <% end %> - <%= row.metric.short_name %> - </td> - <% @snapshots.each do |snapshot| - measure=row.measure(snapshot) - %> - <td align="right" width="1%" nowrap="nowrap"><%= format_measure(measure, :skip_span_id => true) %></td> - <% end %> - <td> - <% - sparkline_url=row.sparkline_url - if sparkline_url - %> - <%= image_tag(sparkline_url) %> - <% - end - %> - </td> - </tr> - <% end %> - <tr> - <td class="title"><br/><%= message('time_machine.distributions') -%></td> - <% @snapshots.each_with_index do |snapshot, index| %> - <td align="right" valign="bottom"> - <% current_color = ChartsController::CHART_COLORS[index % ChartsController::CHART_COLORS.size ] %> - <div style="width:10px; height:10px; background-color:#<%= current_color -%>"> </div> - </td> - <% end %> - <td> </td> - </tr> - <tr><td colspan="<%= @snapshots.size + 2 -%>"> -<% - @rows.select{|row| row.metric.val_type == Metric::VALUE_TYPE_DISTRIB}.each do |row| - values=[] - colors=[] - @snapshots.each_with_index do |snapshot, index| - if row.measure(snapshot) && row.measure(snapshot).data - values<<u(row.measure(snapshot).data) - else - values<<'' - end - colors<<ChartsController::CHART_COLORS[index % ChartsController::CHART_COLORS.size ] - end - chart_url = "ck=distarea&v=" + values.join('|') + "&w=360&h=150&c=" + colors.join(',') - chart_id = "distribution_#{row.metric.key}" -%> -<div style="float:left;width: 400px;text-align:center;padding-bottom: 25px;"> - <%= chart(chart_url, :id => chart_id, :alt => message('time_machine.distribution_chart'), :width => 360, :height => 150) -%><br/> - <b><%= row.metric.short_name -%></b> -</div> -<% end %> -</td></tr> - </tbody> - <tfoot> - <tr> - <td colspan="<%= @snapshots.size + 2 -%>"> - <input type="submit" value="<%= message('time_machine.compare_on_chart') -%>" /> - <% if is_admin? %> - <a href="#" onClick="collectSelectedMetrics();$('chart_defaults_form').submit();return false;" class="action"><%= message('time_machine.set_as_default_for_all_users') -%></a> - <% end %> - </td> - </tr> - </tfoot> - </form> -</table> -</div> - -<script type="text/javascript"> - var snapshots = new Hash(); - <% @resource.processed_snapshots.each do |snapshot| - date = snapshot.created_at - js_date = date.year.to_s + "," + (date.month - 1).to_s + "," + date.day.to_s %> - snapshots.set(<%= snapshot.id.to_s %>,new Date(<%= js_date %>)); - <% end %> - - snapshotsCalendar = new YAHOO.widget.Calendar("cal2", "calContainer", { multi_select:true, navigator:true, START_WEEKDAY:1, close:true }); - - snapshotCellRenderer = function(workingDate, cell) { - snapshotId = findSnapshotIdPerDate(workingDate.getFullYear(), workingDate.getMonth(), workingDate.getDate()); - if (snapshotId == null) { - cell.innerHTML = "x"; - return YAHOO.widget.Calendar.STOP_RENDER; - } - } - days = [1,2,3,4,5,6,7]; - days.each(function(date) { - snapshotsCalendar.addWeekdayRenderer(date, snapshotCellRenderer); - }); - - snapshotSelectHandler = function(type, args, obj) { - toggleSnapshotSelection(this._toDate(args[0][0])); - compareSnapshots(); - refreshTimeMachinePageChart(); - }; - - snapshotDeselectHandler = function(type, args, obj) { - toggleSnapshotSelection(this._toDate(args[0])); - }; - - <% @snapshots.each do |snapshot| %> - <%= "selectTimeMachineSnapshot(#{snapshot.id});" %> - <% end %> - - snapshotsCalendar.selectEvent.subscribe(snapshotSelectHandler, snapshotsCalendar, true); - snapshotsCalendar.deselectEvent.subscribe(snapshotDeselectHandler, snapshotsCalendar, true); - snapshotsCalendar.render(); - - function toggleSnapshotSelection(date) { - var snapshotId = findSnapshotIdPerDate(date.getFullYear(), date.getMonth(), date.getDate()); - if ($('l_' + snapshotId)) { - unselectSnapshot(snapshotId, true); - } else { - selectSnapshot(snapshotId, true); - } - } - - function findSnapshotIdPerDate(year, month, date) { - snapshotId = null; - snapshots.each(function(pair) { - snapshotDate = pair.value; - if (snapshotDate.getFullYear() == year && snapshotDate.getMonth() == month && snapshotDate.getDate() == date) { - snapshotId = pair.key; - return; - } - }); - return snapshotId; - } - - Event.observe($("calendar_link"), 'click', function() { - snapshotsCalendar.show(); - }); - - refreshTimeMachineChart(false); -</script> diff --git a/sonar-server/src/main/webapp/javascripts/calendar/calendar-min.js b/sonar-server/src/main/webapp/javascripts/calendar/calendar-min.js deleted file mode 100644 index 0d8406af862..00000000000 --- a/sonar-server/src/main/webapp/javascripts/calendar/calendar-min.js +++ /dev/null @@ -1,1514 +0,0 @@ -(function(){YAHOO.util.Config=function(D){if(D){this.init(D) -}}; -var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config; -A.CONFIG_CHANGED_EVENT="configChanged"; -A.BOOLEAN_TYPE="boolean"; -A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D; -this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT); -this.configChangedEvent.signature=C.LIST; -this.queueInProgress=false; -this.config={}; -this.initialConfig={}; -this.eventQueue=[] -},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE) -},checkNumber:function(D){return(!isNaN(D)) -},fireEvent:function(D,F){var E=this.config[D]; -if(E&&E.event){E.event.fire(F) -}},addProperty:function(E,D){E=E.toLowerCase(); -this.config[E]=D; -D.event=this.createEvent(E,{scope:this.owner}); -D.event.signature=C.LIST; -D.key=E; -if(D.handler){D.event.subscribe(D.handler,this.owner) -}this.setProperty(E,D.value,true); -if(!D.suppressEvent){this.queueProperty(E,D.value) -}},getConfig:function(){var D={},F,E; -for(F in this.config){E=this.config[F]; -if(E&&E.event){D[F]=E.value -}}return D -},getProperty:function(D){var E=this.config[D.toLowerCase()]; -if(E&&E.event){return E.value -}else{return undefined -}},resetProperty:function(D){D=D.toLowerCase(); -var E=this.config[D]; -if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]); -return true -}}else{return false -}},setProperty:function(E,G,D){var F; -E=E.toLowerCase(); -if(this.queueInProgress&&!D){this.queueProperty(E,G); -return true -}else{F=this.config[E]; -if(F&&F.event){if(F.validator&&!F.validator(G)){return false -}else{F.value=G; -if(!D){this.fireEvent(E,G); -this.configChangedEvent.fire([E,G]) -}return true -}}else{return false -}}},queueProperty:function(S,P){S=S.toLowerCase(); -var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E; -if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false -}else{if(!B.isUndefined(P)){R.value=P -}else{P=R.value -}K=false; -J=this.eventQueue.length; -for(L=0; -L<J; -L++){G=this.eventQueue[L]; -if(G){H=G[0]; -I=G[1]; -if(H==S){this.eventQueue[L]=null; -this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]); -K=true; -break -}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]) -}}if(R.supercedes){O=R.supercedes.length; -for(T=0; -T<O; -T++){Q=R.supercedes[T]; -F=this.eventQueue.length; -for(E=0; -E<F; -E++){M=this.eventQueue[E]; -if(M){N=M[0]; -D=M[1]; -if(N==Q.toLowerCase()){this.eventQueue.push([N,D]); -this.eventQueue[E]=null; -break -}}}}}return true -}else{return false -}},refireEvent:function(D){D=D.toLowerCase(); -var E=this.config[D]; -if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D) -}else{this.fireEvent(D,E.value) -}}},applyConfig:function(D,G){var F,E; -if(G){E={}; -for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F] -}}this.initialConfig=E -}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]) -}}},refresh:function(){var D; -for(D in this.config){this.refireEvent(D) -}},fireQueue:function(){var E,H,D,G,F; -this.queueInProgress=true; -for(E=0; -E<this.eventQueue.length; -E++){H=this.eventQueue[E]; -if(H){D=H[0]; -G=H[1]; -F=this.config[D]; -F.value=G; -this.fireEvent(D,G) -}}this.queueInProgress=false; -this.eventQueue=[] -},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()]; -if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D) -}return true -}else{return false -}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()]; -if(F&&F.event){return F.event.unsubscribe(E,G) -}else{return false -}},toString:function(){var D="Config"; -if(this.owner){D+=" ["+this.owner.toString()+"]" -}return D -},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length; -for(E=0; -E<F; -E++){G=this.eventQueue[E]; -if(G){D+=G[0]+"="+G[1]+", " -}}return D -},destroy:function(){var E=this.config,D,F; -for(D in E){if(B.hasOwnProperty(E,D)){F=E[D]; -F.event.unsubscribeAll(); -F.event=null -}}this.configChangedEvent.unsubscribeAll(); -this.configChangedEvent=null; -this.owner=null; -this.config=null; -this.initialConfig=null; -this.eventQueue=null -}}; -A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G; -if(F>0){G=F-1; -do{D=E.subscribers[G]; -if(D&&D.obj==I&&D.fn==H){return true -}}while(G--) -}return false -}; -YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider) -}()); -YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime()); -switch(D){case this.MONTH:var E=A.getMonth()+C; -var B=0; -if(E<0){while(E<0){E+=12; -B-=1 -}}else{if(E>11){while(E>11){E-=12; -B+=1 -}}}F.setMonth(E); -F.setFullYear(A.getFullYear()+B); -break; -case this.DAY:F.setDate(A.getDate()+C); -break; -case this.YEAR:F.setFullYear(A.getFullYear()+C); -break; -case this.WEEK:F.setDate(A.getDate()+(C*7)); -break -}return F -},subtract:function(A,C,B){return this.add(A,C,(B*-1)) -},before:function(C,B){var A=B.getTime(); -if(C.getTime()<A){return true -}else{return false -}},after:function(C,B){var A=B.getTime(); -if(C.getTime()>A){return true -}else{return false -}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true -}else{return false -}},getJan1:function(A){return this.getDate(A,0,1) -},getDayOffset:function(B,D){var C=this.getJan1(D); -var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS); -return A -},getWeekNumber:function(C,F){C=this.clearTime(C); -var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS)); -var B=this.getDate(E.getFullYear(),0,1); -var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1; -var D=Math.ceil((A)/7); -return D -},isYearOverlapWeek:function(A){var C=false; -var B=this.add(A,this.DAY,6); -if(B.getFullYear()!=A.getFullYear()){C=true -}return C -},isMonthOverlapWeek:function(A){var C=false; -var B=this.add(A,this.DAY,6); -if(B.getMonth()!=A.getMonth()){C=true -}return C -},findMonthStart:function(A){var B=this.getDate(A.getFullYear(),A.getMonth(),1); -return B -},findMonthEnd:function(B){var D=this.findMonthStart(B); -var C=this.add(D,this.MONTH,1); -var A=this.subtract(C,this.DAY,1); -return A -},clearTime:function(A){A.setHours(12,0,0,0); -return A -},getDate:function(D,A,C){var B=null; -if(YAHOO.lang.isUndefined(C)){C=1 -}if(D>=100){B=new Date(D,A,C) -}else{B=new Date(); -B.setFullYear(D); -B.setMonth(A); -B.setDate(C); -B.setHours(0,0,0,0) -}return B -}}; -YAHOO.widget.Calendar=function(C,A,B){this.init.apply(this,arguments) -}; -YAHOO.widget.Calendar.IMG_ROOT=null; -YAHOO.widget.Calendar.DATE="D"; -YAHOO.widget.Calendar.MONTH_DAY="MD"; -YAHOO.widget.Calendar.WEEKDAY="WD"; -YAHOO.widget.Calendar.RANGE="R"; -YAHOO.widget.Calendar.MONTH="M"; -YAHOO.widget.Calendar.DISPLAY_DAYS=42; -YAHOO.widget.Calendar.STOP_RENDER="S"; -YAHOO.widget.Calendar.SHORT="short"; -YAHOO.widget.Calendar.LONG="long"; -YAHOO.widget.Calendar.MEDIUM="medium"; -YAHOO.widget.Calendar.ONE_CHAR="1char"; -YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null}}; -YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"}; -YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"}; -YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(B){var A={id:null,container:null,config:null}; -if(B&&B.length&&B.length>0){switch(B.length){case 1:A.id=null; -A.container=B[0]; -A.config=null; -break; -case 2:if(YAHOO.lang.isObject(B[1])&&!B[1].tagName&&!(B[1] instanceof String)){A.id=null; -A.container=B[0]; -A.config=B[1] -}else{A.id=B[0]; -A.container=B[1]; -A.config=null -}break; -default:A.id=B[0]; -A.container=B[1]; -A.config=B[2]; -break -}}else{}return A -},init:function(D,B,C){var A=this._parseArgs(arguments); -D=A.id; -B=A.container; -C=A.config; -this.oDomContainer=YAHOO.util.Dom.get(B); -if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId() -}if(!D){D=this.oDomContainer.id+"_t" -}this.id=D; -this.containerId=this.oDomContainer.id; -this.initEvents(); -this.today=new Date(); -YAHOO.widget.DateMath.clearTime(this.today); -this.cfg=new YAHOO.util.Config(this); -this.Options={}; -this.Locale={}; -this.initStyles(); -YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER); -YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE); -this.cellDates=[]; -this.cells=[]; -this.renderStack=[]; -this._renderStack=[]; -this.setupConfig(); -if(C){this.cfg.applyConfig(C,true) -}this.cfg.fireQueue() -},configIframe:function(C,B,D){var A=B[0]; -if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position"); -if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe"); -this.iframe.src="javascript:false;"; -YAHOO.util.Dom.setStyle(this.iframe,"opacity","0"); -if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize") -}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild) -}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe) -}this.iframe=null -}}}}},configTitle:function(B,A,C){var E=A[0]; -if(E){this.createTitleBar(E) -}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key); -if(!D){this.removeTitleBar() -}else{this.createTitleBar(" ") -}}},configClose:function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key); -if(E){if(!D){this.createTitleBar(" ") -}this.createCloseButton() -}else{this.removeCloseButton(); -if(!D){this.removeTitleBar() -}}},initEvents:function(){var A=YAHOO.widget.Calendar._EVENT_TYPES; -this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT); -this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT); -this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT); -this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT); -this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE); -this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER); -this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER); -this.resetEvent=new YAHOO.util.CustomEvent(A.RESET); -this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR); -this.beforeShowEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW); -this.showEvent=new YAHOO.util.CustomEvent(A.SHOW); -this.beforeHideEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE); -this.hideEvent=new YAHOO.util.CustomEvent(A.HIDE); -this.beforeShowNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW_NAV); -this.showNavEvent=new YAHOO.util.CustomEvent(A.SHOW_NAV); -this.beforeHideNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE_NAV); -this.hideNavEvent=new YAHOO.util.CustomEvent(A.HIDE_NAV); -this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER_NAV); -this.renderNavEvent=new YAHOO.util.CustomEvent(A.RENDER_NAV); -this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true); -this.selectEvent.subscribe(this.onSelect,this,true); -this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true); -this.deselectEvent.subscribe(this.onDeselect,this,true); -this.changePageEvent.subscribe(this.onChangePage,this,true); -this.renderEvent.subscribe(this.onRender,this,true); -this.resetEvent.subscribe(this.onReset,this,true); -this.clearEvent.subscribe(this.onClear,this,true) -},doSelectCell:function(G,A){var L,F,I,C; -var H=YAHOO.util.Event.getTarget(G); -var B=H.tagName.toLowerCase(); -var E=false; -while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true -}H=H.parentNode; -B=H.tagName.toLowerCase(); -if(B=="html"){return -}}if(E){YAHOO.util.Event.preventDefault(G) -}L=H; -if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1]; -I=A.cellDates[F]; -C=YAHOO.widget.DateMath.getDate(I[0],I[1]-1,I[2]); -var K; -if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0]; -if(K){K.blur() -}var D=A.cellDates[F]; -var J=A._indexOfSelectedFieldArray(D); -if(J>-1){A.deselectCell(F) -}else{A.selectCell(F) -}}else{K=L.getElementsByTagName("a")[0]; -if(K){K.blur() -}A.selectCell(F) -}}},doCellMouseOver:function(C,B){var A; -if(C){A=YAHOO.util.Event.getTarget(C) -}else{A=this -}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode; -if(!A.tagName||A.tagName.toLowerCase()=="html"){return -}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER) -}},doCellMouseOut:function(C,B){var A; -if(C){A=YAHOO.util.Event.getTarget(C) -}else{A=this -}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode; -if(!A.tagName||A.tagName.toLowerCase()=="html"){return -}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER) -}},setupConfig:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate}); -this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected}); -this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle}); -this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose}); -this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate}); -this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate}); -this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions}); -this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions}); -this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale}); -this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale}); -this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale}); -this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale}); -this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale}); -this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale}); -var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key); -this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key) -}; -this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true); -this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true); -this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues}); -this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues}); -this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale}); -this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale}); -this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale}); -this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale}); -this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale}); -this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:this.configNavigator}) -},configPageDate:function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true) -},configMinDate:function(B,A,C){var D=A[0]; -if(YAHOO.lang.isString(D)){D=this._parseDate(D); -this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2])) -}},configMaxDate:function(B,A,C){var D=A[0]; -if(YAHOO.lang.isString(D)){D=this._parseDate(D); -this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2])) -}},configSelected:function(C,A,E){var B=A[0]; -var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; -if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true) -}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D) -}},configOptions:function(B,A,C){this.Options[B.toUpperCase()]=A[0] -},configLocale:function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -this.Locale[C.toUpperCase()]=B[0]; -this.cfg.refireEvent(A.LOCALE_MONTHS.key); -this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key) -},configLocaleValues:function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG; -D=D.toLowerCase(); -var G=C[0]; -switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat(); -break; -case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat(); -break -}break; -case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat(); -break; -case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat(); -break; -case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat(); -break; -case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat(); -break -}var F=this.cfg.getProperty(B.START_WEEKDAY.key); -if(F>0){for(var A=0; -A<F; -++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift()) -}}break -}},configNavigator:function(C,A,D){var E=A[0]; -if(YAHOO.widget.CalendarNavigator&&(E===true||YAHOO.lang.isObject(E))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this); -function B(){if(!this.pages){this.oNavigator.erase() -}}this.beforeRenderEvent.subscribe(B,this,true) -}}else{if(this.oNavigator){this.oNavigator.destroy(); -this.oNavigator=null -}}},initStyles:function(){var A=YAHOO.widget.Calendar._STYLES; -this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_NAV:A.CSS_NAV,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4} -},buildMonthLabel:function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key); -var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX; -var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX; -if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C -}else{return C+B -}},buildDayLabel:function(A){return A.getDate() -},createTitleBar:function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div"); -B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE; -B.innerHTML=A; -this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild); -YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle"); -return B -},removeTitleBar:function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null; -if(A){YAHOO.util.Event.purgeElement(A); -this.oDomContainer.removeChild(A) -}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle") -},createCloseButton:function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif"; -var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0]; -if(!E){E=document.createElement("a"); -A.addListener(E,"click",function(H,G){G.hide(); -A.preventDefault(H) -},this) -}E.href="#"; -E.className="link-close"; -if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img"); -B.src=YAHOO.widget.Calendar.IMG_ROOT+F; -B.className=C; -E.appendChild(B) -}else{E.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'"></span>' -}this.oDomContainer.appendChild(E); -return E -},removeCloseButton:function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null; -if(A){YAHOO.util.Event.purgeElement(A); -this.oDomContainer.removeChild(A) -}},renderHeader:function(E){var H=7; -var F="us/tr/callt.gif"; -var G="us/tr/calrt.gif"; -var M=YAHOO.widget.Calendar._DEFAULT_CONFIG; -if(this.cfg.getProperty(M.SHOW_WEEK_HEADER.key)){H+=1 -}if(this.cfg.getProperty(M.SHOW_WEEK_FOOTER.key)){H+=1 -}E[E.length]="<thead>"; -E[E.length]="<tr>"; -E[E.length]='<th colspan="'+H+'" class="'+this.Style.CSS_HEADER_TEXT+'">'; -E[E.length]='<div class="'+this.Style.CSS_HEADER+'">'; -var K,L=false; -if(this.parent){if(this.index===0){K=true -}if(this.index==(this.parent.cfg.getProperty("pages")-1)){L=true -}}else{K=true; -L=true -}if(K){var A=this.cfg.getProperty(M.NAV_ARROW_LEFT.key); -if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F -}var C=(A===null)?"":' style="background-image:url('+A+')"'; -E[E.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+C+" > </a>" -}var J=this.buildMonthLabel(); -var B=this.parent||this; -if(B.cfg.getProperty("navigator")){J='<a class="'+this.Style.CSS_NAV+'" href="#">'+J+"</a>" -}E[E.length]=J; -if(L){var D=this.cfg.getProperty(M.NAV_ARROW_RIGHT.key); -if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G -}var I=(D===null)?"":' style="background-image:url('+D+')"'; -E[E.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+I+" > </a>" -}E[E.length]="</div>\n</th>\n</tr>"; -if(this.cfg.getProperty(M.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E) -}E[E.length]="</thead>"; -return E -},buildWeekdays:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -C[C.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">'; -if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th> </th>" -}for(var B=0; -B<this.Locale.LOCALE_WEEKDAYS.length; -++B){C[C.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>" -}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th> </th>" -}C[C.length]="</tr>"; -return C -},renderBody:function(c,a){var m=YAHOO.widget.Calendar._DEFAULT_CONFIG; -var AB=this.cfg.getProperty(m.START_WEEKDAY.key); -this.preMonthDays=c.getDay(); -if(AB>0){this.preMonthDays-=AB -}if(this.preMonthDays<0){this.preMonthDays+=7 -}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(c).getDate(); -this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays; -c=YAHOO.widget.DateMath.subtract(c,YAHOO.widget.DateMath.DAY,this.preMonthDays); -var Q,H; -var G="w"; -var W="_cell"; -var U="wd"; -var k="d"; -var I; -var h; -var O=this.today.getFullYear(); -var j=this.today.getMonth(); -var D=this.today.getDate(); -var q=this.cfg.getProperty(m.PAGEDATE.key); -var C=this.cfg.getProperty(m.HIDE_BLANK_WEEKS.key); -var Z=this.cfg.getProperty(m.SHOW_WEEK_FOOTER.key); -var T=this.cfg.getProperty(m.SHOW_WEEK_HEADER.key); -var M=this.cfg.getProperty(m.MINDATE.key); -var S=this.cfg.getProperty(m.MAXDATE.key); -if(M){M=YAHOO.widget.DateMath.clearTime(M) -}if(S){S=YAHOO.widget.DateMath.clearTime(S) -}a[a.length]='<tbody class="m'+(q.getMonth()+1)+" "+this.Style.CSS_BODY+'">'; -var z=0; -var J=document.createElement("div"); -var b=document.createElement("td"); -J.appendChild(b); -var o=this.parent||this; -for(var u=0; -u<6; -u++){Q=YAHOO.widget.DateMath.getWeekNumber(c,q.getFullYear(),AB); -H=G+Q; -if(u!==0&&C===true&&c.getMonth()!=q.getMonth()){break -}else{a[a.length]='<tr class="'+H+'">'; -if(T){a=this.renderRowHeader(Q,a) -}for(var AA=0; -AA<7; -AA++){I=[]; -this.clearElement(b); -b.className=this.Style.CSS_CELL; -b.id=this.id+W+z; -if(c.getDate()==D&&c.getMonth()==j&&c.getFullYear()==O){I[I.length]=o.renderCellStyleToday -}var R=[c.getFullYear(),c.getMonth()+1,c.getDate()]; -this.cellDates[this.cellDates.length]=R; -if(c.getMonth()!=q.getMonth()){I[I.length]=o.renderCellNotThisMonth -}else{YAHOO.util.Dom.addClass(b,U+c.getDay()); -YAHOO.util.Dom.addClass(b,k+c.getDate()); -for(var t=0; -t<this.renderStack.length; -++t){h=null; -var l=this.renderStack[t]; -var AC=l[0]; -var B; -var V; -var F; -switch(AC){case YAHOO.widget.Calendar.DATE:B=l[1][1]; -V=l[1][2]; -F=l[1][0]; -if(c.getMonth()+1==B&&c.getDate()==V&&c.getFullYear()==F){h=l[2]; -this.renderStack.splice(t,1) -}break; -case YAHOO.widget.Calendar.MONTH_DAY:B=l[1][0]; -V=l[1][1]; -if(c.getMonth()+1==B&&c.getDate()==V){h=l[2]; -this.renderStack.splice(t,1) -}break; -case YAHOO.widget.Calendar.RANGE:var Y=l[1][0]; -var X=l[1][1]; -var e=Y[1]; -var L=Y[2]; -var P=Y[0]; -var y=YAHOO.widget.DateMath.getDate(P,e-1,L); -var E=X[1]; -var g=X[2]; -var A=X[0]; -var w=YAHOO.widget.DateMath.getDate(A,E-1,g); -if(c.getTime()>=y.getTime()&&c.getTime()<=w.getTime()){h=l[2]; -if(c.getTime()==w.getTime()){this.renderStack.splice(t,1) -}}break; -case YAHOO.widget.Calendar.WEEKDAY:var K=l[1][0]; -if(c.getDay()+1==K){h=l[2] -}break; -case YAHOO.widget.Calendar.MONTH:B=l[1][0]; -if(c.getMonth()+1==B){h=l[2] -}break -}if(h){I[I.length]=h -}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=o.renderCellStyleSelected -}if((M&&(c.getTime()<M.getTime()))||(S&&(c.getTime()>S.getTime()))){I[I.length]=o.renderOutOfBoundsDate -}else{I[I.length]=o.styleCellDefault; -I[I.length]=o.renderCellDefault -}for(var n=0; -n<I.length; -++n){if(I[n].call(o,c,b)==YAHOO.widget.Calendar.STOP_RENDER){break -}}c.setTime(c.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS); -if(z>=0&&z<=6){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_TOP) -}if((z%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_LEFT) -}if(((z+1)%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_RIGHT) -}var f=this.postMonthDays; -if(C&&f>=7){var N=Math.floor(f/7); -for(var v=0; -v<N; -++v){f-=7 -}}if(z>=((this.preMonthDays+f+this.monthDays)-7)){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_BOTTOM) -}a[a.length]=J.innerHTML; -z++ -}if(Z){a=this.renderRowFooter(Q,a) -}a[a.length]="</tr>" -}}a[a.length]="</tbody>"; -return a -},renderFooter:function(A){return A -},render:function(){this.beforeRenderEvent.fire(); -var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key)); -this.resetRenderers(); -this.cellDates.length=0; -YAHOO.util.Event.purgeElement(this.oDomContainer,true); -var B=[]; -B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+'" id="'+this.id+'">'; -B=this.renderHeader(B); -B=this.renderBody(C,B); -B=this.renderFooter(B); -B[B.length]="</table>"; -this.oDomContainer.innerHTML=B.join("\n"); -this.applyListeners(); -this.cells=this.oDomContainer.getElementsByTagName("td"); -this.cfg.refireEvent(A.TITLE.key); -this.cfg.refireEvent(A.CLOSE.key); -this.cfg.refireEvent(A.IFRAME.key); -this.renderEvent.fire() -},applyListeners:function(){var K=this.oDomContainer; -var B=this.parent||this; -var G="a"; -var D="mousedown"; -var H=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,G,K); -var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,G,K); -if(H&&H.length>0){this.linkLeft=H[0]; -YAHOO.util.Event.addListener(this.linkLeft,D,B.previousMonth,B,true) -}if(C&&C.length>0){this.linkRight=C[0]; -YAHOO.util.Event.addListener(this.linkRight,D,B.nextMonth,B,true) -}if(B.cfg.getProperty("navigator")!==null){this.applyNavListeners() -}if(this.domEventMap){var E,A; -for(var M in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,M)){var I=this.domEventMap[M]; -if(!(I instanceof Array)){I=[I] -}for(var F=0; -F<I.length; -F++){var L=I[F]; -A=YAHOO.util.Dom.getElementsByClassName(M,L.tag,this.oDomContainer); -for(var J=0; -J<A.length; -J++){E=A[J]; -YAHOO.util.Event.addListener(E,L.event,L.handler,L.scope,L.correct) -}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this); -YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this); -YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this) -},applyNavListeners:function(){var D=YAHOO.util.Event; -var C=this.parent||this; -var F=this; -var B=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer); -if(B.length>0){function A(J,I){var H=D.getTarget(J); -if(this===H||YAHOO.util.Dom.isAncestor(this,H)){D.preventDefault(J) -}var E=C.oNavigator; -if(E){var G=F.cfg.getProperty("pagedate"); -E.setYear(G.getFullYear()); -E.setMonth(G.getMonth()); -E.show() -}}D.addListener(B,"click",A) -}},getDateByCellId:function(B){var A=this.getDateFieldsByCellId(B); -return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]) -},getDateFieldsByCellId:function(A){A=A.toLowerCase().split("_cell")[1]; -A=parseInt(A,10); -return this.cellDates[A] -},getCellIndex:function(C){var B=-1; -if(C){var A=C.getMonth(),H=C.getFullYear(),G=C.getDate(),E=this.cellDates; -for(var D=0; -D<E.length; -++D){var F=E[D]; -if(F[0]===H&&F[1]===A+1&&F[2]===G){B=D; -break -}}}return B -},renderOutOfBoundsDate:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB); -A.innerHTML=B.getDate(); -return YAHOO.widget.Calendar.STOP_RENDER -},renderRowHeader:function(B,A){A[A.length]='<th class="calrowhead">'+B+"</th>"; -return A -},renderRowFooter:function(B,A){A[A.length]='<th class="calrowfoot">'+B+"</th>"; -return A -},renderCellDefault:function(B,A){A.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(B)+"</a>" -},styleCellDefault:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE) -},renderCellStyleHighlight1:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1) -},renderCellStyleHighlight2:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2) -},renderCellStyleHighlight3:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3) -},renderCellStyleHighlight4:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4) -},renderCellStyleToday:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY) -},renderCellStyleSelected:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED) -},renderCellNotThisMonth:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM); -A.innerHTML=B.getDate(); -return YAHOO.widget.Calendar.STOP_RENDER -},renderBodyCellRestricted:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL); -YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED); -A.innerHTML=B.getDate(); -return YAHOO.widget.Calendar.STOP_RENDER -},addMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B)); -this.resetRenderers(); -this.changePageEvent.fire() -},subtractMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B)); -this.resetRenderers(); -this.changePageEvent.fire() -},addYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B)); -this.resetRenderers(); -this.changePageEvent.fire() -},subtractYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B)); -this.resetRenderers(); -this.changePageEvent.fire() -},nextMonth:function(){this.addMonths(1) -},previousMonth:function(){this.subtractMonths(1) -},nextYear:function(){this.addYears(1) -},previousYear:function(){this.subtractYears(1) -},reset:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -this.cfg.resetProperty(A.SELECTED.key); -this.cfg.resetProperty(A.PAGEDATE.key); -this.resetEvent.fire() -},clear:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -this.cfg.setProperty(A.SELECTED.key,[]); -this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime())); -this.clearEvent.fire() -},select:function(C){var F=this._toFieldArray(C); -var B=[]; -var E=[]; -var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; -for(var A=0; -A<F.length; -++A){var D=F[A]; -if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire(); -E=this.cfg.getProperty(G) -}B.push(D); -if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D -}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E) -}else{this.cfg.setProperty(G,E) -}this.selectEvent.fire(B) -}return this.getSelectedDates() -},selectCell:function(D){var B=this.cells[D]; -var H=this.cellDates[D]; -var G=this._toDate(H); -var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE); -if(C){this.beforeSelectEvent.fire(); -var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; -var E=this.cfg.getProperty(F); -var A=H.concat(); -if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A -}if(this.parent){this.parent.cfg.setProperty(F,E) -}else{this.cfg.setProperty(F,E) -}this.renderCellStyleSelected(G,B); -this.selectEvent.fire([A]); -this.doCellMouseOut.call(B,null,this) -}return this.getSelectedDates() -},deselect:function(E){var A=this._toFieldArray(E); -var D=[]; -var G=[]; -var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; -for(var B=0; -B<A.length; -++B){var F=A[B]; -if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire(); -G=this.cfg.getProperty(H) -}D.push(F); -var C=this._indexOfSelectedFieldArray(F); -if(C!=-1){G.splice(C,1) -}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G) -}else{this.cfg.setProperty(H,G) -}this.deselectEvent.fire(D) -}return this.getSelectedDates() -},deselectCell:function(E){var H=this.cells[E]; -var B=this.cellDates[E]; -var F=this._indexOfSelectedFieldArray(B); -var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE); -if(G){this.beforeDeselectEvent.fire(); -var I=YAHOO.widget.Calendar._DEFAULT_CONFIG; -var D=this.cfg.getProperty(I.SELECTED.key); -var C=this._toDate(B); -var A=B.concat(); -if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED) -}D.splice(F,1) -}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D) -}else{this.cfg.setProperty(I.SELECTED.key,D) -}this.deselectEvent.fire(A) -}return this.getSelectedDates() -},deselectAll:function(){this.beforeDeselectEvent.fire(); -var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; -var A=this.cfg.getProperty(D); -var B=A.length; -var C=A.concat(); -if(this.parent){this.parent.cfg.setProperty(D,[]) -}else{this.cfg.setProperty(D,[]) -}if(B>0){this.deselectEvent.fire(C) -}return this.getSelectedDates() -},_toFieldArray:function(B){var A=[]; -if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]] -}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B) -}else{if(YAHOO.lang.isArray(B)){for(var C=0; -C<B.length; -++C){var D=B[C]; -A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()] -}}}}return A -},toDate:function(A){return this._toDate(A) -},_toDate:function(A){if(A instanceof Date){return A -}else{return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]) -}},_fieldArraysAreEqual:function(C,B){var A=false; -if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true -}return A -},_indexOfSelectedFieldArray:function(E){var D=-1; -var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key); -for(var C=0; -C<A.length; -++C){var B=A[C]; -if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C; -break -}}return D -},isDateOOM:function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth()) -},isDateOOB:function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -var E=this.cfg.getProperty(A.MINDATE.key); -var F=this.cfg.getProperty(A.MAXDATE.key); -var C=YAHOO.widget.DateMath; -if(E){E=C.clearTime(E) -}if(F){F=C.clearTime(F) -}var B=new Date(D.getTime()); -B=C.clearTime(B); -return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime())) -},_parsePageDate:function(B){var E; -var A=YAHOO.widget.Calendar._DEFAULT_CONFIG; -if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B) -}else{var F,D,C; -C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key)); -F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1; -D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10); -E=YAHOO.widget.DateMath.getDate(D,F,1) -}}else{E=YAHOO.widget.DateMath.getDate(this.today.getFullYear(),this.today.getMonth(),1) -}return E -},onBeforeSelect:function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED); -this.parent.deselectAll() -}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED); -this.deselectAll() -}}},onSelect:function(A){},onBeforeDeselect:function(){},onDeselect:function(A){},onChangePage:function(){this.render() -},onRender:function(){},onReset:function(){this.render() -},onClear:function(){this.render() -},validate:function(){return true -},_parseDate:function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER); -var A; -if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]]; -A.type=YAHOO.widget.Calendar.MONTH_DAY -}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]]; -A.type=YAHOO.widget.Calendar.DATE -}for(var B=0; -B<A.length; -B++){A[B]=parseInt(A[B],10) -}return A -},_parseDates:function(B){var I=[]; -var H=B.split(this.Locale.DATE_DELIMITER); -for(var G=0; -G<H.length; -++G){var F=H[G]; -if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER); -var E=this._parseDate(A[0]); -var J=this._parseDate(A[1]); -var D=this._parseRange(E,J); -I=I.concat(D) -}else{var C=this._parseDate(F); -I.push(C) -}}return I -},_parseRange:function(A,E){var B=YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1); -var D=YAHOO.widget.DateMath.getDate(E[0],E[1]-1,E[2]); -var C=[]; -C.push(A); -while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]); -B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1) -}return C -},resetRenderers:function(){this.renderStack=this._renderStack.concat() -},removeRenderers:function(){this._renderStack=[]; -this.renderStack=[] -},clearElement:function(A){A.innerHTML=" "; -A.className="" -},addRenderer:function(A,B){var D=this._parseDates(A); -for(var C=0; -C<D.length; -++C){var E=D[C]; -if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B) -}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B) -}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B) -}}}},_addRenderer:function(B,C,A){var D=[B,C,A]; -this.renderStack.unshift(D); -this._renderStack=this.renderStack.concat() -},addMonthRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A) -},addWeekdayRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A) -},clearAllBodyCellStyles:function(A){for(var B=0; -B<this.cells.length; -++B){YAHOO.util.Dom.removeClass(this.cells[B],A) -}},setMonth:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -var B=this.cfg.getProperty(A); -B.setMonth(parseInt(C,10)); -this.cfg.setProperty(A,B) -},setYear:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key; -var C=this.cfg.getProperty(A); -C.setFullYear(parseInt(B,10)); -this.cfg.setProperty(A,C) -},getSelectedDates:function(){var C=[]; -var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key); -for(var E=0; -E<B.length; -++E){var D=B[E]; -var A=YAHOO.widget.DateMath.getDate(D[0],D[1]-1,D[2]); -C.push(A) -}C.sort(function(G,F){return G-F -}); -return C -},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none"; -this.hideEvent.fire() -}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block"; -this.showEvent.fire() -}},browser:(function(){var A=navigator.userAgent.toLowerCase(); -if(A.indexOf("opera")!=-1){return"opera" -}else{if(A.indexOf("msie 7")!=-1){return"ie7" -}else{if(A.indexOf("msie")!=-1){return"ie" -}else{if(A.indexOf("safari")!=-1){return"safari" -}else{if(A.indexOf("gecko")!=-1){return"gecko" -}else{return false -}}}}}})(),toString:function(){return"Calendar "+this.id -}}; -YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar; -YAHOO.widget.Cal_Core=YAHOO.widget.Calendar; -YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init.apply(this,arguments) -}}; -YAHOO.widget.CalendarGroup.prototype={init:function(D,B,C){var A=this._parseArgs(arguments); -D=A.id; -B=A.container; -C=A.config; -this.oDomContainer=YAHOO.util.Dom.get(B); -if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId() -}if(!D){D=this.oDomContainer.id+"_t" -}this.id=D; -this.containerId=this.oDomContainer.id; -this.initEvents(); -this.initStyles(); -this.pages=[]; -YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER); -YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP); -this.cfg=new YAHOO.util.Config(this); -this.Options={}; -this.Locale={}; -this.setupConfig(); -if(C){this.cfg.applyConfig(C,true) -}this.cfg.fireQueue(); -if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true); -this.showEvent.subscribe(this._fixWidth,this,true) -}},setupConfig:function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG; -this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages}); -this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate}); -this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected}); -this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle}); -this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose}); -this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean}); -this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber}); -this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig}); -this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:this.configNavigator}) -},initEvents:function(){var C=this; -var E="Event"; -var B=function(G,J,F){for(var I=0; -I<C.pages.length; -++I){var H=C.pages[I]; -H[this.type+E].subscribe(G,J,F) -}}; -var A=function(F,I){for(var H=0; -H<C.pages.length; -++H){var G=C.pages[H]; -G[this.type+E].unsubscribe(F,I) -}}; -var D=YAHOO.widget.Calendar._EVENT_TYPES; -this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT); -this.beforeSelectEvent.subscribe=B; -this.beforeSelectEvent.unsubscribe=A; -this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT); -this.selectEvent.subscribe=B; -this.selectEvent.unsubscribe=A; -this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT); -this.beforeDeselectEvent.subscribe=B; -this.beforeDeselectEvent.unsubscribe=A; -this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT); -this.deselectEvent.subscribe=B; -this.deselectEvent.unsubscribe=A; -this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE); -this.changePageEvent.subscribe=B; -this.changePageEvent.unsubscribe=A; -this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER); -this.beforeRenderEvent.subscribe=B; -this.beforeRenderEvent.unsubscribe=A; -this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER); -this.renderEvent.subscribe=B; -this.renderEvent.unsubscribe=A; -this.resetEvent=new YAHOO.util.CustomEvent(D.RESET); -this.resetEvent.subscribe=B; -this.resetEvent.unsubscribe=A; -this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR); -this.clearEvent.subscribe=B; -this.clearEvent.unsubscribe=A; -this.beforeShowEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW); -this.showEvent=new YAHOO.util.CustomEvent(D.SHOW); -this.beforeHideEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE); -this.hideEvent=new YAHOO.util.CustomEvent(D.HIDE); -this.beforeShowNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW_NAV); -this.showNavEvent=new YAHOO.util.CustomEvent(D.SHOW_NAV); -this.beforeHideNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE_NAV); -this.hideNavEvent=new YAHOO.util.CustomEvent(D.HIDE_NAV); -this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER_NAV); -this.renderNavEvent=new YAHOO.util.CustomEvent(D.RENDER_NAV) -},configPages:function(K,J,G){var E=J[0]; -var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key; -var O="_"; -var L="groupcal"; -var N="first-of-type"; -var D="last-of-type"; -for(var B=0; -B<E; -++B){var M=this.id+O+B; -var I=this.containerId+O+B; -var H=this.cfg.getConfig(); -H.close=false; -H.title=false; -H.navigator=null; -var A=this.constructChild(M,I,H); -var F=A.cfg.getProperty(C); -this._setMonthOnDate(F,F.getMonth()+B); -A.cfg.setProperty(C,F); -YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE); -YAHOO.util.Dom.addClass(A.oDomContainer,L); -if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N) -}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D) -}A.parent=this; -A.index=B; -this.pages[this.pages.length]=A -}},configPageDate:function(H,G,E){var C=G[0]; -var F; -var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key; -for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -if(B===0){F=A._parsePageDate(C); -A.cfg.setProperty(D,F) -}else{var I=new Date(F); -this._setMonthOnDate(I,I.getMonth()+B); -A.cfg.setProperty(D,I) -}}},configSelected:function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key; -this.delegateConfig(C,A,E); -var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[]; -this.cfg.setProperty(D,B,true) -},delegateConfig:function(B,A,E){var F=A[0]; -var D; -for(var C=0; -C<this.pages.length; -C++){D=this.pages[C]; -D.cfg.setProperty(B,F) -}},setChildFunction:function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key); -for(var C=0; -C<A; -++C){this.pages[C][D]=B -}},callChildFunction:function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key); -for(var E=0; -E<A; -++E){var D=this.pages[E]; -if(D[F]){var C=D[F]; -C.call(D,B) -}}},constructChild:function(D,B,C){var A=document.getElementById(B); -if(!A){A=document.createElement("div"); -A.id=B; -this.oDomContainer.appendChild(A) -}return new YAHOO.widget.Calendar(D,B,C) -},setMonth:function(E){E=parseInt(E,10); -var F; -var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key; -for(var D=0; -D<this.pages.length; -++D){var C=this.pages[D]; -var A=C.cfg.getProperty(B); -if(D===0){F=A.getFullYear() -}else{A.setFullYear(F) -}this._setMonthOnDate(A,E+D); -C.cfg.setProperty(B,A) -}},setYear:function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key; -C=parseInt(C,10); -for(var E=0; -E<this.pages.length; -++E){var D=this.pages[E]; -var A=D.cfg.getProperty(B); -if((A.getMonth()+1)==1&&E>0){C+=1 -}D.setYear(C) -}},render:function(){this.renderHeader(); -for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.render() -}this.renderFooter() -},select:function(A){for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -B.select(A) -}return this.getSelectedDates() -},selectCell:function(A){for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -B.selectCell(A) -}return this.getSelectedDates() -},deselect:function(A){for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -B.deselect(A) -}return this.getSelectedDates() -},deselectAll:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.deselectAll() -}return this.getSelectedDates() -},deselectCell:function(A){for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -B.deselectCell(A) -}return this.getSelectedDates() -},reset:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.reset() -}},clear:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.clear() -}},nextMonth:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.nextMonth() -}},previousMonth:function(){for(var B=this.pages.length-1; -B>=0; ---B){var A=this.pages[B]; -A.previousMonth() -}},nextYear:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.nextYear() -}},previousYear:function(){for(var B=0; -B<this.pages.length; -++B){var A=this.pages[B]; -A.previousYear() -}},getSelectedDates:function(){var C=[]; -var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key); -for(var E=0; -E<B.length; -++E){var D=B[E]; -var A=YAHOO.widget.DateMath.getDate(D[0],D[1]-1,D[2]); -C.push(A) -}C.sort(function(G,F){return G-F -}); -return C -},addRenderer:function(A,B){for(var D=0; -D<this.pages.length; -++D){var C=this.pages[D]; -C.addRenderer(A,B) -}},addMonthRenderer:function(D,A){for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -B.addMonthRenderer(D,A) -}},addWeekdayRenderer:function(B,A){for(var D=0; -D<this.pages.length; -++D){var C=this.pages[D]; -C.addWeekdayRenderer(B,A) -}},removeRenderers:function(){this.callChildFunction("removeRenderers") -},renderHeader:function(){},renderFooter:function(){},addMonths:function(A){this.callChildFunction("addMonths",A) -},subtractMonths:function(A){this.callChildFunction("subtractMonths",A) -},addYears:function(A){this.callChildFunction("addYears",A) -},subtractYears:function(A){this.callChildFunction("subtractYears",A) -},getCalendarPage:function(D){var F=null; -if(D){var G=D.getFullYear(),C=D.getMonth(); -var B=this.pages; -for(var E=0; -E<B.length; -++E){var A=B[E].cfg.getProperty("pagedate"); -if(A.getFullYear()===G&&A.getMonth()===C){F=B[E]; -break -}}}return F -},_setMonthOnDate:function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath; -var A=B.add(C,B.MONTH,D-C.getMonth()); -C.setTime(A.getTime()) -}else{C.setMonth(D) -}},_fixWidth:function(){var A=0; -for(var C=0; -C<this.pages.length; -++C){var B=this.pages[C]; -A+=B.oDomContainer.offsetWidth -}if(A>0){this.oDomContainer.style.width=A+"px" -}},toString:function(){return"CalendarGroup "+this.id -}}; -YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer"; -YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi"; -YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title"; -YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon"; -YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_parseArgs","browser"); -YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG; -YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2}; -YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup; -YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B) -}; -YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup); -YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up; -YAHOO.widget.CalendarNavigator=function(A){this.init(A) -}; -(function(){var A=YAHOO.widget.CalendarNavigator; -A.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc",INVALID:"yui-invalid",DEFAULT:"yui-default"}; -A._DEFAULT_CFG={strings:{month:"Month",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"}; -A.ID_SUFFIX="_nav"; -A.MONTH_SUFFIX="_month"; -A.YEAR_SUFFIX="_year"; -A.ERROR_SUFFIX="_error"; -A.CANCEL_SUFFIX="_cancel"; -A.SUBMIT_SUFFIX="_submit"; -A.YR_MAX_DIGITS=4; -A.YR_MINOR_INC=1; -A.YR_MAJOR_INC=10; -A.UPDATE_DELAY=50; -A.YR_PATTERN=/^\d+$/; -A.TRIM=/^\s*(.*?)\s*$/ -})(); -YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(A){var C=A.oDomContainer; -this.cal=A; -this.id=C.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX; -this._doc=C.ownerDocument; -var B=YAHOO.env.ua.ie; -this.__isIEQuirks=(B&&((B<=6)||(B===7&&this._doc.compatMode=="BackCompat"))) -},show:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES; -if(this.cal.beforeShowNavEvent.fire()){if(!this.__rendered){this.render() -}this.clearErrors(); -this._updateMonthUI(); -this._updateYearUI(); -this._show(this.navEl,true); -this.setInitialFocus(); -this.showMask(); -YAHOO.util.Dom.addClass(this.cal.oDomContainer,A.NAV_VISIBLE); -this.cal.showNavEvent.fire() -}},hide:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES; -if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false); -this.hideMask(); -YAHOO.util.Dom.removeClass(this.cal.oDomContainer,A.NAV_VISIBLE); -this.cal.hideNavEvent.fire() -}},showMask:function(){this._show(this.maskEl,true); -if(this.__isIEQuirks){this._syncMask() -}},hideMask:function(){this._show(this.maskEl,false) -},getMonth:function(){return this._month -},getYear:function(){return this._year -},setMonth:function(A){if(A>=0&&A<12){this._month=A -}this._updateMonthUI() -},setYear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN; -if(YAHOO.lang.isNumber(B)&&A.test(B+"")){this._year=B -}this._updateYearUI() -},render:function(){this.cal.beforeRenderNavEvent.fire(); -if(!this.__rendered){this.createNav(); -this.createMask(); -this.applyListeners(); -this.__rendered=true -}this.cal.renderNavEvent.fire() -},createNav:function(){var B=YAHOO.widget.CalendarNavigator; -var C=this._doc; -var D=C.createElement("div"); -D.className=B.CLASSES.NAV; -var A=this.renderNavContents([]); -D.innerHTML=A.join(""); -this.cal.oDomContainer.appendChild(D); -this.navEl=D; -this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX); -this.monthEl=C.getElementById(this.id+B.MONTH_SUFFIX); -this.errorEl=C.getElementById(this.id+B.ERROR_SUFFIX); -this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX); -this.cancelEl=C.getElementById(this.id+B.CANCEL_SUFFIX); -if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off") -}this._setFirstLastElements() -},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES; -var A=this._doc.createElement("div"); -A.className=B.MASK; -this.cal.oDomContainer.appendChild(A); -this.maskEl=A -},_syncMask:function(){var B=this.cal.oDomContainer; -if(B&&this.maskEl){var A=YAHOO.util.Dom.getRegion(B); -YAHOO.util.Dom.setStyle(this.maskEl,"width",A.right-A.left+"px"); -YAHOO.util.Dom.setStyle(this.maskEl,"height",A.bottom-A.top+"px") -}},renderNavContents:function(A){var D=YAHOO.widget.CalendarNavigator,E=D.CLASSES,B=A; -B[B.length]='<div class="'+E.MONTH+'">'; -this.renderMonth(B); -B[B.length]="</div>"; -B[B.length]='<div class="'+E.YEAR+'">'; -this.renderYear(B); -B[B.length]="</div>"; -B[B.length]='<div class="'+E.BUTTONS+'">'; -this.renderButtons(B); -B[B.length]="</div>"; -B[B.length]='<div class="'+E.ERROR+'" id="'+this.id+D.ERROR_SUFFIX+'"></div>'; -return B -},renderMonth:function(D){var G=YAHOO.widget.CalendarNavigator,H=G.CLASSES; -var I=this.id+G.MONTH_SUFFIX,F=this.__getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),E=D; -if(A&&A.length>0){E[E.length]='<label for="'+I+'">'; -E[E.length]=this.__getCfg("month",true); -E[E.length]="</label>"; -E[E.length]='<select name="'+I+'" id="'+I+'" class="'+H.MONTH_CTRL+'">'; -for(var B=0; -B<A.length; -B++){E[E.length]='<option value="'+B+'">'; -E[E.length]=A[B]; -E[E.length]="</option>" -}E[E.length]="</select>" -}return E -},renderYear:function(B){var E=YAHOO.widget.CalendarNavigator,F=E.CLASSES; -var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DIGITS,D=B; -D[D.length]='<label for="'+G+'">'; -D[D.length]=this.__getCfg("year",true); -D[D.length]="</label>"; -D[D.length]='<input type="text" name="'+G+'" id="'+G+'" class="'+F.YEAR_CTRL+'" maxlength="'+A+'"/>'; -return D -},renderButtons:function(A){var D=YAHOO.widget.CalendarNavigator.CLASSES; -var B=A; -B[B.length]='<span class="'+D.BUTTON+" "+D.DEFAULT+'">'; -B[B.length]='<button type="button" id="'+this.id+'_submit">'; -B[B.length]=this.__getCfg("submit",true); -B[B.length]="</button>"; -B[B.length]="</span>"; -B[B.length]='<span class="'+D.BUTTON+'">'; -B[B.length]='<button type="button" id="'+this.id+'_cancel">'; -B[B.length]=this.__getCfg("cancel",true); -B[B.length]="</button>"; -B[B.length]="</span>"; -return B -},applyListeners:function(){var B=YAHOO.util.Event; -function A(){if(this.validate()){this.setYear(this._getYearFromUI()) -}}function C(){this.setMonth(this._getMonthFromUI()) -}B.on(this.submitEl,"click",this.submit,this,true); -B.on(this.cancelEl,"click",this.cancel,this,true); -B.on(this.yearEl,"blur",A,this,true); -B.on(this.monthEl,"change",C,this,true); -if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true) -}this.applyKeyListeners() -},purgeListeners:function(){var A=YAHOO.util.Event; -A.removeListener(this.submitEl,"click",this.submit); -A.removeListener(this.cancelEl,"click",this.cancel); -A.removeListener(this.yearEl,"blur"); -A.removeListener(this.monthEl,"change"); -if(this.__isIEQuirks){A.removeListener(this.cal.oDomContainer,"resize",this._syncMask) -}this.purgeKeyListeners() -},applyKeyListeners:function(){var D=YAHOO.util.Event; -var A=YAHOO.env.ua; -var C=(A.ie)?"keydown":"keypress"; -var B=(A.ie||A.opera)?"keydown":"keypress"; -D.on(this.yearEl,"keypress",this._handleEnterKey,this,true); -D.on(this.yearEl,C,this._handleDirectionKeys,this,true); -D.on(this.lastCtrl,B,this._handleTabKey,this,true); -D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true) -},purgeKeyListeners:function(){var C=YAHOO.util.Event; -var B=(YAHOO.env.ua.ie)?"keydown":"keypress"; -var A=(YAHOO.env.ua.ie||YAHOO.env.ua.opera)?"keydown":"keypress"; -C.removeListener(this.yearEl,"keypress",this._handleEnterKey); -C.removeListener(this.yearEl,B,this._handleDirectionKeys); -C.removeListener(this.lastCtrl,A,this._handleTabKey); -C.removeListener(this.firstCtrl,A,this._handleShiftTabKey) -},submit:function(){if(this.validate()){this.hide(); -this.setMonth(this._getMonthFromUI()); -this.setYear(this._getYearFromUI()); -var B=this.cal; -var C=this; -function D(){B.setYear(C.getYear()); -B.setMonth(C.getMonth()); -B.render() -}var A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY; -if(A>0){window.setTimeout(D,A) -}else{D() -}}},cancel:function(){this.hide() -},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors(); -return true -}else{this.setYearError(); -this.setError(this.__getCfg("invalidYear",true)); -return false -}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A; -this._show(this.errorEl,true) -}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML=""; -this._show(this.errorEl,false) -}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID) -},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID) -},clearErrors:function(){this.clearError(); -this.clearYearError() -},setInitialFocus:function(){var A=this.submitEl; -var B=this.__getCfg("initialFocus"); -if(B&&B.toLowerCase){B=B.toLowerCase(); -if(B=="year"){A=this.yearEl; -try{this.yearEl.select() -}catch(C){}}else{if(B=="month"){A=this.monthEl -}}}if(A&&YAHOO.lang.isFunction(A.focus)){try{A.focus() -}catch(C){}}},erase:function(){if(this.__rendered){this.purgeListeners(); -this.yearEl=null; -this.monthEl=null; -this.errorEl=null; -this.submitEl=null; -this.cancelEl=null; -this.firstCtrl=null; -this.lastCtrl=null; -if(this.navEl){this.navEl.innerHTML="" -}var B=this.navEl.parentNode; -if(B){B.removeChild(this.navEl) -}this.navEl=null; -var A=this.maskEl.parentNode; -if(A){A.removeChild(this.maskEl) -}this.maskEl=null; -this.__rendered=false -}},destroy:function(){this.erase(); -this._doc=null; -this.cal=null; -this.id=null -},_show:function(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none") -}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex -}else{return 0 -}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator; -var A=null; -if(this.yearEl){var C=this.yearEl.value; -C=C.replace(B.TRIM,"$1"); -if(B.YR_PATTERN.test(C)){A=parseInt(C,10) -}}return A -},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year -}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month -}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl; -this.lastCtrl=this.cancelEl; -if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl; -this.lastCtrl=this.yearEl -}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl; -this.lastCtrl=this.yearEl -}}},_handleEnterKey:function(B){var A=YAHOO.util.KeyListener.KEY; -if(YAHOO.util.Event.getCharCode(B)==A.ENTER){this.submit() -}},_handleDirectionKeys:function(G){var F=YAHOO.util.Event; -var A=YAHOO.util.KeyListener.KEY; -var C=YAHOO.widget.CalendarNavigator; -var D=(this.yearEl.value)?parseInt(this.yearEl.value,10):null; -if(isFinite(D)){var B=false; -switch(F.getCharCode(G)){case A.UP:this.yearEl.value=D+C.YR_MINOR_INC; -B=true; -break; -case A.DOWN:this.yearEl.value=Math.max(D-C.YR_MINOR_INC,0); -B=true; -break; -case A.PAGE_UP:this.yearEl.value=D+C.YR_MAJOR_INC; -B=true; -break; -case A.PAGE_DOWN:this.yearEl.value=Math.max(D-C.YR_MAJOR_INC,0); -B=true; -break; -default:break -}if(B){F.preventDefault(G); -try{this.yearEl.select() -}catch(G){}}}},_handleTabKey:function(C){var B=YAHOO.util.Event; -var A=YAHOO.util.KeyListener.KEY; -if(B.getCharCode(C)==A.TAB&&!C.shiftKey){try{B.preventDefault(C); -this.firstCtrl.focus() -}catch(C){}}},_handleShiftTabKey:function(C){var B=YAHOO.util.Event; -var A=YAHOO.util.KeyListener.KEY; -if(C.shiftKey&&B.getCharCode(C)==A.TAB){try{B.preventDefault(C); -this.lastCtrl.focus() -}catch(C){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator._DEFAULT_CFG; -var A=this.cal.cfg.getProperty("navigator"); -if(B){return(A!==true&&A.strings&&A.strings[D])?A.strings[D]:C.strings[D] -}else{return(A!==true&&A[D])?A[D]:C[D] -}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)}; -YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.4.1",build:"742"});
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/javascripts/calendar/yahoo-dom-event-min.js b/sonar-server/src/main/webapp/javascripts/calendar/yahoo-dom-event-min.js deleted file mode 100644 index 106a14472c4..00000000000 --- a/sonar-server/src/main/webapp/javascripts/calendar/yahoo-dom-event-min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.4.1 -*/ -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var B=YAHOO.util,L,J,H=0,K={},F={},N=window.document;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=F[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");F[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=N.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&G){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(G){J=function(Q,R,S){switch(R){case"opacity":if(YAHOO.lang.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S&&(S.tagName||S.item)){return S;}if(YAHOO.lang.isString(S)||!S){return N.getElementById(S);}if(S.length!==undefined){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=N.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=YAHOO.lang.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(U){if(!this.hasClass(U,R)){return false;}var V=U.className;U.className=V.replace(Q," ");if(this.hasClass(U,R)){this.removeClass(U,R);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.replaceClass(V,R,Q);}V.className=YAHOO.lang.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+H++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(Q,R){Q=B.Dom.get(Q);R=B.Dom.get(R);if(!Q||!R){return false;}if(Q.contains&&R.nodeType&&!M){return Q.contains(R);}else{if(Q.compareDocumentPosition&&R.nodeType){return !!(Q.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==Q;});}}}return false;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||G)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight; -}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||G){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while(Q=Q.parentNode){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},getFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}return Q.parentNode.insertBefore(R,Q);},insertAfter:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(R){var S=R.getBoundingClientRect();var Q=R.ownerDocument;return[S.left+B.Dom.getDocumentScrollLeft(Q),S.top+B.Dom.getDocumentScrollTop(Q)];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;while(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(B.Dom.getStyle(R,"display").search(/^inline|table-row.*$/i)){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(K){if(K&&3==K.nodeType){return K.parentNode;}else{return K;}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)]; -},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F[L]=null;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=YAHOO.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(YAHOO.env.ua.ie&&I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{}; -var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.4.1",build:"742"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.4.1", build: "742"}); diff --git a/sonar-server/src/main/webapp/stylesheets/calendar.css b/sonar-server/src/main/webapp/stylesheets/calendar.css deleted file mode 100644 index 97f08fe40ec..00000000000 --- a/sonar-server/src/main/webapp/stylesheets/calendar.css +++ /dev/null @@ -1,394 +0,0 @@ -/* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.4.1 -*/ -.yui-calcontainer { - position: relative; - float: left; - _overflow: hidden; -} -.yui-calcontainer iframe { - position: absolute; - border: none; - margin: 0; - padding: 0; - z-index: 0; - width: 100%; - height: 100%; - left: 0px; - top: 0px; -} - -.yui-calcontainer iframe.fixedsize { - width: 50em; - height: 50em; - top: -1px; - left: -1px; -} - -.yui-calcontainer.multi .groupcal { - z-index: 1; - float: left; - position: relative; -} - -.yui-calcontainer .title { - position: relative; - z-index: 1; -} - -.yui-calcontainer .close-icon { - position: absolute; - z-index: 1; -} - -.yui-calendar { - position: relative; -} - -.yui-calendar .calnavleft { - position: absolute; - z-index: 1; -} - -.yui-calendar .calnavright { - position: absolute; - z-index: 1; -} - -.yui-calendar .calheader { - position: relative; - width: 100%; - text-align: center; -} - -.yui-calcontainer .yui-cal-nav-mask { - position: absolute; - z-index: 2; - margin: 0; - padding: 0; - width: 100%; - height: 100%; - _width: 0; - _height: 0; - left: 0; - top: 0; - display: none; -} - -.yui-calcontainer .yui-cal-nav { - position: absolute; - z-index: 3; - top: 0; - display: none; -} - -.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn { - display: -moz-inline-box; - display: inline-block; -} - -.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button { - display: block; * - display: inline-block; * - overflow: visible; - border: none; - background-color: transparent; - cursor: pointer; -} - -.yui-calendar .calbody a:hover { - background: inherit; -} - -p#clear { - clear: left; - padding-top: 10px; -} - -.yui-skin-sam .yui-calcontainer { - background-color: #f2f2f2; - border: 1px solid #808080; - padding: 10px; -} - -.yui-skin-sam .yui-calcontainer .title { - background: url(../images/calendar/sprite.png) repeat-x 0 0; - border-bottom: 1px solid #4b9fd5; - font: 100% sans-serif; - color: #000; - height: auto; - padding: .4em; - margin: 0 -10px 10px -10px; - top: 0; - left: 0; - text-align: left; -} - - -.yui-skin-sam .yui-calcontainer.withtitle { - padding-top: 0; -} - -.yui-skin-sam .yui-calcontainer .calclose { - background: url(../images/calendar/sprite.png) no-repeat 0 -300px; - width: 25px; - height: 15px; - top: .4em; - right: .4em; - cursor: pointer; -} - -.yui-skin-sam .yui-calendar { - border-spacing: 0; - border-collapse: collapse; - font: 100% Arial, Helvetica, sans-serif; - text-align: center; -} - -.yui-skin-sam .yui-calendar .calhead { - background: transparent; - border: none; - vertical-align: middle; -} - -.yui-skin-sam .yui-calendar .calheader { - background: transparent; - padding: 0; - text-align: center; -} - -.yui-skin-sam .yui-calendar .calheader img { - border: none; -} - -.yui-skin-sam .yui-calendar .calnavleft { - background: url(../images/calendar/sprite.png) no-repeat 0 -450px; - width: 25px; - height: 15px; - top: 0; - bottom: 0; - left: -5px; - margin-left: .4em; - cursor: pointer; -} - -.yui-skin-sam .yui-calendar .calnavright { - background: url(../images/calendar/sprite.png) no-repeat 0 -500px; - width: 25px; - height: 15px; - top: 0; - bottom: 0; - right: -5px; - margin-right: .4em; - cursor: pointer; -} - -.yui-skin-sam .yui-calendar .calweekdayrow { - height: 2em; -} - -.yui-skin-sam .yui-calendar .calweekdaycell { - color: #000; - font-weight: bold; - font-size: 80%; - text-align: center; - width: 2em; -} - -.yui-skin-sam .yui-calendar .calfoot { - background-color: #f2f2f2; -} - -.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot -{ - color: #a6a6a6; - font-size: 85%; - font-style: normal; - font-weight: normal; -} - -.yui-skin-sam .yui-calendar .calrowhead { - text-align: right; - padding-right: 2px; -} - -.yui-skin-sam .yui-calendar .calrowfoot { - text-align: left; - padding-left: 2px; -} - -.yui-skin-sam .yui-calendar td.calcell { - border: 1px solid #000000; - background: #fff; - padding: 1px; - - text-align: center; - white-space: nowrap; -} - -.yui-skin-sam .yui-calendar td.calcell a { - color: #0066cc; - display: block; - height: 100%; - text-decoration: none; -} - -.yui-skin-sam .yui-calendar td.calcell.today { - -} - -.yui-skin-sam .yui-calendar td.calcell.today a { - -} - -.yui-skin-sam .yui-calendar td.calcell.oom { - background-color: #cccccc; - color: #a6a6a6; - cursor: default; -} - -.yui-skin-sam .yui-calendar td.calcell.selected { - background-color: #fff; - color: #000; -} - -.yui-skin-sam .yui-calendar td.calcell.selected a { - background-color: #b3d4ff; - color: #000; -} - -.yui-skin-sam .yui-calendar td.calcell.calcellhover { - background-color: #426fd9; - color: #fff; - cursor: pointer; -} - -.yui-skin-sam .yui-calendar td.calcell.calcellhover a { - background-color: #426fd9; - color: #fff; -} - -.yui-skin-sam .yui-calendar td.calcell.previous { - color: #e0e0e0; -} - -.yui-skin-sam .yui-calendar td.calcell.restricted { - text-decoration: line-through; -} - -.yui-skin-sam .yui-calendar td.calcell.highlight1 { - background-color: #ccff99; -} - -.yui-skin-sam .yui-calendar td.calcell.highlight2 { - background-color: #99ccff; -} - -.yui-skin-sam .yui-calendar td.calcell.highlight3 { - background-color: #ffcccc; -} - -.yui-skin-sam .yui-calendar td.calcell.highlight4 { - background-color: #ccff99; -} - -.yui-skin-sam .yui-calendar a.calnav { - border: 1px solid #f2f2f2; - padding: 0 4px; - text-decoration: none; - color: #000; - zoom: 1; -} - -.yui-skin-sam .yui-calendar a.calnav:hover { - background: url(../images/calendar/sprite.png) repeat-x 0 0; - border-color: #A0A0A0; - cursor: pointer; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask { - background-color: #000; - opacity: 0.25; * - filter: alpha(opacity = 25); -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav { - font-family: arial, helvetica, clean, sans-serif; - font-size: 93%; - border: 1px solid #808080; - left: 50%; - margin-left: -7em; - width: 14em; - padding: 0; - top: 2.5em; - background-color: #f2f2f2; -} - -.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav { - top: 4.5em; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b { - padding: 5px 10px 5px 10px; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-b { - text-align: center; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-e { - margin-top: 5px; - padding: 5px; - background-color: #EDF5FF; - border-top: 1px solid black; - display: none; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav label { - display: block; - font-weight: bold; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc { - width: 100%; - _width: auto; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid { - background-color: #FFEE69; - border: 1px solid #000; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc { - width: 4em; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn { - border: 1px solid #808080; - background: url(../images/calendar/sprite.png) repeat-x 0 0; - background-color: #ccc; - margin: auto .15em; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button { - padding: 0px; - font-size: 93%; - line-height: 2; - line-height: 1.7; - min-height: 2em; - min-height: auto; - color: #000; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default { - border: 1px solid #304369; - background-color: #426fd9; - background: url(../images/calendar/sprite.png) repeat-x 0 -1400px; -} - -.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button { - color: #fff; -}
\ No newline at end of file |