var a;function PhotoMatrix(b){this.group=[];this.photo=[];this.selectedPhotoNr=parseInt(b);this.previousPhotoIndexShowing=this.currentPhotoIndexShowing=0}a=PhotoMatrix.prototype;
a.init=function(){this.photoElem=document.getElementById("photo");this.photoTextElem=document.getElementById("photoText");this.fotoExtraInfoContainer=document.getElementById("fotoExtraInfoContainer");if(!isNaN(this.selectedPhotoNr)){this.selectedPhotoIndex=this.selectedPhotoNr-1;this.selectedGroupIndex=this.photo[this.selectedPhotoIndex].groupIndex;this.previousPhotoIndexShowing=this.currentPhotoIndexShowing=this.selectedPhotoIndex}this.setGroup(this.selectedGroupIndex)};
a.setGroup=function(b){if(b>=0){for(var c=0;c<this.group.length;c++){if(c==b){this.group[c].makeSelected();this.group[c].groupInfoBox.style.display="block"}else{this.group[c].makeUnselected();this.group[c].groupInfoBox.style.display="none"}this.group[c].showRightPhotos()}clearTimeout(this.photoSlideShowTimer);this.currentPhotoIndexShowing=this.previousPhotoIndexShowing;this.selectedGroupIndex=b}this.showNextPhoto()};
a.showNextPhoto=function(){var b=false,c=this;if(this.currentPhotoIndexShowing>=0){this.showPhoto();this.previousPhotoIndexShowing=this.currentPhotoIndexShowing}for(;!b;){this.currentPhotoIndexShowing++;if(this.currentPhotoIndexShowing==this.photo.length)this.currentPhotoIndexShowing=0;if(this.group[this.photo[this.currentPhotoIndexShowing].groupIndex].selected)b=true}this.photoSlideShowTimer=setTimeout(function(){c.showNextPhoto()},4E3)};
a.showPhoto=function(){var b=document.all,c=this.photo[this.currentPhotoIndexShowing],d=this.photo[this.previousPhotoIndexShowing].thumbOverlayImage;if(b){this.photoElem.style.filter="blendTrans(duration=1)";this.photoTextElem.style.filter="blendTrans(duration=1)";this.photoElem.filters.blendTrans.Apply();this.photoTextElem.filters.blendTrans.Apply()}this.photoElem.src=c.filename;this.changeText(this.photoTextElem,c);c.thumbOverlayImage.src="images/layout/thumb_overlay_sel.png";if(this.previousPhotoIndexShowing!=
this.currentPhotoIndexShowing)d.src="images/layout/thumb_overlay.png";if(b){this.photoElem.filters.blendTrans.Play();this.photoTextElem.filters.blendTrans.Play()}};
a.changeText=function(b,c){for(var d;b.hasChildNodes();)b.removeChild(b.firstChild);d=this.fotoExtraInfoContainer.childNodes;for(var e=0;e<d.length;e++)d[e].style.display="none";if(c.extraInfo){d=document.createElement("a");d.onclick=createMethodReference(c,c.showExtraInfo);d.style.textDecoration="underline";d.style.cursor="pointer";d.appendChild(document.createTextNode(c.title));b.appendChild(d)}else b.appendChild(document.createTextNode(c.title))};a.showExtraInfo=function(){};
a.addGroup=function(b){this.group.push(new PhotoMatrixGroup(b,this.group.length,this))};a.addPhoto=function(b,c,d,e,f){if(b<this.group.length){c=new PhotoMatrixPhoto(d,e,b,c,f);this.group[b].photo.push(c);this.photo.push(c)}};
function PhotoMatrixGroup(b,c,d){this.id=b;this.index=c;this.photoMatrix=d;this.selected=true;this.photo=[];this.groupNameElem=document.getElementById(this.id);this.groupInfoBox=document.getElementById("infoBox_"+this.id);this.groupNameElem.style.cursor="pointer";this.groupNameElem.onclick=createMethodReference(this,"clicked");this.makeSelected()}PhotoMatrixGroup.prototype.clicked=function(){this.photoMatrix.setGroup(this.index)};
PhotoMatrixGroup.prototype.makeSelected=function(){this.groupNameElem.style.color="#535353";this.selected=true};PhotoMatrixGroup.prototype.makeUnselected=function(){this.groupNameElem.style.color="#A0A0A0";this.selected=false};PhotoMatrixGroup.prototype.showRightPhotos=function(){for(var b=0;b<this.photo.length;b++)this.selected==true?this.photo[b].showThumb():this.photo[b].hideThumb()};
function PhotoMatrixPhoto(b,c,d,e,f){this.filename=b;this.title=c;this.groupIndex=d;this.id=e;this.extraInfo=f;this.thumbIdPrefix="thumb";this.thumbOverlayIdPrefix="thumbOverlay";this.thumbImage=document.getElementById(this.thumbIdPrefix+this.id);this.thumbOverlayImage=document.getElementById(this.thumbOverlayIdPrefix+this.id);if(this.extraInfo)this.extraInfoBox=document.getElementById("fotoExtra_"+this.id)}PhotoMatrixPhoto.prototype.showExtraInfo=function(){this.extraInfoBox.style.display="block"};
PhotoMatrixPhoto.prototype.hideThumb=function(){if(this.thumbImage)this.thumbImage.style.visibility="hidden"};PhotoMatrixPhoto.prototype.showThumb=function(){if(this.thumbImage)this.thumbImage.style.visibility="visible"};function FaqList(){this.faq=[];this.activeFaqIndex=-1}FaqList.prototype.addFaq=function(b){this.faq.push(new Faq(b,this,this.faq.length))};FaqList.prototype.switchStatus=function(){};
function Faq(b,c,d){this.id=b;this.faqList=c;this.index=d;this.open=false;this.questionIdPrefix="q";this.answerIdPrefix="a";this.init()}Faq.prototype.init=function(){this.questionElem=document.getElementById(this.questionIdPrefix+this.id);this.answerElem=document.getElementById(this.answerIdPrefix+this.id);this.questionElem.onclick=createMethodReference(this,"switchStatus")};
Faq.prototype.switchStatus=function(){if(this.open){this.hideAnswer();this.faqList.activeFaqIndex=-1}else{this.faqList.activeFaqIndex>=0&&this.faqList.faq[this.faqList.activeFaqIndex].hideAnswer();this.showAnswer();this.faqList.activeFaqIndex=this.index}};Faq.prototype.hideAnswer=function(){this.answerElem.style.display="none";this.open=false};Faq.prototype.showAnswer=function(){this.answerElem.style.display="block";this.open=true};function House(){}
House.prototype.init=function(){this.id="huis";this.window=[];this.window.push(new HouseWindow(this.window.length,"lb"));this.window.push(new HouseWindow(this.window.length,"rb"));this.window.push(new HouseWindow(this.window.length,"lo"));this.window.push(new HouseWindow(this.window.length,"ro"))};HouseResearch.prototype=new House;function HouseResearch(){this.init()}
HouseResearch.prototype.replacePhotos=function(){this.window[0].replacePhoto("images/layout/huis/behandeling_lb.png");this.window[1].replacePhoto("images/layout/huis/behandeling_rb.png");this.window[2].replacePhoto("images/layout/huis/behandeling_lo.png");this.window[3].replacePhoto("images/layout/huis/behandeling_ro.png")};HouseBrushing.prototype=new House;function HouseBrushing(){this.init()}
HouseBrushing.prototype.replacePhotos=function(){this.window[0].replacePhoto("images/layout/huis/poetsen_lb.png");this.window[1].replacePhoto("images/layout/huis/poetsen_rb.png");this.window[2].replacePhoto("images/layout/huis/poetsen_lo.png");this.window[3].replacePhoto("images/layout/huis/poetsen_ro.png")};HouseBraces.prototype=new House;function HouseBraces(){this.init()}HouseBraces.prototype.replacePhoto=function(b,c){this.window[b].replacePhoto("images/layout/huis/"+c)};
function HouseWindow(b,c){this.index=b;this.id=c;this.photoIdPrefix="huisFoto_";this.init()}HouseWindow.prototype.init=function(){this.photoElem=document.getElementById(this.photoIdPrefix+this.id)};HouseWindow.prototype.replacePhoto=function(b){this.photoElem.src=b;this.photoElem.onclick=null;this.photoElem.style.cursor="default"};function writeEmail(b,c,d){b||(b="eenmooielach.nl");d||(d=c+"@"+b);document.write('<a href="mailto:'+c+"@"+b+'">'+d+"</a>")}
function setCookie(b,c,d){document.cookie=b+"="+escape(c)+(d==null?"":"; expires="+d.toUTCString())}function getCookie(b){b=b+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(b);if(offset!=-1){offset+=b.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(offset,end))}else return""}}function createMethodReference(b,c){c instanceof Function||(c=b[c]);return function(){c.apply(b,arguments)}}
function Debug(b){java.lang.System.out.println(b)};

