
var overlay_fx;function showBox(id,show)
{if(show!=undefined&&show==false)
{$('overlay').removeEvent('click');overlay_fx.start(0);$(id).fade('out');}
else
{$('overlay').addEvent('click',function(e){showBox(id,false);});overlay_fx.start(0.7);$(id).fade('in');}}
tinyMCE.init({mode:'exact',skin:'o2k7',theme:'advanced',elements:'page_content,page_add_content,setting_contact',force_br_newlines:true,entity_encoding: "raw",theme_advanced_path:false,theme_advanced_toolbar_align:"left",theme_advanced_toolbar_location:"top",extended_valid_elements:'a[name|href|target|title|onclick],img[class|src|alt|title|hspace|vspace|width|height|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'});window.addEvent('domready',function(){$$('.foto').each(function(el){el.addEvent('click',function(e){var url=el.firstChild.src;if(url){url=url.replace("/thumb/","/");$('popup_foto').setAttribute('src',url)
$('popup_foto').style.display="block";}else{$('popup_foto').style.display="none";}
if($chk($('photo_id')))
$('photo_id').value=el.childNodes[1].value;
if($chk($('photo_id2')))
$('photo_id2').value=el.childNodes[1].value;
if($chk($('photo_title')))
$('photo_title').value=el.childNodes[2].value;if($chk($('photo_url')))
$('photo_url').value=el.childNodes[3].value;showBox('foto_popup');});});$$('.close_window').each(function(el){el.addEvent('click',function(e){new Event(e).stop();showBox(el.parentNode,false);});});$each(['contact_form','foto_popup','login_form','menu_form','page_form','page_add_form'],function(id){if($chk($(id)))
$(id).fade('hide').setStyle('display','block');});overlay_fx=new Fx.Tween($('overlay'),{link:'cancel',onStart:Events.prototype.clearChain,duration:300,property:'opacity'}).set(0);$('overlay').setStyles({width:window.getScrollSize().x,height:window.getScrollSize().y,'display':'block'});if($chk($('vraag')))
{var el=$('vraag');var text="Typ hier uw vraag";$('vraag').addEvent('focus',function(e){if(el.value==text){el.value="";}});$('vraag').addEvent('blur',function(e){if(el.value==""){el.value=text;}});}
if($chk($('send-button')))
{$('send-button').addEvent('click',function(e){new Event(e).stop();$('contact-form').submit();});}
if($chk($('add_menu_cancel')))
{$('add_menu_cancel').addEvent('click',function(e){new Event(e).stop();showBox('menu_form',false);});}
if($chk($('contact_cancel')))
{$('contact_cancel').addEvent('click',function(e){new Event(e).stop();showBox('contact_form',false);});}
if($chk($('contact_link')))
{$('contact_link').addEvent('click',function(e){new Event(e).stop();showBox('contact_form');});}
if($chk($('login_cancel')))
{$('login_cancel').addEvent('click',function(e){new Event(e).stop();showBox('login_form',false);});}
if($chk($('login_link')))
{$('login_link').addEvent('click',function(e){new Event(e).stop();showBox('login_form');});}
if($chk($('menu_cancel')))
{$('menu_cancel').addEvent('click',function(e){new Event(e).stop();showBox('menu_form',false);});}
if($chk($('menu_link')))
{$('menu_link').addEvent('click',function(e){new Event(e).stop();showBox('menu_form');});}
if($chk($('page_cancel')))
{$('page_cancel').addEvent('click',function(e){new Event(e).stop();showBox('page_form',false);});}
if($chk($('page_link')))
{$('page_link').addEvent('click',function(e){new Event(e).stop();showBox('page_form');});}
if($chk($('page_add_cancel')))
{$('page_add_cancel').addEvent('click',function(e){new Event(e).stop();showBox('page_add_form',false);});}
if($chk($('page_add_link')))
{$('page_add_link').addEvent('click',function(e){new Event(e).stop();showBox('page_add_form');});}});
function confirmSubmit(){var agree=confirm("Weet u zeker dat u dit item wilt verwijderen?");if (agree)return true; else return false;}
