if(typeof(ASL)=="undefined"){var ASL={}}$(document).ready(function(){$("#fotos-slide").jCarouselLite({btnNext:".next",btnPrev:".prev"});$("#kalender-klein").datepicker({firstDay:1,onSelect:function(c,b){ASL_event_getDay(c)}});$("#gebruikersnaam").click(function(){if($(this).val()=="ASLpage gebruikersnaam"){$(this).val("")}});$(".box-photo .background-photo a").hover(function(){$(this).parent(".background-photo").parent(".box-photo").find("em").animate({opacity:"show"},"fast");$(this).mousemove(function(b){$(this).parent(".background-photo").parent(".box-photo").find("em").css("left",b.pageX+15);$(this).parent(".background-photo").parent(".box-photo").find("em").css("top",b.pageY+15)})},function(){$(this).parent(".background-photo").parent(".box-photo").find("em").animate({opacity:"hide"},"fast")});$(".box-video .background-video a").hover(function(){$(this).parent(".background-video").parent(".box-video").find("em").animate({opacity:"show"},"fast");$(this).mousemove(function(b){$(this).parent(".background-video").parent(".box-video").find("em").css("left",b.pageX+15);$(this).parent(".background-video").parent(".box-video").find("em").css("top",b.pageY+15)})},function(){$(this).parent(".background-video").parent(".box-video").find("em").animate({opacity:"hide"},"fast")});$(".box-video .omliggend .background-video a").hover(function(){$(this).parent(".background-video").parent(".omliggend").parent(".box-video").find("em").animate({opacity:"show"},"fast");$(this).mousemove(function(b){$(this).parent(".background-video").parent(".omliggend").parent(".box-video").find("em").css("left",b.pageX+15);$(this).parent(".background-video").parent(".omliggend").parent(".box-video").find("em").css("top",b.pageY+15)})},function(){$(this).parent(".background-video").parent(".omliggend").parent(".box-video").find("em").animate({opacity:"hide"},"fast")});function a(){if(!document.getElementsByTagName){return}var d=document.getElementsByTagName("a");for(var c=0;c<d.length;c++){var b=d[c];if(b.getAttribute("href")&&b.getAttribute("rel")=="external"){b.target="_blank"}}}$("#stream-meer").toggle(function(){$("#stream-left").show("slow");$(this).html("Minder").addClass("minder")},function(){$("#stream-left").hide("slow");$(this).html("Meer").removeClass("minder")});$("#statistieken-meer").toggle(function(){$("#statistieken-overige").show("slow");$(this).html("Minder").addClass("minder")},function(){$("#statistieken-overige").hide("slow");$(this).html("Meer").removeClass("minder")})});function ASL_profile_portlet(){$(".column").sortable({connectWith:".column",dropOnEmpty:true,update:function(b,c){serial=$(this).sortable("serialize");var d=$(this).sortable("toArray");var a=$(this).attr("id");a=a.replace("column","");$.ajax({type:"POST",url:"/ajax.php?module=profiel&function=updateBlocks&column="+a,cache:false,data:serial,dataType:"json",success:function(e){if(e.resp=="OK"){$(d).each(function(){var f=this.replace("profile_","");$("#"+this+" .main-action-minus").attr("onclick","ASL_profile_blocks_delete('"+f+"','"+a+"'); return false;");$("#"+this+" .main-action-minus").attr("href","/administratie/profiel/deletebadge/?badge="+f+"&column="+a)})}}})}});$(".column").disableSelection()}function ASL_profile_blocks_delete(a,b){$.ajax({type:"POST",url:"/ajax.php?module=profiel&function=deleteBlock",cache:false,data:"block="+a+"&column="+b,dataType:"json",success:function(c){if(c.resp=="OK"){$("#profile_"+a).remove()}}});return false}function ASL_profile_blocks(a){}function ASL_checkSession(a){$.ajax({type:"GET",url:"/ajax.php?module=auth&function=checkSession",cache:false,dataType:"json",success:function(f){if(f==""){return false}if(f.resp=="OK"){if(f.network.aslpage){if(f.network.facebook.link){if(!f.network.facebook.connected){facebooklink=f.network.facebook.authlink;if(!fbloginbutton){if($("#facebook-melding").length==0){var e=jQuery("<div id='facebook-melding'>Connectie met Facebook kwijt, gelieve terug in te loggen.<br> Klik hier om terug te verbinden:<a href=\""+facebooklink+'" onclick="ASL_FB_getPerms(ASL_stream_gotPermissions); return false;"><img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="" /></a></div>');$("#feed-login").append(e)}else{$("#facebook-melding").show()}fbloginbutton=true}else{$("#facebook-melding").hide();fbloginbutton=false}}else{ASL_facebook_resetPerms();ASL_facebook_addPerms(f.network.facebook.perms);ASL_facebook_checkPerms()}}if(f.network.twitter.link){if(!f.network.twitter.connected){if($("#twitter-melding").length==0){var d=jQuery("<div id='twitter-melding'>Connectie met Twitter kwijt, gelieve terug in te loggen.<br> Klik hier om terug te verbinden:<a href=\""+ASL.config.loginURL+'oauth/twitter/login" onclick="ASL_twitter_login_button(); return false;"><img src="'+ASL.config.staticURL+'images/connect_buttons/twitter_connect.png" alt="" /></a></div>');$("#feed-login").append(d)}else{$("#twitter-melding").show()}}else{if($("#twitter-melding")){$("#twitter-melding").hide()}}}if(f.network.myspace.link&&!f.network.myspace.connected){if($("#myspace-melding").length==0){var c=jQuery("<div id='myspace-melding'>Connectie met Myspace kwijt, gelieve terug in te loggen.<br> Klik hier om terug te verbinden:<a href=\""+ASL.config.loginURL+'oauth/myspace/login" onclick="ASL_myspace_login_button(); return false;"><img src="'+ASL.config.staticURL+'images/connect_buttons/myspace_connect.png" alt="" /></a></div>');$("#feed-login").append(c)}else{$("#myspace-melding").show()}}else{if($("#twitter-melding")){$("#twitter-melding").hide()}}if(f.network.netlog.link&&!f.network.netlog.connected){if($("#netlog-melding").length==0){var b=jQuery("<div id='netlog-melding'>Connectie met Netlog kwijt, gelieve terug in te loggen.<br> Klik hier om terug te verbinden:<a href=\""+ASL.config.loginURL+'oauth/netlog/login" onclick="ASL_netlog_login_button(); return false;"><img src="'+ASL.config.staticURL+'images/connect_buttons/netlog_connect.png" alt="" /></a></div>');$("#feed-login").append(b)}else{$("#netlog-melding").show()}}else{if($("#netlog-melding")){$("#netlog-melding").hide()}}tch=window.setTimeout("ASL_checkSession()",30000);if(typeof a=="function"){a.call(this)}}else{alert("Je sessie bij aslpage is vervallen, gelieve opnieuw in te loggen.");window.location=ASL.config.loginURL+"inloggen/?ref="+window.location.pathname}}else{tch=window.setTimeout("ASL_checkSession()",3000)}},error:function(){tch=window.setTimeout("ASL_checkSession()",3000)}})}function ASL_jumpAlbum(targ,selObj){var location="?album=";location=(selObj.options[selObj.selectedIndex].value==0)?"./":"./"+selObj.options[selObj.selectedIndex].value;eval(targ+".location='"+location+"'")}function ASL_admin_jumpAlbum(targ,selObj){var location="?album=";location=(selObj.options[selObj.selectedIndex].value==0)?"./":"./?album="+selObj.options[selObj.selectedIndex].value;eval(targ+".location='"+location+"'")}function ASL_add_foto_album(b){var a="";a=prompt("Geef een album naam:","Nieuw album");if(a!=null){$.ajax({type:"POST",url:"/ajax.php?module=foto&function=addAlbum",cache:false,data:"album="+escape(a),dataType:"json",success:function(c){if(c.resp=="OK"){$("select#foto_albums").addOption(c.album,true)}}})}return false}function ASL_Checklength(b,a){var c=document.getElementById(a);if(c.value.length<b){alert("Je moet minstens "+b+" tekens ingeven");return false}else{return true}}function ASL_add_video_album(b){var a="";a=prompt("Geef een album naam:","Nieuw album");if(a!=null){$.ajax({type:"POST",url:"/ajax.php?module=video&function=addAlbum",cache:false,data:"album="+escape(a),dataType:"json",success:function(c){if(c.resp=="OK"){$("select#video_albums").addOption(c.album,true)}}})}return false}function ASL_add_audio_album(b){var a="";a=prompt("Geef een album naam:","Nieuw album");if(a!=null){$.ajax({type:"POST",url:"/ajax.php?module=audio&function=addAlbum",cache:false,data:"album="+escape(a),dataType:"json",success:function(c){if(c.resp=="OK"){$("select#audio_albums").addOption(c.album,true)}}})}return false}function ASL_remove_foto_comment(b,a,c){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=foto&function=removecomment",cache:false,data:"msg_id="+b+"&profile_id="+a+"&foto_id="+c,dataType:"json",success:function(d){if(d.resp=="OK"){$("#comment-"+b).hide("slow")}}})}return false}function ASL_remove_video_comment(c,a,b){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=video&function=removecomment",cache:false,data:"msg_id="+c+"&profile_id="+a+"&video_id="+b,success:function(d){if(d=="OK"){$("div#comment-"+c).hide("slow")}}})}return false}function ASL_apps_comment_remove(b,a){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=apps&function=removecomment",cache:false,data:"msg_id="+b+"&app_id="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("#comment-"+b).hide("slow")}}})}return false}function ASL_msgbox_popup(){var a="/popups/msgbox";winpops=window.open(a,"msgbox","width=400,height=220,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0");if(window.focus){winpops.focus()}return false}function ASL_emoticons_popup(b){var a="/popups/emoticons?form="+b;winpops=window.open(a,"emoticons","width=660,height=500,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0");if(window.focus){winpops.focus()}return false}function ASL_news_popup(b){var a="/popups/nieuws/"+b;winpops=window.open(a,"nieuws","width=400,height=220,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0");if(window.focus){winpops.focus()}return false}function ASL_colorpicker_popup(){var a="/popups/colorpicker";winpops=window.open(a,"colorpicker","width=470,height=340,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0");return false}function ASL_popup_flyer(){var a="/popups/flyer";winpops=window.open(a,"flyer","width=400,height=220,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0");if(window.focus){winpops.focus()}return false}function ASL_update_flyer(a){$("div#flyer").html('<a href="http://thumbs.aslpagecdn.be/events/'+a+'" class="thickbox" title=""><img src="http://thumbs.aslpagecdn.be/eventthumbnail/'+a+'" alt="" /></a>');return}var lastid=0;function ASL_loadMsg(a){$.ajax({type:"GET",url:"/xml/msgbox.xml",cache:false,dataType:"xml",timeout:10000,success:function(b){if(a!=1){$("div#msgbox").html("")}var e=jQuery.makeArray($(b).find("message"));$("div#msgbox div.msg:hidden").remove();var c=0;var d=new Array();$(e).each(function(){var j=$(this).attr("msgid");d[c]=j;c++;var l=$(this).text();var o=$(this).attr("foto");var r=$(this).attr("username");var m=$(this).attr("timestamp");var h=$(this).attr("level");var p=$(this).attr("leeftijd");var n="";if($(this).attr("crew")!="-"){n=' - <a href="#" onclick="return CREW_delmsgboxmsg(\''+j+"');\">verwijder</a>"}var g=$("div#msgbox #"+j);var k=parseInt(j);if(g.length==0&&k>lastid){var q="";if(h>1){q="<font color='orange'><strong> (Crew)</strong></font>"}var f=jQuery('<div class="msg" id=\''+j+'\'><div class="msgphoto"><a href="/'+r+'"><img src="'+o+'" title="'+r+" "+p+'"></a></div><div class="msgcontent"><div class="msgtext"> '+l+'</div><div class="msginfo">gepost door <a href="/'+r+'">'+r+"</a>"+q+" - "+m+n+"</div></div></div>").hide();f.prependTo("div#msgbox");$("div#msgbox #"+j).show("slow");lastid=k}});$("div#msgbox").find("div.msg").each(function(){if(jQuery.inArray($(this).attr("id"),d)==-1){$(this).hide("slow")}})},complete:function(){window.setTimeout("ASL_loadMsg(1)",3000)}})}function ASL_video(c){var a={};var d={};var b={};a.showdigits="true";a.autostart="false";a.fullscreen="true";a.file="/getplaylist/"+c+".xml";d.allowfullscreen="true";d.allowscriptaccess="always";d.flashvars="adttext.config=http%3A%2F%2Fvads.theconnection.be%2Faslpage.xml&viral.functions=recommendations&viral.recommendations=/feeds/player/relatedvideos.xml?video="+c;swfobject.embedSWF("/swf/player.swf","videobox","560","427","9.0.0",false,a,d,b);return}function ASL_video_extern(c){var a={};var d={};var b={};a.fullscreen="true";a.color1="0x5d1719";a.color2="0xcd311b";d.allowfullscreen="true";d.allowscriptaccess="always";swfobject.embedSWF("/v/"+c,"videobox","560","340","9.0.0",false,a,d,b);return}function ASL_audio(b){var a={};var d={};var c={};a.showdigits="true";a.autostart="false";a.fullscreen="false";a.file="/getaudioplaylist/"+b+".xml";d.allowfullscreen="false";swfobject.embedSWF(ASL.config.staticURL+"/swf/player-4.6.swf","audiobox","400","225","9.0.0",false,a,d,c);return}function ASL_blog_remove_admin(a,b){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=blog&function=removeblog",cache:false,data:"profile_id="+a+"&blog_id="+b,success:function(c){if(c=="OK"){$("li#blog-"+b).hide("slow")}}})}return false}function ASL_blog_remove(a,b){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=blog&function=removeblog",cache:false,data:"profile_id="+a+"&blog_id="+b,success:function(c){if(c=="OK"){$("#blog-"+b).hide("slow");$("#blog-reactieform-"+b).hide("slow")}}})}return false}function ASL_blog_remove_comment(c,a,b){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=blog&function=removecomment",cache:false,data:"comment_id="+c+"&profile_id="+a+"&blog_id="+b,success:function(d){if(d=="OK"){$("div#comment-"+c).hide("slow")}}})}return false}function ASL_add_video_comment(e){var f=e.asl_reactie.value;var b=e.video_id.value;var a=e.video_userid.value;if(f!=""){var c=e.elements.submit;var d=$(c).attr("value");$.ajax({beforeSend:function(){$(c).attr("value","Aan het posten..");$(c).attr("disabled","true");e.elements.asl_reactie.disabled=true},type:"POST",url:"/ajax.php?module=video&function=addcomment",cache:false,data:"video_userid="+a+"&video_id="+b+"&comment="+escape(f),dataType:"json",success:function(h){if(h.resp=="OK"){var k=h.comment;var j=jQuery(k).hide();var g=h.comment_id;j.prependTo("div.video div.reactie");$("div.video div.reactie #comment-"+g).show("slow");e.asl_reactie.value=""}},complete:function(){$(c).attr("value",d);$(c).removeAttr("disabled");e.elements.asl_reactie.disabled=false}})}return false}function ASL_add_blog_comment(d){var e=d.asl_reactie.value;var a=d.blog_id.value;var f=d.blog_userid.value;if(e!=""){var b=d.elements.submit;var c=$(b).attr("value");$.ajax({beforeSend:function(){$(b).attr("value","Aan het posten..");$(b).attr("disabled","true");d.elements.asl_reactie.disabled=true},type:"POST",url:"/ajax.php?module=blog&function=addcomment",cache:false,data:"blog_id="+a+"&profile_id="+f+"&comment="+escape(e),dataType:"json",success:function(h){if(h.resp=="OK"){var k=h.comment;var j=jQuery(k).hide();var g=h.comment_id;j.prependTo("div#blog-reactie-"+a);$("div#blog-reactie-"+a+" div#comment-"+g).show("slow",function(){$(this).css({display:"list-item"})});d.asl_reactie.value="";ASL_blog_show_comment_form(a)}},complete:function(){$(b).attr("value",c);$(b).removeAttr("disabled");d.elements.asl_reactie.disabled=false}})}return false}function ASL_add_audio_comment(e){var f=e.asl_reactie.value;var a=e.audio_id.value;var d=e.audio_userid.value;if(f!=""){var b=e.elements.submit;var c=$(b).attr("value");$.ajax({beforeSend:function(){$(b).attr("value","Aan het posten..");$(b).attr("disabled","true");e.elements.asl_reactie.disabled=true},type:"POST",url:"/ajax.php?module=audio&function=addcomment",cache:false,data:"audio_userid="+d+"&audio_id="+a+"&comment="+escape(f),dataType:"json",success:function(h){if(h.resp=="OK"){var k=h.comment;var j=jQuery(k).hide();var g=h.comment_id;j.prependTo("div.audio div.reactie");$("div.reactie #comment-"+g).show("slow");e.asl_reactie.value=""}},complete:function(){$(b).attr("value",c);$(b).removeAttr("disabled");e.elements.asl_reactie.disabled=false}})}return false}function ASL_apps_comment_add(d){var e=d.asl_reactie.value;var a=d.app_id.value;if(e!=""){var b=d.elements.submit;var c=$(b).attr("value");$.ajax({beforeSend:function(){$(b).attr("value","Aan het posten..");$(b).attr("disabled","true");d.elements.asl_reactie.disabled=true},type:"POST",url:"/ajax.php?module=apps&function=addcomment",cache:false,data:"&app_id="+a+"&comment="+escape(e),dataType:"json",success:function(g){if(g.resp=="OK"){var j=g.comment;var h=jQuery(j).hide();var f=g.comment_id;h.prependTo("div.reactie");$("div.reactie #comment-"+f).show("slow");d.asl_reactie.value=""}},complete:function(){$(b).attr("value",c);$(b).removeAttr("disabled");d.elements.asl_reactie.disabled=false}})}return false}function ASL_blog_show_comment_form(a){$("div#blog-reactieform-"+a).toggle();return false}function ASL_TWITTER_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=twitter&function=getFriends",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();document.getElementById("searchresult").innerHTML=a.html}}});return false}function ASL_NETLOG_inviteFriend(b){var a=new Array();for(i=0;i<b.length;i++){if(b[i].checked){a.push(b[i].value)}}$.ajax({type:"GET",url:"/ajax.php?module=netlog&function=sendMessage&userids="+a+"&title=titel&body=bericht",cache:false,dataType:"json",success:function(c){$("#searchresult").html(c.html)}})}function ASL_NETLOG_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=netlog&function=getFriends",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();$("#searchresult").html(a.html)}}});return false}function ASL_GMail_Invite(c,b,a){$.ajax({type:"GET",url:"/ajax.php?module=gmail&function=inviteFriend&from="+b+"&to="+a,cache:false,dataType:"json",success:function(d){if(d.resp=="OK"){c.style.visibility="hidden"}}});return false}function ASL_GMAIL_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=gmail&function=getFriends",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();$("#searchresult").html(a.html)}}});return false}function ASL_MYSPACE_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=myspace&function=getFriends",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();$("#searchresult").html(a.html)}}});return false}function ASL_MSN_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=search&function=msnform",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();$("#searchresult").html(a.html)}}});return false}function ASL_EMAIL_searchASLFriends(){$.ajax({type:"GET",url:"/ajax.php?module=search&function=emailform",cache:false,dataType:"json",beforeSend:function(){$("#searchresult").html("");$("#searchfriendsbyfb .friend_search_loading").show()},success:function(a){if(a.resp=="OK"){$("#searchfriendsbyfb .friend_search_loading").hide();$("#searchresult").html(a.html)}}});return false}function ASL_add_friend(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=addfriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("li#isFriend").html('<a href="#" class="vriend-verwijderen" onclick="return ASL_remove_friend('+a+","+b+');">Verwijder uit vriendenlijst</a>');$("li#isFriend").show();$("div#ok").html("Vriendje toegevoegd!");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("li#isBlocked").hide()}}});return false}function ASL_add_friend_inuserlist(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=addfriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("#userlist-"+b+" .userlist-action").html('<a href="./?remove=friend&amp;userid={$smarty.session.userid}&amp;friendsid={$userlist[profile].userid}" onclick="ASL_remove_friend_inuserlist(\''+a+"','"+b+'\'); return false;" class="verwijder">Verwijder</a>');$("div#ok").html("Vriend toegevoegd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_add_friend_network(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=addfriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("#userlist-"+b+" .userlist-network-button").html('<a href="./?remove=friend&amp;userid='+a+"&amp;friendsid="+b+'" onclick="ASL_remove_friend_network(\''+a+"','"+b+'\'); return false;" class="verwijder">Verwijder</a>');$("#userlist-"+b).addClass("userlist-network-disabled");$("div#ok").html("Vriend toegevoegd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_remove_friend(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=removefriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("li#isFriend").html('<a href="#" class="vriend-toevoegen" onclick="return ASL_add_friend('+a+","+b+');">Voeg toe aan vrienden</a>');$("li#isFriend").show();$("div#ok").html("Vriendje verwijderd!");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("li#isBlocked").show()}}});return false}function ASL_remove_friend_inuserlist(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=removefriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("#userlist-"+b+" .userlist-action").html('<a href="./?add=friend&amp;userid={$smarty.session.userid}&amp;friendsid={$userlist[profile].userid}" onclick="ASL_add_friend_inuserlist(\''+a+"','"+b+'\'); return false;" class="toevoegen">Toevoegen</a>');$("div#ok").html("Vriendje verwijderd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_remove_friend_network(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=removefriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",beforeSend:function(){$("li#isFriend").hide()},success:function(c){if(c.resp=="OK"){$("#userlist-"+b+" .userlist-network-button").html('<a href="./?add=friend&amp;userid='+a+"&amp;friendsid="+b+'" onclick="ASL_add_friend_network(\''+a+"','"+b+'\'); return false;" class="toevoegen"><span>Toevoegen</span></a>');$("#userlist-"+b).removeClass("userlist-network-disabled");$("div#ok").html("Vriendje verwijderd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_remove_groep(a){if(confirm("Deze groep definitief verwijderen?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=removeGroep",cache:false,data:"groepid="+a,dataType:"json",success:function(b){if(b.resp=="OK"){$("div#ok").html("Deze groep is verwijderd.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#removable_groepen div#groep_"+a).hide("slow")}}})}return false}function ASL_subscr_groep(a,b){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=subscribeGroep",cache:false,data:"userid="+a+"&groepid="+b,dataType:"json",success:function(c){if(c.resp=="OK"){$("li#isGroep").html('<a href="#" class="vriend-verwijderen" onclick="return ASL_remove_groep('+a+","+b+');">Deze groep verlaten</a>');$("div#ok").html("Je bent nu lid van deze groep! Voor sommige groepen dient lidmaatschap wel goedgekeurd te worden.");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_unsubscr_groep(b,a){if(confirm("Deze groep verlaten?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=unsubscribeGroep",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("li#isGroep").html('<a href="#" class="lid-worden" onclick="return ASL_subscr_groep('+a+","+b+');">Wordt lid van deze groep</a>');$("div#ok").html("Je bent geen lid van deze groep meer!");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#groepen_user div#groep_"+b).hide("slow")}}})}return false}function ASL_confirmsubscr_groep(b,a){if(confirm("Lidmaatschap goedkeuren?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=confirmSubscrGroep",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#ok").html("Lidmaatschap goedgekeurd.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#userlist_unconfirmed div#user_"+a).hide("slow")}}})}return false}function ASL_denysubscr_groep(b,a){if(confirm("Lidmaatschap weigeren?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=denySubscrGroep",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#ok").html("Lidmaatschap geweigerd.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#userlist_unconfirmed div#user_"+a).hide("slow")}}})}return false}function ASL_removeban_groep(b,a){if(confirm("Lidmaatschap toestaan?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=removeBanGroep",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#ok").html("Lidmaatschap toegestaan.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$data=$("div#userlist_banned div#user_"+a);$data.hide("slow")}}})}return false}function ASL_makeadmin_groep(b,a){if(confirm("Admin maken?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=makeUserAdmin",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#ok").html("User is admin.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#userlist_leden div#user_"+a+" div.userlist-action").html('<a href="#" class="makeadmin" onclick="return ASL_undoadmin_groep('+b+","+a+');">verwijder adminrechten</a> - <a href="#" class="ban" onclick="return ASL_denysubscr_groep('+b+","+a+');">Ban deze user</a>')}}})}return false}function ASL_undoadmin_groep(b,a){if(confirm("Deze user adminrechten afnemen?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=undoUserAdmin",cache:false,data:"groepid="+b+"&userid="+a,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#ok").html("User is geen admin meer.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#userlist_leden div#user_"+a+" div.userlist-action").html('<a href="#" class="makeadmin" onclick="return ASL_makeadmin_groep('+b+","+a+');">maak deze user admin</a> - <a href="#" class="ban" onclick="return ASL_denysubscr_groep('+b+","+a+');">Ban deze user</a>')}}})}return false}function ASL_removeMedia_groep(a,c,b){if(confirm("Deze "+a+" uit deze groep verwijderen?")){$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=removeMedia",cache:false,data:"type="+a+"&groepid="+c+"&mediaid="+b,dataType:"json",success:function(d){if(d.resp=="OK"){$("div#ok").html(a+" is verwijderd.");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("div#"+a+"list div#"+a+"_"+b).hide()}}})}return false}function ASL_block_friend(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=blockfriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",success:function(c){if(c.resp=="OK"){$("li#isBlocked").html('<a href="#" class="vijand-verwijderen" onclick="return ASL_unblock_friend('+a+","+b+');">Verwijder van vijanden</a>');$("div#ok").html("Deze persoon is bij deze geblokkeerd van je profiel!");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("li#isFriend").hide()}}});return false}function ASL_unblock_friend(a,b){$.ajax({type:"POST",url:"/ajax.php?module=friends&function=unblockfriend",cache:false,data:"profile_id="+a+"&friendid="+b,dataType:"json",success:function(c){if(c.resp=="OK"){$("li#isBlocked").html('<a href="#" class="vijand-verwijderen" onclick="return ASL_block_friend('+a+","+b+');">Voeg toe aan vijanden</a>');$("div#ok").html("Deze persoon is bij deze gedeblokkeerd!");$("div#top-message div#ok").show();$("div#top-message").show("slow");$("li#isFriend").show()}}});return false}function ASL_guestbook_remove(a,b){doyou=confirm("Weet u zeker dat u het bericht wilt verwijderen?");if(doyou==true){$.ajax({type:"POST",url:"/ajax.php?module=guestbook&function=removemessage",cache:false,data:"profile_id="+a+"&gbid="+b,dataType:"json",success:function(c){if(c.resp=="OK"){$("div#msgid-"+b).hide("slow")}}})}return false}function ASL_BB_insertAtCursor(d,c){var d=d;var c=c;if(document.selection){d.focus();sel=document.selection.createRange();sel.text=c}else{if(d.selectionStart||d.selectionStart=="0"){var b=d.selectionStart;var a=d.selectionEnd;d.value=d.value.substring(0,b)+c+d.value.substring(a,d.value.length)}else{d.value+=c}}}function ASL_add_gb_message(a){if(a.asl_bericht.value==""){alert("Gelieve een bericht in te typen.");return false}return true}function ASL_subscribe_event(a){var a=a;$.ajax({type:"POST",url:"/ajax.php?module=events&function=subscribe",cache:false,data:"eventid="+a,dataType:"json",success:function(b){if(b.resp=="OK"){$("span#event-inschrijven-"+a).html('<a href="#" class="main-action-minus" style="padding-left: 18px" onclick="return ASL_unsubscribe_event('+a+')">mij uitschrijven voor dit event</a>')}}});return false}function ASL_unsubscribe_event(a){var a=a;$.ajax({type:"POST",url:"/ajax.php?module=events&function=unsubscribe",cache:false,data:"eventid="+a,dataType:"json",success:function(b){if(b.resp=="OK"){$("span#event-inschrijven-"+a).html('<a href="#" class="main-action-plus" style="padding-left: 18px" onclick="return ASL_subscribe_event('+a+')"><strong> inschrijven voor dit event</strong></a>')}}});return false}function ASL_event_getDay(a){$.ajax({type:"GET",url:"/ajax.php?module=events&function=getDay&date="+a,cache:false,dataType:"json",success:function(b){if(b.resp=="OK"){$("#maincontent").html(b.html)}}})}function ASL_preview_blog(a,b){$.ajax({type:"GET",url:"/ajax.php?module=blog&function=getblogmessage&profile_id="+a+"&blog_id="+b,dataType:"json",beforeSend:function(){$("div#blogbox").hide()},success:function(c){$("div#blogbox div.blog-preview-title").html(c.title);$("div#blogbox div.blog-preview-message").html(c.bericht);$("div#blogbox div.blog-preview-info").html('geschreven door <a href="/'+c.username+'">'+c.username+"</a> op "+c.date)},complete:function(){$("div#blogbox").show("slow")}});return false}function ASL_changeBg(a){var a=a;var c="";var b="aslpage-logo-rood-grijs.png";if(a==1){theme="white"}if(a==2){theme=""}if(a==3){theme=""}if(a==5){theme="white";b="aslpage-logo-oud.png"}$("link[@rel*=style][title]").each(function(d){if(this.getAttribute("title")!=""){this.disabled=true}if(this.getAttribute("title")==theme){this.disabled=false}});if(b!=""){b=ASL.config.staticURL+"images/design/"+b;if($("#aslpage-logo").attr("src")!=b){$("#aslpage-logo").attr("src",b)}}$.cookie("theme",a,{expires:90,path:"/",domain:".aslpage.be"});return false}function ASL_checkAll(a){if(a[0].checked==false){for(i=0;i<a.length;i++){a[i].checked=true}}else{for(i=0;i<a.length;i++){a[i].checked=false}}}function ASL_msn_checkAll(b){var a="form#"+b+" INPUT[type='checkbox']";if($(a).attr("checked")==true){$(a).attr("checked",false)}else{$(a).attr("checked",true)}}function ASL_groepen_checkUrl(){var b=document.groep_form;var c=b.elements.asl_groep_url.value;var a=b.elements.asl_groep_checkurl;$.ajax({type:"POST",url:"/ajax.php?module=groepen&function=check_url",cache:false,data:"url="+c,dataType:"json",beforeSend:function(){$(a).attr("disabled","true")},success:function(d){if(d.resp!="OK"){alert(d.ERRORMSG)}},complete:function(){$(a).removeAttr("disabled");alert("Deze url is nog beschikbaar.")}});return false}function ASL_admin_prof_background(d){var b=document.skin_aanpassen;var a=d.value;var c=b.elements.background_image;if(a==0){$(c).removeAttr("disabled")}else{$(c).attr("disabled","true")}return}function ASL_confirm_remove_account(a){if(a.profiel_verwijderen_keuze[0].checked==true){doyou=confirm("Weet u zeker dat u uw account wilt verwijderen?");return doyou}return false}function ASL_search_friend_form(a){return ASL_search_friend_msn_form(a)}function ASL_search_friend_msn_form(a){ASL_search_msn_friends_form(a)}function ASL_search_msn_friends_form(d){$("#top-message").hide();$("#ok").hide();$("#error").hide();var c=d.elements.zoekmsn;var b=d.elements.messenger_email;var a=d.elements.messenger_password;$.ajax({type:"POST",url:"/ajax.php?module=search&function=msn",cache:false,data:"action=search&email="+b.value+"&password="+a.value,dataType:"json",beforeSend:function(){$("#searchfriendsbymsn .friend_search_loading").show();$(c).attr("disabled","true");$(b).attr("disabled","true");$(a).attr("disabled","true")},success:function(e){if(e.resp=="OK"){$("#searchresult").html(e.html)}else{$("#searchfriendsbymsn .friend_search_loading").hide();$(c).removeAttr("disabled");$(b).removeAttr("disabled");$(a).removeAttr("disabled");if(e.ERRORMSG!="undefined"){alert(e.ERRORMSG)}else{alert("Oeps, iets fout gelopen, probeer opnieuw.")}}},error:function(){$("#searchfriendsbymsn .friend_search_loading").hide();$(c).removeAttr("disabled");$(b).removeAttr("disabled");$(a).removeAttr("disabled");alert("Oeps, iets fout gelopen, probeer opnieuw.")}});return false}function ASL_search_friend_email_form(c){$("#top-message").hide();$("#ok").hide();$("#error").hide();var b=c.elements.zoekmsn;var a=c.elements.friend_email;$.ajax({type:"POST",url:"/ajax.php?module=search&function=email",cache:false,data:"action=search&email="+escape(a.value),dataType:"json",beforeSend:function(){$("#searchfriendsbymail .friend_search_loading").show();$(b).attr("disabled","true");$(a).attr("disabled","true")},success:function(d){if(d.resp=="OK"){$("#searchresult").html(d.html)}else{$("#searchfriendsbymail .friend_search_loading").hide();$(b).removeAttr("disabled");$(a).removeAttr("disabled");$(password).removeAttr("disabled");if(d.ERRORMSG!="undefined"){alert(d.ERRORMSG)}else{alert("Oeps, iets fout gelopen, probeer opnieuw.")}}},error:function(){$("#searchfriendsbymail .friend_search_loading").hide();$(b).removeAttr("disabled");$(a).removeAttr("disabled");alert("Oeps, iets fout gelopen, probeer opnieuw.")}});return false}function ASL_search_friend_add(b){$("#top-message").hide();$("#ok").hide();$("#error").hide();var a=b.elements.addfriends;var c="";$("input[@type='checkbox'][@name='addfriend[]']").each(function(){if(this.checked){c+="&addfriend[]="+this.value}});$.ajax({type:"POST",url:"/ajax.php?module=search&function=friend",cache:false,data:"action=addfriends"+c,dataType:"json",beforeSend:function(){$(".friend_search_loading").show();$(a).attr("disabled","true")},success:function(d){if(d.resp=="OK"){$("#searchfriends").html(d.html);if(d.OKMSG!=""){$("#ok").html(d.OKMSG);$("#ok").show("slow");$("#top-message").show()}else{if(d.ERRORMSG!=""){$("#error").html(d.ERRORMSG);$("#error").show("slow");$("#top-message").show()}}}else{$(".friend_search_loading").hide();$(a).removeAttr("disabled");if(d.ERRORMSG!="undefined"){alert(d.ERRORMSG)}else{alert("Oeps, iets fout gelopen, probeer opnieuw.")}}},error:function(){$(".friend_search_loading").hide();$(a).removeAttr("disabled");alert("Oeps, iets fout gelopen, probeer opnieuw.")}})}function ASL_search_friend_invite(c){$("#top-message").hide();$("#ok").hide();$("#error").hide();var a=c.elements.invitefriends;var b="";$("input[@type='checkbox'][@name='invitefriend[]']").each(function(){if(this.checked){b+="&invitefriend[]="+this.value}});$.ajax({type:"POST",url:"/ajax.php?module=search&function=friend",cache:false,data:"action=invitefriends"+b,dataType:"json",beforeSend:function(){$(".friend_search_loading").show();$(a).attr("disabled","true")},success:function(d){if(d.resp=="OK"){window.location.href="/administratie/vrienden/wie-wil-ik/"}else{$(".friend_search_loading").hide();$(a).removeAttr("disabled");if(d.ERRORMSG!="undefined"){alert(d.ERRORMSG)}else{alert("Oeps, iets fout gelopen, probeer opnieuw.")}}},error:function(){$(".friend_search_loading").hide();$(a).removeAttr("disabled");alert("Oeps, iets fout gelopen, probeer opnieuw.")}})}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d,c){if(c==null){c=0}else{if(c<0){c=Math.max(0,this.length+c)}}for(var b=c,a=this.length;b<a;b++){if(this[b]===d){return b}}return -1}}var uploading=false;var colorSwitchThreshold=50;function attachUploadHandlers(){$("#upload_form").submit(beginUpload);if($.browser.msie){$("#upload_iframe").bind("readystatechange",completeUpload)}else{$("#upload_iframe").bind("load",completeUpload)}}function updateProgressBarGUI(a){$(".progress-bar .progress-bar-bg").width(a+"%");$(".progress-bar .progress-bar-text").text(a+"%");if(a>colorSwitchThreshold){if(!$(".progress-bar .progress-bar-text").is(".progress-50-percent")){$(".progress-bar .progress-bar-text").addClass("progress-50-percent")}}else{if(a==0){$(".progress-bar .progress-bar-text").removeClass("progress-50-percent")}}}function beginUpload(){if(checkAllowFileExtensions()){return false}$("#upload_button").attr("disabled","true");uploading=true;$("div.progress-bar").show();updateProgressBarGUI(0);getUploadProgress();return true}function stopUpload(){uploading=false;try{window.stop()}catch(a){try{document.execCommand("Stop")}catch(a){}}}function completeUpload(a){if(uploading&&(a.type&&(a.type=="load"||a.type=="readystatechange"))){uploading=false;updateProgressBarGUI(100);window.setTimeout(uploadDone,1000)}}function uploadDone(){var a=$("#UPLOAD_IDENTIFIER").val();parent.location="./?ok="+a}function getUploadProgress(){var b=$("#UPLOAD_IDENTIFIER").val();var a=new Date().getTime();$.ajax({type:"POST",url:"/ajax.php?module=upload&function=getprogress",data:"id="+b,cache:false,dataType:"json",success:updateProgressBar,complete:function(){if(uploading){window.setTimeout(getUploadProgress,500)}}})}function updateProgressBar(c){if(c!=null){if(c.errorCode==0){var f=$(".progress-bar .progress-bar-text");var b=$(".progress-bar .progress-bar-bg");var d=parseInt(c.progressData.bytes_uploaded);var e=parseInt(c.progressData.bytes_total);var a=parseInt((d/e)*100);updateProgressBarGUI(a)}}}function checkAllowFileExtensions(){if(allow_extensions=="undefined"||allow_extensions==""){return false}if(inputfiletype=="undefined"||inputfiletype==""){return true}theform=document.getElementById("upload_form");if(theform.elements[inputfiletype].value!=""){if(!theform.elements[inputfiletype].value.match(allow_extensions)){var a=theform.elements[inputfiletype].value;var c=a.lastIndexOf("\\");if(c<1){c=a.lastIndexOf("/")}var d=a.slice(c+1,a.length);var b=d.slice(d.indexOf(".")).toLowerCase();alert('Sorry, een bestand met "'+b+'" als extentie is niet toegelaten.');return true}}return false}$(document).ready(attachUploadHandlers);function ASL_App_Add(a){$.ajax({type:"POST",url:"/ajax.php?module=apps&function=adduser",cache:false,data:"app_id="+a,dataType:"json",success:function(b){if(b.resp=="OK"){$("li#hasApp").html('<a href="/apps/'+b.local_url+'/verwijderapp" class="main-action-cross" onclick="return ASL_App_Remove('+a+');">Verwijder van mijn applicaties</a>');$("div#ok").html("Applicatie toegevoegd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}function ASL_App_Remove(a){$.ajax({type:"POST",url:"/ajax.php?module=apps&function=removeuser",cache:false,data:"app_id="+a,dataType:"json",success:function(b){if(b.resp=="OK"){$("li#hasApp").html('<a href="/apps/'+b.local_url+'/voegapptoe" class="main-action-plus" onclick="return ASL_App_Add('+a+');">Voeg toe aan mijn applicaties</a>');$("div#ok").html("Applicatie uit je lijst verwijderd!");$("div#top-message div#ok").show();$("div#top-message").show("slow")}}});return false}var dash_init=true;function ASL_dashboard(){$.ajax({type:"GET",url:"/ajax.php?module=homepage&function=getdash",cache:false,dataType:"json",error:function(){window.setTimeout("ASL_dashboard()",3000)},beforeSend:function(){if(dash_init){dash_init=false;$("#dashboard div.loader").show()}},success:function(a){if(a!=null){if(a.resp=="OK"){$("#dash-visitors").html(a.dash.visitors);$("#dash-unread").html(a.dash.unread);$("#dash-friends-online").html(a.dash.friends.online);$("#dash-friends-new").html(a.dash.friends.newfriends);$("#dash-friends-bday").html(a.dash.friends.friendsbday);$("#dashboard ul").show();$("#dashboard div.loader").hide()}}window.setTimeout("ASL_dashboard()",30000)}})}function ASL_oauth_googleFriendConnect(){}function ASL_twitter_login_button(){$.ajax({type:"GET",url:"/ajax.php?module=twitter&function=getLoginUrl",cache:false,dataType:"json",success:function(a){if(a.resp=="OK"){window.location=a.url}}});return false}function ASL_facebook_login_button(){return ASL_FB.loginButton()}function ASL_netlog_login_button(){$.ajax({type:"GET",url:"/ajax.php?module=netlog&function=getLoginUrl",cache:false,dataType:"json",success:function(a){if(a.resp=="OK"){window.location=a.url}}});return false}function ASL_myspace_login_button(){$.ajax({type:"GET",url:"/ajax.php?module=myspace&function=getLoginUrl",cache:false,dataType:"json",success:function(a){if(a.resp=="OK"){window.location=a.url}}});return false}function redirect(a){window.location=a}function getQueryVariable(a){var c=window.location.search.substring(1);var d=c.split("&");for(var b=0;b<d.length;b++){var e=d[b].split("=");if(e[0]==a){return e[1]}}return false}function sleep(a){var b=new Date().getTime();while(new Date().getTime()<b+a){}}function rhtmlspecialchars(a){if(typeof(a)=="string"){a=a.replace(/&gt;/ig,">");a=a.replace(/&lt;/ig,"<");a=a.replace(/&#039;/g,"'");a=a.replace(/&quot;/ig,'"');a=a.replace(/&amp;/ig,"&")}return a}function htmlspecialchars(a){return a}function shareMyspace(c,d,b,a){var e="http://www.myspace.com/index.cfm?fuseaction=postto&t="+encodeURIComponent(c)+"&c="+encodeURIComponent(d)+"&u="+encodeURIComponent(b)+"&l="+encodeURIComponent(a);window.open(urlout(e))}function urlout(a){a="/link/url/?url="+encodeURIComponent(a);return a}function clickable(c){if(c==""||c=="undefined"){return c}var b=/<a\s.*href=['"](\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])['"].*>.*<\/a>/ig;var d=c.replace(b,"$1");b=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;var a=d.replace(b,"<a href='/link/url/?url=$1' target='_blank'>$1</a>");return a}function ASL_apps_profilebadge_app(a){$.ajax({type:"GET",url:"/ajax.php?module=apps&function=getApp&app="+encodeURIComponent(a),cache:false,dataType:"json",beforeSend:function(){$("#profile_"+a+" #"+a).html('<div class="loader" style="display: block;"></div>')},success:function(c){if(c!=""){if(c.resp=="OK"){var d=c.app;var b="";b+='<div id="widget_'+d.id+'" class="widget_profile"></div>';b+='<input type="hidden" id="ticket_'+d.id+'" value="'+d.token+'" />';$("#profile_"+a+" #profile_title_"+a).html(d.title);$("#profile_"+a+" #"+a).html(b);gadget=gadgets.container.createGadget({cache:0,debug:false,specUrl:d.url,appname:d.local_url,showtitle:true,id:d.id,view:"profile",height:"400",width:"310",sandbox:false,viewParams:""});gadgets.container.addGadget(gadget);gadget.render(document.getElementById("widget_"+d.id))}}}})}function ASL_apps_profilebadge_foto(a){$.ajax({type:"GET",url:"/ajax.php?module=foto&function=getFoto&foto="+encodeURIComponent(a),cache:false,dataType:"json",beforeSend:function(){$("#profile_"+a+" #"+a).html('<div class="loader" style="display: block;"></div>')},success:function(c){if(c!=""){if(c.resp=="OK"){var d=c.foto;var b="";b+='<a href="/profiel/zoom/'+d.user_id+"/"+d.id+'/"><img src="'+d.zoom_url+'" style="max-width: 310px;" alt="" /></a>';$("#profile_"+a+" #"+a).html(b)}}}})}function ASL_foto_getComments(b,a){var a=a;if(a==null){a=1}$.ajax({type:"GET",url:"/ajax.php?module=foto&function=getComments&foto_id="+b+"&page="+a,cache:false,dataType:"json",beforeSend:function(){$("#comments").html('<div class="loader" style="display: block;"></div>')},success:function(d){if(d!=""){if(d.resp=="OK"){var c="";var e=jQuery.makeArray(d.comments);$(e).each(function(){c+='<div class="entry" id="comment-'+this.comment_id+'">';c+='<div class="poster">';c+='<a href="/'+this.poster_username+'"><img src="'+ASL.config.miniThumbURL;if(this.poster_foto!=""){c+=this.poster_foto}else{c+="nopicture.jpg"}c+='" alt="" title="'+this.poster_username+'" style="margin: 5px;" /></a><br/>';c+="</div>";c+='<div class="message">';c+='<a href="/'+this.poster_username+'">'+this.poster_username+"</a> zegt: <p>"+this.comment+"</p>";c+="</div>";c+='<div class="remove">';if(this.user_id==d.session.userid){c+='<a href="#" OnClick="return ASL_remove_foto_comment(\''+this.comment_id+"','"+this.user_id+"','"+b+'\');"><img src="'+ASL.config.staticURL+'images/profiel/trash.gif" border="0" alt="Verwijder Bericht" title="Verwijder Bericht"></a>'}c+="</div>";c+="</div>"});$("#comments").html(c)}}},error:function(){window.setTimeout("ASL_foto_getComments("+b+","+a+")",3000)}})}function ASL_add_foto_comment(a){return ASL_foto_addComment(a)}function ASL_foto_addComment(c){var f=c.asl_reactie.value;var e=c.foto_id.value;var d=c.foto_userid.value;if(f!=""){var a=c.elements.submit;var b=$(a).attr("value");$.ajax({beforeSend:function(){$(a).attr("value","Aan het posten..");$(a).attr("disabled","true");c.elements.asl_reactie.disabled=true},type:"POST",url:"/ajax.php?module=foto&function=addcomment",cache:false,data:"foto_userid="+d+"&foto_id="+e+"&comment="+escape(f),dataType:"json",success:function(g){if(g.resp=="OK"){comment_id=g.comment.comment_id;html="";html+='<div class="entry" id="comment-'+g.comment.comment_id+'">';html+='<div class="poster">';html+='<a href="/'+g.comment.poster_username+'"><img src="'+ASL.config.miniThumbURL;if(g.comment.poster_foto!=""){html+=g.comment.poster_foto}else{html+="nopicture.jpg"}html+='" alt="" title="'+g.comment.poster_username+'" style="margin: 5px;" /></a><br/>';html+="</div>";html+='<div class="message">';html+='<a href="/'+g.comment.poster_username+'">'+g.comment.poster_username+"</a> zegt: <p>"+g.comment.comment+"</p>";html+="</div>";html+='<div class="remove">';if(g.comment.user_id==g.session.userid){html+='<a href="#" OnClick="return ASL_remove_foto_comment(\''+g.comment.comment_id+"','"+g.comment.user_id+"','"+e+'\');"><img src="'+ASL.config.staticURL+'images/profiel/trash.gif" border="0" alt="Verwijder Bericht" title="Verwijder Bericht"></a>'}html+="</div>";html+="</div>";html=jQuery(html);html.prependTo("div.foto div.reactie");$("div.foto div.reactie #comment-"+comment_id).show("slow");c.asl_reactie.value=""}},complete:function(){$(a).attr("value",b);$(a).removeAttr("disabled");c.elements.asl_reactie.disabled=false}})}return false};
