// 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=02; //default stylesheet
function selectStyleSheet(dir) {
var li; // link items - that is, stylesheets
//make sure we're under limit
//alert (sz+dir);
if (1 < sz+dir && sz+dir  < 9){
   for(var i=0; li=document.getElementsByTagName("link")[i]; i++) {
// get stylesheets
	//alert (li.getAttribute("title"));
     if(li.getAttribute("rel").indexOf("style") != -1 && li.getAttribute("title")) {
		if(li.getAttribute("title").indexOf("article") !=-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....
    sz=sz+dir;
 }
}
