// JavaScript Document

function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}

function textnormal()
{
MM_changeProp('maintext','','fontSize','11','TD');
MM_changeProp('tochangea','','fontSize','11','DIV');
MM_changeProp('tochangeb','','fontSize','11','DIV');
MM_changeProp('newstext','','fontSize','11','TD');
MM_changeProp('newstext1','','fontSize','11','TD');
}

function textlarge()
{
MM_changeProp('maintext','','fontSize','13','TD');
MM_changeProp('tochangea','','fontSize','13','DIV');
MM_changeProp('tochangeb','','fontSize','13','DIV');
MM_changeProp('newstext','','fontSize','13','TD');
MM_changeProp('newstext1','','fontSize','13','TD');
}

function textlarger()
{
MM_changeProp('maintext','','fontSize','15','TD');
MM_changeProp('tochangea','','fontSize','15','DIV');
MM_changeProp('tochangeb','','fontSize','15','DIV');
MM_changeProp('newstext','','fontSize','15','TD');
MM_changeProp('newstext1','','fontSize','15','TD');
}




var ContentHeight = 50;
var TimeToSlide = 250.0;

var openAccordion = '';

function runAccordion(index) {
    var nID = "Accordion" + index + "Content";
    if (openAccordion == nID)
        nID = '';

    setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'"
      + openAccordion + "','" + nID + "')", 33);

    openAccordion = nID;
}


function animate(lastTick, timeLeft, closingId, openingId) {
    var curTick = new Date().getTime();
    var elapsedTicks = curTick - lastTick;

    var opening = (openingId == '') ? null : document.getElementById(openingId);
    var closing = (closingId == '') ? null : document.getElementById(closingId);

    if (timeLeft <= elapsedTicks) {
        if (opening != null)
            opening.style.height = ContentHeight + 'px';

        if (closing != null) {
            closing.style.display = 'none';
            closing.style.height = '0px';
        }
        return;
    }

    timeLeft -= elapsedTicks;
    var newClosedHeight = Math.round((timeLeft / TimeToSlide) * ContentHeight);

    if (opening != null) {
        if (opening.style.display != 'block')
            opening.style.display = 'block';
        opening.style.height = (ContentHeight - newClosedHeight) + 'px';
    }

    if (closing != null)
        closing.style.height = newClosedHeight + 'px';

    setTimeout("animate(" + curTick + "," + timeLeft + ",'"
      + closingId + "','" + openingId + "')", 33);
}

