// JavaScript for the HeadGeezer.com Website
 // var $ = function (id) {
 //   return document.getElementById(id);
// }
//
//  Functions for Button Changes
//
function AllBut(TheButton, TheColor, TheBackground, TheBorder) {
    var Elem = document.getElementById(TheButton);
    Elem.style.color = TheColor;
    Elem.style.background = TheBackground;
    Elem.style.border = TheBorder;
}
function GreenOver(TheButton) {
    AllBut(TheButton, '#000', '#6F0', '3px inset #888');
}
function GreenOut(TheButton) {
    AllBut(TheButton, '#6F0', '#000', '3px outset #888');
}
function RedOver(TheButton) {
    AllBut(TheButton, '#000', "#999", '4px inset #CCC');
}
function RedOut(TheButton) {
    AllBut(TheButton, '#F00', '#DDD', '4px outset #CCC');
}
function SetMenu(TheItem, TheColor, TheBackground) {
    document.getElementById(TheItem).style.color = TheColor;
    document.getElementById(TheItem).style.background = TheBackground;
}
function targetBlank(url) {
    blankWin = window.open(url, '_blank', 'menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes')
}
//
//  Function for non-Menu Button Border & Color Change
//
function SetBorder(TheItem, TheBorder, TheBackground) {
    document.getElementById(TheItem).style.border = TheBorder;
    document.getElementById(TheItem).style.background = TheBackground;
}
//
//	Function for the Contact Popup
//
function popcontact() {
    window.open("contact.html", "popcontact", "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=580,height=520,top=125,left=275");
}
//
//  Function for GeezerMail Popup
//
function popmail() {
    window.open('mailpro.html', 'popmail', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width=638,height=500,top=150,left=300');
}
//
//   Functions for Rollovers
//
function HG_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.HG_p) d.HG_p = new Array();
        var i, j = d.HG_p.length, a = HG_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.HG_p[j] = new Image; d.HG_p[j++].src = a[i]; }
    }
}
function HG_swapImgRestore() { //v3.0
    var i, x, a = document.HG_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function HG_findObj(n, d) { //v4.01
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = HG_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function HG_swapImage() { //v3.0
    var i, j = 0, x, a = HG_swapImage.arguments; document.HG_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
        if ((x = HG_findObj(a[i])) != null) { document.HG_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}

