document.onreadystatechange = startInit;
document.onmouseover = setStatus;
document.onmouseout = setStatus;
document.onclick = setStatus;

/////////////////////////////////////////////////////////////////////////////////////////////////
function startInit() {
   if (document.readyState=='complete') {
      if (document.getElementById('bodyFoot')) {
         oDiv = document.getElementById('bodyFoot');
         oImg = document.createElement('img');
         oImg.src = 'graphics/hoofrule.gif';
         oImg.width = 600;
         oImg.height = 63;
         oDiv.appendChild(oImg);
         oHTML = document.createElement('h6');
         oHTML.id = 'footText';
         oHTML.innerHTML = 'Web Page Designed and Maintained by:';
         oDiv.appendChild(oHTML);
         oImg = document.createElement('img');
         oImg.src = 'graphics/logo.gif';
         oImg.width = 200;
         oImg.height = 40;
         oDiv.appendChild(oImg);
         oHTML = document.createElement('h6');
         oHTML.innerHTML ='Rt 1 Box 406F Luther, Oklahoma (405) 277-9003<br>www.lucky4jays.com';
         oDiv.appendChild(oHTML);
      }
      if (document.getElementById('bodyContent')) {
         window.setTimeout("showDocument()",1000);
      }
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function noRightClick() {
   clickMsg1 ="Sorry, right mouse click is disabled."
   clickMsg2 ="Source codes and images are propery of Lucky 4 Jays Paints and Quarters."
   clickMsg3 ="ALL RIGHTS RESERVED"
   if (event.button == 2) {
         alert(clickMsg1+'\n'+clickMsg2+'\n'+clickMsg3)
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function setStatus() {
   if (document.getElementById('bodyHead')) {
      window.status = 'Welcome to '+document.title+' - '+bodyHead.innerText
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function showDocument() {
   oDiv = document.getElementById('bodyLoadMsg');
   oDiv.style.visibility='hidden';
   oDiv  = document.getElementById('bodyContent');
   oDiv.style.filter='revealTrans()';
   oDiv.filters.revealTrans.transition = 12;
   oDiv.filters.revealTrans.duration = 1;
   if (oDiv.filters.revealTrans.status != 1) {
      oDiv.filters.revealTrans.apply();
      oDiv.style.visibility = 'visible';
      oDiv.filters.revealTrans.play();
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function hRule() {
   oDiv  = document.getElementById('bodyContent');
   oImg = new Image();
   oImg.src = 'graphics/hoofrule.gif';
   oImg.alt = 'Hoof print rule';
   oImg.width = 600;
   oImg.height = 63;
   oDiv.appendChild(oImg);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function payPal() {
   oDiv  = document.getElementById('bodyContent');
   oDiv2 = document.createElement('div')
   htmlString1 = '<img src="http://images.paypal.com/images/lgo/logo3v.gif" border="0" alt="PayPal logo">'
   htmlString2 = '<h5><a href="https://www.paypal.com/auction/pal=9LBXM5JBTZHF4" target="_blank">'
   htmlString3 = 'Click here to buy a horse or pay for a breeding through PayPal</a></h5>'
   htmlString4 = '<img src="http://images.paypal.com/images/icon_visa.gif" border="0" alt="Visa">&nbsp;'
   htmlString5 = '<img src="http://images.paypal.com/images/icon_mastercard.gif" border="0" alt="MasterCard">&nbsp;'
   htmlString6 = '<img src="http://images.paypal.com/images/icon_discover.gif" border="0" alt="Discover">&nbsp;'
   htmlString7 = '<img src="http://images.paypal.com/images/icon_amex.gif" border="0" alt="American Express">'
   oDiv2.innerHTML = htmlString1+htmlString2+htmlString3+htmlString4+htmlString5+htmlString6+htmlString7
   oDiv.appendChild(oDiv2);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function winOpen(wURL,wName,wSize) {
   if (!wURL) {
      wURL = 'about:blank'
   }
   if (!wName) {
      wName = ''
   }
   wFeatures = new Array(13)
   if (wSize == 1) {
      wWidth = 300
      wHeight = 200
      wTop = 0
      wLeft = (screen.width) ? (screen.width-wWidth)/2 : 0;
      wFeatures[0] = 'channelmode=no'
      wFeatures[1] = 'directories=no'
      wFeatures[2] = 'fullscreen=no'
      wFeatures[3] = 'height='+wHeight
      wFeatures[4] = 'left='+wLeft
      wFeatures[5] = 'location=no'
      wFeatures[6] = 'menubar=no'
      wFeatures[7] = 'resizable=yes'
      wFeatures[8] = 'scrollbars=yes'
      wFeatures[9] = 'status=no'
      wFeatures[10] = 'titlebar=no'
      wFeatures[11] = 'toolbar=no'
      wFeatures[12] = 'top='+wTop
      wFeatures[13] = 'width='+wWidth
   }
   else if (wSize == 2) {
      wWidth = 450
      wHeight = 300
      wTop = 0
      wLeft = (screen.width) ? (screen.width-wWidth)/2 : 0;
      wFeatures[0] = 'channelmode=no'
      wFeatures[1] = 'directories=no'
      wFeatures[2] = 'fullscreen=no'
      wFeatures[3] = 'height='+wHeight
      wFeatures[4] = 'left='+wLeft
      wFeatures[5] = 'location=no'
      wFeatures[6] = 'menubar=no'
      wFeatures[7] = 'resizable=yes'
      wFeatures[8] = 'scrollbars=yes'
      wFeatures[9] = 'status=no'
      wFeatures[10] = 'titlebar=no'
      wFeatures[11] = 'toolbar=no'
      wFeatures[12] = 'top='+wTop
      wFeatures[13] = 'width='+wWidth
   }
   else if (wSize == 3) {
      wWidth = 650
      wHeight = 400
      wTop = 0
      wLeft = (screen.width) ? (screen.width-wWidth)/2 : 0;
      wFeatures[0] = 'channelmode=no'
      wFeatures[1] = 'directories=no'
      wFeatures[2] = 'fullscreen=no'
      wFeatures[3] = 'height='+wHeight
      wFeatures[4] = 'left='+wLeft
      wFeatures[5] = 'location=no'
      wFeatures[6] = 'menubar=no'
      wFeatures[7] = 'resizable=yes'
      wFeatures[8] = 'scrollbars=yes'
      wFeatures[9] = 'status=no'
      wFeatures[10] = 'titlebar=no'
      wFeatures[11] = 'toolbar=no'
      wFeatures[12] = 'top='+wTop
      wFeatures[13] = 'width='+wWidth
   }
   else {
      wWidth = 650
      wHeight = 400
      wTop = 0
      wLeft = (screen.width) ? (screen.width-wWidth)/2 : 0;
      wFeatures[0] = 'channelmode=no'
      wFeatures[1] = 'directories=yes'
      wFeatures[2] = 'fullscreen=no'
      wFeatures[3] = 'height='+wHeight
      wFeatures[4] = 'left='+wLeft
      wFeatures[5] = 'location=yes'
      wFeatures[6] = 'menubar=yes'
      wFeatures[7] = 'resizable=yes'
      wFeatures[8] = 'scrollbars=yes'
      wFeatures[9] = 'status=yes'
      wFeatures[10] = 'titlebar=yes'
      wFeatures[11] = 'toolbar=yes'
      wFeatures[12] = 'top='+wTop
      wFeatures[13] = 'width='+wWidth
   }
  window.open(wURL,wName,wFeatures)
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function printButton() {
   oDiv  = document.getElementById('bodyContent');
   wpButton = document.createElement('input');
   wpButton.id =  'wPrint';
   wpButton.type = 'button';
   wpButton.value = 'Print this Document';
   wpButton.onclick = winPrint;
   oDiv.appendChild(wpButton);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function winPrint() {
   if (window.name != 'menuArea' && window.name != 'titleArea') {
      window.print();
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function window.onbeforeprint() {
   if (document.getElementById('footText')) {
      footText.innerText = 'Document compliments of'
   }
   if (document.getElementById('wPrint')) {
       wPrint.className = 'noShow'
   }
   if (document.getElementById('wLuther')) {
       wLuther.className = 'noShow'
   }
   if (document.getElementById('StatCont')) {
       StatCont.className = 'noShow'
   }
   if (document.getElementById('fLogic')) {
       fLogic.className = 'noShow'
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function window.onafterprint() {
    if (document.getElementById('footText')) {
      footText.innerText = 'Web Page Designed and Maintained by:'
   }
   if (document.getElementById('wPrint')) {
       wPrint.className = 'yesShow'
   }
   if (document.getElementById('wLuther')) {
       wLuther.className = 'yesShow'
   }
   if (document.getElementById('StatCont')) {
       StatCont.className = 'yesShow'
   }
   if (document.getElementById('fLogic')) {
       fLogic.className = 'yesShow'
   }
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function updateHead(textString) {
   textString  = bodyHead.innerText +' '+textString
   bodyHead.innerText = textString.toLowerCase()
}
/////////////////////////////////////////////////////////////////////////////////////////////////
function email(user,subj) {
   domain = 'lucky4jays.com';
   recipient = user+'@'+domain;
   url = 'mailto:'+recipient+'?subject='+subj;
   document.write(recipient.link(url));
}

