var TYPE_WALL=201;var nMultimediaFormat=1;var TYPE_BLOG=63;var sSubscriberTemplate='';var nBlogPublishReload=1;function load(sTab){if(sTab=='LATESTBLOG'){location.href='/blog/'+sUUsername+'/';}else if(sTab=='FEEDBACK'){}else if(sTab=='SUBSCRIBERS'){blog_subscribers(1);}else if(sTab=='BLOGROLL'){blog_roll(1);}else if(sTab=='EDIT'){}else if(sTab=='FEEDBACK'){};};function blog_subscribers(nPos){if(nPos==1) aPos[1]=1;else if(nPos==undefined) nPos=aPos[1];if(sSubscriberTemplate=='')sSubscriberTemplate=$('#idSubscriberTemplate').html();AJAX('op=profilenetwork_fetch&sAuthKey='+sAuthKey+'&nUUID='+nUUID+'&sUUsername='+sUUsername+'&sNetworkType=BLOGSUBSCRIBERS&nPos='+nPos+'&nPerPage='+nPerPage+'&sTemplate='+escape(sSubscriberTemplate),'blog_subscribers_result');};function blog_subscribers_result(nResult,sResponse){if(nResult!=-1){$('#idSubscriberList').html(sResponse!=''?unescape(sResponse):'None..').show();};};function blog_roll(nPos){if(nPos==1) aPos[1]=1;else if(nPos==undefined) nPos=aPos[1];if(sSubscriberTemplate=='')sSubscriberTemplate=$('#idSubscriberTemplate').html();AJAX('op=profilenetwork_fetch&sAuthKey='+sAuthKey+'&nUUID='+nUUID+'&sUUsername='+sUUsername+'&sNetworkType=BLOGROLL&nPos='+nPos+'&nPerPage='+nPerPage+'&sTemplate='+escape(sSubscriberTemplate),'blog_roll_result');};function blog_roll_result(nResult,sResponse){if(nResult!=-1){$('#idBlogRollList').html(sResponse!=''?unescape(sResponse):'None..').show();};};function blog_permalink(sURL){if(prompt('You can link directly to this blog-posting with this URL:'+"\n"+'(Click OK to reload webpage to the permalink and cancel to return.)','http://'+sURL)){location.href='http://'+sURL;};};function blog_edit(nCID){AJAX('op=post_edit&sAuthKey='+sAuthKey+'&nCOID='+nUUID+'&nCType='+TYPE_BLOG+'&nCID='+nCID,'blog_edit_result');};function blog_edit_result(nResult,sResponse){if(nResult!=-1){nCReplyCID=nResult;aResponse=sResponse.split('|');nActiveBlogCID=nResult;$('#idBlogPostTitle').val(unescape(aResponse[0]));$('#idBlogPostBody').val(unescape(aResponse[1]));$('#idBlogTags').val(unescape(aResponse[2]));if($('#idBlogTags').val()!=''){$('#idPostTags').show();$('#idPostTagsShow').hide();}else{$('#idPostTags').hide();$('#idPostTagsShow').show();};try{$('#idBlogPostBody').focus();htmleditor_resize('idBlogPostBody');htmleditor_settext('idBlogPostBody',unescape(aResponse[1]));}catch(e){} $('#idEditTab').click();}else{alert('Sorry, unable to retrieve that blog-post to edit.');};};function blog_archive_posts(sDiv){$('#'+sDiv).toggle(400);};function blog_attachmentformat(){if(nMultimediaFormat==1)nMultimediaFormat=2;else nMultimediaFormat=1;if(nMultimediaFormat==1)$('#idPostAttachmentFormat').html('Thumbnails');if(nMultimediaFormat==2)$('#idPostAttachmentFormat').html('Inline');};$(document).ready(function(){if(location.href.indexOf('#')>1){var sArea=location.href;sArea=sArea.substr(location.href.indexOf('#')+1);if(sArea=='Edit')$('#idEditTab').click();if(sArea=='Report'&&nCPostCID>0) feedback_post_report(nCPostCID,location.href.substr(7,location.href.indexOf('#')-7));};});