// JavaScript Document
/* increasing and decreasing text size.
how this works:
1- loop through all of the stylesheets
2 - check if they have a title
3 - check if that title contains "article" (indicates our article stylesheet)
4 - disable all article stylesheets
5 - enable the next size up or down.
6 - exit, enjoy the day.
*/
<!--
var sz=12 //default stylesheet
function selectStyleSheet(dir) {
	
	var li; // link items - that is, stylesheets
//make sure we're under limit
if (10<sz+dir&&sz+dir<20){
   for(var i=0; li=document.getElementsByTagName("link")[i]; i++) {
// get stylesheets

     if(li.getAttribute("rel").indexOf("style") != -1 && li.getAttribute("title")) {
		 //window.alert(dir);
      if(li.getAttribute("title").indexOf("size") !=-1) li.disabled = true;
// check if 1 - it's a stylesheet with a title, 2- if it is an article stylesheet, disable it
		if (li.getAttribute("title").indexOf(sz+dir)>-1)li.disabled = false;
// if it's the next in line, enable it
	  }
	 }
//don't forget to increment the size, so we know what's next....

document.getElementById("sizePlus").src = "../images/ico_sizeplus.gif";
document.getElementById("sizeLess").src = "../images/ico_sizeless.gif";
if(dir > 0 && sz+dir == 18) document.getElementById("sizePlus").src = "../images/ico_sizeplus_off.gif";
if(dir < 0 && sz+dir == 12) document.getElementById("sizeLess").src = "../images/ico_sizeless_off.gif";

    sz=sz+dir;
   }
  }
-->
