﻿// JScript File

function showOrHide(theSender,theRecipient) {
   var sender = document.getElementById(theSender);
   var recipient = document.getElementById(theRecipient);

   if (recipient.style.display=="none") {
      recipient.style.display="block"; //show element
      sender.src="http://www.wilco-online.org/ebids/images/down_arrow2.gif"
   }
   else {
      recipient.style.display="none"; //hide element
      sender.src="http://www.wilco-online.org/ebids/images/up_arrow2.gif"
   }
   return false;
}


function showOrHideText(theSender,theRecipient) {
    var sender = document.getElementById(theSender);
    var recipient = document.getElementById(theRecipient);

    if (recipient.style.display=="none") {
      recipient.style.display="block"; //show element
      sender.innerHTML = "<div style='cursor:pointer;cursor:hand;font-weight:bold;color:#800000;'>(hide full text)</div>"
    }
    else {
      recipient.style.display="none"; //hide element
      sender.innerHTML = "<span style='cursor:pointer;cursor:hand;font-weight:bold;color:#800000;'>... (show full text)</span>"
    }
    return false;
}


function getposOffset(overlay, offsettype){
  var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
  var parentEl=overlay.offsetParent;
  while (parentEl!=null){
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
  }
  return totaloffset;
}

function overlay(curobj, subobj){
  if (document.getElementById){
    var subobj=document.getElementById(subobj)
    subobj.style.left=getposOffset(curobj, "left")+"px"
    subobj.style.top=getposOffset(curobj, "top")+"px"
    subobj.style.display="block"
    return false
  }
  else
  return true
}

function overlayclose(subobj){
  document.getElementById(subobj).style.display="none"
}