﻿//default font-size var.  used to keep track of font-size when we increase and decrease via tools menu
var fontSize;
fontSize = 11;


//bookmark function
function bookmarksite(title, url) {
    if (document.all)
        window.external.AddFavorite(url, title);
    else if (window.sidebar)
        window.sidebar.addPanel(title, url, "")
}

//font tools menu actions
function setFont(action)
{
    var newFontSize;
    switch(action)
    {
        case '+':
            if (fontSize < 16) {
            fontSize ++;
            newFontSize = fontSize + 'px';
            setStyleByTag('p','fontSize',newFontSize,1);
            setStyleByTag('td','fontSize',newFontSize,1);
            setStyleByClass('div','text','fontSize',newFontSize);
            };
            break;
        case '-':
            fontSize --;
            newFontSize = fontSize + 'px';
            setStyleByTag('p','fontSize',newFontSize,1);
            setStyleByTag('td','fontSize',newFontSize,1);
            setStyleByClass('div','text','fontSize',newFontSize);
            break;
        case 'black':
            setStyleByTag('body','color','black',1);
            break;
        case 'red':
            setStyleByTag('body','color','red',1); 
            break;   
    }
}


