//*************************************************************************************************
if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown = click;

function click(e) {
    var now = new Date();
    var year = now.getYear();
    var message = "(c) Copyright 1997 - " + year + " J.B. Wood Products. All Rights Reserved.";

    if (document.all) {
        if (event.button == 2) {
            alert(message);
            return false;
        }
    }
    if (document.layers) {
        if (e.which == 3) {
            alert(message);
            return false;
        }
    }

    if (new String(window.location.href).indexOf("jbwood.com") > 0) {
        if (document.all) {
            if (event.button == 0 || event.button == 1) {
                window.location = "https://secure13.hostek.net/jbwood-com/st_categories.aspx"
            }
        }
        if (document.layers) {
            if (e.which == 0 || e.which == 1) {
                window.location = "https://secure13.hostek.net/jbwood-com/st_categories.aspx"
            }
        }
    }
}

//*************************************************************************************************
//var statBarMsg = "                                                              " +
//  "Factory outlet open house Saturday March 25, 10 am to 4pm. " +
//  "Refreshments and door prizes will be served. " +
//  "                         ";
var statBarMsg = "                                                              " +
"Sign up for our periodic specials throughout the year. " +
"Go to our feedback page and tell us you want to join our email list. " +
"                         ";
//*************************************************************************************************
function WindowStatusBar() {
    StatScroll();
}

//*************************************************************************************************
function StatScroll() {
    window.status = statBarMsg;
    statBarMsg = statBarMsg.substring(1, statBarMsg.length) + statBarMsg.substring(0, 1)
    setTimeout("StatScroll()", 100)
}

//*************************************************************************************************
// This functions pops up a new window to allow the user to email a friend
function tellAFriend() {
    var winl = (screen.width - 400) / 6;
    var wint = (screen.height - 425) / 6;
    window.open("https://secure13.hostek.net/jbwood-com/taf_main.aspx", null, "width=400,height=425,top=" + wint + ",left=" + winl + ",toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes");
}

//*************************************************************************************************
// This functions tells how to add a book mark
function addBookmark() {
    if (navigator.appName == "Microsoft Internet Explorer") {
        var bookmarkurl, bookmarktitle
        bookmarkURL = "http://www.JBWood.com/"
        bookmarkTitle = "JBWood.com"
        window.external.AddFavorite(bookmarkURL, bookmarkTitle)
    } else {
        alert("To bookmark this site, click 'Bookmarks | Add bookmark' or 'Favorites | Add To Favorites', some browsers Ctrl+D or Ctrl+T also work");
    }
}