var sEmail = new Array("jim@","info@","sales@","orders@");

function init() {/*
var so = document.getElementById("boldse").style;
so.display = 'none'; */
}
function email( i )
{
switch (i) {
case 4:
document.write('<a title="Send an Email to Sxeco" href="mailto:'+sEmail[1]+'sxeco.com?Subject=Question%20about%20something%20on%20Sxeco.com">Email</a>');
break;
default:
document.write('<a title="Send an Email to Sxeco" href="mailto:'+sEmail[i]+'sxeco.com'+'">'+sEmail[i]+'sxeco.com</a>');
break;
}
}
function expand(thistag) {var styleObj = document.getElementById(thistag).style;styleObj.display=(styleObj.display=='none')?'':'none';}
function Chg( o, cl ){o.className = cl;}

var timerID = null;
var quote   = '"'; // To allow embedding quotes in a quoted string
var sos     = "";
//var sPath   = "c:\\my music\\";
var sPath   = "http://www.jgilmore.com/jim/";
var sndFile = "";

var Sounds = new Array("PuttingB.mp3","AllOfMy.mp3","EverySingleDay.mp3","summary.mp3");

// avoid error of passing event object in older browsers
if (!document.layers && !document.all) event = "none";

function showToolTip(sTipText, sBGColor, sFontFace, sSize, e) {
    if (document.layers) { // Netscape 4.7x
        var ToolTip = document.layers.tooltip;
        var ToolTipDoc = ToolTip.document;
        ToolTipDoc.open();

        ToolTipDoc.write('<body><div id="tt"style="position:absolute;border:solid;border-width:1;border-color:#000000;layer-background-color:'+ sBGColor + ';">');
        ToolTipDoc.write('<font face="' + sFontFace + '" size="' + sSize + '">'+ sTipText);
        if (sndFile != "")
          ToolTipDoc.write('<EMBED SRC="' + sPath + sndFile +'" HIDDEN=TRUE MASTERSOUND>');
        ToolTipDoc.write('</font></div></body>');
        ToolTipDoc.close();
        ToolTip.clip.width = ToolTipDoc.layers.tt.clip.width;
        ToolTip.clip.height = ToolTipDoc.layers.tt.clip.height;
        document.captureEvents(Event.MOUSEMOVE);
        document.onmousemove = delayToolTip;
        delayToolTip(e);
     }
     if (document.all) { // IE
        var ToolTip = document.all.tooltip;
        ToolTip.innerHTML = '<div id="tt"style="position:absolute;border:solid;border-width:1;' +
          'padding:2;border-color:#000000;background-color:'+ sBGColor + ';">' +
          '<font face="' + sFontFace + '" size="' + sSize + '">' + sTipText + '</font>';
        if (sndFile != "")
          ToolTip.innerHTML += '<BGSOUND LOOP="1" SRC="' + sPath + sndFile +'" TITLE="N/A">';
        ToolTip.innerHTML += '</div>';
        ToolTip.noWrap = true;
        document.onmousemove = delayToolTip;
        delayToolTip(e);
     }
} // showToolTip()

function delayToolTip(e) {
    if (timerID) clearTimeout(timerID);
    var nX = 0;
    var nY = 0;
    if (document.layers) { // Netscape 4.7x
        nX = e.pageX;
        nY = e.pageY;
    }
    if (document.all) { // IE
        nX = window.event.clientX + document.body.scrollLeft;
        nY = window.event.clientY + document.body.scrollTop;
    } timerID = setTimeout("displayToolTip(" + nX + ", " + nY + ")", 300);
} // delayToolTip()

function displayToolTip(nX, nY) {
    if (document.layers) { // Netscape 4.7x
        document.releaseEvents(Event.MOUSEMOVE);
        document.onmousemove = null;
        var ToolTip = document.layers.tooltip;
        var ToolTipClip = ToolTip.clip;
        var nRightMargin = window.innerWidth + window.pageXOffset;
        if ((nX + ToolTipClip.width) > (nRightMargin - 10)) { // if the tooltip runs off right
            nX = nRightMargin - ToolTipClip.width - 20;
        }
        if ((nY + ToolTipClip.height) > (window.innerHeight + window.pageYOffset - 38)) { // if tooltip runs off bottom
            nY -= ToolTipClip.height + 22;
        }
        ToolTip.left = nX;
        ToolTip.top = nY + 20;
        ToolTip.visibility = 'visible';
     }
     if (document.all) { // IE
        document.onmousemove = null;
        var ToolTip = document.all.tooltip;
        var ToolTipStyle = ToolTip.style;
        var InnerToolTip = ToolTip.all.tt;
        var nRightMargin = document.body.clientWidth + document.body.scrollLeft;

        if ((nX + InnerToolTip.clientWidth) > nRightMargin) { // if the tooltip runs off right
            nX = nRightMargin - InnerToolTip.clientWidth - 6;
        }
        if ((nY + InnerToolTip.clientHeight) > (document.body.clientHeight +
          document.body.scrollTop - 20)) { // if tooltip runs off bottom
            nY -= InnerToolTip.clientHeight + 30;
        }
        ToolTipStyle.pixelLeft = nX;
        ToolTipStyle.pixelTop = nY + 20;
        ToolTipStyle.visibility = 'visible';
     }
} // displayToolTip()

function hideToolTip() {
    if (timerID) clearTimeout(timerID);
    if (document.layers) { // Netscape 4.7x
        document.releaseEvents(Event.MOUSEMOVE);
        document.onmousemove = null;
        document.layers.tooltip.visibility = 'hidden';
    }
    if (document.all) { // IE
     document.onmousemove = null;
     var ToolTipStyle = document.all.tooltip.style;
     ToolTipStyle.visibility = 'hidden';
     ToolTipStyle.pixelLeft = 0; // move layer to top left corner, otherwise when you
     ToolTipStyle.pixelTop = 0;  // set innerHTML again, it may cause a horizontal scrollbar
    }
} // hideToolTip()

function Tip( s ) {

   if (s == "") {
     hideToolTip();
     window.status = sos;
     sndFile = "";
   } else {
     sos = window.status;
     window.status = s;
     showToolTip(s, '#ffffcc', '', '2',event);
   }
}
function InfoBox(t,l,ttl,s){document.getElementById('dl1').style.top=t;document.getElementById('dl1').style.left=l;document.getElementById('dTitle').innerText=ttl;document.getElementById('dBdy').innerText=s;document.getElementById('dl1').style.display='';return void('');}
function BuyButton(itm,desc,pr){
document.write("<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" target=\"paypal\">"+
"<input type=\"hidden\" value=\"_cart\" name=\"cmd\" />"+
"<input type=\"hidden\" value=\"jim@sxeco.com\" name=\"business\" />"+
"<input type=\"hidden\" value=\""+desc+"\" name=\"item_name\" >"+
"<input type=\"hidden\" value=\""+itm+"\" name=\"item_number\" >"+
"<input type=\"hidden\" value=\""+pr+"\" name=\"amount\">"+
"<input type=\"hidden\" value=\"1\" name=\"no_note\" />"+
"<input type=\"hidden\" value=\"USD\" name=\"currency_code\" />"+
"<input type=\"hidden\" value=\"US\" name=\"lc\" />"+
"<input type=\"hidden\" value=\"1.50\" name=\"shipping\" />"+
"<input type=\"hidden\" value=\"1.50\" name=\"shipping2\" />"+
"<input type=\"hidden\" value=\"0.00\" name=\"handling\" />"+
"<input type=\"hidden\" value=\"1.50\" name=\"handling_cart\" />"+
"<input type=\"hidden\" value=\"Sxeco\" name=\"page_style\">"+
"<input type=\"hidden\" value=\"https://site194.mysite4now.com/jerrygilmore/bigcoconuts/PayPal750x90.gif\" name=\"image_url\" />"+
"<input type=\"hidden\" value=\"1\" name=\"add\" />"+
"<input type=\"submit\" value=\"Buy\"/>"+
"</form>");
//PP.item_number.value=itm;PP.item_name.value=desc;PP.amount.value=pr;PP.submit();
}


