if (
  document.referrer.indexOf("://www.mountainbike.be") != -1 // http://www.mountainbike.be*
  || document.referrer.indexOf("://www.mountainbike.be/kalender.php") != -1 // http://www.mountainbike.be/kalender.php*
  || document.referrer.indexOf("://www.google.be") != -1 // http://www.google.be*
  || document.referrer.indexOf("://www.google.nl") != -1 // http://www.google.nl*
  || document.referrer.indexOf("://www.google.com") != -1 // http://www.google.com*
  || document.referrer.indexOf("://www.mountainbike.startpagina.nl") != -1 // http://www.mountainbike.startpagina.nl*
  || document.referrer.indexOf("://www.mountainbike.startpagina.be") != -1 // http://www.mountainbike.startpagina.be*
  || document.referrer.indexOf("://www.wielerbondvlaanderen.be") != -1 // http://www.wielerbondvlaanderen.be*
  || document.referrer.indexOf("://www.fietspromo.be") != -1 // http://www.fietspromo.be*
  || document.referrer.indexOf("://www.rondevanhetwaasland.be") != -1 // http://www.rondevanhetwaasland.be*
  || document.referrer.indexOf("://www.netlog.be") != -1 // http://www.netlog.be*
  || document.referrer.indexOf("://www.mtb-live.com") != -1 // http://www.mtb-live.com*
  || document.referrer.indexOf("://www.mountainbike-live.com") != -1 // http://www.mountainbike-live.com*
  || document.referrer.indexOf("://www.netlog.be") != -1 // http://www.netlog.be*
  || document.referrer.indexOf("://www.netlog.nl") != -1 // http://www.netlog.nl*
  || document.referrer.indexOf("://www.netlog.com") != -1 // http://www.netlog.com*
  || document.referrer.indexOf("://www.facebook.com") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://www.vlaamsewielrijdersbond.be") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://www.mtb-you.nl") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://www.vinden.be") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://www.forum.mountainbike.be") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://www.citymtbchallenge.be") != -1 // http://www.facebook.com*
  || document.referrer.indexOf("://tinyurl.com") != -1 // http://www.facebook.com*
  
) {
  document.write('<div id="newsletter" class="topic" style="z-index: 200; width: 240px; height: 292px; background: #fff; position: absolute; top: -250px; left: 50%; margin-left: -450px; border: 1px solid">');
  document.write('  <div class="gradiet">');
  document.write('    <p class="topic_top1"><b>Welkom op MTB-You</b></p>');
  document.write('    <div style="padding: 10px">');
  document.write('      Welkom op MTB-You!<br/><br/>');
  document.write('      Op de hoogte blijven van de toertochten in uw streek?<br/>Schrijf in op onze nieuwsbrief!<br/><br/>');
  document.write('      <form method="post" action="/default.asp" name="ns_cms_Popup" onsubmit="return checkSignupDetailsPopup();">');

	document.write('<table width="173" border="0" cellspacing="0" cellpadding="0" style="padding-left:10px;">');
	document.write('<tr>');
	document.write('<td><input type="text" name="ns_cms_firstName" value="Voornaam"  onfocus="this.value=\'\';" class="input_field" >');
	document.write('<tr>');
	document.write('<td><img src="img/spacer.gif" width="1" height="5" border="0" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><input type="text" name="ns_cms_surname" value="Naam" onFocus="this.value=\'\';" class="input_field"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><img src="img/spacer.gif" width="1" height="5" border="0" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><input type="text" name="ns_cms_email" value="E-mail" onFocus="this.value=\'\';" class="input_field"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><img src="img/spacer.gif" width="1" height="5" border="0" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td align="left"><input type="image" src="/cmsmedia/images/topbar_register_btn.gif" name="go" value=""  /></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><img src="img/spacer.gif" width="1" height="5" border="0" alt=""></td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<input type="hidden" name="ns_cms_submit" value="true">');

  document.write('      </form>');
  document.write('      <a href="http://www.mtb-you.be/" onclick="return bookmarksite(\'MTB-You\',\'http://www.mtb-you.be/\',this);">Voeg ons toe aan uw favorieten!</a><br/>');
  document.write('      <a href="http://www.mtb-you.be/" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.mtb-you.be/\');">Maak van ons uw startpagina!</a><br/><br/>');
  document.write('      <center><input type="button" onclick="document.getElementById(\'newsletter\').style.display = \'none\';" name="close" value="Venster sluiten"></center>');
  document.write('    </div>');
  document.write('  </div>');
  document.write('</div>');
  for (i = 1; i < 20; i++) {
    var yposition = (14*i)-200;
    window.setTimeout("document.getElementById('newsletter').style.top = '"+yposition+"px'",800+(50*i));
  }
}

function bookmarksite(title, url, object) {
  if (document.all) {
    window.external.AddFavorite(url, title);
    return false; 
  } else if (window.sidebar) {
    window.sidebar.addPanel(title, url, "");
    return false; 
  } else if (window.opera && window.print) {
    object.rel = 'sidebar';
    object.href = url;
    object.title = title;
    return true; 
  } else {
    return false; 
  } 
}

function checkSignupDetailsPopup() {
  if (n_trimString(document.ns_cms_Popup.ns_cms_firstName.value) == "") {
    alert("Gelieve uw voornaam in te voeren..");
    document.ns_cms_Popup.ns_cms_firstName.focus();
    return false;
  }
  if (n_trimString(document.ns_cms_Popup.ns_cms_surname.value) == "") {
    alert("Gelieve uw naam in te voeren.");
    document.ns_cms_Popup.ns_cms_surname.focus();
    return false;
  }
  if (n_trimString(document.ns_cms_Popup.ns_cms_email.value) == "") {
    alert("Gelieve een geldig e-mailadres in te vullen.");
    document.ns_cms_Popup.ns_cms_email.focus();
    return false;
  }
  var atFound = -1;
  var dotFound = -1;
  var charFound = false;
  var checkStr;
  var splitString
  checkStr = document.ns_cms_Popup.ns_cms_email.value;
  splitString = checkStr.split("");
  for (var i = 0; i < checkStr.length+1; i++) {
    if (splitString[i] == "\"" | splitString[i] == "'") {
      alert("Gelieve een geldig e-mailadres in te vullen.");
      document.ns_cms_Popup.ns_cms_email.focus();
      return false;
    }
    if (splitString[i] < " " | splitString[i] > " ") { charFound = true; }
    if (splitString[i] == "@") { atFound = i; }
    if (splitString[i] == ".") { dotFound = i; }
  }
  if (charFound == true) {
    if (atFound > -1) {
      if (dotFound > -1) {
        if (dotFound < atFound) {
          alert("Gelieve een geldig e-mailadres in te vullen.");
          document.ns_cms_Popup.ns_cms_email.focus();
          return false;
        } else {
		  if ((dotFound-atFound) == 1 | dotFound == (checkStr.length-1) | atFound == 0) {
            alert("Gelieve een geldig e-mailadres in te vullen.");
            document.ns_cms_Popup.ns_cms_email.focus();
            return false;
          }
        }
      } else {
        alert("Gelieve een geldig e-mailadres in te vullen.");
        document.ns_cms_Popup.ns_cms_email.focus();
        return false;
      }
    } else {
      alert("Gelieve een geldig e-mailadres in te vullen.");
      document.ns_cms_Popup.ns_cms_email.focus();
      return false;
    }
  }
  return true;
}
