function insert(el,ins) { if (el.setSelectionRange){ el.value = el.value.substring(0,el.selectionStart) + ins + el.value.substring(el.selectionStart,el.selectionEnd) + el.value.substring(el.selectionEnd,el.value.length); } else if (document.selection && document.selection.createRange) { el.focus(); var range = document.selection.createRange(); range.text = ins + range.text; } } function playsound(url) { if (url!='') { url = escape(url); var res = ''; } else { res = ""; } document.getElementById("soundeffect").innerHTML = res; } function updateFilter() { var val = $('input:radio:checked').val(); if (val==1) $('.thumbDiv').show(1000); if (val==2) { var a = $('.thumbDiv[title=]'); var b = $('.thumbDiv[title]'); a.show(); b.hide(1000); } if (val==3) { var a = $('.thumbDiv[title=]'); var b = $('.thumbDiv[title]'); b.show(); a.hide(1000); } } function kiespostzegel() { top.window.returnValue = -1; $.fn.colorbox({ href: "/postzegel.php", iframe: true, open: true, title: "Kies een postzegel", width: "900px", height: "750px", onClosed: function() { if (top.window.returnValue!=-1) { $.getScript('/ajax.php?req=postzegel&val='+top.window.returnValue); } } }); } function bijbelvers() { top.window.returnValue = -1; $.fn.colorbox({ href: "/bijbelvers.php", iframe: true, open: true, title: "Kies een bijbelvers", width: "500px", height: "700px", onClosed: function() { if (top.window.returnValue>=0) { $.getScript('/ajax.php?req=bijbelvers&val='+top.window.returnValue); } } }); } function addRcpt() { if ($('#naamontvanger').val()!='' && $('#emailontvanger').val()!='') { $.get('/ajax.php',{req: "addRcpt", name: $('#naamontvanger').val(), eml: $('#emailontvanger').val()}, function(data){ if (data=='true') { $('#naamontvanger,#emailontvanger').val(''); $.getScript('/ajax.php?req=getMailList'); } else { alert(data); } }); } else { alert('Vul eerst de ontvanger gegevens in.'); } } function delRcpt() { if ($('#cbemail').val()!=null) { $.get('/ajax.php',{req: "rmRcpt", val: $('#cbemail').val()},function(data){ if (data=='true') { $.getScript('/ajax.php?req=getMailList'); } }); } else { alert('Kies eerst de ontvanger die je wilt verwijderen uit de lijst.'); } } var currentImg=''; document.write("
"); $(function(){ $('#imgPreview').load(function() { if (typeof(currentImg)=='object') { $('#divPreview').stop(true,true); $('#imgPreview').css('border','black 1px solid'); $('#imgPreview').show(); $('#divPreview').fadeIn(300); } }); if ($('.thumbDiv[title=]').length>0 && $('.thumbDiv[title]').length>0) $('#ecardFilter').show(); $('#postzegel').load(function() { $(this).fadeIn(500); }); $('.thumb').mouseenter(function(){ currentImg = $(this); var newimg = $(this).attr('src').replace('/thumb',''); $('#imgPreview').attr('src',newimg); }).mouseleave(function(){ currentImg = ''; $('#imgPreview').css('border',''); $('#divPreview').hide(); $('#imgPreview').attr('src','/images/trans.gif'); }).mousemove(function(e){ var pos = $('.container').offset(); var newx = e.pageX-pos.left+15; if (newx>400) newx -= 380; var newy = Math.round(e.pageY-pos.top+$('#container').scrollTop()-($('#divPreview').height()/2)); if (newy<0) newy = 0; $('#divPreview').css('left',newx+'px'); $('#divPreview').css('top',newy+'px'); }); });