<!-- // (c)2000-2001 WWW.surfusuf.NL
/*****************************************************************
 partly (c)1999-2001 My Brain - www.mybrain.nl - @mybrain.nl
 *****************************************************************/
d=document;
d.oncontextmenu = nocontextmenu;      // for IE5+
d.onmousedown = norightclick;        // for all others
yr=(new Date()).getFullYear();
defaultStatus ="Copyright © 1999-" + yr + " - My Brain - www.surfusuf.nl - All Rights Reserved.";

var pagecolor = "#F9C000";   //orange
var tablecolor = "#CECFCE";  // grey
var headercolor = "#000065"; // green
var advertcolor = "#000065"; // green
var titlecolor = "#FFFFFF";  // white
var colortip = "#FF0000";    // red
var surfusufheader = "#940829";   // dark-red
var textcolor = "#000000";   // black
var subsitename = "WWW.SURFUSUF.NL";

function getCookie(getCookieName) {
  var gcname = getCookieName + "=";
  var m = 0;
  while (m < document.cookie.length) {
    var n = m + gcname.length;
    if (document.cookie.substring(m, n) == gcname){
    var clngth = document.cookie.indexOf (";", n);
    if (clngth == -1) clngth = document.cookie.length;
    return unescape(document.cookie.substring(n, clngth));
    }
    m = document.cookie.indexOf(" ", m) + 1;
    if (m == 0) break;
  }
  return "*";
}
function delCookie(delCookieNaam) {
  document.cookie = delCookieNaam + "=; expires= Thu, 01-Jan-70 00:00:01 GMT";
  document.cookie = delCookieNaam + "=; expires= Thu, 01-Jan-70 00:00:01 GMT; path=/";
  return true;
}
function setCookie(setCookieName, setCookieValue) {
  var expire = new Date ();
  expire.setTime (expire.getTime() + (365 * 24 * 60 * 60 * 1000));
  document.cookie = setCookieName + "=" + escape (setCookieValue) + "; expires=" + expire.toGMTString() + "; path=/";
}
//This block will capture the right click and discard it
if (window.Event) // Only Netscape will have the CAPITAL E.
  document.captureEvents(Event.MOUSEUP); // catch the mouse up event
function nocontextmenu() // this function only applies to IE4, ignored otherwise.
{ event.cancelBubble = true; event.returnValue = false; return false; }
function norightclick(e)   // This function is used by all others
{ if (window.Event) { if (e.which == 2 || e.which == 3) { return false; } }
  else { if (event.button == 2 || event.button == 3) { event.cancelBubble = true; event.returnValue = false; return false; } } 
}
// datum
function writeToday()
{ var vada = new Date();
  var StrVandaag;
	switch (vada.getDay())
	{ case 0 : StrVandaag = "Zondag "; break;
	  case 1 : StrVandaag = "Maandag "; break;
	  case 2 : StrVandaag = "Dinsdag "; break;
	  case 3 : StrVandaag = "Woensdag "; break;
	  case 4 : StrVandaag = "Donderdag "; break;
	  case 5 : StrVandaag = "Vrijdag "; break;
	  case 6 : StrVandaag = "Zaterdag "; break; }
	StrVandaag += vada.getDate()
	switch (vada.getMonth())
	{ case  0 : StrVandaag += " januari "; break;
	  case  1 : StrVandaag += " februari "; break;
	  case  2 : StrVandaag += " maart "; break;
	  case  3 : StrVandaag += " april "; break;
	  case  4 : StrVandaag += " mei "; break;
	  case  5 : StrVandaag += " juni "; break;
	  case  6 : StrVandaag += " juli "; break;
	  case  7 : StrVandaag += " augustus "; break;
	  case  8 : StrVandaag += " september "; break;
	  case  9 : StrVandaag += " oktober "; break;
	  case 10 : StrVandaag += " november "; break;
	  case 11 : StrVandaag += " december "; break; }
	StrVandaag += vada.getFullYear();
	d.write(StrVandaag);
}
function setSelectValue(veldnaam)
{ // INPUT TYPE=SELECT
  if (getCookie(veldnaam) != -1) { document.dataform[veldnaam].selectedIndex = getCookie(veldnaam); }
}
function storeSelectValue(veldnaam)
{ // INPUT TYPE=SELECT
 if (document.dataform.StoreValues.checked) {
   setCookie(veldnaam, document.dataform[veldnaam].selectedIndex);
 }
}
function setRadioValue(veldnaam)
{ // INPUT TYPE=RADIO
  if (getCookie(veldnaam) != '*') { document.dataform[veldnaam][getCookie(veldnaam)].checked = true; }
}
function storeRadioValue(veldnaam)
{ // INPUT TYPE=RADIO
 if (document.dataform.StoreValues.checked) {
  for (var i=0; i < Aanvraag[veldnaam].length; i++ ) {
   if (Aanvraag[veldnaam][i].checked == true) { setCookie(veldnaam, i); }
  }
 }
}
function setTextValue(veldnaam)
{ // INPUT TYPE=TEXT & TEXTAREA
  var tmp="";
  if (getCookie(veldnaam) != '*') { tmp = getCookie(veldnaam) + ""; }
  document.dataform[veldnaam].value=tmp;
}
function storeTextValue(veldnaam)
{ // INPUT TYPE=TEXT & TEXTAREA
  if (document.dataform.StoreValues.checked) {
   if (document.dataform[veldnaam].value != "undefined") { setCookie(veldnaam, document.dataform[veldnaam].value); }
  }  
}
function popup(url,width,height) {
	date = new Date();
	window.open(url,date.getTime(),"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width="+width+",height="+height);
}
//surfusuf
function writeSectionHeader(color,title,lockBt,unlockBt,hideBt,unhideBt,nCol,nSec)
{ d.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>');
  d.writeln('<table border="1" width="100%" cellspacing="0" cellpadding="0" bgcolor="' + color + '" bordercolorlight="' + titlecolor + '" bordercolordark="' + textcolor + '">');
  d.writeln('<tr bordercolor="' + color + '"><td ALIGN="left" bgcolor="' + color + '">');
  d.writeln('<font COLOR="' + titlecolor + '" FACE="arial,verdana" SIZE="2"><b>'+title);
  d.writeln('</b></font></td>');
  if (lockBt || unlockBt || hideBt || unhideBt) { d.writeln('<td align="right"><nobr>'); }
  if (lockBt) { d.write('<a HREF="settings.asp"><img border=0 src="/images/icon_unlock.gif" alt="kinderslot instellen"></a>'); }
  if (unlockBt) { d.write('<a HREF="settings.asp"><img border=0 src="/images/icon_lock.gif" alt="kinderslot openen"></a>'); }
  if (hideBt) { d.write('<A HREF="JavaScript:hide('+nCol+','+ nSec+');"><img border=0 src="/images/icon_close.gif"></a>'); }
  if (unhideBt) { d.write('<A HREF="JavaScript:unhide('+nCol+','+ nSec+');"><img border=0 src="/images/icon_adjust.gif"></a>'); }
  if (lockBt || unlockBt || hideBt || unhideBt) { d.writeln('</nobr></td>'); }
  d.writeln('</tr></table>');
  d.writeln('<table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolorlight="' + titlecolor + '" bordercolordark="' + textcolor + '">');
  d.writeln('<tr><td BGCOLOR="' + tablecolor + '" bordercolor="' + tablecolor + '"><font COLOR="' + textcolor + '" FACE="arial,verdana" SIZE="2">');
}
function writeSectionFooter()
{ d.writeln('</font></td></tr></table>');
  d.writeln('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td><IMG SRC="/images/dot.gif" BORDER="0" HEIGHT="10" WIDTH="10"></td></tr></table>');
  d.writeln('</td></tr></table>');
}
//CONTENT
function go1(siteURL,windowtype)
{ startDate= new Date();
  if (windowtype=="0")
  { if (parseInt(navigator.appVersion)>=4)
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
      ((screen.width/100)*80)+",height="+(((screen.height/100)*85)-200)+",left="+((screen.width/100)*9)+",top="+((screen.height/100)*14)); }
    else
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280"); } }
    if (windowtype=="1")
    { top.location.href=siteURL; }
    if (windowtype=="2")
    { if(parseInt(navigator.appVersion)>=4)
      { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
        ((screen.width/100)*99)+",height="+(((screen.height/100)*107)-200)+",left=0,top=0"); }
      else
      { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280"); } }
}
/*****************************************************************
 SEARCH Forms
 (c)1999-2002 My Brain - www.mybrain.nl - @mybrain.nl
 *****************************************************************/
function doSearch(){
  var words = d.searchforit.query.value;
  if (d.searchforit.service.options[d.searchforit.service.selectedIndex].value!="")
  { if (notEmpty(words))
		{ var searchitems = addplus(words);
		  var index = d.searchforit.service.selectedIndex;
		  var siteURL = d.searchforit.service.options[index].value;
		  setCookie('SearchService',d.searchforit.service.selectedIndex);
		  siteURL += searchitems;
		  go1(siteURL,"0");
		}
  }
}
function addplus(items){
  var plussed = "";
  for (var t = 1 ; t <= items.length ; t++)
  { if (items.substring(t-1,t) == " ")
    { plussed+="+"; }
    else
    { if (items.substring(t-1,t) == "+")
      { plussed+="%2B"; }
      else
      { plussed+=items.substring(t-1,t); }
    }
  }
  return plussed;
}
function notEmpty(word){
  if (word == "" || word == null)
  { alert("\nWaar bent u naar op zoek??\n\nMinimaal één zoekwoord opgeven ...");
    d.searchforit.query.focus();
    return false; }
  else
  { return true; }
}
function SearchFormInit()
{ searchCookie=getCookie("SearchService");
  if ((searchCookie!='*') && (searchCookie!=-1))
  { d.searchforit.service.selectedIndex = searchCookie; }
  //d.searchforit.query.focus();
  d.MyGoogle.q.focus();
}
/*****************************************************************
 MAIL Forms
 (c)1999-2002 My Brain - www.mybrain.nl - @mybrain.nl
 *****************************************************************/
var FormUsername="";
var FormPassword="";
var FormService="";
var MailServiceCount=0;
var MailCookieArray= new Array();
var MailService= new Array();
var MailUsername = new Array();
var MailPassword = new Array();
var FormServiceIndex = 0;
function ChangeMailService()
{ FormServiceIndex=d.MailLoginForm.MailServices.selectedIndex+1;
  if (FormServiceIndex==1)
  { FormService="wanadoo";
    d.MailLoginForm.login.value=d.WanadooMailForm.LOGIN1.value;
    d.MailLoginForm.login.value=d.WanadooMailForm.LOGIN.value;
    d.MailLoginForm.password.value=d.WanadooMailForm.PASSWORD.value; }
  if (FormServiceIndex==2)
  { FormService="hotmail";
    d.MailLoginForm.login.value=d.hotmail_com.login.value;
    d.MailLoginForm.password.value=d.hotmail_com.passwd.value; }
  if (FormServiceIndex==3)
  { FormService="dolfijn";
    d.MailLoginForm.login.value=d.DolfijnForm.login.value;
    d.MailLoginForm.password.value=d.DolfijnForm.passwd.value; }
  if (FormServiceIndex==4)
  { FormService="freemail";
    d.MailLoginForm.login.value=d.FreeMailForm.username.value;
    d.MailLoginForm.password.value=d.FreeMailForm.password.value; }
  if (FormServiceIndex==5)
  { FormService="lol";
    d.MailLoginForm.login.value=d.LolForm.user.value;
    d.MailLoginForm.password.value=d.LolForm.pwd.value; }
  FormUsername=d.MailLoginForm.login.value;
  FormPassword=d.MailLoginForm.password.value;
  if (FormUsername != '')
  { d.MailLoginForm.keepUsername.checked=true; }
  else
  {d.MailLoginForm.keepUsername.checked=false; }
  if (FormPassword != '')
  { d.MailLoginForm.keepPassword.checked=true; }
  else
  { d.MailLoginForm.keepPassword.checked=false; }
}
function saveUserData()
{ FormServiceIndex=d.MailLoginForm.MailServices.selectedIndex+1;
  if (FormServiceIndex==1)
  { FormService="wanadoo";
    d.WanadooMailForm.PASSWORD.value=d.MailLoginForm.password.value;
    d.WanadooMailForm.LOGIN1.value=d.MailLoginForm.login.value;
    d.WanadooMailForm.LOGIN.value=d.MailLoginForm.login.value+"@"+d.WanadooMailForm.DOMAIN.value;
  }
  if (FormServiceIndex==2)
  { FormService="hotmail";
    d.hotmail_com.passwd.value=d.MailLoginForm.password.value;
    d.hotmail_com.login.value=d.MailLoginForm.login.value; }
  if (FormServiceIndex==3)
  { FormService="dolfijn";
    d.DolfijnForm.passwd.value=d.MailLoginForm.password.value;
    d.DolfijnForm.login.value=d.MailLoginForm.login.value; }
  if (FormServiceIndex==4)
  { FormService="freemail";
    d.FreeMailForm.password.value=d.MailLoginForm.password.value;
    d.FreeMailForm.username.value=d.MailLoginForm.login.value; }
  if (FormServiceIndex==5)
  { FormService="lol";
    d.LolForm.pwd.value=d.MailLoginForm.password.value;
    d.LolForm.user.value=d.MailLoginForm.login.value; }
  mailFound=false;
  for (i=0;i<MailServiceCount;i++)
  { if (MailService[i]==FormService)
    { mailFound=true;
      if (d.MailLoginForm.keepUsername.checked==true)
      { MailUsername[i]=d.MailLoginForm.login.value; }
      else
      { MailUsername[i]=''; }
      if (d.MailLoginForm.keepPassword.checked==true)
      { MailPassword[i]=d.MailLoginForm.password.value; }
      else
      { MailPassword[i]='';	}
    }
  }
  if (mailFound==false && (d.MailLoginForm.keepUsername.checked==true || d.MailLoginForm.keepPassword.checked==true))
  { if (d.MailLoginForm.keepUsername.checked==true)
   	{ MailUsername[i]=d.MailLoginForm.login.value; }
   	else
   	{ MailUsername[i]=''; }
    if (d.MailLoginForm.keepPassword.checked==true)
    { MailPassword[i]=d.MailLoginForm.password.value; }
    else
    { MailPassword[i]=''; }
    MailService[i]=FormService;
    MailServiceCount=MailServiceCount+1;
  }
  var cookieValue=d.MailLoginForm.MailServices.selectedIndex+'%';
  for (i=0;i<MailServiceCount;i++)
  { cookieValue=cookieValue+MailService[i]+'%'+MailUsername[i]+'%'+MailPassword[i]+'#'; }
  setCookie("mailCookie",cookieValue);
}
function RegisterService()
{ if (d.MailLoginForm.MailServices.selectedIndex==0)
  { d.WanadooMailRegister.submit(); }
  if (d.MailLoginForm.MailServices.selectedIndex==1)
  { d.HotmailRegister.submit(); }
  if (d.MailLoginForm.MailServices.selectedIndex==2)
  { d.DolfijnRegister.submit(); }
  if (d.MailLoginForm.MailServices.selectedIndex==3)
  { d.FreeMailRegister.submit(); }
  if (d.MailLoginForm.MailServices.selectedIndex==4)
  { d.LolRegister.submit(); }
}
function StartMailService()
{ saveUserData();
  thisFormIndex=d.MailLoginForm.MailServices.selectedIndex+1;
  if (thisFormIndex==1)
  { d.WanadooMailForm.submit(); }
  if (thisFormIndex==2)
  { d.hotmail_com.submit(); }
  if (thisFormIndex==3)
  { d.DolfijnForm.submit(); }
  if (thisFormIndex==4)
  { d.FreeMailForm.submit(); }
  if (thisFormIndex==5)
  { d.LolForm.submit(); }
}
function MailFormInit()
{ mailCookie=getCookie("mailCookie")
  if (mailCookie=='*')
  { mailCookieIsEr=false; }
  else
  {	var bpos=2; var epos=2;
    var MailCookieIsEr=true;
    FormServiceIndex=parseInt(mailCookie.substring(0,1));
    d.MailLoginForm.MailServices.selectedIndex=FormServiceIndex;
    for (i=0;(i<10 && (epos < mailCookie.length));i++)
    { epos=mailCookie.indexOf('#',bpos);
      if (epos==-1) { epos=mailCookie.length; }
      MailCookieArray[i]=mailCookie.substring(bpos,epos);
      bpos=epos+1;
    }
    MailServiceCount=i-1;
    for (i=0;i<MailServiceCount;i++)
    { epos=MailCookieArray[i].indexOf('%',0);
      MailService[i]= MailCookieArray[i].substring(0,epos);
      bpos=epos+1;
      epos=MailCookieArray[i].indexOf('%',bpos);
      MailUsername[i]=MailCookieArray[i].substring(bpos,epos);
      bpos=epos+1;
      epos=MailCookieArray[i].length;
      MailPassword[i]=MailCookieArray[i].substring(bpos,epos);
    }
    for (i=0;i<MailServiceCount;i++)
    { if (MailService[i]=="wanadoo")
      { d.WanadooMailForm.LOGIN.value=MailUsername[i];
        d.WanadooMailForm.LOGIN1.value=MailUsername[i];
        d.WanadooMailForm.PASSWORD.value=MailPassword[i];
      }
      if (MailService[i]=="hotmail")
      { d.hotmail_com.login.value=MailUsername[i];
        d.hotmail_com.passwd.value=MailPassword[i];
        d.hotmail_com.padding.value = "xxxxxxxxxxxxxxxx".substr(0, 16 - MailPassword[i].length);
      }
      if (MailService[i]=="dolfijn")
      { d.DolfijnForm.login.value=MailUsername[i];
        d.DolfijnForm.passwd.value=MailPassword[i];
      }
      if (MailService[i]=="freemail")
      { d.FreeMailForm.username.value=MailUsername[i];
        d.FreeMailForm.password.value=MailPassword[i];
      }
      if (MailService[i]=="lol")
      { d.LolForm.user.value=MailUsername[i];
        d.LolForm.pwd.value=MailPassword[i];
      }
    }
  }
  ChangeMailService();
}
/*****************************************************************
 Automatic Screen Refresher
 (c)1999-2003 My Brain - www.mybrain.nl - @mybrain.nl
 *****************************************************************/
function fncRefreshCheck()
{	fncRefreshMe();
	if (document.frmRefresh.start.checked)
	{ setTimeout("top.document.frames.updates.location.reload();",600000); }
}
function fncRefreshMe()
{ if (getCookie("AutomaticRefresh") == "on")
	{ document.frmRefresh.start.checked = true; }
	else
	{ document.frmRefresh.start.checked = false; }
}
function fncRefreshCookie()
{ if (document.frmRefresh.start.checked)
	{  setCookie("AutomaticRefresh","on"); }
	else
	{  setCookie("AutomaticRefresh","off"); }
	fncRefreshCheck();
}

//-->
