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}

var selected_id = null; 
var dom = document.getElementById; 
function swapIt(id, newclass) { 
	if (dom) { 
		if(selected_id != id) { 
			el = document.getElementById(id); 
			el.className = newclass; 
			el.style.cursor = "hand"; 
			el.style.cursor = "pointer"; 
		} 
	} 
} 

function down (id,oldclass,newclass){ 
	if (dom) { 
		if(selected_id != null) { 
			document.getElementById(selected_id).className = oldclass; 
		} 
		el.className = newclass; 
		selected_id = id; 
	} 
} 




//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: Nov 8th, 06

var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?

////NO NEED TO EDIT BELOW////////////////////////
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id //id of UL element
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
for (var i=0; i<ullist.length; i++){
ullist[i].className=""  //deselect all tabs
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
}
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
}

function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if (thetab.getAttribute("rel"))
expandcontent(thetab)
}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
if (enabletabpersistence==1) //if persistence feature turned on
setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for (var i=0; i<ullist.length; i++){
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
return ullist[i].getElementsByTagName("a")[0]
break
}
}
}

function initializetabcontent(){
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
setCookie(arguments[i], "")
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
for (var x=0; x<ulist.length; x++){ //loop through each LI element
var ulistlink=ulist[x].getElementsByTagName("a")[0]
if (ulistlink.getAttribute("rel")){
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
ulistlink.onclick=function(){
expandcontent(this)
return false
}
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
expandcontent(ulistlink) //auto load currenly selected tab content
}
} //end inner for loop
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
expandcontent(culistlink) //auto load currenly selected tab content
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
}
} //end outer for loop
}


function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value //cookie value is domain wide (path=/)
}



function startLogin(){
	if (document.all["LOGIN"]){document.all["LOGIN"].style.visibility="visible"}else{return}
	document.forms[0].sUser.focus();
}

function noLogin(){if (document.all["LOGIN"]){document.all["LOGIN"].style.visibility="hidden"}else{return}}

function chkLogin(){
	User = document.forms[0].sUser.value;
	PW = document.forms[0].sPW.value;
	CheckLogin(User,PW);
	window.location.href=window.location.href
	//noLogin();
}

function logoff(){
	window.location="/_Sys/logoff.asp"
}