 
 
 
 

/*This code is owned by AdlandPro Classifieds
http://www.adlandpro.com
Copying or modifying is strictly prohibited.
*/
 

function changeCase(frmObj) {
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = frmObj.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
         }
      }
   }
}
frmObj.value = tmpStr;
}
 
 
 
 
 
function checkForm(theForm)  {
 
if (theForm.M.checked != true && theForm.B.checked != true && theForm.F.checked != true && theForm.D.checked != true)
  {
    alert("PLease select at least one topic.");
    return (false);
  }


if (theForm.elements.email_address.value== "" )  {
   alert ("Contact Email for your submission is missing.!");
  theForm.email_address.focus();
    return (false);
  }
 
if (theForm.email_address.value.indexOf("@") == -1  || theForm.email_address.value.indexOf(".") == -1)
  {
   alert(  "Sorry: This is not valid email address.");
    theForm.email_address.focus();
    return (false);
  }




 if (theForm.first_name.value == "")  {
   alert ("Your first name is missing!");
    theForm.first_name.focus();
    return (false);
  }
 


if (theForm.first_name.value.length > 100)
  {
 var name_length = theForm.first_name.value.length 
    alert("Text for your first name exceeds 100 characters. \n Your first name contains " + name_length + " characters.");
    theForm.first_name.focus();
    return (false);
  }

 if (theForm.last_name.value == "")  {
   alert ("Your last name  is missing!");
    theForm.last_name.focus();
    return (false);
  }
 

 
if (theForm.last_name.value.length > 100)
  {
 var name_length = theForm.last_name.value.length 
    alert("Text for your last name exceeds 100 characters. \n Your last name contains " + name_length + " characters.");
    theForm.last_name.focus();
    return (false);
  }
 

  return (true);
} 


 
 
 

function rep_submission(ref) {
 if (! ref || ref == '' ) 
{ alert ("WARNING!\nAdlandPro Opt-in window  is set-up incorrectly.\n\nPlease contact support@adlandpro.com and notify about the problem. Please provide url of the page with error.\n\n"); }
 
document.write("<div align='center'>");
document.write("<table border='0' cellpadding='0' cellspacing='0' width='327'>");
document.write("<tr>");
document.write("<td width='11' bgcolor='#0033CC' align='left' valign='top'>");
document.write("<p align='left'><b><img align='left border='0' hspace='0' src='http://www.adlandpro.com/images/adbar_top2.gif' width='9' height='18'></b>");
document.write("</td>");
document.write("<td width='457' bgcolor='#0033CC' align='left' valign='top'>");
document.write("<p align='center'>");
document.write("<font color='#FFFFFF' size='4'><b>AdlandPro.com&nbsp;&nbsp;&nbsp;<br>");
document.write("Opt-In</b><strong>&nbsp;&nbsp;</strong></font><b><font color='#FFFFFF' size='4'>Newsletters&nbsp;</font></b><font color='#FFFFFF' size='4'><strong> </strong><b>&nbsp;&nbsp;");
document.write("</b></font><font color='#C0C0C0' size='1'>#" + ref + "</font>");
document.write("</td>");
document.write("<td width='15' bgcolor='#0033CC' align='left' valign='top'>");
document.write("&nbsp;");
document.write("</td>");
document.write("</tr>");
document.write("<center>");
document.write("<tr>");
document.write("<td width='11' valign='middle'></td>");
document.write("<td width='457' valign='middle'>");
document.write("<p><font size='2'><br>");
document.write("&nbsp;</font></center>Receive professionally written articles once a week on ");
document.write("following topics&nbsp;&nbsp;&nbsp;");
document.write("<form method='POST' action='http://www.adlandpro.com/Opt-In-List/subscribe.asp' onsubmit='return checkForm(this);'>");
document.write("<p><input type='checkbox' name='M' value='Y'>  Marketing and Promotion<br>");
document.write("<input type='checkbox' name='B' value='Y'> Internet Business Building<br>");
document.write("<input type='checkbox' name='F' value='Y'> Free Stuff Resources<br>");
document.write("<input type='checkbox' name='T' value='Y'> Health, Lifestyle & Time Management<br>");
document.write("<input type='checkbox' name='D' value='Y'> Adland Digest (Discussion on Marketing and Promotion on the Internet)</p>");
document.write("<p>");
document.write("Your email address<br>");
document.write("<input type='text' name='email_address' size='20' maxlength='100'><br>");
document.write("First Name<br>");
document.write("<input type='text' name='first_name'  onBlur='javascript:changeCase(this.form.first_name)' size='20' maxlength='100'><br>");
document.write("Last Name<br>");
document.write("<input type='text' name='last_name' onBlur='javascript:changeCase(this.form.last_name)' size='20' maxlength='100'></p>");
document.write("<p>");
document.write("Never stop learning.");
document.write("<br>");
document.write("<input type='submit' value='Subscribe' name='B1'></p>");
document.write("<input type='hidden' name='ref' value='" + ref + "''><input type='hidden' name='step' value='1'>");
document.write("</form>");
document.write("<p><font size='1'><i>Your email will only be used for this newsletter ");
document.write("service. You ");
document.write("can cancel anytime and your details and email won't be rented or sold to");
document.write(" 3rd parties.</i></font>");
document.write("<p>&nbsp;");
document.write("</td>");
document.write("<td width='15' valign='middle'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td bgcolor='#BAD04F' colspan='2' width='470'>");
document.write("<p align='center'><i><font size='2' color='#666666'>Quality Newsletter Source</font></i></p>");
document.write("</td>");
document.write("<td width='15' bgcolor='#BAD04F' valign='bottom' align='right'>");
document.write("<p align='right'><img border='0' src='http://www.adlandpro.com/images/curve_r_b.gif' align='absbottom' width='15' height='10'></p>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</div>");




 

}