var thecopy=""

var mitems=new Array(
"index.html?Home",
"feedback.html?Feedback",
"auction.html?Auctions",
"about.html?About",
"help.html?Help"
)

var refmenu=window.location.href
refmenu=refmenu.toLowerCase()
var topmsg=""
if (refmenu.indexOf("bidok")>-1 || refmenu.indexOf("dupbid")>-1)
{  var topmsg="<center><font color=red size=-1 face=arial>Thank you.<br>Your Bid was posted.<p>"
   if (refmenu.indexOf("dupbid")>-1)
   {  topmsg+="Note: any other items or bids from your email adddress were removed.\n\nThis prevents spam, erroneous bidding and keeps prices low for other bidders.<p>This auction allows one bid and one item per bidder.\n\nYou may bid on multiple items (as many as you want) <b>after you have won an item and your email is confirmed.</b>"
   }
   topmsg+="</center><p><hr><p><font color=black size=+0 face=times>"
}
   
var menuref=window.location.href

var la="<td><center><a href=\""
var lb="\"><font color=\"white\" size=-1 face=\"verdana, arial, helvetica\" class=\"thtcolor\">"
var lc="</a></td>"
if (menuref.indexOf("wind")<0)
{  var tmenu="<body bgcolor=\"000077\"><table width=100% background=\"mytop.jpg\"><tr><td><img src=\"spacer.gif\" width=600 height=120><br>"
}  else
{  var tmenu="<body bgcolor=\"000077\"><table width=100% background=\"mytopbuy.jpg\"><tr><td><img src=\"spacer.gif\" width=600 height=120><br>"
}

tmenu+="<center><table cellpadding=3 border=1 bgcolor=\"000077\"><tr>"
for (i=0; i<mitems.length; i++)
{   var anm=mitems[i]
    msplit=anm.split("?")
    var a=msplit[0]
    var b=msplit[1]
    tmenu+=la
    tmenu+=a
    tmenu+=lb
    tmenu+=b
    tmenu+=lc
}
tmenu+="</tr></table></td></tr></table><br>"

var thisyear=new Date()
  var theYear = thisyear.getYear()
  thecopy = "Copyright &#169 "+theYear+"<br>"
  thecopy+="by KCK"
  thecopy+="<p>"
  thecopy+="Portions of this website sponsonred in part by<br>"
  thecopy+="<a href=\"javascript:gosee('http://eduhosting.org')\"><img src=\"http://eduhosting.org/pics/edulogo.gif\" border=0 alt=\"Eduhosting.org and Kids Computer Kamp - Free PCs for Kids since 1983\"></a>"

var bidbot="<form name=\"postbid\" method=post action=\"http://bigdrivehosting.com/userscripts/wgzbid.pl\">"
bidbot+="<input type=hidden name=\"mycode\">"
bidbot+="<input type=hidden name=\"myemail\">"
bidbot+="<input type=hidden name=\"mybid\">"
bidbot+="</form>"

function gosee(pass)
{ window.open(pass)
}

function ckemail(inEm)
{ var testEm = inEm
  var AtSym    = testEm.indexOf('@')
  var Period   = testEm.lastIndexOf('.')
  var Space    = testEm.indexOf(' ')
  var Length   = testEm.length - 1   // Array is from 0 to length-1
  
  if  ((AtSym < 1) ||                     // '@' cannot be in first position
      (Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
      (Period == Length ) ||             // Must be atleast one valid char after '.'
      (Space  != -1))                     // No empty spaces permitted
  { return 0
  }
  return 1
}

function gobid()
{   var mycode=document.wgz.products.value
    var myemail=document.wgz.myemail.value
    var mybid=document.wgz.mybid.value
    var msg=mycode+myemail+mybid
    if (!ckemail(myemail))
    {  alert("Email address appears invalid.")
       document.wgz.myemail.focus()
       return
    }
    var msg=""
    for (i=0; i<wgzitems.length; i++)
    {   var anitem=wgzitems[i]
        isplit=anitem.split(sep)
        var amt=isplit[0]
        amt=(amt*1)+(10*1)
        var sh="U.S.A. $"+isplit[1]+" Canada: $"+isplit[2]+" Overseas: $"+isplit[3]
        var desc=isplit[4]
        var icode=isplit[5]
        if (icode==mycode)
        {  msg="Item: "+icode+"\nDesc: "+desc+"\nRetail: $"+amt+"\nS/H: "+sh+"\n\nBidder: "+myemail+" Bid: $"+mybid
        }
     }
     if (msg=="")
     {  return
     }
     msg="Please review the item, shipping charges, your bid and email.\n\nClick OK if you wish to post this bid.\n\nClick CANCEL if you wish to change your bid, review product descriptions or prices.\n\n"+msg
     var ok=confirm(msg)
     if (ok)
     {  document.postbid.mycode.value=mycode
        document.postbid.myemail.value=myemail
        document.postbid.mybid.value=mybid
        document.postbid.submit()
     }
}

function postbid()
{ var myemail=document.wgz.myemail.value
}


function goebay()
{ window.open('http://search-desc.ebay.com/windgenzen_W0QQamp;sspagenameZhQ3ahQ3aadvsearchQ3aUSQQcatrefZC5QQfclZ3QQfromZR7QQfrppZ200QQfsooZ1QQfsopZ1QQftsZ2QQnojsprZyQQpfidZ0QQsacatZQ2d1QQsofocusZbs')
}
