document.listName=unescape('%53%6B%61%6E%6B%20%49%74%20%55%70%21%20%4D%61%69%6C%69%6E%67%6C%69%73%74');
var hotListMailname='';
var hotListID='63D3C00418517FD8C1256A51005FDB8F';
var ENCA='37088.670023148148148';

function addToList(listName,mailName,butNum) { 
  listName=unescape(listName);
  if (mailName.toLowerCase()=='admin') {     hotListWin=window.open("http://www.lavasoft.dk/inet/hotList.nsf/displayAdminProfile?openagent&listName="+escape(listName)+"&password=&enca="+ENCA+"&fname=admLogin","hotListWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,scrollbars=yes,width=495,height=350");
  } 
  else { 
    if ( (mailName.indexOf('.')!=-1) && (mailName.indexOf('@')!=-1) && (mailName.length>5)) { 
      forceUnsub="";
      if (butNum==1) forceUnsub="&confirmdeletion=true";
s="http://www.lavasoft.dk/inet/hotList.nsf/toggleMailingListAgent?openAgent&listName="+escape(listName)+"&mailName="+mailName+"&enca="+ENCA+"&host="+escape(location.href)+forceUnsub;
hotListWin=window.open(s,"hotListWin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=295,height=200")
    } 
    else { 
      alert('eMail-adresse ikke korrekt');
    }
  }
}

function infoMsg(s,msg) { 
  if (s==1) setStatus(msg,20);
  else setStatus('',20);
}

function setFormAction(objForm,flag) {
  if (!document.origAction) document.origAction=objForm.onsubmit;
  if (flag==1) objForm.onsubmit=new Function("addToList(listName,mailName,butNum);return false");
  else objForm.onsubmit=document.origAction;
}

function setStatus(t,c) {
  if (c>=1) {
    s="";
    for (i=0;i<c;i++) s+="  ";
    window.status=s+t;
    c--;
    tID=setTimeout('setStatus("'+t+'",'+c+')',5);   
  } 
  else {
    window.status=t;
  }
}

function proxySetFormAction(objForm,flag,s,msg,clear) {
  setFormAction(objForm,flag);
  if (clear==1) objForm.hotListName.value="";
  infoMsg(s,unescape(msg));
}

function dw(html) {document.write(html);}


// ------------------------------------------------------- HotList visual stuff -----------------------------------------------------------------


// Styles
dw('<style><!-- ');
dw('.emLink'+hotListID+' {text-decoration:none;}');
dw('.emLink'+hotListID+':hover {background-color:#cccccc;text-decoration:none;}');
dw('.emFont7'+hotListID+' {font-size:7pt;}');
dw('.emFont7low'+hotListID+' {font-size:7pt;line-height:0.9em;}');
dw('.emInput'+hotListID+' {background-color:#ffffff; height:20px; width:115px; color:#000000; font-family:verdana; font-weight:bold; font-size:8pt;}');
dw('.emBtn'+hotListID+' {background-color:000000; color:white; height:20px; font-family:verdana; font-weight:bold; font-size:8pt;}');
dw(' --></style>');


// Border table
dw('<form name=HL'+hotListID+'>');
dw('<table border=0 width=150 cellspacing=0 cellpadding=1 align=center bgcolor=cccccc><tr><td>');

// Inner table
dw('<table border=0 width=100% cellspacing=0 cellpadding=2 align=center bgcolor=cccccc><tr><td colspan=2>');

// Topbar
dw('<table border=0 width=100% cellpadding=1 cellspacing=0><tr><td bgcolor=#cccccc><font face="verdana" color=000000 size=1><b><div align=left>Join <font color=000000 id=dispListname>'+document.listName+'</x></div></b></td></tr></table>');

// Input
dw('</td></tr><tr><td nowrap>');
dw('<small><b><input name=hotListName size=15 value="eMail-address" class=emInput'+hotListID+' onFocus=proxySetFormAction(this.form,1,1,"'+escape("Type e-mail adress.")+'",1) onBlur=proxySetFormAction(this.form,0,0,"",0)>');
dw('</b></small></td>');

// Button
dw('<td><small><b>');
dw('<input type=button name=hotListAddToList value="OK" onFocus=setFormAction(this.form,1) onClick=addToList("'+escape(document.listName)+'",this.form.hotListName.value,0) onBlur=setFormAction(this.form,0) class=emBtn'+hotListID+'>');
dw('</b></small></td></tr>');

// End inner table
dw('</td></tr></table>');

// End border table (and end the form between td and tr to avoid linebreak in some browsers)
dw('</td>');
for (q=0;q<document.forms.length;q++) if (document.forms[q].name=="HL"+hotListID) dw("</form>");
dw('</tr></table>');
