function goWesternUnion()
{

   top.topframe.document.clear();
   top.topframe.document.open();
   top.topframe.document.writeln("<HTML>");
   top.topframe.document.writeln("<HEAD><TITLE></TITLE></HEAD>");
   top.topframe.document.writeln("<BODY BACKGROUND='printback.gif'>");
   top.topframe.document.writeln("<STYLE TYPE='text/css'>");
   top.topframe.document.writeln("table { font:normal 13px arial\; }");
   top.topframe.document.writeln("p.other1 { font:bold 15px arial\; }");
   top.topframe.document.writeln("p.other2 { font:normal 13px arial\; margin-right:25%\;}");
   top.topframe.document.writeln("textarea.ta { width:260px\; height:40px\; font:normal 13px arial\; margin-left:10px\; overflow:auto\; }");
   top.topframe.document.writeln("input.box { width:260px\; font:normal 13px arial\; margin-left:10px\; }");
   top.topframe.document.writeln("tr.dk { background-color:#f2f2f2\; }");
   top.topframe.document.writeln("tr.lt { background-color:#ffffff\; }");
   top.topframe.document.writeln("</STYLE>");
   top.topframe.document.writeln("<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 width='100%'>");
   top.topframe.document.writeln("<TR>");
   top.topframe.document.writeln("<TD><IMG SRC='empty.gif' WIDTH=40 HEIGHT=1 ALT='' BORDER=0></TD>");
   top.topframe.document.writeln("<TD>");
   top.topframe.document.writeln("<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=98% BACKGROUND='ptlogo_membership_bg.gif'>");
   top.topframe.document.writeln("<TR><TD><IMG SRC='ptlogo_membership.gif' WIDTH='186' HEIGHT='42' BORDER='0' ALT='Pagetutor.com'></TD></TR>");
   top.topframe.document.writeln("</TABLE>");
   top.topframe.document.writeln("<P CLASS='other1'>PageTutor order - Western Union");
   top.topframe.document.writeln("<P CLASS='other2'><b>Step 1:</b> Go to your nearest Western Union outlet and tell them you would like to send a payment of <b>$" + cd_total + " in US Dollars</b> to:");
   top.topframe.document.writeln("<br>&nbsp\;");
   top.topframe.document.writeln("<br>&nbsp\;&nbsp\;&nbsp\;Joe Barta");
   top.topframe.document.writeln("<br>&nbsp\;&nbsp\;&nbsp\;Eastlake, OH  44095");
   top.topframe.document.writeln("<br>&nbsp\;&nbsp\;&nbsp\;USA");
   top.topframe.document.writeln("<P CLASS='other2'>They will accept your native currency and perform the necessary conversions (you pay in your currency, I get it in US Dollars). They will also give you a <i>Money Transfer Control Number</i>. If you're not sure where to find your nearest Western Union outlet, you can go to the <A HREF='http://www.westernunion.com/' TARGET='_blank'>Western Union web site</A> and click \"Find Agent Location\". After making payment, continue with Step 2 below.");
   top.topframe.document.writeln("<P CLASS='other2'><b>Step 2:</b> Fill out the form below and click Send. This will notify me of your payment and your order will be normally be processed within 24 hrs. <span style='color:#ff0000'>(A membership password is not issued until payment is verified and collected from Western Union. Entering fake information here will result only in a few wasted minutes of your time.)</span>");
   top.topframe.document.writeln("<FORM NAME='westernunionform' action='http://www.pagetutor.com/cgi-bin/cgiemail/membership/western_union.txt' method='POST' target='_top'>");
   top.topframe.document.writeln("<P CLASS='other3'><TABLE CELLSPACING='0' CELLPADDING='1' BORDER='0' style='margin-left:10px'>");

   if(cd_3digit == '110')
   {
      top.topframe.document.writeln("<TR class=dk><TD>Money Transfer Control Number:</TD><TD> <INPUT class='box' TYPE='text' NAME='Control_Number'  VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Your Name:</TD><TD>                     <INPUT class='box' TYPE='text' NAME='Name'            VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>City:</TD><TD>                          <INPUT class='box' TYPE='text' NAME='City'            VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>State/Province:</TD><TD>                <INPUT class='box' TYPE='text' NAME='State'           VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Zip/Postal Code:</TD><TD>               <INPUT class='box' TYPE='text' NAME='Zip'             VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Country:</TD><TD>                       <INPUT class='box' TYPE='text' NAME='Country'         VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Email Address:</TD><TD>                 <INPUT class='box' TYPE='text' NAME='Cust_email'      VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Amount (in US Dollars):</TD><TD>        <INPUT class='box' TYPE='text' NAME='Amount'          VALUE='$" + cd_total + "' readonly style='cursor:default'></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Item(s) ordered:</TD><TD>               <textarea class='ta' readonly name='Item' style='cursor:default'>" + cd_desc1 + "</textarea></TD></TR>");
   }
   else
   {
      top.topframe.document.writeln("<TR class=dk><TD>Money Transfer Control Number:</TD><TD> <INPUT class='box' TYPE='text' NAME='Control_Number'  VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Your Name:</TD><TD>                     <INPUT class='box' TYPE='text' NAME='Name'            VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Address:</TD><TD>                       <INPUT class='box' TYPE='text' NAME='Address1'        VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>&nbsp;</TD><TD>                         <INPUT class='box' TYPE='text' NAME='Address2'        VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>City:</TD><TD>                          <INPUT class='box' TYPE='text' NAME='City'            VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>State/Province:</TD><TD>                <INPUT class='box' TYPE='text' NAME='State'           VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Zip/Postal Code:</TD><TD>               <INPUT class='box' TYPE='text' NAME='Zip'             VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Country:</TD><TD>                       <INPUT class='box' TYPE='text' NAME='Country'         VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Email Address:</TD><TD>                 <INPUT class='box' TYPE='text' NAME='Cust_email'      VALUE=''></TD></TR>");
      top.topframe.document.writeln("<TR class=dk><TD>Amount (in US Dollars):</TD><TD>        <INPUT class='box' TYPE='text' NAME='Amount'          VALUE='$" + cd_total + "' readonly style='cursor:default'></TD></TR>");
      top.topframe.document.writeln("<TR class=lt><TD>Item(s) ordered:</TD><TD>               <textarea class='ta' readonly name='Item' style='cursor:default'>" + cd_desc1 + "</textarea></TD></TR>");
   }

   top.topframe.document.writeln("<TR><TD colspan='2'><IMG SRC='empty.gif' WIDTH='2' HEIGHT='8' ALT='' BORDER='0'></TD></TR>");
   top.topframe.document.writeln("<TR><TD COLSPAN='2'><INPUT TYPE='button' VALUE='   Send   ' onClick='top.submitWUForm()'></TD></TR>");
   top.topframe.document.writeln("</TABLE>");

   top.topframe.document.writeln("<input type=hidden name='Product_Number' value='" + cd_3digit + "'>");
   top.topframe.document.writeln("<input type=hidden name='success' value='http://www.pagetutor.com/membership/thanks.html'>");
   if(cd_3digit == '110')
   {
      top.topframe.document.writeln("<INPUT TYPE='hidden' NAME='Address1' VALUE=''>");
      top.topframe.document.writeln("<INPUT TYPE='hidden' NAME='Address2' VALUE=''>");
   }

   top.topframe.document.writeln("</FORM>");
   top.topframe.document.writeln("<HR SIZE='1'>");
   top.topframe.document.writeln("<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 ALIGN=center>");
   top.topframe.document.writeln("<TR><TD>'Live as if you were to die tomorrow. Learn as if you were to live forever.'</TD></TR>");
   top.topframe.document.writeln("<TR><TD ALIGN=right>- Mahatma Gandhi&nbsp\;&nbsp\;&nbsp\;&nbsp\;</TD></TR>");
   top.topframe.document.writeln("</TABLE>");
   top.topframe.document.writeln("</TD></TR></TABLE>");
   top.topframe.document.writeln("</BODY></HTML>");
   top.topframe.document.close();

}



function submitWUForm()
{
   if(checkWUForm() == true)
   {
      top.topframe.document.westernunionform.submit();
   }
}







function checkWUForm()
{

   // grab form info
   var uctrlnum  = top.topframe.document.westernunionform.Control_Number.value;
   var uname     = top.topframe.document.westernunionform.Name.value;
   if(cd_3digit != '110')
   {
      var uaddress1 = top.topframe.document.westernunionform.Address1.value;
      var uaddress2 = top.topframe.document.westernunionform.Address2.value;
   }
   var ucity     = top.topframe.document.westernunionform.City.value;
   var ustate    = top.topframe.document.westernunionform.State.value;
   var uzip      = top.topframe.document.westernunionform.Zip.value;
   var ucountry  = top.topframe.document.westernunionform.Country.value;
   var uemail    = top.topframe.document.westernunionform.Cust_email.value;



   //Check for form errors ==========================
   var errors = 0;
   var errormessage = "I need the following information before proceeding:\n\n";

   if (uctrlnum.length == 0) { errormessage = errormessage + "-  You must enter the Money Transfer Control Number.\n"; errors = 1; }
   if (uname.length == 0) { errormessage = errormessage + "-  You must fill in your name.\n"; errors = 1; }
   if(cd_3digit != '110')
   {
      if (uaddress1.length == 0) { errormessage = errormessage + "-  You must fill in your address.\n"; errors = 1; }
   }
   if (ucountry.length == 0) { errormessage = errormessage + "-  You must fill in your country.\n"; errors = 1; }
   if (emailcheck(uemail) == "bad") { errormessage = errormessage + "-  The email address you entered is not valid.\n"; errors = 1; }

   if (errors == 0)
   {
      // flag questionable items
      flags = 0;
      flagmessage = "I found some potential errors...\n\n";
      if (ucity.length == 0)  { flagmessage = flagmessage + "-  City is blank.\n"; flags = 1; }
      if (ustate.length == 0) { flagmessage = flagmessage + "-  State/Province is blank.\n"; flags = 1; }
      if (uzip.length == 0)   { flagmessage = flagmessage + "-  Zip/Postal Code is blank.\n"; flags = 1; }

      if (flags == 0)
      {
         return true;
      }
      else
      {
         if (confirm(flagmessage + "\nAre you sure the information you gave is correct and complete? Press OK to continue with the info you've given. Press Cancel to stop and make changes.\n\n"))
         {
            return true;
         }
         else
         {
            return false;
         }
      }
   }
   else
   {
      alert(errormessage);
      return false;
   }

}

