var email = GetCookie('email_address');
if (email == null) {
email = 'your email here';
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;}
return null;}
function SetCookie (name, value) {var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = ".internet.com";
// (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" +
expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");}

function checkCodeMail() {
invalid = ""
email = document.mail.user.value;
code = document.mail.source.value;
if (code == "") {
invalid += "Before you can send your code to yourself you need to ";
invalid += "follow the instructions above to output the code.  When "
invalid += "the code has been generated, click \"Done\" to email it!\r\n\r\n";}
if (email.indexOf("@")<1 || email == "your email here" || email == "") {
invalid += "Invalid email address!  Be sure that in your email address ";
invalid += "you included your Username, the '@' Sign, and the Domain Name.";}
if (invalid == "") {
doAd();
return true;
}
else {
alert(invalid);
return false;}}
function doAd() {
pathname = location.pathname;
myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
var largeExpDate = new Date ();
largeExpDate.setTime(largeExpDate.getTime() + (24 * 3600 * 1000));
SetCookie('email_address',email,largeExpDate,myDomain);
page = "http://www.robsdomein.nl?" + email;
window.open(page, "AdWindow", "width=515,height=150");
return true;}
function uncode() {
smut="&lt;";
replacewords="< ";
txt=document.mail.source2.value;
tstx="";
space=replacewords.indexOf(" ");
wrd=replacewords.substring(0,space);
wrdl=wrd.length
replacewords=replacewords.substring(space+1,replacewords.length);
while (txt.indexOf(wrd)>-1){
space=txt.indexOf(wrd);
txt=txt.substring(0,space)+smut+txt.substring((space+wrdl),txt.length);}
smut="&gt;";
replacewords="> ";
space=replacewords.indexOf(" ");
wrd=replacewords.substring(0,space);
wrdl=wrd.length
replacewords=replacewords.substring(space+1,replacewords.length);
while (txt.indexOf(wrd)>-1){
space=txt.indexOf(wrd);
txt=txt.substring(0,space)+smut+txt.substring((space+wrdl),txt.length);}
document.mail.source2.value=txt;}

function generate(form) {
var txt = '<' + '!-- TWEE STAPPEN OM DE FAQs PAGINA TE INSTALLEREN:\r\n\r\n'
+ '   1.  Plak het eerste gedeelte tussen de <HEAD> tags van je HTML document\r\n';
txt = txt + '   2.  Plak het laatste gedeelte tussen de <BODY> tags van je HTML document  --' + '>\r\n\r\n'
+ '<' + '!-- STAP EEN: Plak de volgende code tussen de <HEAD> tags van je HTML document  --' + '>\r\n\r\n'
+ '<HE' + 'AD>\r\n\r\n'
+ '<SCR' + 'IPT LANG' + 'UAGE="JavaS' + 'cript">\r\n'
+ '<!-- Original:  Ronnie T. Moore, Managing Editor  -->\r\n'
+ '<!-- Dit script en nog veel meer zijn gratis beschikbaar op -->\r\n'
+ '<!-- Robs Domein!! http://www.robsdomein.nl -->\r\n\r\n'
+ '<!' + '-- Begin\r\n'
+ 'func' + 'tion show' + 'FAQ(form) ' + '{\r\n'
+ 'form.' + 'answer.value = form.' + 'question.options[form.question.'
+ 'selectedIndex].value;\r\n' + '}' + '\r\n/' + '/ End --' + '>\r\n'
+ '</SCR' + 'IPT>\r\n' + '</HE' + 'AD>\r\n\r\n'
+ '<!-- STAP TWEE: Plak de volgende code tussen de <BODY> tags van je HTML document  -->\r\n\r\n'
+ '<BO' + 'DY>\r\n\r\n<center>\r\n<fo' + 'rm name=faqform>\r\n'
+ '<table border=1 cellspacing=0 cellpadding=5>\r\n';


if (document.faqgen.faqtitle.value != "") {
txt = txt + '<tr bgcolor="#000099">\t\n<td align=center><font face="verdana,arial" size="-1" '
+ 'color="#ffffff">\r\n<b>' + document.faqgen.faqtitle.value + '</b></font></td>\r\n</tr>\r\n';
}

txt = txt + '<tr bgcolor="#ffffcc"><td><font face="verdana,arial" size="-1"><br>\r\nBrowse door het Frequently '
+ 'Asked Questions venster en klik voor het antwoord.\r\n<p>\r\n<ul>' 
+ '<select size=10 name=question onChange="java' + 'script:showFAQ(this.form);">\r\n';

for (var i = 1; i <= 10; i++) {
q = eval('document.faqgen.q' + i + '.value');
a = eval('document.faqgen.a' + i + '.value');
if (q!="" && a!="") {
txt = txt + '<option value="' + a + '">&nbsp;&nbsp;&nbsp;-->&nbsp;&nbsp;' + q + '\r\n';
}
else {
break;
}
}

txt = txt + '</select>\r\n'
+ '</ul>\r\n'
+ '<p>\r\n'
+ 'Antwoord:\r\n'
+ '<p>\r\n'
+ '<ul>\r\n'
+ '<textarea name="answer" rows=15 cols=50 wrap=virtual></textarea>\r\n'
+ '</ul>\r\n'
+ '</font>\r\n'
+ '</td>\r\n'
+ '</tr>\r\n'
+ '</table>\r\n'
+ '</form>\r\n'
+ '</center>';

document.mail.source.value=txt;
document.mail.source2.value=txt;

uncode();
}

function View(text) {
msg=window.open("","DisplayWindow");
msg.document.write(text);
msg.document.write("</body></html>");
}
