/* 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=13 //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")) 
            {
                // check if 1 - it's a stylesheet with a title, 2- if it is an article stylesheet, disable it
                if (li.getAttribute("title").indexOf("article") !=-1)
                {
                    li.disabled = true;
                }
                
                // if it's the next in line, enable it
                if (li.getAttribute("title").indexOf(sz+dir)>-1)
                {
                    li.disabled = false;
                }
            }
        }

        //don't forget to increment the size, so we know what's next....
        sz=sz+dir;
        
        //document.getElementById("textPlaceholder").style.marginBottom = "100px";
    }
}
