function openFrame(a){$('<iframe id="frame">Uw browser ondersteunt geen frames</iframe>').appendTo("#ContentTekst");$("#frame").attr("src",a);$("#frame").attr("class","IframeOverlay");$("#frame").attr("name","Iframe")}function GetWindowHeight(){var a=0,b=0;if(typeof window.innerWidth=="number"){b=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b=document.documentElement.clientHeight+1}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b=document.body.clientHeight+2}return b}function ClosePicture(){bodys=document.getElementsByTagName("body");body=bodys[0];body.removeChild(DarkLayer);phj=document.getElementById("PopupHolder");if(phj){phj.style.display="none"}}function OpenAfbeelding(a){if(a!=null){url=Images[a]}if(url){bodys=document.getElementsByTagName("body");body=bodys[0];phj=document.getElementById("PopupHolder");phjFoto=document.getElementById("PopupFoto");phjSluiten=document.getElementById("Sluiten");pvol=document.getElementById("PopupVolgende");pvor=document.getElementById("PopupVorige");if(body&&phj&&phjFoto&&pvol&&pvor&&phjSluiten){if(!DarkLayer){DarkLayer=document.createElement("div");DarkLayer.className="DarkLayer";DarkLayer.style.height=GetWindowHeight()+"px"}body.appendChild(DarkLayer);phj.style.display="block";phjFoto.style.backgroundImage="url("+url+")";pvor.style.display=Images[a-1]?"block":"none";pvol.style.display=Images[a+1]?"block":"none";phjSluiten.href="#foto"+a;OpenPictureNext=a+1;OpenPicturePrev=a-1}}}function MenuOpenList(a){Element=document.getElementById(a);if(Element){if(CurrentMenuOpen){CurrentMenuOpen.style.display="none"}Element.style.display="block";CurrentMenuOpen=Element}}function getPositionFrom(a){var b={top:0,left:0};var c=false;while(a.offsetParent){b.top+=a.offsetTop-a.scrollTop;b.left+=a.offsetLeft-a.scrollLeft;a=a.offsetParent;if(a.nodeName.toLowerCase()!="html"){if(a.currentStyle){if(a.currentStyle["position"]=="absolute")c=true}else{if(window.getComputedStyle){if(document.defaultView.getComputedStyle(a,null).getPropertyValue("position")=="absolute"){c=true}}}}}if(!c){var d=document.getElementsByTagName("BODY").item(0);b.top+=d.offsetTop;b.left+=d.offsetLeft}return b}function IC_Photo_Popup_Close(){if(IC_Photo_Popup_referer!=null){IC_Photo_Popup_referer.style.display="none"}if(IC_Photo_Settings.UseDarkLayer&&IC_Photo_DarkLayer!=null){IC_Photo_DarkLayer.style.display="none"}return false}function IC_Photo_Popup(a,b,c,d,e){var f=document.getElementsByTagName("body").item(0);var g=document.getElementsByTagName("html").item(0);if(!IC_Photo_DarkLayer&&IC_Photo_Settings.UseDarkLayer){IC_Photo_DarkLayer=document.createElement("div");IC_Photo_DarkLayer.id="IC_Photo_DarkLayer";f.appendChild(IC_Photo_DarkLayer)}if(IC_Photo_Popup_referer==null){IC_Photo_Popup_referer=document.createElement("a");IC_Photo_Popup_referer.id="IC_Photo_Popup_Holder";IC_Photo_Popup_referer.onclick=IC_Photo_Popup_Close;IC_Photo_Popup_referer.href="#";IC_Photo_Popup_referer.title=IC_Photo_Settings.Title;if(IC_Photo_Settings.UseAltTag){var h=document.createElement("span");h.className="AltLabel";h.appendChild(document.createTextNode(e));IC_Photo_Popup_referer.appendChild(h);IC_Photo_Popup_referer.Label=h}if(IC_Photo_Settings.UseCloseTag){var j=document.createElement("a");j.className="CloseButton";j.href="#";j.appendChild(document.createTextNode(IC_Photo_Settings.CloseTitle));IC_Photo_Popup_referer.appendChild(j)}f.appendChild(IC_Photo_Popup_referer)}if(IC_Photo_Popup_referer!=null){IC_Photo_Popup_referer.style.display="block";IC_Photo_Popup_referer.style.height=d+IC_Photo_Settings.Padding*2+"px";IC_Photo_Popup_referer.style.width=c+30+"px";LabelHeight=0;if(IC_Photo_Settings.UseAltTag){IC_Photo_Popup_referer.Label.innerHTML=e;if(e!=""){LabelHeight=IC_Photo_Popup_referer.Label.offsetHeight;IC_Photo_Popup_referer.style.height=d+LabelHeight+IC_Photo_Settings.Padding*2+"px"}}IC_Photo_Popup_referer.style.backgroundPosition="center "+(IC_Photo_Settings.Padding+LabelHeight)+"px";IC_Photo_Popup_referer.style.backgroundImage="url("+b+")";IC_Image=null;for(i=0;i<a.childNodes.length;i++){if(a.childNodes[i].tagName.toUpperCase()=="IMG"){IC_Image=a.childNodes[i]}}if(IC_Image){Position=getPositionFrom(IC_Image);Left=Position.left+IC_Image.offsetWidth/2-IC_Photo_Popup_referer.offsetWidth/2;Left=Math.min(Left,f.offsetWidth-IC_Photo_Popup_referer.offsetWidth-IC_Photo_Settings.MarginToBorders);Left=Math.max(Left,IC_Photo_Settings.MarginToBorders);Top=Position.top+IC_Image.offsetHeight/2-IC_Photo_Popup_referer.offsetHeight/2;WindowMax=Math.max(f.offsetHeight,g.offsetHeight);Top=Math.min(Top,WindowMax-IC_Photo_Popup_referer.offsetHeight-IC_Photo_Settings.MarginToBorders);Top=Math.max(Top,IC_Photo_Settings.MarginToBorders);IC_Photo_Popup_referer.style.top=Top+"px";IC_Photo_Popup_referer.style.left=Left+"px";if(IC_Photo_Settings.UseDarkLayer){IC_Photo_DarkLayer.style.display="block";DLHeight=Math.max(f.offsetHeight,g.offsetHeight,Top+IC_Photo_Popup_referer.offsetHeight);IC_Photo_DarkLayer.style.height=DLHeight+"px"}}}}function JJMenuList(a,b,c){this.IDReference=b;this.Opener=c;this.Menu=a;this.Childs=[];this.DropDownX=0;this.DropDownY=0;this.Open=false;this.Direction="open";this.MouseOn=false;this.accelOpenConst=4e-4;this.FindElement();this.StartTime=null;this.ActionIntervalRunner=null;this.AutoCloseTimer=null;this.Menu.AddMenuList(this)}function JJMenuItem(a,b,c,d){this.Menu=a;this.Parent=null;this.Index=null;this.Element=b;this.NormalClass=b.className;this.MouseOn=false;this.ParentY=b.offsetTop;this.ParentX=b.offsetLeft;this.ToOpenID=c;this.ToOpen=null;if(this.ToOpenID){var e=new JJMenuList(a,c,this);this.ToOpen=e;if(this.ToOpen){e.FindElement();if(e.Element){e.Element.onmouseout=function(){e.MouseOut()};e.Element.onmouseover=function(){e.MouseOver()}}}}this.KeepOpenID=d;if(this.KeepOpenID){this.KeepOpen=this.Menu.SearchMenuList(this.KeepOpenID);this.Parent=this.KeepOpen}this.Open=false;this.Menu.AddMenuItem(this)}function JJMenu(){this.Childs=[];this.MenuItems=[];this.MenuLists=[];this.Closing=[];this.Opening=[];this.AnimationOpenTime=500;this.AnimationCloseTime=250;this.minCPUResolution=15;this.StandaardOpenTime=360;this.MenuItemUpPostFix="Up";this.zIndex=1}JJMenuList.prototype.FindElement=function(){if(this.Element==null){this.Element=document.getElementById(this.IDReference);if(this.Element!=null){this.Element.style.display="block";this.DropDownY=this.Element.offsetHeight;this.Element.style.display="none";this.DropDownX=this.Element.offsetWidth;this.Element.style.left=this.Opener.ParentX+"px";this.Element.style.top=this.Opener.ParentY-this.DropDownY+"px";this.BerekenAccelConst(this.DropDownY)}}};JJMenuItem.prototype.UpdateClassName=function(a){Class="";if(a){Class=this.NormalClass;ML=this.Menu.MenuItemUpPostFix.length;CL=Class.length;if(Class.substring(CL-ML,CL)!=this.Menu.MenuItemUpPostFix){Class+=this.Menu.MenuItemUpPostFix}}else{Class=this.NormalClass}if(this.Element.className!=Class){this.Element.className=Class}};JJMenu.prototype.SearchMenuList=function(a){for(idx in this.MenuLists){MenuList=this.MenuLists[idx];if(MenuList.IDReference==a){return MenuList}}return null};JJMenuList.prototype.BerekenAccelConst=function(){Space=(parseInt(this.Element.style.top)-this.Opener.ParentY)*-1;this.accelOpenConst=Space/this.Menu.AnimationOpenTime/this.Menu.AnimationOpenTime;this.accelCloseConst=Space/this.Menu.AnimationCloseTime/this.Menu.AnimationCloseTime};JJMenu.prototype.RegisterToMenu=function(a,b,c){var d=new JJMenuItem(this,a,b,c);if(d.ToOpen||d.KeepOpen){this.AddToMenuOrder(d);a.onmouseover=function(){d.MouseMove()};a.onmouseover();a.onmouseout=function(){d.MouseOut()};return true}else{a.onmouseover=function(){};return false}};JJMenu.prototype.GetNewZIndex=function(){this.zIndex++;return this.zIndex};JJMenu.prototype.AddMenuItem=function(a){var b=this.MenuItems.push(a)-1;a.Index=b};JJMenu.prototype.AddMenuList=function(a){var b=this.MenuLists.push(a)-1;this.Closing[b]=false;this.Opening[b]=false;a.Index=b};JJMenu.prototype.AddToMenuOrder=function(a){ChildIndex=null;if(a.KeepOpen){for(var b in this.Childs){if(ChildIndex==null&&this.Childs[b].ToOpen){ChildIndex=this.Childs[b].ToOpen.AddToMenuOrder(a)}}}else{ChildIndex=this.Childs.push(a)-1}if(ChildIndex){this.MenuItems[a.Index].ChildIndex=ChildIndex}};JJMenuList.prototype.AddToMenuOrder=function(a){ChildIndex=null;if(this.ToOpen==a.KeepOpen){a.Parent=this;return this.Childs.push(a)}for(var b in this.Childs){ChildIndex=this.Childs[b].AddToMenuOrder(a);if(ChildIndex){return ChildIndex}}return null};JJMenuList.prototype.MouseOut=function(){this.MouseOn=false;this.CheckPossibleClose()};JJMenuList.prototype.MouseOver=function(){this.MouseOn=true;this.CheckPossibleClose()};JJMenuItem.prototype.MouseOut=function(){this.MouseOn=false;if(this.ToOpen){this.ToOpen.CheckPossibleClose()}};JJMenuItem.prototype.MouseMove=function(){this.MouseOn=true;if(this.ToOpen!=null){this.ToOpen.StartOpenMenu()}if(this.KeepOpen!=null&&this.Menu.Closing[this.KeepOpen.Index]==false){this.KeepOpen.StartOpenMenu()}};JJMenu.prototype.CloseOtherThanMe=function(a){for(var b in this.Childs){MenuItem=this.Childs[b];cIndex=MenuItem.Index;if(cIndex!=a){if(MenuItem.ToOpen){lIndex=MenuItem.ToOpen.Index;if(this.Closing[lIndex]==false&&(MenuItem.ToOpen.Open||this.Opening[lIndex]==true)){MenuItem.ToOpen.StartCloseMenuList()}}}}};JJMenuItem.prototype.CloseOtherThanMe=function(a){if(this.Parent){for(var b in this.Childs){MenuList=this.Childs[b];if(MenuList.Index!=a){MenuList.StartCloseMenuList()}}}else{this.Menu.CloseOtherThanMe(this.Index)}};JJMenuList.prototype.StartOpenMenu=function(){this.FindElement();this.Opener.CloseOtherThanMe(this.Index);this.Element.style.zIndex=this.Menu.GetNewZIndex();if(this.Menu.Opening[this.Index]==true){return}if(this.Open==false||this.Menu.Closing[this.Index]==true){this.StartTime=(new Date).getTime();this.Opener.UpdateClassName(true);this.Element.style.top=this.Opener.ParentY-this.DropDownY+"px";this.Element.style.display="block";this.Menu.Closing[this.Index]=false;this.Menu.Opening[this.Index]=true;this.Direction="open";if(this.Element.className=="SubList Quick"){this.EndOpenMenuList()}else{clearInterval(this.ActionIntervalRunner);this.ActionIntervalRunner=setInterval("JJMenu_SlideMenuList( "+this.Index+" )",this.Menu.minCPUResolution)}}else{if(this.Open==true){this.ResetCloseTimer()}}};JJMenu_SlideMenuList=function(a){if(Menu.MenuLists[a]){Menu.MenuLists[a].SlideMenuList()}};JJMenu_AutoCloseMenu=function(a){if(Menu.MenuItems[a]){Menu.MenuLists[a].StartCloseMenuList()}};JJMenuList.prototype.SlideMenuList=function(){var a=(new Date).getTime()-this.StartTime;Top=this.Opener.ParentY;if(this.Direction=="open"){var b=Math.round(Math.pow(this.Menu.AnimationOpenTime-a,2)*this.accelOpenConst);Top=this.Opener.ParentY-b}else{var b=Math.round(Math.pow(a,2)*this.accelCloseConst);Top=this.Opener.ParentY-b}this.Element.style.top=Top+"px";if(a>(this.Direction=="open"?this.Menu.AnimationOpenTime:this.Menu.AnimationCloseTime)){if(this.Direction=="open"){this.EndOpenMenuList()}else{this.EndCloseMenuList()}}};JJMenuList.prototype.EndOpenMenuList=function(){clearInterval(this.ActionIntervalRunner);this.Open=true;this.Element.style.top=this.Opener.ParentY+"px";this.Menu.Opening[this.Index]=false;this.ResetCloseTimer(false)};JJMenuList.prototype.CheckPossibleClose=function(){this.FindElement();if(this.MouseOn==true){this.ClearCloseTimer();return false}if(this.Opener!=null&&this.Opener.MouseOn==true){this.ClearCloseTimer();return false}this.ResetCloseTimer();return true};JJMenuList.prototype.ClearCloseTimer=function(a){if(this.AutoCloseTimer){clearInterval(this.AutoCloseTimer)}};JJMenuList.prototype.ResetCloseTimer=function(a){clearInterval(this.AutoCloseTimer);this.AutoCloseTimer=setTimeout("JJMenu_AutoCloseMenu( "+this.Index+" )",this.Menu.StandaardOpenTime);if(a){HasKids=false;for(var b in Childs){MenuItem=Childs[b];if(MenuItem.ToOpen){if(MenuItem.ToOpen.Open){MenuItem.ToOpen.ResetCloseTimer(a);a=true}}}a=HasKids}if(!a){if(this.Opener.Parent){this.Opener.Parent.ResetCloseTimer(false)}}};JJMenuList.prototype.StartCloseMenuList=function(){if(!this.CheckPossibleClose()){return}for(var a in this.Childs){MenuItem=this.Childs[a].ToOpen;if(MenuItem.ToOpen){MenuItem.ToOpen.StartCloseMenuList()}}clearTimeout(this.AutoCloseTimer);if(this.Open||this.Menu.Opening[this.Index]==true){this.StartTime=(new Date).getTime();this.Direction="close";this.Menu.Closing[this.Index]=true;this.Menu.Opening[this.Index]=false;if(this.Element.className=="SubList Quick"){this.EndCloseMenuList()}else{clearInterval(this.ActionIntervalRunner);this.ActionIntervalRunner=setInterval("JJMenu_SlideMenuList( "+this.Index+" )",this.Menu.minCPUResolution)}}};JJMenuList.prototype.EndCloseMenuList=function(){clearInterval(this.ActionIntervalRunner);this.Open=false;this.Opener.UpdateClassName(false);this.Element.style.display="none";this.Menu.Closing[this.Index]=false};Menu=new JJMenu;var IC_Photo_DarkLayer=null;var IC_Photo_Popup_referer=null;var IC_Photo_Settings={MarginToBorders:10,Title:"Klik hier om te sluiten",CloseTitle:"x",UseAltTag:true,UseCloseTag:true,UseDarkLayer:true,Padding:15};CurrentMenuOpen=null;var DarkLayer=null;OpenPictureNext=null;OpenPicturePrev=null
