function getClientWidth(){return (window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth));}function getClientHeight(){return (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));}function mycarousel_itemLoadCallback(carousel, state){for (var i = carousel.first; i <= carousel.last; i++) {if (carousel.has(i)) {continue;}if (i > mycarousel_itemList.length) {break;}carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i-1],i));}};function mycarousel_getItemHTML(item,counter){return '<DIV class="fotoImgSl" id="fotoImgSl'+item.title+'"><img src="' + HTTPPAD + 'viewpic.php?pic=' + item.url + '&mode=VERYSMALL" width="150" height="100" alt="' + item.title + '" title="' + item.title + '" onclick="load_big_pic(\'' + item.url + '\',\'' + counter + '\');"/></DIV>';};function trigger_click(item,counter,Length){$('#zwrt_pic_img').html('');var wd = getClientWidth();var ht = getClientHeight();var pwd = wd * 0.9;var pht = ht * 0.9;var wpd = (pht / 2) - 32;var ppd = (ht - pht) / 2;var pld = (wd - pwd) / 2;$('#zwrt_back').css({"width":wd+"px","height":ht+"px"});$('#zwrt_pic').css({"width":pwd+"px","height":pht+"px","top":ppd+"px","left":pld+"px"});$("#zwrt_wait").css({"paddingTop":wpd+"px"});$('#zwrt_back').fadeIn(1000);$('#zwrt_pic').fadeIn(1000);gal_show_bigImg(item,counter,Length,pwd,pht);$('#zwrt_back').bind('click', function() {$('#zwrt_pic_img').html('');$('#zwrt_pic').hide();$('#zwrt_back').hide();});}function gal_show_bigImg(item,counter,Length,wd,ht){$('#zwrt_pic_img').html('');$('#zwrt_pic_info').html('');$('#zwrt_pic_img').append('<DIV id="bigImgPrev"></DIV>');$('#zwrt_pic_img').append('<DIV id="bigPicCont"><IMG src="'+HTTPPAD+'viewpic.php?pic='+item+'&mode=FULL&wd='+wd+'&ht='+ht+'" border="0" id="bigImgLoaded"/></DIV>');$('#zwrt_pic_img').append('<DIV id="bigImgNext"></DIV>');$('#zwrt_pic_info').html(mycarousel_itemList[counter-1].title + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +counter+' van '+Length);if (counter == 1){var itemP = mycarousel_itemList[Length-1].url;var prevC = Length;}else{var itemP = mycarousel_itemList[counter-2].url;var prevC = counter-1;}if (counter == Length){var itemN = mycarousel_itemList[0].url;var nextC = 1;}else{var itemN = mycarousel_itemList[counter].url;var nextC = Math.abs(counter)+1;}$('#bigImgLoaded').load(function() {var pht = $('#bigImgLoaded').height();var mtp = (ht - pht) / 2;var mbt = (ht / 2) - (16 + mtp);$('#bigPicCont').css("marginTop",mtp+"px");$('#bigImgPrev').css("top",mbt+"px");$('#bigImgNext').css("top",mbt+"px");$("#zwrt_wait").hide();$('#bigImgPrev').bind('click', function() {$("#zwrt_wait").show();gal_show_bigImg(itemP,prevC,Length,wd,ht)});$('#bigImgNext').bind('click', function() {$("#zwrt_wait").show();gal_show_bigImg(itemN,nextC,Length,wd,ht)});});}function showCityGallery(s,m,t,md){var max = Math.abs(s) + Math.abs(m);var last = t - 1;if ($("#fotoSlider").has("div").length){var chld = $("#fotoGalInt").children();var lchl = m - 1;if (md && md == "d"){var ni = Math.abs(s) + Math.abs(m);if (ni > last){ni = Math.abs(ni) - Math.abs(t);}var px = s - 1;if (px < 0){px = last;}if (s == last){var nx = 0;}else{var nx = Math.abs(s) + 1;}$("#fotoGalInt").append(mycarousel_getItemHTML(mycarousel_itemList[ni],ni+1));$(chld[0]).remove();$("#fotoItemPrev").remove();$("#fotoItemNext").remove();$("#fotoSlider").prepend('<div id="fotoItemPrev" onclick="showCityGallery('+px+','+m+','+t+',\'u\');">&nbsp;</div>');$("#fotoSlider").append('<div id="fotoItemNext" onclick="showCityGallery('+nx+','+m+','+t+',\'d\');">&nbsp;</div>');return false;}else{var ni = s;var px = Math.abs(ni) - 1;if (px < 0){px = last;}if (s == last){var nx = 0;}else{var nx = Math.abs(s) + 1;}$("#fotoGalInt").prepend(mycarousel_getItemHTML(mycarousel_itemList[ni],ni+1));$(chld[lchl]).remove();$("#fotoItemPrev").remove();$("#fotoItemNext").remove();$("#fotoSlider").prepend('<div id="fotoItemPrev" onclick="showCityGallery('+px+','+m+','+t+',\'u\');">&nbsp;</div>');$("#fotoSlider").append('<div id="fotoItemNext" onclick="showCityGallery('+nx+','+m+','+t+',\'d\');">&nbsp;</div>');}}else{$("#fotoSlider").append('<div id="fotoGalInt"></div>');while (s < max){if (mycarousel_itemList[s]){$("#fotoGalInt").append(mycarousel_getItemHTML(mycarousel_itemList[s],s+1));}s++;}$("#fotoSlider").append('<div style="clear:both;"></div>');$("#fotoSlider").append('<div id="fotoItemPrev" onclick="showCityGallery('+last+','+m+','+t+',\'u\');">&nbsp;</div>');$("#fotoSlider").append('<div id="fotoItemNext" onclick="showCityGallery(\'0\','+m+','+t+',\'d\');">&nbsp;</div>');$("#fotoSlider").append('<div style="clear:both;"></div>');}}function load_big_pic(k,c){var itemInfo = "'"+k+"','"+c+"','"+mycarousel_itemList.length+"'";$("#fotoPreview").css('display','none');$("#fotoPreview").html('<IMG src="'+HTTPPAD+'viewpic.php?pic='+k+'&mode=BIG" onclick="trigger_click('+itemInfo+');"/>');$("#fotoPreview").fadeIn(3000, function() {});return false;}function load_handle(){if (curpage == 8){$("#contentFrame").css("background","url('images/home.jpg') no-repeat");}else if (curpage == 2){$("#contentFrame").css("background","url('images/bio.jpg') no-repeat");}else if (curpage == 12){$("#contentFrame").css("background","url('images/disco.jpg') no-repeat");}else if (curpage == 11 || curpage == 9 || curpage == 7 ){$("#contentFrame").css("background","url('images/fvm.jpg') no-repeat");}else if (curpage == 13){$("#contentFrame").css("background","url('images/promo.jpg') no-repeat");}else{$("#contentFrame").css("background","url('images/concerten.jpg') no-repeat");}if (my_albums.length > 0){$.each(my_albums, function(k,v){if (k > 0){$("#fotoMenu").prepend('<DIV class="fotoMenu" id="fotoMenu'+k+'"><A href="'+HTTPPAD+'index.php?Page=9&alb='+k+'">'+v+'</A></DIV>');}});}if (my_vid_albums.length > 0){$.each(my_vid_albums, function(k,v){if (k > 0 && v && v.length > 0 ){$("#videoMenu").prepend('<DIV class="fotoMenu" id="videoMenu'+k+'"><A href="'+HTTPPAD+'index.php?Page=7&alb='+k+'">'+v+'</A></DIV>');}});}if (my_med_albums.length > 0){$.each(my_med_albums, function(k,v) {if (k > 0 && v && v.length > 0 ){$("#mediaMenu").prepend('<DIV class="fotoMenu" id="mediaMenu'+k+'"><A href="'+HTTPPAD+'index.php?Page=11&alb='+k+'">'+v+'</A></DIV>');}});}if (curpage == '9' && CurSurfPage > '0' ){showCityGallery(0,4,mycarousel_itemList.length);load_big_pic(mycarousel_itemList[0].url,'1');$("#fotoInh").animate({height: '500px'}, 3000, function() {$('.scroll-pane').jScrollPane({showArrows: true});});}else{$('#contentInh').slideToggle(3000,function() {$('.scroll-pane').jScrollPane({showArrows: true});});}if (curpage == '7'){$('embed').attr('wmode',"transparent");}$(".tweet").tweet({username: "DZuijderwijk",join_text: "auto",avatar_size: 32,count: 5,auto_join_text_default: "",auto_join_text_ed: "",auto_join_text_ing: "",auto_join_text_reply: "",auto_join_text_url: "",loading_text: "tweets worden geladen..."});$("#jquery_jplayer_1").jPlayer({ready: function (){$(this).jPlayer("setMedia",{mp3: "mzc/1.mp3"}).jPlayer("pause");},ended: function (event){$(this).jPlayer("pause");},swfPath: "js",supplied: "mp3"});return true;}function menu_handle(p){var LayerName = 'contentInh';if (curpage == '9'){LayerName = 'fotoInh';}if (p == 2){$('#videoMenu').hide();$('#mediaMenu').hide();$('#fotoMenu').toggle();if (my_albums.length > 0){$.each(my_albums, function(k,v){if (k > 0){$("#fotoMenu"+k).bind('click', function(){$('#'+LayerName).animate({height: '0px'}, 1500, function(){$('#'+LayerName).html('');window.location=HTTPPAD+'index.php?Page=9&alb='+k;});return false;});}});}return false;}else if (p == 3){$('#fotoMenu').hide();$('#mediaMenu').hide();$('#videoMenu').toggle();if (my_vid_albums.length > 0){$.each(my_vid_albums, function(k,v){if (k > 0){$("#videoMenu"+k).bind('click', function(){$('#'+LayerName).animate({height: '0px'}, 1500, function(){$('#'+LayerName).html('');window.location=HTTPPAD+'index.php?Page=7&alb='+k;});return false;});}});}return false;}else if (p == 4){$('#fotoMenu').hide();$('#videoMenu').hide();$('#mediaMenu').toggle();if (my_med_albums.length > 0){$.each(my_med_albums, function(k,v) {if (k > 0){$("#mediaMenu"+k).bind('click', function() {$('#'+LayerName).animate({height: '0px'}, 1500, function() {$('#'+LayerName).html('');window.location=HTTPPAD+'index.php?Page=11&alb='+k;});return false;});}});}return false;}else{$('#'+LayerName).animate({height: '0px'}, 1500, function(){$('#'+LayerName).html('');if (p == 0){window.location=HTTPPAD+"index.php";return false;}else if (p == 1){window.location=HTTPPAD+"index.php?Page=2";return false;}else if (p == 5){window.location=HTTPPAD+"index.php?Page=4";return false;}else if (p == 6){window.location=HTTPPAD+"index.php?Page=6";return false;}else if (p == 7){window.location=HTTPPAD+"index.php?Page=8";return false;}else if (p == 8){window.location=HTTPPAD+"index.php?Page=5";return false;}else if (p == 9){window.location=HTTPPAD+"index.php?Page=12";return false;}else if (p == 10){window.location=HTTPPAD+"index.php?Page=13";return false;}});return false;}}

