function popup(url,name,win_height,win_width){
			if(validering(document.getElementById("txtemail").value)){
				if(Count(document.getElementById("txtemail"))){
					pos_horizon = ((screen.width/2)-(win_width/2));
					pos_vertical = ((screen.height/2)-((win_height/2)+70));
					window.open(url+="?email="+document.getElementById("txtemail").value,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
				}else{
					alert("Der må maks være 50 karakterer i e-mail-adressen.");
				}
			}
		}
		
function popup2(url,name,win_height,win_width){
			if(validering(document.getElementById("txtemail").value)){
				if(Count(document.getElementById("txtemail"))){
					pos_horizon = ((screen.width/2)-(win_width/2));
					pos_vertical = ((screen.height/2)-((win_height/2)+70));
					window.open(url+="&email="+document.getElementById("txtemail").value,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
				}else{
					alert("Der må maks være 50 karakterer i e-mail-adressen.");
				}
			}
		}
		
		function Count(tBox){
			var max = 50;
		
			if (tBox.value.length > max){
			  return false;
			}
			return true;
		}
		
		function validering(email){
			var t = "\\wáàãââæåçéèêëìíîïñòóôõöøùúûüýÿ";
			var regexp = new RegExp("^["+t+"]["+t+"\\.\\-\\+]*@["+t+"]["+t+"\\.\\-]*\\.["+t+"]{2}["+t+"\\.\\-\\/]*$","i");
			tekst=email.toLowerCase();
			
			if (!regexp.test(tekst)){
				alert ("Du har indtastet en ugyldig e-mail");
				return false;
			}
			return true;
		}

document.write('<TABLE width="175" height="48" border=0 cellspacing=0 cellpadding=0 bgcolor=#ffffff align=center><tr><td width="100%" height="100%"><TABLE width="175" border=0 cellspacing=0 cellpadding=0 valign="top"><tr><td colspan="2" valign="top" height="14"><IMG src="http://holmhalby.w11.dk/img/TilmeldNyhedsbrevHeader.jpg" border=0 alt="E-mail nyheder"></td></tr><tr><td COLSPAN="2" align="left" height="20"><INPUT type=text value=\'Indtast e-mail\' size="16" maxlength=\'150\' name=\'txtemail\' id=\'txtemail\' onFocus="this.value=\'\';" onBlur="if(this.value==\'\')this.value=\'Indtast e-mail\';" style="font-family:arial; font-style:normal; font-size:11px; color:#000000; background-color:white; border-width:1px; border-color:#000000; border-style:solid; width:173px;"></td></tr><tr><td height="1" COLSPAN="2"><IMG src="http://holmhalby.w11.dk/img/spacer" width="1" height="1" border=0 alt=""></td></tr><tr><td height="20" align="right" style="padding-top:4px;"><a href="javascript:popup(\'http://holmhalby.w11.dk/subscribe.aspx\',\'mitvindue\',\'428\',\'752\');"><IMG src=http://holmhalby.w11.dk/img/TilmeldNyhedsbrevTilmeld.jpg border=0 alt="Tilmeld"></a></td><td height="20" width="64" align="right" style="padding-top:4px;><a href="javascript:popup2(\'http://holmhalby.w11.dk/message.aspx?text=EditDelete\',\'mitvindue\',\'428\',\'752\');"><IMG src=http://holmhalby.w11.dk/img/TilmeldNyhedsbrevAfmeld.jpg border=0 alt="Ret / afmeld"></a></TD></TR></table></td></tr></table>');
