//-- Open centered popup
//-- <a href="file.asp" onClick="NewWindow(this.href,'Reageer','700','500','yes');return false">link</a>
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

//-------------------------------------------------
//This script is written by Eric (Webcrawl@usa.net)
//For full source code, installation instructions,
//100's more DHTML scripts, and Terms Of
//Use, visit dynamicdrive.com
//---------------------------
function showPrintDialogbox()
{
	//var NS = (navigator.appName == "Netscape");
	var nBrowserVersion = parseInt(navigator.appVersion);
	if (nBrowserVersion > 3)
	{
		if (window.print)
		    window.print();  
		else
		{
			var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
			document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
			WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
		}
	}
}


//--------------------------
// Ordinaire trim functie	
//--------------------------
function trim(s)
{ 
	while (s.substring(0,1)==' ')					s=s.substring(1,s.length);
	while (s.substring(s.length-1,s.length)==' ')	s=s.substring(0,s.length-1);
	return s;
}

//----------------------------------
// Delay functies					
//----------------------------------

function wait(delay)
{
	setTimeout('pauseforalert('+delay+')',delay);
}
		
function pauseforalert(delay)
{
	alert("Ok "+delay/1000+" seconds have elapsed");
}

//----------------------------------
// hoover over regels en verander achtergrond					
//----------------------------------

function tr_onmouseover(element) {
    var oTR = getElement(element, "TR");
    if (oTR != null && !eval(oTR.active)) {
        oTR.style.backgroundColor = "silver";
    }
}
function tr_onmouseout(element) {
    var oTR = getElement(element, "TR");
    if (oTR != null && !eval(oTR.active)) {
        oTR.style.backgroundColor = "";
    }
}
function tr_onclick(element) {
    var oTR = getElement(element, "TR");
    var oTABLE = getElement(oTR, "TABLE");
    if (oTABLE != null) {
        if (typeof(oTABLE.activeRow) != "undefined" && oTABLE.activeRow !=
 null) {
            oTABLE.activeRow.style.backgroundColor = "";
            oTABLE.activeRow.style.color = "";
            oTABLE.activeRow.active = "false";
        }
        if (oTR != null) {
            oTR.style.backgroundColor = "highlight";
            oTR.style.color = "highlighttext";
            oTR.active = "true";
            oTABLE.activeRow = oTR;
        }
    }
}
function getElement(src, tagName) {
    var obj = src;
    while (obj != null && obj.tagName != tagName) {
        obj = obj.parentElement;
    }
    return obj;
}




var state = 'none'; 
function showhide(layer_ref) { 
	if (state == 'block') { 
		state = 'none'; 
	} 
	else { 
		state = 'block'; 
	} 
	if (document.all) { //IS IE 4 or 5 (or 6 beta) 
		eval( "document.all." + layer_ref + ".style.display = state"); 
	} 
	if (document.layers) { //IS NETSCAPE 4 or below 
		document.layers[layer_ref].display = state; 
	} 
	if (document.getElementById &&!document.all) { 
		hza = document.getElementById(layer_ref); 
		hza.style.display = state; 
	} 
} 




function mapper(input)
{
	if (input == 10){document.getElementById("landenbox").innerHTML = 'Frankrijk';
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 1){document.getElementById("landenbox").innerHTML = "België";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 3){document.getElementById("landenbox").innerHTML = "Denemarken";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 4){document.getElementById("landenbox").innerHTML = "Duitsland";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 9){document.getElementById("landenbox").innerHTML = "Finland";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 10){document.getElementById("landenbox").innerHTML = "Frankrijk";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 23){document.getElementById("landenbox").innerHTML = "Griekenland";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 33){document.getElementById("landenbox").innerHTML = "Groot Brittannië";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 11){document.getElementById("landenbox").innerHTML = "Hongarije";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 8){document.getElementById("landenbox").innerHTML = "Ierland";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 13){document.getElementById("landenbox").innerHTML = "Italië";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 16){document.getElementById("landenbox").innerHTML = "Kroatië";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 18){document.getElementById("landenbox").innerHTML = "Luxemburg";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 19){document.getElementById("landenbox").innerHTML = "Nederland";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 20){document.getElementById("landenbox").innerHTML = "Noorwegen";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 22){document.getElementById("landenbox").innerHTML = "Oostenrijk";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 25){document.getElementById("landenbox").innerHTML = "Polen";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 24){document.getElementById("landenbox").innerHTML = "Portugal";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 21){document.getElementById("landenbox").innerHTML = "Roemenië";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 15){document.getElementById("landenbox").innerHTML = "Slovenië";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 30){document.getElementById("landenbox").innerHTML = "Slowakije";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 26){document.getElementById("landenbox").innerHTML = "Spanje";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 29){document.getElementById("landenbox").innerHTML = "Tsjechië";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 27){document.getElementById("landenbox").innerHTML = "Zweden";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 28){document.getElementById("landenbox").innerHTML = "Zwitserland";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 80){document.getElementById("landenbox").innerHTML = "Joegoslavië (geen data)";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 81){document.getElementById("landenbox").innerHTML = "Bulgarije (geen data) ";
	overlib(document.getElementById("landenbox").innerHTML);} 
	if (input == 82){document.getElementById("landenbox").innerHTML = "Macedonië (geen data) ";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 83){document.getElementById("landenbox").innerHTML = "Albanië (geen data) ";
	overlib(document.getElementById("landenbox").innerHTML);}
	if (input == 84){document.getElementById("landenbox").innerHTML = "Bosnië H. (geen data) ";
	overlib(document.getElementById("landenbox").innerHTML);}
}


//-->
// Bookmark specific page
function Bookmark()		{
 		if (navigator.appName == 'Microsoft Internet Explorer') {
		window.external.AddFavorite(document.location, document.title);}
}
// maximeer scherm
function maxscherm()  {
	window.moveTo(100,100)
	window.resizeTo(screen.width-200,screen.height-200)
}
// Verstuur form
function submitform(action){
	document.myform.action="forum.php?"+action;
	document.myform.submit();
}
// Gebruikt bij forum
function jumpforum(that) {
	theURL = that.options[that.selectedIndex].value; 
	if ((theURL) && (theURL != '-1')) {
		window.location = '/forum.php?forum=' + theURL;
	}
	else { 
		window.location = '/forum.php' ;
	} 
}
// Gebruikt bij campingadd.php
function jumpland(that) {
	theURL = that.options[that.selectedIndex].value; 
	if ((theURL) && (theURL != '-1')) {
		window.location = '/campingadd.php?lid=' + theURL;
	}
}
