﻿var undefined;
if ( page_subject == undefined ) var page_subject = "";

function spamless(user,domain,tld,sub) {
   locationstring = "mailto:" + user + "@" + domain + "." + tld;
   if (sub == 0) {locationstring = locationstring + "?subject=" + page_subject ;}
   window.location = locationstring;
}

/* 
   call this by placing the following line in the HTML 
   instead of the raw javascript text (above)
   
   <script language="JavaScript" src="spamless.js"></script>
   
   to define a default subject for email on a page (such as "Anfrage")
   put the following two lines in the HTML
   
   <script language="JavaScript1.2"> var page_subject = "Anfrage"; </script>
   <script language="JavaScript" src="spamless.js"></script>

*/
