  var myref=window.location.href
  var mybody="<body bgcolor=white><center>"
  var myhead="<tr><td colspan=2 align=right bgcolor=black><img src=\"aniwind.gif\" align=left>"
  myhead+="<font color=white size=+3><img src=\"aniying.gif\" align=left>WIND GEN ZEN<p>ONLINE CLASS<br>ENROLLMENT<p><font size=+0>"
  myhead+="<font size=+1><center>Making your own Wind Generator<br>for Pennies on the Dollar<br>"

  if (myref.indexOf("?paid")<0)
  {  mybody="<table bgcolor=white width=50% cellpadding=15 border=10>"
     mybody+=myhead
     mybody+="<form name=\"form1\"><font size=+0 color=b87333>Thank you for your payment.</td></tr>"
     mybody+="<tr><td align=right>"
     mybody+="<font color=royalblue face=arial><b>PayPal email address that paid for this class:</td>"
     mybody+="<td><input size=20 maxlength=50 name=\"myemail\">"
     mybody+="<input type=button value=\"LOOK ME UP\" onClick=\"goconfirm()\"><br><font color=royalblue><i>"
     mybody+="Your email is checked in the PAID order database.</td></tr>"
  }  else
  {  mybody+="<table bgcolor=white width=90% border=10 cellpadding=15>"
     mybody+=myhead
     mybody+="<p><font color=b87333 face=arial size=+0><b>"
     mybody+="Congratulations - we'll show you how to disconnect from the grid!"
     mybody+="</td></tr>"
     mybody+="</td></tr>"
     mybody+="<tr><td><font color=royalblue>"
     mybody+="<b>CLASS ENROLLMENT OVERVIEW:<p></b>WRITE THIS DOWN:<p>The password for the ONLINE CLASS is "
     mybody+="<font color=red size=+1><b>kckwindgenzen</b><font size=+0 color=blue><p>The password for the CD CLASS, which you can download from the class page is <b><font size=+1 color=red>nasa </b><font size=+0 color=blue>(small letters).<p>The CD class has an AVI video of how a blade is carved. Both classes have step-by-step instructions for carving blades, connecting circuits and putting up Wind Generators.<p>"
     mybody+="These classes were designed by folks who write educational software for large EDU publishers. We have tried to include every single step you will need, but know some people will have different location, power or noise requirements.<p>"
     mybody+="As new questions come in and solutions and diagrams are developed, we will add to the ONLINE CLASS, so check back frequently for updates.<p>Thank you.<p>"
     mybody+="<b>To get started now, <font color=red>write down the passwords above,</b><p><font color=blue>Once you have done that:<center><a href=\"wgs0.html\">"
     mybody+="<img src=\"clickred2.gif\" "
     mybody+="border=0 alt=\"click here\"></a>"
  }
  mybody+="</td></tr></table></body>"
  document.write(mybody)
   
function goconfirm()
{ var anemail=document.form1.myemail.value
  anemail=anemail.toLowerCase()
  if (!ckemail(anemail))
  {  alert("Invalid email address\n\nPlease try again")
     document.form1.myemail.focus()
     return
  }
  var abr="<br>"
  var mypal=myorders.length
  for (i=0; i<mypal; i++)
  { var ano=myorders[i]
    parts=ano.split(abr)
    inemail=parts[1]
    inemail=inemail.toLowerCase()
    if ((inemail==anemail) && (ano.indexOf("Online")>0) && (ano.indexOf("Class")>0) && (ano.indexOf("Online")>0) && (ano.indexOf("Wind")>0))
    {  window.open("download.html?paid",'cdwin','resizeable=no, location=no, toolbar=no, scrollbars=yes, height=600 width=800, top=20 left=20')
       return
    }
  }
  var ok=confirm("That email address does not show in the paid database.\n\nClick OK to pay now or CANCEL to try again.\n\nThe fee for this online report is $9.95.")
  if (ok)
  {  document.palform.submit()
  }  else
  {  document.form1.myemail.focus()
  }
}

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
}