﻿function getObj(name) {
    if (document.getElementById) {
        this.obj = document.getElementById(name);
        if (this.obj) this.style = document.getElementById(name).style;
    } else if (document.all) {
        this.obj = document.all[name];
        if (this.obj) this.style = document.all[name].style;
    } else if (document.layers) {
        if (document.layers[name]) {
            this.obj = document.layers[name];
            if (this.obj) this.style = document.layers[name];
        } else {
            this.obj = eval("document.layers." + name + ".layers[name]");
            if (this.obj) this.style = eval("document.layers." + name + ".layers[name]");
        }
    }
}


/* Start Functions to re-size font */
var currentSize = "";
var smallSize = "80%";
var largeSize = "115%";

function reduceTextSize(DivName) {
    var size;
    size = (currentSize == "" || currentSize == "100%" || currentSize == smallSize) ? smallSize : "100%";

    var divObj = new getObj(DivName);
    divObj.style.fontSize = size;
    currentSize = size;
}
function enlargeTextSize(DivName) {
    var size;
    size = (currentSize == "" || currentSize == "100%" || currentSize == largeSize) ? largeSize : "100%";

    var divObj = new getObj(DivName);
    divObj.style.fontSize = size;
    currentSize = size;
}
/* End Functions to re-size font */


/* Start Functions to add site to bookmarks */
function bookmark() {
    bookmarkurl = "http://www.lenwallisaudio.com.au"
    bookmarktitle = "Len Wallis Audio"
    if (document.all)
        window.external.AddFavorite(bookmarkurl, bookmarktitle)
    else if (window.sidebar) // firefox
        window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}
/* End */
