
/***********************************************
* Cross browser Marquee II- � Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

// email obfuscation //
function liame(name,domain){
document.write('<a title=\"email address obfuscated. javascript must be enabled.\" href=\"mailto:' + name + '@' + domain + '\">');
document.write(name + '@' + domain + '</a>');
}

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee

/***********************************************

FREESTYLE MENUS v1.0 RC (c) 2001-2005 Angus Turnbull, http://www.twinhelix.com
Altering this notice or redistributing this file is prohibited.

************************************************/

var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');var aeOL=[];function addEvent(o,n,f,l){var a='addEventListener',h='on'+n,b='',s='';if(o[a]&&!l)return o[a](n,f,false);o._c|=0;if(o[h]){b='_f'+o._c++;o[b]=o[h]}s='_f'+o._c++;o[s]=f;o[h]=function(e){e=e||window.event;var r=true;if(b)r=o[b](e)!=false&&r;r=o[s](e)!=false&&r;return r};aeOL[aeOL.length]={o:o,h:h}};addEvent(window,'unload',function(){for(var i=0;i<aeOL.length;i++)with(aeOL[i]){o[h]=null;for(var c=0;o['_f'+c];c++)o['_f'+c]=null}});function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.animations=[];this.animSpeed=100;if(isIE&&!isOp)addEvent(window,'unload',new Function(myName+'=null'))};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot){timer=setTimeout(myName+'.menus["'+id+'"].hide()',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addEvent(ref,'mouseover',this.over);addEvent(ref,'mouseout',this.out);if(obj.nested){addEvent(ref,'focus',this.over);addEvent(ref,'click',this.over);addEvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);setVis(1)}};FSMenuNode.prototype.hide=function(){with(this)with(obj){if(!lyr||!lyr.ref)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);setVis(0)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh){with(this)with(obj){lyr.timer|=0;lyr.counter|=0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;if(isDOM&&animSpeed<100)for(var a=0;a<animations.length;a++)animations[a](ref,counter);counter+=animSpeed*(sh?1:-1);if(counter>100){counter=100}else if(counter<=0){counter=0;sty[cssProp]=cssHid}else if(isDOM)timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+')',50)}}};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!document.documentElement)return;var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;if(isIE){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addEvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)setTimeout(node.onfocus,1,e);node=node.parentNode}'));addEvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function(myName+'.hide("'+menuID+'")');addEvent(a,'mouseover',eShow);addEvent(a,'focus',eShow);addEvent(a,'mouseout',eHide);addEvent(a,'blur',eHide);if(sOC)addEvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.returnValue=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}menus[id]=new FSMenuNode(id,true,this)}};if(!self.page)var page={win:self,minW:0,minH:0,MS:isIE&&!isOp};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}if(e&&this.MS&&navigator.platform.indexOf('Mac')>-1&&e.tagName=='A'){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.fsmMM=document.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return document.fsmMM?document.fsmMM(e):document.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}

// MENU FLOATING: This will scroll a menu with the page.
// To activate:
//  1) Wrap each menu with a tag like this: <div id="abcdef"> <MENU DATA GOES HERE> </div>
//     That should either be in a column by itself, or have POSITION:ABSOLUTE set in its CSS.
//  2) Add the ID of the DIVs wrapping each menu to the fsmScrollHandler() function below.
//  3) Paste the script below at the end of fsmenu.js

// If you have good CSS knowledge, consider implementing a position:fixed solution in supported
// browsers. This is a general, JS-only floating function designed to work with most layouts.

function fsmScrollHandler()
{
 floatElement('floatMenu');
 // ADD OTHER PAGE ELEMENTS CONTAINING MENUS HERE.
};

function floatElement(containerID)
{
 var container = getRef(containerID);
 if (!container) return;
 container.style.paddingTop = (typeof window.pageYOffset == 'number' ? window.pageYOffset :
  (document.body ? document.body.scrollTop || document.documentElement.scrollTop : 0)) + 'px';
 window.status = container.style.paddingTop;
};
if (''+window.onscroll=='undefined') setInterval('fsmScrollHandler()', 500);
else addEvent(window, 'scroll', fsmScrollHandler);

//<![CDATA[

// For each menu you create, you must create a matching "FSMenu" JavaScript object to represent
// it and manage its behaviour. You don't have to edit this script at all if you don't want to;
// these comments are just here for completeness. Also, feel free to paste this script into the
// external .JS file to make including it in your pages easier!

// Here's a menu object to control the above list of menu data:
var listMenu = new FSMenu('listMenu', true, 'visibility', 'visible', 'hidden');

// The parameters of the FSMenu object are:
//  1) Its own name in quotes.
//  2) Whether this is a nested list menu or not (in this case, true means yes).
//  3) The CSS property name to change when menus are shown and hidden.
//  4) The visible value of that CSS property.
//  5) The hidden value of that CSS property.
//
// Next, here's some optional settings for delays and highlighting:
//  * showDelay is the time (in milliseconds) to display a new child menu.
//  * switchDelay is the time to switch from one child menu to another child menu.
//    Set this higher and point at 2 neighbouring items to see what it does.
//  * hideDelay is the time it takes for a menu to hide after mouseout.
//  * cssLitClass is the CSS classname applied to parent items of active menus.
//  * showOnClick will, suprisingly, set the menus to show on click. Pick one of 3 values:
//    0 = all mouseover, 1 = first level click, sublevels mouseover, 2 = all click.

//listMenu.showDelay = 0;
//listMenu.switchDelay = 125;
//listMenu.hideDelay = 500;
listMenu.cssLitClass = 'highlighted';
//listMenu.showOnClick = 1;


// Now the fun part... animation! This script supports animation plugins you can add to each
// menu object you create. Here's two to get you started. To enable animation, add one or
// more functions to the menuObject.animations array, and set menuObject.animSpeed to the
// desired percentage of animation to be completed per frame.
// Animation functions are called with a reference to the menu element being animated,
// and a counter variable that changes from 0 to 100 depending on the animation progress.

function animClipDown(ref, counter)
{
 var cP = Math.pow(Math.sin(Math.PI*counter/200),0.75);
 ref.style.clip = (counter==100 ?
  ((window.opera || navigator.userAgent.indexOf('KHTML') > -1) ? '':
   'rect(auto, auto, auto, auto)') :
    'rect(0, ' + ref.offsetWidth + 'px, '+(ref.offsetHeight*cP)+'px, 0)');
};

function animFade(ref, counter)
{
 var f = ref.filters, done = (counter==100);
 if (f)
 {
  if (!done && ref.style.filter.indexOf("alpha") == -1)
   ref.style.filter += ' alpha(opacity=' + counter + ')';
  else if (f.length && f.alpha) with (f.alpha)
  {
   if (done) enabled = false;
   else { opacity = counter; enabled=true }
  }
 }
 else ref.style.opacity = ref.style.MozOpacity = counter/100.1;
};

// I'm applying them both to this menu and setting the speed to 20%. Delete this to disable.
listMenu.animations[listMenu.animations.length] = animFade;
listMenu.animations[listMenu.animations.length] = animClipDown;
listMenu.animSpeed = 20;


// Finally, on page load you have to activate the menu by calling its 'activateMenu()' method.
// I've provided an "addEvent" method that lets you easily run page events across browsers.
// You pass the activateMenu() function two parameters:
//  (1) The ID of the outermost <ul> list tag containing your menu data.
//  (2) A node containing your submenu popout arrow indicator.
// If none of that made sense, just cut and paste this next bit for each menu you create.

var arrow = null;
if (document.createElement && document.documentElement)
{
 // arrow = document.createElement('span');
 // arrow.appendChild(document.createTextNode('>'));
 // Feel free to replace the above two lines with these for a small arrow image...
 arrow = document.createElement('img');
 arrow.src = 'http://www.oaksbible.org/images/arrow.png';
 // arrow.src = 'file:///Users/timmccoy/Desktop/OaksBible/images/arrow.png';
 arrow.style.borderWidth = '0';

 arrow.className = 'subind';
}

addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));


// You may wish to leave your menu as a visible list initially, then apply its style
// dynamically on activation for better accessibility. Screenreaders and older browsers will
// then see all your menu data, but there will be a 'flicker' of the raw list before the
// page has completely loaded. If you want to do this, remove the CLASS="..." attribute from
// the above outermost UL tag, and uncomment this line:
//addEvent(window, 'load', new Function('getRef("listMenuRoot").className="menulist"'));


// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can have as many menus as you want on a page.

//]]>

// The following stuff is an attempt to put some scriptural referencs on the Oaks website
// 

function updateLosung()
  {
  var Content = document.getElementById('content');
  var url = "http://www.losung.de/cgi-bin/today.pl?lang=" + langcode + "&inline=2";
  var req = new XMLHttpRequest();
  req.open("GET", url, false);
  req.send(null);
  output = req.responseText;
  document.getElementById('content').innerHTML = output;
  }

// adding popup windows, initially for accweather info.  Later it may be useful 
// for other items as needed.  Note that the popup data info is all on one line.

// The next one is unused, at this time, as well. Retained here for documentation purposes.
var zpopstyle = " style=\"z-index:1001;position:relative;top:0px;left:0px;\" ";
var pop0 = "no help available";
var pop1 = "<table "+zpopstyle+"bgcolor="+color1+" cellpadding=\"10\"<tr><td><pre>\
######################################################<br />\
# JAVASCRIPT POPUPS ROUTINE VERSION #7 07-Feb-2001   #<br />\
# Written by Mike McGrath [mike_mcgrath@lineone.net] #<br />\
# PC-Tested for Netscape 3.04, 4.61, 6.0, & IE5.5    #<br />\
# Note: Popups may not cover all form field inputs.  #<br />\
# PLEASE RETAIN THIS NOTICE WHEN COPYING MY SCRIPT.  #<br />\
# THIS SCRIPT IS COPYRIGHT OF MIKE MCGRATH 1998-2001 #<br />\
######################################################<br />\
# This javascript version, as shown above, has been  #<br />\
# modified by Tim McCoy, mccoytest@cox.net to better #<br />\
# organiize/simplify the data for novice users, like #<br />\
# me.  Also, it permits modifying the popup window   #<br />\
# location relative to the text or area that enables #<br />\
# the popup. Slight changes (maybe not the best way, #<br />\
# but it works) were made for Mac Safari detection.  #<br />\
# Has been tested on Mac(Firefox 1.0.7, Safari 2.0.3 #<br />\
# Camino 1.0b2, Opera 8.51, IE 5.2, Shira 1.2,       #<br />\
# OmniWeb 5.1.3 b2, iCab 3.0.2 b382 [kinda])         #<br />\
######################################################<br />\
</pre></td></tr></table>\
";

// had to embed pop2 in an extra table to get the border to show up properly
var pop2 = "\
<table style=\"z-index:1001;position:fixed;bottom:150px;\" bgcolor=\"#FFFFFF\" border=\"1px\"><tr><td>\
  <table style=\"border:\#B89 solid 1px;padding:3px; padding-bottom:5px;\" bgcolor=\"#FFFFFF\"><tr><td>\
  <center>\
  <h3 style=\"font-size:10px;font-family:Arial,Helvetica,Verdana;\">Current AccuWeather for Santa Barbara</h3>\
  <div class=\"accu2\">\
  <img src=\"http://wxport.accuweather.com/wxpost/graphic.aspx?zipcode=93111&type=61&partner=40888\" alt=\"Failed to load AccuWeather image.\">\
  </div>\
  </center>\
  </td></tr></table>\
</td></tr></table>\
";

var pop3 = "\
<table style=\"z-index:1001;position:relative;\" bgcolor=\"#FFFFFF\" border=\"1px\"><tr><td>\
  <table style=\"border:#B89 solid 1px;\" bgcolor=\"#FFFFFF\"><tr><td width=\"250\">\
    <center>\
    <h3 align=\"left\" style=\"font-size:11px;font-family:Arial,Helvetica,Verdana;\">Curt Crawshaw has designed a special T-shirt that our Oaks Costa Rica mission team will receive for their trip. We are making them available for $15 to anyone who orders through July 8. Men&apos;s and women&apos;s styles and sizes are available.  T&#111;&#110;&#105;&#32;L&#111;&#112;&#101;&#122;, will collect your pre-payment and size info.</h3> \
    <img src=\"http://www.oaksbible.org/images/costaricaT_s.jpg\">\
    </center>\
  </td></tr></table>\
</td></tr></table>\
";

var pop4 = "\
<table style=\"z-index:1002;position:relative;\" bgcolor=\"#FFFFFF\" border=\"1px\"><tr><td>\
<img src=\"http://www.oaksbible.org/images/GraceGiving.png\">\
</td></tr></table>\
";

var pop5 = "\
<table style=\"z-index:1001;position:relative;\" bgcolor=\"#FFFFFF\" border=\"1px\"><tr><td>\
<img src=\"http://www.oaksbible.org/images/EasterAtTheOaks.jpg\">\
</td></tr></table>\
";

// background color of popupwindows
var color0 = "#cdffff"; 
var color1 = "#A57C38"; 
var color2 = "#A57C38"; 
var color3 = "#A57C38"; 
var color4 = "#A57C38"; 
var color5 = "#A57C38"; 

// coord X and Y offsets of popupwindows to the activation text.
var coords0 = {x:0, y:0}; 
var coords1 = {x:0, y:0}; 
var coords2 = {x:0, y:0}; 
var coords3 = {x:0, y:0}; 
var coords4 = {x:0, y:0}; 
var coords5 = {x:0, y:0}; 

// now we insert the above items into an object for easy access
var e  = new Array();
e[0] = {color:color0 , coords:coords0 , msg:pop0};
e[1] = {color:color1 , coords:coords1 , msg:pop1};
e[2] = {color:color2 , coords:coords2 , msg:pop2};
e[3] = {color:color3 , coords:coords3 , msg:pop3};
e[4] = {color:color4 , coords:coords4 , msg:pop4};
e[5] = {color:color5 , coords:coords4 , msg:pop5};

/***********************************************
* Font size functionality
* THERE ARE NO DUPLICATE VARIABLES HERE.
* PLEASE DO NOT REMOVE ANY VARIABLES YOU MISINTERPRET AS DUPLICATED.
* anderson.fabiano@ifactory.com.br (July 25 2006)
*/
var STA_FONT_SIZE = 16;
var MIN_FONT_SIZE = 11;
var MAX_FONT_SIZE = 20;

var MIN_BODY_FONT_SIZE = 9;
var MAX_BODY_FONT_SIZE = 20;

var MIN_TEASER_FONT_SIZE = 11;
var MAX_TEASER_FONT_SIZE = 17;

var MIN_HEADLINE_FONT_SIZE = 16;
var MAX_HEADLINE_FONT_SIZE = 20;

function increaseFontSizes(){

   var body = document.getElementById('bodyElement');
   var headline = document.getElementById('headlineElement');

   MIN_FONT_SIZE = MIN_HEADLINE_FONT_SIZE;
   MAX_FONT_SIZE = MAX_HEADLINE_FONT_SIZE;
   increaseFontSize(headline);

   MIN_FONT_SIZE = MIN_BODY_FONT_SIZE;
   MAX_FONT_SIZE = MAX_BODY_FONT_SIZE;
   increaseFontSize(body);

}

function increaseFontSizesHome(){

   var body = document.getElementById('bodyElement');

   MIN_FONT_SIZE = MIN_BODY_FONT_SIZE;
   MAX_FONT_SIZE = MAX_BODY_FONT_SIZE;
   increaseFontSize(body);


}

function decreaseFontSizes(){

   var body = document.getElementById('bodyElement');
   var headline = document.getElementById('headlineElement');



   MIN_FONT_SIZE = MIN_HEADLINE_FONT_SIZE;
   MAX_FONT_SIZE = MAX_HEADLINE_FONT_SIZE;
   decreaseFontSize(headline);

   MIN_FONT_SIZE = MIN_BODY_FONT_SIZE;
   MAX_FONT_SIZE = MAX_BODY_FONT_SIZE;
   decreaseFontSize(body);


}
function decreaseFontSizesHome(){

   var body = document.getElementById('bodyElement');

   MIN_FONT_SIZE = MIN_BODY_FONT_SIZE;
   MAX_FONT_SIZE = MAX_BODY_FONT_SIZE;
   decreaseFontSize(body);


}

function increaseArticlesFontSizes(){
   changeArticlesFontSizes(1);
}

function decreaseArticlesFontSizes(){
   changeArticlesFontSizes(-1);
}

function changeArticlesFontSizes(val){
   var parent1 = document.getElementById("articlesSpan");
   var thisChild = parent1.firstChild;
   while ( thisChild != parent1.lastChild ){
      //ignore attribute (type 2) and text (type 3) nodes.
      if ( thisChild.nodeType == 1 ){
         //alert(thisChild.id);
         if(val > 0){
            increaseFontSize(thisChild);
         }else{
            decreaseFontSize(thisChild);
         }
      }
      thisChild = thisChild.nextSibling;
   }
}


function increaseFontSize(element) {
   var sizeStr = element.style.fontSize;

   if(sizeStr == ""){
      element.style.fontSize = STA_FONT_SIZE + "px";
      increaseFontSize(element);
      return;
   }

   for(var i = MIN_FONT_SIZE; i < MAX_FONT_SIZE; i++){

      if(sizeStr == (i + "px")
      || sizeStr == (i + ".0px")){
         var index = sizeStr.indexOf("px");
         var sz = sizeStr.substring(0, sizeStr.length - index);

         if(sz != "" && !isNaN(sz)){
            sz = parseInt(sz);
            element.style.fontSize = (sz + 1) + "px";
            return;
         }
      }
   }
}

function decreaseFontSize(element) {
   var sizeStr = element.style.fontSize;

   for(var i = MAX_FONT_SIZE; i > MIN_FONT_SIZE; i--){
      if(sizeStr == (i + "px")
      || sizeStr == (i + ".0px")){
         var index = sizeStr.indexOf("px");
         var sz = sizeStr.substring(0, sizeStr.length - index);

         if(sz != "" && !isNaN(sz)){
            sz = parseInt(sz);
            element.style.fontSize = (sz - 1) + "px";
            return;
         }
      }
   }
}


