// #_# DETECT NAVOGOTOR TYPE ---------------------------------------------------
var nuA   = navigator.userAgent;
var M2    = (nuA.indexOf("Mozilla/2") != -1);
var M3    = (nuA.indexOf("Mozilla/3") != -1);
var M4    = (nuA.indexOf("Mozilla/4") != -1);
var OP    = (nuA.indexOf("Opera") != -1);
var OP3   = (nuA.indexOf("Opera/3") != -1) && M3;
var OP35  = (nuA.indexOf("Opera/3") != -1) && M4;
var OP36  = (nuA.indexOf("Opera 3") != -1) && M4;
var OP4   = (nuA.indexOf("Opera 4") != -1) ||
            (nuA.indexOf("Opera/4") != -1);
var OP5   = (nuA.indexOf("Opera 5") != -1) ||
            (nuA.indexOf("Opera/5") != -1);
var OP6   = (nuA.indexOf("Opera 6") != -1) ||
            (nuA.indexOf("Opera/6") != -1);
var OP7   = (nuA.indexOf("Opera 7") != -1) ||
            (nuA.indexOf("Opera/7") != -1);
var IE    = (nuA.indexOf("MSIE") != -1) && !OP;
var IE3   = (nuA.indexOf("MSIE 3") != -1);
var IE4   = (nuA.indexOf("MSIE 4") != -1);
var IE50  = (nuA.indexOf("MSIE 5.0") != -1) && !OP;
var IE55  = (nuA.indexOf("MSIE 5.5") != -1) && !OP;
var IE60  = (nuA.indexOf("MSIE 6.0") != -1) && !OP;
var GECKO = (nuA.indexOf("Gecko") != -1);
var MOZ   = GECKO && (nuA.indexOf("Netscape") == -1) &&
            (nuA.indexOf("Firefox") == -1);
var MOZ1  = MOZ && (nuA.indexOf("rv:1") != -1);
var FF    = (nuA.indexOf("Firefox") != -1);
var FF1   = (nuA.indexOf("Firefox/1") != -1);
var NN    = (navigator.appName == "Netscape") && !OP && !MOZ;
var NN2   = NN && M2;
var NN3   = NN && M3;
var NN4   = NN && M4;
var NN6   = (nuA.indexOf("Netscape6") != -1);
var NN7   = (nuA.indexOf("Netscape/7") != -1);
var NN8   = (nuA.indexOf("Netscape/8") != -1);

// #_# CREATE POPUPWINDOW ------------------------------------------------------
function PopupVenster( Pagina, Titel, Breed, Hoog, Scroll)
{
	var venster = null;
	var Pagina;
	var Titel;
	var Breed;
	var Hoog;
	var Scroll;
	VanafLinks = (screen.width)? (screen.width-Breed) /2 : 0;
	VanafBoven = (screen.height)?(screen.height-Hoog)/2 : 0;
	instellingen = 'height='+Hoog+',width='+Breed+',top='+VanafBoven+',left='+VanafLinks+', scrollbars=' + Scroll + ' ,directories=' + 0 + ', location=' + 0 + ', menubar=' + 0 + ', resizable=' + 0 + ', status=' + 0 + ', toolbar='+ 0 + ' '
	venster = window.open(Pagina,Titel,instellingen);
}

// #_# REPLACE ENTERS IN FORM TO <br>  -----------------------------------------
function ReplRN(f){
    f.bericht.value = f.bericht.value.replace(/\r\n/g, "<br>");
}

// #_# BLINK ID blink ----------------------------------------------------------
function BlinkOnOff(){
    document.getElementById('blink').style.visibility = (document.getElementById('blink').style.visibility == "hidden") ? "visible" : "hidden";
}
function Knipper(){
    setInterval('BlinkOnOff()',500);
}
function BlinkOnOff2(){
    document.getElementById('blink2').style.visibility = (document.getElementById('blink2').style.visibility == "hidden") ? "visible" : "hidden";
}
function Knipper2(){
    setInterval('BlinkOnOff()',500);
}

// #_# NO RIGHT MOUSEKLICKMENU -------------------------------------------------
if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
	event.cancelBubble = true
	event.returnValue = false;
	return false;
}

// #_# NO RIGHT MOUSEKLICK -----------------------------------------------------
function norightclick(e)
{
	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;
			}
	}
	document.oncontextmenu = nocontextmenu;
	document.onmousedown = norightclick;


// #_# NO TEXT SELECTION -------------------------------------------------------
function disableselect(e)
{
	return false
}

function reEnable()
{
	return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar)
{
	document.onmousedown=disableselect
	document.onclick=reEnable
}


// #_# HIDE LINKINFO STATUSBAR -------------------------------------------------
//function info()
//{
//window.status= 'www.gomangosteen.nl                                     ';
//setTimeout("info()",40);
//}
//window.onload=info;


// #_# GET DOCUMENT DATE  ------------------------------------------------------
function DatumWeergave(datum) {
var dag = datum.getDate();
var maand = datum.getMonth() + 1;
var maand2 = ((maand < 10) ? "0" : "") + maand;
var jaar = datum.getYear();
if (jaar < 70) {
var jaar4 = (jaar + 2000);
}
else {
var jaar4 = ((jaar < 1900) ? (jaar + 1900) : (jaar));
}
var datumwaarde = dag + "-" + maand2 + "-" + jaar4;
return datumwaarde
}

// BUTTON_IMAGES ACTIONS  ------------------------------------------------------
function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

// #_# OPEN EN CLOSE ALINEA ----------------------------------------------------
var onthouden="uit" 		// actuele status bijhouden met sessie-cookie (aan/uit)
var vorige_verbergen="ja"   // bij nieuw item vorige geopende item dichtvouwen(ja/nee)
if (document.getElementById){
<!--
document.write('<style type="text/css">')
document.write('.wisselen{display:none;}')
document.write('</style>')
//-->
}
function getElementbyClass(classname){
ophalen=new Array()
var teller=0
var alleTags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alleTags.length; i++){
if (alleTags[i].className==classname)
ophalen[teller++]=alleTags[i]}}
function dichtvouwen(omit){
var teller=0
while (ophalen[teller]){
if (ophalen[teller].id!=omit)
ophalen[teller].style.display="none"
teller++}}
function uitvouwen(cid){
if (typeof ophalen!="undefined"){
if (vorige_verbergen=="ja")
dichtvouwen(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"}}
function vernieuwen(){
dichtvouwen("alles")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))}}
return returnvalue;}
function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem}
else return ""}
function status_opslaan(){
var teller=0, selectedItem=""
while (ophalen[teller]){
if (ophalen[teller].style.display=="block")
selectedItem+=ophalen[teller].id+"|"
teller++}
document.cookie=window.location.pathname+"="+selectedItem}
function do_onload(){
getElementbyClass("wisselen")
if (onthouden=="aan" && typeof ophalen!="undefined")
vernieuwen()}
if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload
if (onthouden=="aan" && document.getElementById)
window.onunload=status_opslaan