﻿// JavaScript Document
// BeginWebWidget YUI_Calendar: yuicalendar1 

  (function() { 
    var cn = document.body.className.toString();
    if (cn.indexOf('yui-skin-sam') == -1) {
      document.body.className += " yui-skin-sam";
    }
  })();

  var inityuicalendar1 = function() {
    //var yuicalendar1 = new YAHOO.widget.Calendar("yuicalendar1");
	var yuicalendar1 = new YAHOO.widget.Calendar("Call","yuicalendar1");
	//此為設定月曆反白區塊
	yuicalendar1.addRenderer("6/17/2009,6/25/2009,7/3/2009,7/4/2009,7/5/2009,7/11/2009,7/12/2009,7/17/2009,7/18/2009,7/19/2009,7/25/2009,7/26/2009,8/2/2009,8/1/2009,8/8/2009,8/9/2009,8/15/2009,8/16/2009,8/22/2009,8/23/2009,8/29/2009,8/30/2009,9/5/2009,9/6/2009,9/8/2009,9/12/2009,9/13/2009,9/19/2009,9/20/2009,9/26/2009,9/27/2009",yuicalendar1.renderCellStyleHighlight1); 

// Date labels for German locale 
//此為設定週月名稱
	yuicalendar1.cfg.setProperty("MONTHS_SHORT",   ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]);   
	yuicalendar1.cfg.setProperty("MONTHS_LONG",    ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]);   
	yuicalendar1.cfg.setProperty("WEEKDAYS_1CHAR", ["日", "一", "二", "三", "四", "五", "六"]);   
	yuicalendar1.cfg.setProperty("WEEKDAYS_SHORT", ["日", "一", "二", "三", "四", "五", "六"]);   
	yuicalendar1.cfg.setProperty("WEEKDAYS_MEDIUM",["日", "一", "二", "三", "四", "五", "六"]);   
	yuicalendar1.cfg.setProperty("WEEKDAYS_LONG",  ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]);   

    // The following event subscribers demonstrate how to handle
    // YUI Calendar events, specifically when a date cell is 
    // selected and when it is unselected.
    //
    // See: http://developer.yahoo.com/yui/calendar/ for more 
    // information on the YUI Calendar's configurations and 
    // events.
    //
    // The YUI Calendar API cheatsheet can be found at:
    // http://yuiblog.com/assets/pdf/cheatsheets/calendar.pdf
    //
    //--- begin event subscribers ---//
    yuicalendar1.selectEvent.subscribe(selectHandler, yuicalendar1, true);
    yuicalendar1.deselectEvent.subscribe(deselectHandler, yuicalendar1, true);
    //--- end event subscribers ---//

    yuicalendar1.render();
  }
  
  function selectHandler(event, data) {
  // The JavaScript function subscribed to yuicalendar1.  It is called when
  // a date cell is selected.
  //
  // alert(event) will show an event type of "Select".
  // alert(data) will show the selected date as [year, month, date].
  //此為設定月曆超連結
  if(data == "2009,6,17") {MM_goToURL('parent','news20090617.htm');return document.MM_returnValue};
  if(data == "2009,6,25") {MM_goToURL('parent','news20090625.htm');return document.MM_returnValue};
  if(data == "2009,7,3") {MM_goToURL('parent','news20090703.htm');return document.MM_returnValue};
  if(data == "2009,7,4") {MM_goToURL('parent','page03.htm');return document.MM_returnValue};
  if(data == "2009,7,5") {MM_goToURL('parent','page04.htm');return document.MM_returnValue};
  if(data == "2009,7,11") {MM_goToURL('parent','pk02.htm');return document.MM_returnValue};
  if(data == "2009,7,12") {MM_goToURL('parent','pp02.htm');return document.MM_returnValue};
  if(data == "2009,7,17") {MM_goToURL('parent','news20090717.htm');return document.MM_returnValue};
  if(data == "2009,7,18") {MM_goToURL('parent','pk03.htm');return document.MM_returnValue};
  if(data == "2009,7,19") {MM_goToURL('parent','pp03.htm');return document.MM_returnValue};
  if(data == "2009,7,25") {MM_goToURL('parent','pk04.htm');return document.MM_returnValue};
  if(data == "2009,7,26") {MM_goToURL('parent','pp04.htm');return document.MM_returnValue};
  if(data == "2009,8,1") {MM_goToURL('parent','pk05.htm');return document.MM_returnValue};
  if(data == "2009,8,2") {MM_goToURL('parent','pp05.htm');return document.MM_returnValue};
  if(data == "2009,8,8") {MM_goToURL('parent','pk06.htm');return document.MM_returnValue};
  if(data == "2009,8,9") {MM_goToURL('parent','pp06.htm');return document.MM_returnValue};
  if(data == "2009,8,15") {MM_goToURL('parent','pk07.htm');return document.MM_returnValue};
  if(data == "2009,8,16") {MM_goToURL('parent','pp07.htm');return document.MM_returnValue};
  if(data == "2009,8,22") {MM_goToURL('parent','pk08.htm');return document.MM_returnValue};
  if(data == "2009,8,23") {MM_goToURL('parent','pp08.htm');return document.MM_returnValue};
  if(data == "2009,8,29") {MM_goToURL('parent','pk09.htm');return document.MM_returnValue};
  if(data == "2009,8,30") {MM_goToURL('parent','pp09.htm');return document.MM_returnValue};
  if(data == "2009,9,5") {MM_goToURL('parent','pk10.htm');return document.MM_returnValue};
  if(data == "2009,9,6") {MM_goToURL('parent','pp10.htm');return document.MM_returnValue};
  if(data == "2009,9,8") {MM_goToURL('parent','news20090908.htm');return document.MM_returnValue};
  if(data == "2009,9,12") {MM_goToURL('parent','pk11.htm');return document.MM_returnValue};
  if(data == "2009,9,13") {MM_goToURL('parent','pp11.htm');return document.MM_returnValue};
  if(data == "2009,9,19") {MM_goToURL('parent','pk12.htm');return document.MM_returnValue};
  if(data == "2009,9,20") {MM_goToURL('parent','pp12.htm');return document.MM_returnValue};
  if(data == "2009,9,26") {MM_goToURL('parent','pk13.htm');return document.MM_returnValue};
  if(data == "2009,9,27") {MM_goToURL('parent','pp13.htm');return document.MM_returnValue};
  };

  function deselectHandler(event, data) {
  // The JavaScript function subscribed to yuicalendar1.  It is called when
  // a selected date cell is unselected.
  };    

  // Create the YUI Calendar when the HTML document is usable.
  YAHOO.util.Event.onDOMReady(inityuicalendar1);


// EndWebWidget YUI_Calendar: yuicalendar1 
