');
var beeldinfo = document.createElement('div');
$(beeldinfo).html(beelden[x].na);
$(beeldinfo).attr('class','infosmall');
$(beeldinfo).fadeTo(0,0);
$(thumbbox).append(beeldinfo);
tellerx = tellerx +fotobreed;
}
if(tellerpag>=maxpag+start) {
erismeer = true;
x=xlang;
}
tellerpag = tellerpag +1;
}
}
$(".infosmall").fadeTo(0,0,function(){$(this).css("display","none")});
if(erismeer) {
var backbut = document.createElement('div');
$(backbut).attr('class','listforwardbut button');
$(backbut).attr('title','Naar volgende pagina');
var newstart = parseInt(start+maxpag);
$(backbut).attr("onClick","makeList('"+wie+"','"+wat+"',"+newstart+",$('#"+$(newdiv).attr('id')+"'));");
$(newdiv).append(backbut);
}
if(erisminder) {
var backbut = document.createElement('div');
$(backbut).attr('class','listbackbut button');
$(backbut).attr('title','Naar vorige pagina');
var newstart = parseInt(start-maxpag);
$(backbut).attr("onClick","makeList('"+wie+"','"+wat+"',"+newstart+",$('#"+$(newdiv).attr('id')+"'));");
$(newdiv).append(backbut);
}
}
function gobackPage() {
if(backpage != "") {
var streepjes = backpage.indexOf("__");
if(streepjes >0) {
var wat = backpage.substring(0,streepjes);
var wie = backpage.substring(streepjes+2,backpage.length);
maakPagina(wie,wat);
}
}
}
function sendMail(obj) {
var target = $(obj).parents(".paginaurl");
var newdiv = document.createElement('div');
$(".mailresult").remove();
$(newdiv).attr('id','mailresult');
$(newdiv).attr('class','mailresult');
$(newdiv).attr('onclick','$(this).remove()');
$(target).append(newdiv);
$(newdiv).wrap("
");
var invoer = $('#mailForm').serializeArray();
$.post('mail.php', invoer, function(data) {
if(data.replaceAll(" ","") != "ok"){
$("#mailresult").html(data);
}
else {
$("#mailtable").remove();
$("#mailresult").parents(".paginaurl").append("Uw bericht is verstuurt.
Klik hier om een nieuw bericht te maken");
}
});
}
function newMail() {
$("#url__contactphp").remove();
prevpage="";
lastpage="";
paginas["url__contactphp"]=null;
maakPagina('contact.php','url');
}
function checkClick(obj,wie) {
var label = $(obj).attr("value");
var waarde = $(obj).attr("checked");
var papa = $(obj).parent().parent();
$("#"+papa.attr("id")).data(label,waarde);
makeList(wie,'list',0,papa);
}
function expandImage(obj) {
var marge = 15;
var imghoog = $(obj).parent().height();
var imgbreed = $(obj).parent().width();
var imgfactor = 1;
if( (breed-marge)/imgbreed <= (hoog-marge)/imghoog) {imgfactor = (breed-marge)/imgbreed;}
else {imgfactor = (hoog-marge)/imghoog;}
imghoog = imghoog*imgfactor;
imgbreed = imgbreed*imgfactor;
var movebitx = ((breed-marge)-imgbreed)/2+5;
var movebity = ((hoog-marge)-imghoog)/2+5;
$(obj).parent().css('z-index',5);
$(obj).parent().animate({'width':imgbreed,'height':imghoog,'left':movebitx,'top':movebity},1000);
$(obj).parent().find('.mainimg').animate({'width':imgbreed,'height':imghoog},1000);
$(obj).parent().find('.thumb').each(function(){$(this).css('display','none')});
var colbut = document.createElement('div');
$(colbut).attr('class','colbut button');
$(colbut).attr('title','Vergoot foto');
$(colbut).fadeTo(0,0);
$(colbut).click(function () {
collapseImage($(this));
});
$(obj).parent().append(colbut);
$(obj).parent().find('.backbut').unbind().click(function () {
collapseImage($(this));
gobackPage();
});
$(obj).parent().find('.expbut').remove();
}
function collapseImage(obj) {
var imghoog = $(obj).parent().height();
var imgbreed = $(obj).parent().width();
var imgfactor = 1;
if( pagbreed/imgbreed <= paghoog/imghoog) {imgfactor = pagbreed/imgbreed;}
else {imgfactor = paghoog/imghoog;}
imghoog = imghoog*imgfactor;
imgbreed = imgbreed*imgfactor;
var extrabit = (pagbreed - imgbreed)/2
$(obj).parent().animate({'width':imgbreed,'height':imghoog,'left':300+extrabit,'top':imgtop},1000);
$(obj).parent().find('.mainimg').animate({'width':imgbreed,'height':imghoog},1000);
$(obj).parent().css('z-index',3);
$(obj).parent().find('.thumb').each(function(){$(this).css('display','')});
var expbut = document.createElement('div');
$(expbut).attr('class','expbut button');
$(expbut).attr('title','Vergoot foto');
$(expbut).fadeTo(0,0);
$(expbut).click(function () {
expandImage($(this));
});
$(obj).parent().append(expbut);
$(obj).parent().find('.backbut').unbind().click(function () {
gobackPage();
});
$(obj).parent().find('.colbut').remove();
}
function fillDeco(){
var decoimg = document.createElement('img');
$(decoimg).attr('class','decoimg');
$(decoimg).attr('src',"deco.png");
$(decoimg).css('left',0);
var decoimg2 = document.createElement('img');
$(decoimg2).attr('class','decoimg');
$(decoimg2).attr('src',"deco.png");
$(decoimg2).css('left',1601);
$("#decoback").append(decoimg);
$("#decoback").append(decoimg2);
decoTick();
}
function decoTick(){
$("img.decoimg").each(function(){
//$("#decoback").find(".decoimg").each(function(){
var newleft = parseInt($(this).css("left"))-1;
$(this).css("left",newleft+"px");
if(parseInt($(this).css("left")) < -$(this).width()) {
var decoimg = document.createElement('img');
$(decoimg).attr('class','decoimg');
$(decoimg).attr('src',"deco.png");
$(decoimg).css('left',$(this).width()-1);
$("#decoback").append(decoimg);
$(this).remove();
}
});
//if(!document.all) {
ticker = setTimeout("decoTick()",100);
//}
}
//-----------------Start-------------------------------
$(document).ready(function(){
breed = $(document).width();
hoog = $(document).height();
$("#bodydiv").width(breed);
$("#bodydiv").height(hoog);
var screendiv = "";
$("#bodydiv").append(screendiv);
pagbreed = breed-320;
paghoog = hoog -imgtop-20;
$("#decobar").css("width",pagbreed+"px");
$("#decoback").css("width",pagbreed+"px");
fillDeco();
});