﻿ function submitSubscription(email) 
    {
    if (email=="")
    {
        alert("Please enter e-mail for subscription.");
    }
    else
    {
        var newWin;
         newWin=window.open('','subscription', 'width=650,height=650'
           +',menubar=0'
           +',toolbar=0'
           +',status=0'
           +',scrollbars=1'
           +',resizable=1');
           
           //HEAD
         newWin.document.write("<html><head><title></title>");
         newWin.document.write("</head>");
         //Body
         //newWin.document.write("<body><FORM ACTION='https://app.expressemailmarketing.com/Survey.aspx?SFID=22165' METHOD='POST' name='form1'>");
         //newWin.document.write("<INPUT TYPE='TEXT' NAME='email' VALUE='" + email + "' />");
         //newWin.document.write("<INPUT TYPE='HIDDEN' NAME='SkipSurvey' VALUE='FALSE' />");
         //newWin.document.write("<script language='javascript' type='text/javascript'>document.form1.submit();</script>");
         //newWin.document.write("</FORM></body></html>");
         
         newWin.document.write('<body>');
         newWin.document.write('<form method="post" action="http://app.icontact.com/icp/signup.php" name="icpsignup" accept-charset="UTF-8" onsubmit="return verifyRequired();">');
         newWin.document.write('<input type="hidden" name="redirect" value="http://www.icontact.com//www/signup/thanks.html" />');
         newWin.document.write('<input type="hidden" name="errorredirect" value="http://www.icontact.com//www/signup/error.html" />');
         newWin.document.write("<input type='text' name='fields_email' VALUE='" + email + "' />");
         
         newWin.document.write('<input type="hidden" name="listid" value="9893137">');
         newWin.document.write('<input type="hidden" name="specialid:9893137" value="TCVI">');
         newWin.document.write('<input type="hidden" name="clientid" value="425968">');
         newWin.document.write('<input type="hidden" name="formid" value="4231">');
         newWin.document.write('<input type="hidden" name="reallistid" value="1">');
         newWin.document.write('<input type="hidden" name="doubleopt" value="0">');

         newWin.document.write("<script language='javascript' type='text/javascript'>document.icpsignup.submit();</script>");
         newWin.document.write("</FORM></body></html>");

         newWin.document.close();
     }
     
    }
    
function verifyRequired() {
  if (document.icpsignup["fields_email"].value == "") {
    document.icpsignup["fields_email"].focus();
    alert("The Email field is required.");
    return false;
  }
return true;
}