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}


