function showImage(img,breedte,hoogte){
	newWindow("/pages/image/?"+img,breedte,hoogte,'image','toolbar=no,status=no,resizable=no,scrollbars=no');
}

function newWindow(url,width,height,name,props){
	if(!props){
		var properties = "width="+width+",height="+height+",toolbar=no,status=no,resizable=yes,scrollbars=yes";
	}else{
		var properties = "width="+width+",height="+height+","+props;
	}
	var screenY = window.screen.availHeight;
	var screenX = window.screen.availWidth;
	var leftvar = Math.round((screenX - width) / 2);
	var rightvar = Math.round((screenY - height) / 2);
	properties += ",left=" + leftvar +",top=" + rightvar;

	popupHandle = window.open(url,name, properties);
	setTimeout('popupHandle.focus();',250);
}

function centerWin(){
	w = (screen.availWidth - document.body.clientWidth) / 2 
	h = (screen.availHeight - document.body.clientHeight) / 2 
	window.moveTo(w, h)
}

function cnfrm(url) {
	if (confirm("Weet je zeker dat je dit item wilt verwijderen \n\nDeze actie kan niet ongedaan gemaakt worden.")) {
		location.href=(url);
	}
}

function selLand(){
	sNewURL=document.forms['frmParkSel'].URL.value+"Land="+document.forms['frmParkSel'].Land.value
	location = sNewURL
}

function goPark(){
	sNewURL = "/?pID="+document.forms['frmParkSel'].Park.value
	location = sNewURL
}

function CheckForm(){
	var i=0;
   while(document.forms['GenForm'].elements[i]){
		fld2Check = document.forms['GenForm'].elements[i].name + " - " + document.forms['GenForm'].elements[i].id
		if(fld2Check.indexOf("required")>=0){
			if(document.forms['GenForm'].elements[i].value==""){alert("verplicht veld!");document.forms['GenForm'].elements[i].focus();return false}
		}
		i++
	}
	return true
}

function CheckAtt(id){
	if (document.all){return document.all[id].style;} else if(document.layers){return document.layers[id];}}	
	
function setDot(ix,iy,sNaam){
	ix = ix -4;iy = iy -3;document.write('<div style="z-index: 2; position:absolute; top:' + iy + 'px; left:'+ ix + 'px"><img src="/images/dot1.gif" name=" + sNaam + "alt="' + sNaam + '" width="6" height="6" border="0"></div>')
}

function setLiveDot(ix,iy,iNaam){
	ix = ix -4;iy = iy -3;document.write('<div style="z-index: 2; position:absolute; top:' + iy + 'px; left:'+ ix + 'px"><img src="/images/dot1.gif" name="' + iNaam + '" width="6" height="6" border="0"></div>')
}
function findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { 
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function swapImgRestore() { 
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function Go2Loc(ID){var sURL="/?pID="+ID;location=sURL}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' moet een e-mailadres zijn.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' moet een getal zijn.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' moet een getal zijn tussen '+min+' en '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is verplicht.\n'; }
  } if (errors) alert('De volgende fout(en) gevonden:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function hidestatus(){window.status='';return true}