// This file contains all javascripts used on the site of the Stichting Plotsdoven.
//
// Author: Lex Wassenberg
// (C) Lex wassenberg, 2004

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Definition of functions (all functions defined here will be available
// on all pages that include this script in their header).

function mail(m1, m2, t1, t2)
{
  document.write('<a href="mailto:' + m1 + '@' + m2 + '">');
  if (t1) document.write(t1);
  else document.write(m1 + '@' + m2);
  if (t2) document.write('@' + t2);
  document.write('</a>');
}

function silentErrorHandler()
{
  return true;
}

function check_spd_frame()
{
  if (window.name != 'inhoud' && window.name != 'inhoud2')  // THIS SCRIPT DEPENDS ON THE NAME OF THE FRAME!!!
  {
    if (window.location.href.indexOf('http:') == 0) // we're online
      window.open('/index.html?page=' + this.location.href, '_top');
    else if (window.location.href.indexOf('wassnbrg') != -1)	// we're offline at work
      window.open('/documents and settings/wassnbrg/my documents/personal/pri/pdld/site/domain/html/index.html?page=' + this.location.href, '_top');
    else // we're offline at home
      window.open('/homepages/pdld/site/domain/html/index.html?page=' + this.location.href, '_top');
  }
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Invocation of functions (all functions called here will be executed
// on all pages that include this script in their header).

check_spd_frame();	// all content pages: check if we're in our own frame



// ONESTAT SCRIPTCODE START
// Het wijzigen van deze code is niet toegestaan en zal uw account definitief blokkeren!
// Account ID : 350194
// Website URL: http://www.stichtingplotsdoven.nl
// Copyright (C) 2002-2006 OneStat.com All Rights Reserved
function OneStat_Pageview()
{
    var d=document;
    var sid="350194";
    var CONTENTSECTION="";
    var osp_URL=d.URL;
    var osp_Title=d.title;
    var t=new Date();
    var p="http"+(d.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/stat.aspx?tagver=2&sid="+sid;
    p+="&url="+escape(osp_URL);
    p+="&ti="+escape(osp_Title);
    p+="&section="+escape(CONTENTSECTION);
    p+="&rf="+escape(parent==self?document.referrer:top.document.referrer);
    p+="&tz="+escape(t.getTimezoneOffset());
    p+="&ch="+escape(t.getHours());
    p+="&js=1";
    p+="&ul="+escape(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
    if(typeof(screen)=="object"){
       p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
       p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
    }
    //d.write('<a href="http://www.onestat.com/aspx/login.aspx?sid='+sid+'" target=_blank>');
    d.write('<div style="visibility:hidden;"><img id="ONESTAT_TAG" border="0" src="'+p+'"></div>');
    //d.write('</'+'a>');
}

OneStat_Pageview();

// noscript part, heeft geen nut in script:
// <a href="http://www.onestat.com"><img border="0" src="http://stat.onestat.com/stat.aspx?tagver=2&amp;sid=350194&amp;js=No&amp;" ALT="free web counter"></a>
// end pscript part
// ONESTAT SCRIPTCODE END
