//  **********************************************************
//  *                /email_list_lite/                       *
//  *           Author:   www.Seiretto.com                   *
//  *    © Copyright /email_list_lite/ Seiretto.com          *
//  *              All rights reserved.                      *
//  **********************************************************
//  *        Launch Date:  May 2003                          *
//  *                                                        *
//  *     Version    Date              Comment               *
//  *     1.0f       29th May 2003      Original release     *
//  *                                                        *
//  *  NOTES:                                                *
//  *        Requires:  PHP 4.2.3 (or greater)               *
//  *                   and MySQL                            *
//  **********************************************************/
var email_list_lite_version="1.0f";
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

var message1="";
var message2="";

//var theserver="?group=1&choosegroups=1";
var theserver="?&OZON=Z3JvdXA9MSZjaG9vc2Vncm91cHM9MQ==";
var theform="<table class=\"email\" width=\"130\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
theform=theform + "<tr>";
theform=theform + "<td valign=\"top\">";
theform=theform + "<form style=\"display:inline;\" method=\"POST\" name=\"FF\" action=\"" +theserver+ "\" target=\"_top\">";
theform=theform + "<input class=\"inputbox\" style=\"padding-left:4px;width:140px;\" type=\"text\" value=\"Þitt netfang\" name=\"email_addr\" size=\"22\" onfocus=\"email_addr_onfocus()\"><br>";
theform=theform + "<input type=\"hidden\" name=\"action\" value=1>";
theform=theform + "<br><img src=\"images/trans.gif\" height=\"2\"><div style=\"padding-top:0px\" align=\"right\"><a href=\"#\" onclick=\"validateForm()\" ><img src=\"images/SignUpButton.gif\" border=0></a></div></form>";
theform=theform + "</td>";
theform=theform + "</tr>";
theform=theform + "</table>";



document.write(theform);

function set_action()
{
 with (document.FF)
 {
  if (action.value=="1") Button.value="Join List";
  else Button.value="Leave List";
 }
}

function validateForm()
{
 var okSoFar=true
 var foundAt = 0
 var foundDOT = 0
 var foundSpace = 0
 var foundDQuote = 0
 var foundSQuote = 0
 with (document.FF)
 {
  if (email_addr.value=="" && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn netfang.")
    email_addr.focus()
  }
 if (email_addr.value>"" && okSoFar)
  {
   foundAt = email_addr.value.indexOf("@",0)
   foundDOT = email_addr.value.indexOf(".",0)
   foundSpace = email_addr.value.indexOf(" ",0)
   foundDQuote = email_addr.value.indexOf("\"",0)
   foundSQuote = email_addr.value.indexOf("\'",0)
  }
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn netfang.")
    email_addr.focus()
  }
  if (foundDOT < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn rétt netfang.")
    email_addr.focus()
  }
  if (foundSpace > 1 && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn rétt netfang.")
    email_addr.focus()
  }
  if (foundDQuote > 1 && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn rétt netfang.")
    email_addr.focus()
  }
  if (foundSQuote > 1 && okSoFar)
  {
    okSoFar = false
    alert ("Sláðu inn rétt netfang.")
    email_addr.focus()
  }
  if (okSoFar==true)
  {
   submit();
  }
}
}

TimerID1=setTimeout('moveit(message1)',100);
countit=0;
run_message1=1;
function moveit(tmsg)
{
 document.FF.email_addr.value= document.FF.email_addr.value+tmsg.charAt(countit) ;
 countit++;
 if (countit==tmsg.length)
 {
  countit=0;
  clearTimeout(TimerID1);
  document.FF.email_addr.value="";
  if (run_message1==1) run_message1=0;
  else run_message1=1;
 }
 if (run_message1==1) TimerID1=setTimeout('moveit(message1)',100);
 else TimerID1=setTimeout('moveit(message2)',100);
}

function email_addr_onfocus()
{
  clearTimeout(TimerID1);
  document.FF.email_addr.value="";
}