// JavaScript Document

function getcookie()
{
	var the_cookie = document.cookie;
	var the_cookie = unescape(the_cookie);
    var broken_cookie = the_cookie.split(":");
    var the_size = broken_cookie[1];

	
	var p = document.getElementsByTagName('p');
    for(n=0; n<p.length; n++) {
	   if(the_size=='small')
	   {
		   p[n].style.fontSize = 10 + 'pt';
	   }
	   if(the_size=='medium')
	   {
		   p[n].style.fontSize = 13 + 'pt';
	   }
	   if(the_size=='large')
	   {
		   p[n].style.fontSize = 16 + 'pt';
	   }	   
	}
	
	var li = document.getElementsByTagName('li');
    for(n=0; n<li.length; n++) {
	   if(the_size=='small')
	   {
		   li[n].style.fontSize = 10 + 'pt';
	   }
	   if(the_size=='medium')
	   {
		   li[n].style.fontSize = 13 + 'pt';
	   }
	   if(the_size=='large')
	   {
		   li[n].style.fontSize = 16 + 'pt';
	   }	   
	}
	
	var h2 = document.getElementsByTagName('h2');
    for(n=0; n<h2.length; n++) {
	   if(the_size=='small')
	   {
		   h2[n].style.fontSize = 14 + 'pt';
	   }
	   if(the_size=='medium')
	   {
		   h2[n].style.fontSize = 17 + 'pt';
	   }
	   if(the_size=='large')
	   {
		   h2[n].style.fontSize = 20 + 'pt';
	   }	   
	}
	
	var h3 = document.getElementsByTagName('h3');
    for(n=0; n<h3.length; n++) {
	   if(the_size=='small')
	   {
		   h3[n].style.fontSize = 14 + 'pt';
	   }
	   if(the_size=='medium')
	   {
		   h3[n].style.fontSize = 17 + 'pt';
	   }
	   if(the_size=='large')
	   {
		   h3[n].style.fontSize = 20 + 'pt';
	   }	   
	}
}

function changeFontSize(size)
{
  var p = document.getElementsByTagName('p');
  for(n=0; n<p.length; n++) {
    p[n].style.fontSize = size + 'pt';
   }
   
     var li = document.getElementsByTagName('li');
  for(n=0; n<li.length; n++) {
    li[n].style.fontSize = size + 'pt';
   }
   
     var h2 = document.getElementsByTagName('h2');
  for(n=0; n<h2.length; n++) {
    h2[n].style.fontSize = size + 4 + 'pt';
   }
   
     var h3 = document.getElementsByTagName('h3');
  for(n=0; n<h3.length; n++) {
    h3[n].style.fontSize = size + 4 + 'pt';
   }
   
   var the_date = new Date();
   the_date.setTime(the_date.getTime()+(28*24*60*60*1000));
   var the_cookie_date = the_date.toGMTString();
   
   if(size == 10)
   {
	var the_cookie = "tmtb_size=" + escape("size:small");
	the_cookie = the_cookie + ";expires=" + the_cookie_date + ";path=/";
    document.cookie = the_cookie;
   }
   if(size == 13)
   {
	var the_cookie = "tmtb_size=" + escape("size:medium");
	the_cookie = the_cookie + ";expires=" + the_cookie_date + ";path=/";
    document.cookie = the_cookie;
   }
   if(size == 16)
   {
	var the_cookie = "tmtb_size=" + escape("size:large");
	the_cookie = the_cookie + ";expires=" + the_cookie_date + ";path=/";
    document.cookie = the_cookie;
   }
   
}
