
function vaps_signup (frm) {
  var re;
  if (frm.email.value == '' ) {
    alert('Please enter your email address.');
    return false;
  }
  re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
  if (frm.email.value.match(re) == null) {
    alert('Invalid email address.');
    return false;
  }
  re = /^www\./i;
  if (frm.email.value.match(re) != null ) {
    alert('Your email address should not contain "www." (only the part after "www.")');
    return false;
  }
  if (frm.captcha.value.length != 4) {
    alert('Please enter the security code shown in the image.');
    return false;
  }
  re = /^[a-z0-9]+$/i;
  if (frm.captcha.value.match(re) == null) {
    alert('Please enter the security code shown in the image.');
    return false;
  }
  frm.go.value=' Wait...';
}


if (!aps_bgcolor)   var aps_bgcolor  ='FFFFFF';
if (!aps_ibgcolor)  var aps_ibgcolor ='FFFFFF';
if (!aps_bbgcolor)  var aps_bbgcolor ='DADADA';
if (!aps_fgcolor)   var aps_fgcolor  ='00526E';
if (!aps_ifgcolor)  var aps_ifgcolor ='00526E';
if (!aps_bfgcolor)  var aps_bfgcolor ='00526E';
if (!aps_username)  var aps_username ='';
if (!aps_title)     var aps_title ='';
if (!aps_formstyle) var aps_formstyle=1;
if (!aps_tid) 	    var aps_tid='SignupBox'+aps_formstyle;

var Stamp = new Date();

var out='<form name="asForm" method="POST" action="https://acme-people-search.com/signup.php" onSubmit="return vaps_signup(this);">';
if (aps_formstyle == 2) {
  out+= '<table border="0" width="460" style="background-color: #'+aps_bgcolor+'; border: 1px solid #'+aps_fgcolor+';color:#'+aps_fgcolor+';font-size: 14px;font-family:arial,verdana,times">';
  out+= '<tr><td align="center" colspan="3" style="font-size: 14px;font-family: arial,verdana,times; font-weight: bold">Get Your FREE Affiliate Website for Earning Commissions:</td></tr>';
  out+= '<tr>';
  out+= '<td colspan="3" align="center">';
  out+= 'Your Email: <input type="text" name="email" maxlength="40" size="40" value="" style="background-color:#'+aps_ibgcolor+'; border: 1px solid #'+aps_ifgcolor+'; color: #'+aps_ifgcolor+'; font-size: 14px;font-family: arial,verdana,times">';
  out+= '</td>';
  out+= '</tr>';
  out+= '<tr>';
  out+= '<td align="right" style="font-size: 14px;font-family: arial,verdana,times" width="213">Enter the code shown:</td>';
  out+= '<td width="54" align="center"><img src="http://acme-people-search.com/lib/kcaptcha/index.php?t='+Stamp+'" border="0" alt="Refresh to see code" width="52"/></td>';
  out+= '<td align="left" width="213">';
  out+= '<input name="captcha" maxlength="4" size="4" type="text" style="border: 1px solid #'+aps_ifgcolor+'; color: #'+aps_ifgcolor+'; background-color: #'+aps_ibgcolor+';font-size: 14px;font-family: arial,verdana,times"/> ';
  out+= '<input type="submit" value="Submit" name="go" style="border: 1px solid #'+aps_bfgcolor+'; color: #'+aps_bfgcolor+'; background-color: #'+aps_bbgcolor+';font-size: 14px;font-family: arial,verdana,times"/>';
  out+= '<input type="hidden" value="'+aps_username+'" name="ref" />';
  out+= '<input type="hidden" value="1" name="action" />';
  out+= '<input type="hidden" value="'+aps_tid+'" name="tid" />';
  out+= '<input type="hidden" value="'+aps_title+'" name="encrefsite" />';
  out+= '</td>';
  out+= '</tr>';
  out+= '</table>';
} else {
  out+= '<table border="0" width="200" align="center" style="background-color: #'+aps_bgcolor+'; border: 1px solid #'+aps_fgcolor+';color:#'+aps_fgcolor+';font-family: arial,verdana,times">';
  out+= '<tr><td align="center" colspan="3" style="font-size: 11px;font-family: arial,verdana,times; font-weight: bold">Get Your FREE Affiliate Website:</td></tr>';
  out+= '<tr>';
  out+= '<td colspan="3" align="center"><input type="text" name="email" maxlength="40" size="30" value="Enter your email address" style="background-color:#'+aps_ibgcolor+'; border: 1px solid #'+aps_ifgcolor+'; color: #'+aps_ifgcolor+'; font-size: 11px;font-family: arial,verdana,times" onclick="this.value=\'\';"></td>';
  out+= '</tr>';
  out+= '<tr>';
  out+= '<td align="right" style="font-size: 11px;font-family: arial,verdana,times">Code:</td>';
  out+= '<td width="54" align="center"><img src="http://acme-people-search.com/lib/kcaptcha/index.php?t='+Stamp+'" border="0" alt="Refresh to see code" width="52"/></td>';
  out+= '<td align="left">';
  out+= '<input name="captcha" maxlength="4" size="4" type="text" style="border: 1px solid #'+aps_ifgcolor+'; color: #'+aps_ifgcolor+'; background-color: #'+aps_ibgcolor+';font-size: 11px;font-family: arial,verdana,times"/>&nbsp;';
  out+= '<input type="submit" value="Submit" name="go" style="border: 1px solid #'+aps_bfgcolor+'; color: #'+aps_bfgcolor+'; background-color: #'+aps_bbgcolor+';font-size: 11px;font-family: arial,verdana,times;width:48px;"/>';
  out+= '<input type="hidden" value="'+aps_username+'" name="ref" />';
  out+= '<input type="hidden" value="1" name="action" />';
  out+= '<input type="hidden" value="'+aps_tid+'" name="tid" />';
  out+= '<input type="hidden" value="'+aps_title+'" name="encrefsite" />';
  out+= '</td>';
  out+= '</tr>';
  out+= '</table>';
}
out+= '</form>';
document.write(out);
