function loadHomePageFeed(){document.getElementById('latestpostsbutton').className='headermenuunselected';document.getElementById('feedbutton').className='headermenuselected';loading('homepagecontent');new Ajax.Updater('homepagecontent','/main/ajaxpages/common/homepageactionsbox.php',{method:'post',asynchronous:true,onSuccess:function(){loadActionList(0,0,'Public');}});}
function loadLatestPosts(){document.getElementById('latestpostsbutton').className='headermenuselected';document.getElementById('feedbutton').className='headermenuunselected';loading('homepagecontent');new Ajax.Updater('homepagecontent','/main/ajaxpages/common/latestpostsfull.php',{method:'post',asynchronous:true});}
function contentGuidelines(){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/contentguidelines.php',{method:'post',asynchronous:true});}
function setPostSpam(postid,action){var ok=true;var reason='';if(action=="full"){dlt=confirm("Are you sure you want to set as spam?");if(dlt==false){alert("Action Cancelled");ok=false;}
reason=document.getElementById('reason').options[document.getElementById('reason').selectedIndex].value;}
if(ok){new Ajax.Request('/main/actions/dynamic/setspam.php?a=setspam'+action,{parameters:'postid='+postid+'&reason='+reason,method:'post',evalScripts:true,asynchronous:true,onSuccess:function(t){if(action=="add")alert("Thank you for the warning. This post will be reviewed by our spam team as soon as possible. ");else if(action=="remove")alert("Your choice has been recorded. Thank you for your input!");else alert(t.responseText);}});}}
function joinSeekopia(){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/joinseekopia.php',{method:'post',asynchronous:true});}
function joinSeekopiaWithUsername(username){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/joinseekopia.php?username='+username,{method:'post',asynchronous:true});}
function joinSeekopiaAction(){name=document.joinseekopia.name.value;surname=document.joinseekopia.surname.value;gender=document.joinseekopia.gender.value;email=document.joinseekopia.email.value;username=document.joinseekopia.username.value;password=document.joinseekopia.password.value;password2=document.joinseekopia.password2.value;question=document.joinseekopia.question.value;answer=document.joinseekopia.answer.value;if(document.joinseekopia.terms.checked==true)terms=1;else terms=0;loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/joinseekopia.php?a=join',{method:'post',asynchronous:true,parameters:'name='+escape(name)+'&surname='+escape(surname)+'&gender='+escape(gender)+'&email='+escape(email)+'&username='+escape(username)+'&password='+escape(password)+'&password2='+escape(password2)+'&question='+escape(question)+'&answer='+escape(answer)+'&terms='+escape(terms)});}
var autosavepostid='';function autoSave(){window.setInterval(savePostDraft,120000);}
function savePostDraft(){var IntroText=parent.FCKeditorAPI.GetInstance("introduction");if(IntroText!=undefined)html=IntroText.GetHTML();else html='';var ContentText=parent.FCKeditorAPI.GetInstance("content");if(ContentText!=undefined)html2=ContentText.GetHTML();else html2='';title=document.post.title.value;defaultimage=document.post.defaultimage.value;introduction=html;content=html2;labels=document.post.labels.value;subtopics=document.post.subtopics.value;othertopic=document.post.othertopic.value;new Ajax.Updater('savepoststatus','/main/dynamic/content/savepostdraft.php?postid='+autosavepostid,{method:'post',asynchronous:true,evalScripts:true,parameters:'title='+escape(prepare(title))+'&defaultimage='+escape(defaultimage)+'&introduction='+escape(prepare(introduction))+'&content='+escape(prepare(content))+'&labels='+escape(prepare(labels))+'&subtopics='+escape(subtopics)+'&othertopic='+escape(othertopic)});}
function loadPostCopy(postid){new Ajax.Request('/main/actions/dynamic/setloadsavedpost.php',{method:'post',evalScripts:true,asynchronous:true,onSuccess:function(){if(postid)loadWrite('post/edit/post:'+postid);else loadWrite('post/add');}});}
function sendMessageAction(userid){subject=document.sendmessage.subject.value;message=document.sendmessage.message.value;loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/sendmessage.php?a=send',{method:'post',asynchronous:true,parameters:'userid='+userid+'&subject='+escape(subject)+'&message='+escape(message)});}
function favouriteBloggers(){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/favouritebloggers.php',{method:'post',asynchronous:true});}
function loadUserProfile(){new Ajax.Updater('userprofile','/main/dynamic/content/userprofile.php',{asynchronous:true});}
function loadCrumbs(section,subsection,path){new Ajax.Updater('crumbs','/main/dynamic/content/crumbs.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section='+section+'&subsection='+subsection+'&path='+path});}
function loadContent(path){var paramdivider=path.indexOf('/');section=path.substring(0,paramdivider);path=path.substring(paramdivider+1);if(section=="read/home"){document.location.href='http://www.seekopia.com/home';}else{loadContentMenu(section);loadContentArea(section,path);}}
function loadContentMenu(section){new Ajax.Updater('contentmenu','/main/ajaxpages/content_menu.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'selected='+section});}
function loadContentArea(section,path){new Ajax.Updater('contentarea','/main/ajaxpages/content_'+section+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'selected='+section+'&path='+path});}
function loadRead(path){var paramdivider=path.indexOf('/');if(paramdivider>0){subsection=path.substring(0,paramdivider);path=path.substring(paramdivider+1);}else{subsection=path;path='home';}
if(subsection=="home")document.location.href='http://www.seekopia.com/home';loadReadMenu(subsection);loadReadArea(subsection,path);loadCrumbs('read',subsection,path);}
function loadReadMenu(subsection){new Ajax.Updater('readmenu','/main/ajaxpages/read/menu.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=read&subsection='+subsection});}
function loadReadArea(subsection,path){loading('readcontent');if(subsection=="home"){loadActionList(0,0,'Public');}
new Ajax.Updater('readcontent','/main/ajaxpages/read/'+subsection+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=read&subsection='+subsection+'&path='+path});}
function loadWrite(path){var paramdivider=path.indexOf('/');if(paramdivider>0){subsection=path.substring(0,paramdivider);path=path.substring(paramdivider+1);}else{subsection=path;path='home';}
loadWriteMenu(subsection);loadWriteArea(subsection,path);loadCrumbs('write',subsection,path);}
function loadWriteMenu(subsection){new Ajax.Updater('writemenu','/main/ajaxpages/write/menu.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=write&subsection='+subsection});}
function loadWriteArea(subsection,path){loading('writecontent');new Ajax.Updater('writecontent','/main/ajaxpages/write/'+subsection+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=write&subsection='+subsection+'&path='+path});}
function loadEarn(path){var paramdivider=path.indexOf('/');if(paramdivider>0){subsection=path.substring(0,paramdivider);path=path.substring(paramdivider+1);}else{subsection=path;path='home';}
loadEarnMenu(subsection);loadEarnArea(subsection,path);loadCrumbs('earn',subsection,path);}
function loadEarnMenu(subsection){new Ajax.Updater('earnmenu','/main/ajaxpages/earn/menu.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=earn&subsection='+subsection});}
function loadEarnArea(subsection,path){loading('earncontent');new Ajax.Updater('earncontent','/main/ajaxpages/earn/'+subsection+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=earn&subsection='+subsection+'&path='+path});}
function loadProfile(path){var paramdivider=path.indexOf('/');if(paramdivider>0){subsection=path.substring(0,paramdivider);path=path.substring(paramdivider+1);}else{subsection=path;path='home';}
loadProfileMenu(subsection);loadProfileArea(subsection,path);loadCrumbs('profile',subsection,path);}
function loadProfileMenu(subsection){new Ajax.Updater('profilemenu','/main/ajaxpages/profile/menu.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=profile&subsection='+subsection});}
function loadProfileArea(subsection,path){loading('profilecontent');new Ajax.Updater('profilecontent','/main/ajaxpages/profile/'+subsection+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section=profile&subsection='+subsection+'&path='+path});}
function loadPage(section,subsection,page,params){loading(subsection+'_pagearea');if(page==undefined){page="home";}
new Ajax.Updater(subsection+'_pagearea','/main/ajaxpages/'+section+'/'+subsection+'/'+page+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section='+section+'&subsection='+subsection+'&page='+page+'&params='+params});}
function loadActionList(userid,postid,type,groups,groupsblacklist){new Ajax.Updater('actionlist','/main/dynamic/content/actionlist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&postid='+postid+'&type='+type+'&groups='+groups+'&groupsblacklist='+groupsblacklist,onSuccess:function(t){if(document.getElementById('actions').style.display=='block'){if(t.responseText=="NOROWS"){document.getElementById('actions').style.display='none';}else document.getElementById('actions').style.display='block';}}});}
function showHideActions(){if(document.getElementById('actions').style.display=="block")
{new Ajax.Request('/main/actions/dynamic/showhideactions.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=0',onSuccess:function(){document.getElementById('actions').style.display="none";document.getElementById('actionshidden').style.display="block";}});}else{new Ajax.Request('/main/actions/dynamic/showhideactions.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=1',onSuccess:function(){document.getElementById('actions').style.display="block";document.getElementById('actionshidden').style.display="none";}});}}
function showHideTags(){if(document.getElementById('tags').style.display=="block")
{new Ajax.Request('/main/actions/dynamic/showhidetags.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=0',onSuccess:function(){document.getElementById('tags').style.display="none";document.getElementById('tagshidden').style.display="block";}});}else{new Ajax.Request('/main/actions/dynamic/showhidetags.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=1',onSuccess:function(){document.getElementById('tags').style.display="block";document.getElementById('tagshidden').style.display="none";}});}}
function hideWebsiteIntro(){new Ajax.Request('/main/actions/dynamic/hidewebsiteintro.php',{method:'post',evalScripts:true,asynchronous:true,onSuccess:function(){document.getElementById('websiteintrobox').style.display="none";}});}
function showHideIntro(){if(document.getElementById('introbox').style.display=="block")
{new Ajax.Request('/main/actions/dynamic/showintro.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=0',onSuccess:function(){document.getElementById('introbox').style.display="none";document.getElementById('introboxhidden').style.display="block";}});}else{new Ajax.Request('/main/actions/dynamic/showintro.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=1',onSuccess:function(){document.getElementById('introbox').style.display="block";document.getElementById('introboxhidden').style.display="none";}});}}
function loadBackgrounds(section,start,selected){new Ajax.Updater('backgrounds','/main/dynamic/content/backgrounds.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section='+section+'&start='+start+'&selected='+selected});}
function loadTags(type){loading('tagsarea');if(type=="alltime"){document.getElementById('showalltags').innerHTML='All Time';document.getElementById('showpastmonthtags').innerHTML='<a href="javascript:loadTags(\'pastmonth\')">Past Month</a>';document.getElementById('showpastweektags').innerHTML='<a href="javascript:loadTags(\'pastweek\')">Past Week</a>';document.getElementById('showmostrecenttags').innerHTML='<a href="javascript:loadTags(\'mostrecent\')">Most Recent</a>';}else if(type=="pastmonth"){document.getElementById('showalltags').innerHTML='<a href="javascript:loadTags(\'alltime\')">All Time</a>';document.getElementById('showpastmonthtags').innerHTML='Past Month';document.getElementById('showpastweektags').innerHTML='<a href="javascript:loadTags(\'pastweek\')">Past Week</a>';document.getElementById('showmostrecenttags').innerHTML='<a href="javascript:loadTags(\'mostrecent\')">Most Recent</a>';}else if(type=="pastweek"){document.getElementById('showalltags').innerHTML='<a href="javascript:loadTags(\'alltime\')">All Time</a>';document.getElementById('showpastmonthtags').innerHTML='<a href="javascript:loadTags(\'pastmonth\')">Past Month</a>';document.getElementById('showpastweektags').innerHTML='Past Week';document.getElementById('showmostrecenttags').innerHTML='<a href="javascript:loadTags(\'mostrecent\')">Most Recent</a>';}else if(type=="mostrecent"){document.getElementById('showalltags').innerHTML='<a href="javascript:loadTags(\'alltime\')">All Time</a>';document.getElementById('showpastmonthtags').innerHTML='<a href="javascript:loadTags(\'pastmonth\')">Past Month</a>';document.getElementById('showpastweektags').innerHTML='<a href="javascript:loadTags(\'pastweek\')">Past Week</a>';document.getElementById('showmostrecenttags').innerHTML='Most Recent';}
new Ajax.Updater('tagsarea','/main/dynamic/content/tags.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'type='+type});}
function showNewsFeedOptions(boolean){if(boolean){document.getElementById("hideoptions").style.display='block';document.getElementById("showoptions").style.display='none';document.getElementById("extrafeaturesbox").style.display='block';}else{document.getElementById("hideoptions").style.display='none';document.getElementById("showoptions").style.display='block';document.getElementById("extrafeaturesbox").style.display='none';}}
function setNewsFeed(userid){loading('actionlist');if(document.getElementById("allnewsfeed").checked==true){var type="all";document.getElementById('extrafeaturesbutton').style.display='block';document.getElementById('extrafeatures').style.display='block';}
else if(document.getElementById("younewsfeed").checked==true){var type="you";document.getElementById('extrafeaturesbutton').style.display='none';document.getElementById('extrafeatures').style.display='none';}
else if(document.getElementById("favouritesnewsfeed")){if(document.getElementById("favouritesnewsfeed").checked==true){var type="favourites";document.getElementById('extrafeaturesbutton').style.display='block';document.getElementById('extrafeatures').style.display='block';}}
var profileupdates=0;var newposts=0;var newcomments=0;var newboardmessages=0;var advertising=0;if(type=="you"){profileupdates=1;newposts=1;newcomments=1;newboardmessages=1;advertising=1;}
if(type!="you"){if(document.getElementById("profileupdates").checked==true)profileupdates=1;if(document.getElementById("newposts").checked==true)newposts=1;if(document.getElementById("newcomments").checked==true)newcomments=1;if(document.getElementById("newboardmessages").checked==true)newboardmessages=1;if(document.getElementById("advertising").checked==true)advertising=1;var blacklist='';if(profileupdates==0)blacklist='newmember:blognamechange:  invitefriends:invitefriendsmanual:favouritetopics:profileupdate:addfavourite:profileimagedelete:profileimageupload:';if(newposts==0)blacklist=blacklist+'newpost:';if(newcomments==0)blacklist=blacklist+'newcomment:';if(newboardmessages==0)blacklist=blacklist+'newmessage:';if(advertising==0)blacklist=blacklist+'newadvertapproved:';}
if(type=="all"){if(profileupdates==1&&newposts==1&&newcomments==1&&newboardmessages==1)
loadActionList(0,0,'Public');else{loadActionList(0,0,'Public','',blacklist.substr(0,blacklist.length-1));}}else if(type=="favourites"){if(profileupdates==1&&newposts==1&&newcomments==1&&newboardmessages==1)
loadActionList('favourites',0,'Public');else{loadActionList('favourites',0,'Public','',blacklist.substr(0,blacklist.length-1));}}else if(type=="you"){loadActionList(userid,0,'Private');}
new Ajax.Request('/main/actions/dynamic/setnewsfeed.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'type='+type+'&profileupdates='+profileupdates+'&newposts='+newposts+'&newcomments='+newcomments+'&newboardmessages='+newboardmessages+'&advertising='+advertising});}
function viewMessage(messageid,page){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/viewmessage.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'messageid='+messageid+'&page='+page});}
function viewMessageAction(messageid,page){subject=document.viewmessage.subject.value;message=document.viewmessage.message.value;loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/viewmessage.php?a=send',{method:'post',evalScripts:true,asynchronous:true,parameters:'messageid='+messageid+'&page='+page+'&subject='+escape(subject)+'&message='+escape(message)});}
function sendMessage(userid){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/sendmessage.php',{method:'post',asynchronous:true,parameters:'userid='+userid});}
function sendMessageAction(userid){subject=document.sendmessage.subject.value;message=document.sendmessage.message.value;loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/sendmessage.php?a=send',{method:'post',asynchronous:true,parameters:'userid='+userid+'&subject='+escape(subject)+'&message='+escape(message)});}
function sendReply(userid,messageid){new Ajax.Updater('messagereply','/main/dynamic/content/sendmessage.php',{method:'post',asynchronous:true,parameters:'userid='+userid+'&messageid='+messageid});}
function sendReplyAction(userid,messageid){subject=document.sendmessage.subject.value;message=document.sendmessage.message.value;loading('messagereply');new Ajax.Updater('messagereply','/main/dynamic/content/sendmessage.php?a=send',{method:'post',asynchronous:true,parameters:'userid='+userid+'&subject='+escape(subject)+'&messageid='+messageid+'&message='+escape(message)});}
function deleteMessage(messageid,page,start)
{dlt=confirm("Are you sure you want to delete this message?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deletemessage.php?a=delete',{method:'post',evalScripts:true,asynchronous:true,parameters:'messageid='+messageid,onSuccess:function(){if(page=="messages"){loadRead('profile/messages/start:'+start);}
else if(page=="sentmessages"){loadRead('profile/sentmessages/start:'+start);}
else if(page=="home"){loadRead('profile/home');}
document.getElementById('noticebox').innerHTML='<div class="noticetext">Message Deleted</div>';document.getElementById('noticebox').style.display='block';}});}
else if(dlt==false)alert("Action Cancelled");}
function deleteSentMessage(messageid)
{dlt=confirm("Are you sure you want to delete this message?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deletemessage.php?a=delete',{method:'post',evalScripts:true,asynchronous:true,parameters:'messageid='+messageid,onSuccess:function(){loading('sentmessageslist');loadSentMessagesList(messagesstart,messageslimit,0);loadSentMessagesResultsText();}});document.getElementById('noticebox').innerHTML='<div class="noticetext">Sent Message Deleted</div>';document.getElementById('noticebox').style.display='block';}
else if(dlt==false)alert("Action Cancelled");}
function addBBMessage(userid,parentmessageid,start){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/addbbmessage.php',{method:'post',asynchronous:true,parameters:'userid='+userid+'&start='+start+'&parentmessageid='+parentmessageid});}
function addBBMessageAction(userid,parentmessageid,start){message=document.addbbmessage.message.value;loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/addbbmessage.php?a=send',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&start='+start+'&parentmessageid='+parentmessageid+'&message='+escape(message)});}
function deleteBBMessage(userid,bbmessageid,page,start){dlt=confirm("Are you sure you want to delete this message?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deletebbmessage.php?a=delete',{method:'post',asynchronous:true,parameters:'userid='+userid+'&bbmessageid='+bbmessageid,onSuccess:function(){loadWrite('bulletinboard/home/start:'+start);}});}
else if(dlt==false)alert("Action Cancelled");}
function approveBBMessage(userid,bbmessageid){replyfield='replybbmessage'+bbmessageid;reply=document.getElementById(replyfield).value;new Ajax.Request('/main/actions/dynamic/approvebbmessage.php?a=approve',{method:'post',asynchronous:true,parameters:'bbmessageid='+bbmessageid+'&reply='+reply,onSuccess:function(){loadWrite('bulletinboard/home');}});}
function addFriend(userid){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/addfriend.php',{method:'post',asynchronous:true,parameters:'userid='+userid});}
function addFriendAction(userid){message=document.addfriend.message.value;document.getElementById('actionlayer').innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';new Ajax.Updater('actionlayer','/main/dynamic/popups/addfriend.php?a=add',{method:'post',asynchronous:true,evalScripts:true,parameters:'userid='+userid+'&message='+escape(message)});}
function acceptFriend(requestid,page,start){new Ajax.Request('/main/actions/dynamic/acceptfriend.php?a=accept',{method:'post',asynchronous:true,parameters:'requestid='+requestid,onSuccess:function(){if(page=="home"){loadRead('profile/home');}else if(page=="friendrequests"){loadRead('profile/friendrequests/start:'+start);}
loadUserProfile();}});}
function rejectFriend(requestid,page,start){new Ajax.Request('/main/actions/dynamic/rejectfriend.php?a=delete',{method:'post',asynchronous:true,parameters:'requestid='+requestid,onSuccess:function(){if(page=="home"){loadRead('profile/home');}
else if(page=="friendrequests"){loadRead('profile/friendrequests/start:'+start);}
loadUserProfile();}});}
function loadReadLeftMenu(page){if(document.getElementById('readleftmenu')){new Ajax.Updater('readleftmenu','/main/'+page,{method:'post',evalScripts:true,asynchronous:true});}}
function clearReadLeftMenu(){if(document.getElementById('readleftmenu'))document.getElementById('readleftmenu').innerHTML='';}
function loadReadRightMenu(page){if(document.getElementById('readrightmenu')){new Ajax.Updater('readrightmenu','/main/'+page,{method:'post',evalScripts:true,asynchronous:false});}}
function clearReadRightMenu(){if(document.getElementById('readrightmenu'))document.getElementById('readrightmenu').innerHTML='';}
function loadWriteSideMenu(page){new Ajax.Updater('writesidemenu','/main/'+page,{method:'post',evalScripts:true,asynchronous:true});}
function clearWriteSideMenu(){document.getElementById('writesidemenu').innerHTML='';}
function loadEarnSideMenu(page){new Ajax.Updater('earnsidemenu','/main/'+page,{method:'post',evalScripts:true,asynchronous:true});}
function clearEarnSideMenu(){document.getElementById('earnsidemenu').innerHTML='';}
function loadProfileSideMenu(page){new Ajax.Updater('profilesidemenu','/main/'+page,{method:'post',evalScripts:true,asynchronous:true});}
function clearProfileSideMenu(){document.getElementById('profilesidemenu').innerHTML='';}
function inviteFriends(){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/invitefriends.php',{asynchronous:true,method:'post',evalScripts:true,asynchronous:true});}
function inviteFriendsData(){var errors=false;if((document.getElementById('email_box').value.length==0)||(document.getElementById('email_box').value==null)){alert('Please enter Email.');errors=true;}else var email=document.getElementById('email_box').value;if(errors==false){if((document.getElementById('password_box').value.length==0)||(document.getElementById('password_box').value==null)){alert('Please enter Password.');errors=true;}else var password=document.getElementById('password_box').value;}
if(errors==false){if((document.getElementById('provider_box').value.length==0)||(document.getElementById('provider_box').value==null)){alert('Please enter Provider.');errors=true;}else var provider=document.getElementById('provider_box').value;}
if(errors==false){loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/invitefriends.php?a=getContacts',{asynchronous:true,method:'post',evalScripts:true,asynchronous:true,parameters:'email='+email+'&password='+password+'&provider='+provider});}}
function inviteFriendsSave(provider){var params=$('contactsform').serialize();loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/invitefriends.php?a=saveContacts&provider='+provider,{asynchronous:true,method:'post',evalScripts:true,asynchronous:true,parameters:params});}
function inviteFriendsSend(provider){var params=$('contactsform').serialize();var errors=false;if((document.getElementById('subject').value.length==0)||(document.getElementById('subject').value==null)){alert('Please enter the Subject.');errors=true;}else var subject=prepare(document.getElementById('subject').value);if(errors==false){if((document.getElementById('message').value.length==0)||(document.getElementById('message').value==null)){alert('Please enter the Message.');errors=true;}else var message=prepare(document.getElementById('message').value);}
if(errors==false){loading('actionlayer');new Ajax.Updater('actionlayer','/main/dynamic/popups/invitefriends.php?a=sendContacts&provider='+provider+'&subject='+subject+'&message='+message,{asynchronous:true,method:'post',evalScripts:true,asynchronous:true,parameters:params});}}
function importBlogPosts(){opencloseAction();new Ajax.Updater('actionlayer','/main/dynamic/popups/importblog.php',{asynchronous:true});}
function importBlogPostsAction(save){if((document.importblogposts.blogfeed.value.length==0)||(document.importblogposts.blogfeed.value==null)){alert('Please enter feed.');}else{var feed=$('blogfeed');if(save==1){var selectedposts=',';for(i=0;i<document.importblogposts.selectedposts.length;i++)
{if(document.importblogposts.selectedposts[i].checked==true)
{selectedposts+=document.importblogposts.selectedposts[i].value+",";}}}
else{var selectedposts='';}
document.getElementById('actionlayer').innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Downloading and Importing Posts from RSS Feed...<br /><br />Please leave up to 5 minutes for import to complete.</div>';new Ajax.Updater('actionlayer','/main/dynamic/popups/importblog.php?a=import',{method:'post',evalScripts:true,asynchronous:true,parameters:'save='+save+'&'+feed.serialize()+'&selectedposts='+selectedposts});}}
function updateSelectedPosts(){var chkCnt=0;for(i=0;i<document.importblogposts.selectedposts.length;i++)
{if(document.importblogposts.selectedposts[i].checked==true)
{chkCnt++;}}
if(chkCnt==0){document.importblogposts.savebutton.style.display='none';}else if(chkCnt==1){document.importblogposts.savebutton.style.display='block';document.importblogposts.savebutton.value='Copy this post to your Draft Folder';}else{document.importblogposts.savebutton.style.display='block';document.importblogposts.savebutton.value='Copy these '+chkCnt+' posts to your Draft Folder';}}
function uncheckSelectedPosts(){for(i=0;i<document.importblogposts.selectedposts.length;i++)
{document.importblogposts.selectedposts[i].checked=false;}
updateSelectedPosts();}
function checkSelectedPosts(){for(i=0;i<document.importblogposts.selectedposts.length;i++)
{document.importblogposts.selectedposts[i].checked=true;}
updateSelectedPosts();}
function loadPostsList(blogid){new Ajax.Updater('postslist','/main/dynamic/content/postslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'blogid='+blogid});}
function showHideFeaturedBlogger(){if(document.getElementById('featuredblogger').style.display=="block")
{new Ajax.Request('/main/actions/dynamic/showhidefeaturedblogger.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=0',onSuccess:function(){document.getElementById('featuredblogger').style.display="none";document.getElementById('featuredbloggerhidden').style.display="block";}});}else{new Ajax.Request('/main/actions/dynamic/showhidefeaturedblogger.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=1',onSuccess:function(){document.getElementById('featuredblogger').style.display="block";document.getElementById('featuredbloggerhidden').style.display="none";}});}}
function showHideFeaturedPost(){if(document.getElementById('featuredpost').style.display=="block")
{new Ajax.Request('/main/actions/dynamic/showhidefeaturedpost.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=0',onSuccess:function(){document.getElementById('featuredpost').style.display="none";document.getElementById('featuredposthidden').style.display="block";}});}else{new Ajax.Request('/main/actions/dynamic/showhidefeaturedpost.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show=1',onSuccess:function(){document.getElementById('featuredpost').style.display="block";document.getElementById('featuredposthidden').style.display="none";}});}}
function loadCommentsList(blogid,start,limit){new Ajax.Updater('commentslist','/main/dynamic/content/commentslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'blogid='+blogid+'&start='+start+'&limit='+limit});}
function addComment(postid){document.getElementById('AddCommentButton').value='Adding Comment...';document.getElementById('AddCommentButton').disabled=true;var comment=prepare(document.getElementById('addcomment').value);new Ajax.Request('/main/actions/dynamic/addcomment.php?a=addcomment',{method:'post',asynchronous:true,parameters:'postid='+postid+'&comment='+comment,onSuccess:function(t){if(t.responseText=="EMPTY"){alert('Please write your comment.');document.getElementById('AddCommentButton').value='Add Comment';document.getElementById('AddCommentButton').disabled=false;}else if(t.responseText==1){new Ajax.Updater('postcomments','/main/ajaxpages/read/post/comments.php?postid='+postid,{method:'post',evalScripts:true,asynchronous:true});}else{document.getElementById('AddCommentButton').value='Comment Added - Awaiting Author\'s Approval';}}});}
function addTags(postid){document.getElementById('AddTagsButton').value='Adding Tags...';document.getElementById('AddTagsButton').disabled=true;var tags=prepare(document.getElementById('addtags').value);new Ajax.Request('/main/actions/dynamic/addtags.php?a=addtags',{method:'post',asynchronous:false,parameters:'postid='+postid+'&tags='+tags,onSuccess:function(t){if(t.responseText=="EMPTY"){alert('Please write the tags.');document.getElementById('AddTagsButton').value='Add Tags';document.getElementById('AddTagsButton').disabled=false;}else{document.getElementById('AddTagsButton').value='Tags Added - Awaiting Blogger\'s Approval';document.getElementById('addtags').value='';}}});}
function addBoardMessage(userid,preview){document.getElementById('AddMessageButton').value='Adding Message...';document.getElementById('AddMessageButton').disabled=true;var message=prepare(document.getElementById('addmessage').value);new Ajax.Request('/main/actions/dynamic/addmessage.php?a=addmessage',{method:'post',asynchronous:true,parameters:'userid='+userid+'&message='+message,onSuccess:function(t){if(t.responseText=="EMPTY"){alert('Please write your message.');document.getElementById('AddMessageButton').value='Add Message';document.getElementById('AddMessageButton').disabled=false;}else if(t.responseText==1){new Ajax.Updater('userboard','/main/ajaxpages/read/blogger/messages.php?userid='+userid+'&messagesstart=0&preview='+preview,{method:'post',evalScripts:true,asynchronous:true});}else{document.getElementById('AddMessageButton').value='Message Added - Awaiting Approval';}}});}
function loadPostComments(postid,show,start,navigation,post){if(document.getElementById('boxcomments-'+postid).style.display=='none'||navigation==1)
{document.getElementById('boxcomments-'+postid).style.display='block';if(document.getElementById('showhidecomment-'+postid))document.getElementById('showhidecomment-'+postid).innerHTML='Hide ';new Ajax.Updater('comments-'+postid,'/main/dynamic/content/postcommentslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid+'&show='+show+'&start='+start+'&post='+post,onSuccess:function(t){if(t.responseText=='NOROWS'){if(start>1)loadPostComments(postid,show,1,1);else{loadWrite('comments/'+show);}}}});}else{document.getElementById('boxcomments-'+postid).style.display='none';if(document.getElementById('showhidecomment-'+postid))document.getElementById('showhidecomment-'+postid).innerHTML='Show ';}}
function loadComments(postid,start){new Ajax.Updater('postcomments','/main/ajaxpages/read/post/comments.php?postid='+postid+'&start='+start,{method:'post',evalScripts:true,asynchronous:true});}
function loadUserBoard(userid,start,preview){loading('userboard');new Ajax.Updater('userboard','/main/ajaxpages/read/blogger/messages.php?userid='+userid+'&messagesstart='+start+'&preview='+preview,{method:'post',evalScripts:true,asynchronous:true});}
function loadFavouriteBloggersList(userid,start){new Ajax.Updater('favouritebloggers','/main/dynamic/content/favouritebloggerslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&start='+start,onSuccess:function(t){if(t.responseText=="EMPTY")document.getElementById('favouritebloggerslistbox').style.display='none';}});}
function loadFavouritePostsList(userid,start){new Ajax.Updater('favouriteposts','/main/dynamic/content/favouritepostslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&start='+start,onSuccess:function(t){if(t.responseText=="EMPTY")document.getElementById('favouritepostslistbox').style.display='none';}});}
function loadFansList(userid,start){new Ajax.Updater('fans','/main/dynamic/content/fanslist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&start='+start,onSuccess:function(t){if(t.responseText=="EMPTY")document.getElementById('fanslistbox').style.display='none';}});}
function reactivatePost(postid,status){new Ajax.Request('/main/actions/dynamic/setpostdeletestatus.php?a=reactivate',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid,onSuccess:function(t){if(status=='Online'){location.href='#write/posts/home/show:online';loadWrite('posts/home/show:online');}else if(status=='Spam'){location.href='#write/posts/home/show:spam';loadWrite('posts/home/show:spam');}else if(status=='Draft'){location.href='#write/posts/home/show:draft';loadWrite('posts/home/show:draft');}}});}
function deletePost(postid){dlt=confirm("Are you sure you want to delete this post?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/setpostdeletestatus.php?a=delete',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid,onSuccess:function(){location.href='#write/posts/home/show:deleted';loadWrite('posts/home/show:deleted');}});}
else if(dlt==false)alert("Action Cancelled");}
function setPostLimit(limit,show){new Ajax.Request('/main/actions/dynamic/setpostlimit.php?a=setlimit',{method:'post',evalScripts:true,asynchronous:true,parameters:'limit='+limit,onSuccess:function(){location.href='#write/'+show;loadWrite(show);}});}
function loadCommentsDownDrop(show,postid){new Ajax.Updater('commentsdropdown','/main/dynamic/content/commentsdropdown.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show='+show+'&postid='+postid});}
function savePostCommentReply(postid,commentid,show,start,post){replyfield='reply'+commentid;reply=document.getElementById(replyfield).value;document.getElementById('comments-'+postid).innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';new Ajax.Request('/main/actions/dynamic/savereply.php?a=save',{method:'post',asynchronous:true,parameters:'postid='+postid+'&commentid='+commentid+'&reply='+escape(reply),onSuccess:function(){loadPostComments(postid,show,start,1);if(post==1)loadCommentsDownDrop(show,postid);else loadCommentsDownDrop(show,0);}});}
function resetCommentSpamLevel(postid,commentid,show,start,post){document.getElementById('comments-'+postid).innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';new Ajax.Request('/main/actions/dynamic/resetcommentspamlevel.php?a=reset',{method:'post',asynchronous:true,parameters:'commentid='+commentid,onSuccess:function(){loadPostComments(postid,show,start,1);if(post==1)loadCommentsDownDrop(show,postid);else loadCommentsDownDrop(show,0);}});}
function approveComment(postid,commentid,show,start,post){document.getElementById('comments-'+postid).innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';new Ajax.Request('/main/actions/dynamic/approvecomment.php?a=approve',{method:'post',asynchronous:true,parameters:'commentid='+commentid,onSuccess:function(){loadPostComments(postid,show,start,1);if(post==1)loadCommentsDownDrop(show,postid);else loadCommentsDownDrop(show,0);}});}
function deleteComment(postid,commentid,show,start,post){dlt=confirm("Are you sure you want to delete this comment?");if(dlt==true){document.getElementById('comments-'+postid).innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';new Ajax.Request('/main/actions/dynamic/deletecomment.php?a=delete',{method:'post',asynchronous:true,parameters:'commentid='+commentid,onSuccess:function(){loadPostComments(postid,show,start,1);if(post==1)loadCommentsDownDrop(show,postid);else loadCommentsDownDrop(show,0);}});}
else if(dlt==false)alert("Action Cancelled");}
function loadTagsDownDrop(show){new Ajax.Updater('tagsdropdown','/main/dynamic/content/tagsdropdown.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'show='+show});}
function saveTags(postid,show){tags=document.getElementById('tags-'+postid).value;new Ajax.Request('/main/actions/dynamic/savetags.php?a=save',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid+'&tags='+tags,onSuccess:function(t){new Effect.Highlight('tagbox-'+postid,{duration:2});document.getElementById('tags-'+postid).value=t.responseText;loadTagsDownDrop(show);}});}
function loadNewTags(postid,show){new Ajax.Updater('newtags-'+postid,'/main/dynamic/content/newtagslist.php?',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid+'&show='+show});}
function addTag(tagid,postid,show){new Ajax.Request('/main/actions/dynamic/addtag.php?a=add',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid+'&tagid='+tagid,onSuccess:function(t){if(document.getElementById('tags-'+postid).value)
document.getElementById('tags-'+postid).value=document.getElementById('tags-'+postid).value+', '+t.responseText;else document.getElementById('tags-'+postid).value=t.responseText;loadNewTags(postid,show);new Effect.Highlight('tagbox-'+postid,{duration:2});loadTagsDownDrop(show);}});}
function deleteTag(tagid,postid,show){new Ajax.Request('/main/actions/dynamic/deletetag.php?a=delete',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid+'&tagid='+tagid,onSuccess:function(){loadNewTags(postid);loadTagsDownDrop(show);}});}
function saveFavouriteTopics(userid){var empty=true;var favouritetopics=',';for(i=0;i<document.favouritetopics.favtopics.length;i++)
{if(document.favouritetopics.favtopics[i].checked==true)
{empty=false;}
if(document.favouritetopics.favtopics[i].checked==false)
{favouritetopics+=document.favouritetopics.favtopics[i].value+",";}}
if(empty){alert('Please select at least one topic.');}else{new Ajax.Request('/main/actions/dynamic/setfavouritetopics.php',{method:'post',asynchronous:false,parameters:'favouritetopics='+favouritetopics,onSuccess:function(t){document.getElementById('savefavtopicsbutton').value='Saved';document.getElementById('savefavtopicsbutton').disabled=true;setTimeout("document.getElementById('savefavtopicsbutton').value = 'Save Changes'; document.getElementById('savefavtopicsbutton').disabled = false;",2000);loadActionList(userid,0,'Private');}});}}
function loadAllFavouriteBloggerActions(userids){var users=userids.split(",");for(i=0;i<users.length;i++){loadFavouriteBloggersActions(users[i],1);}}
function loadFavouriteBloggersActions(userid,loadactions){if(document.getElementById('actions-'+userid).style.display=='none'||loadactions==1)
{document.getElementById('actions-'+userid).style.display='block';document.getElementById('showlatestpostbutton-'+userid).innerHTML='hide newsfeed';new Ajax.Updater('actions-'+userid,'/main/dynamic/content/actionlist.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'userid='+userid+'&type=Public',onSuccess:function(t){if(t.responseText=="NOROWS"){document.getElementById('actions-'+userid).style.display='none';document.getElementById('showlatestpostbutton-'+userid).innerHTML='no newsfeed available';}}});}else{document.getElementById('actions-'+userid).style.display='none';document.getElementById('showlatestpostbutton-'+userid).innerHTML='show latest posts';}}
function setFavouriteBloggerSendEmail(userid){if(document.getElementById('sendemail-'+userid).checked==true){var checked=1;}else var checked=0;new Ajax.Request('/main/actions/dynamic/setfavouritebloggersendemail.php?a=update',{method:'post',asynchronous:false,parameters:'userid='+userid+'&sendemail='+checked,onSuccess:function(t){new Effect.Highlight('sendemailbox-'+userid,{duration:2});}});}
function setUserPostsBy(chosenview,action){new Ajax.Request('/main/actions/dynamic/setuserproperty.php',{method:'post',asynchronous:false,parameters:'property=showpostsby&value='+chosenview,onSuccess:function(t){if(action=="refresh")document.location.href=document.location.href;else new Effect.Highlight('favouritebloggersbox',{duration:2});}});}
function deleteFavouriteBlogger(userid,type,start){dlt=confirm("Are you sure you want to remove this blogger from your favourites?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deletefavouriteblogger.php?a=delete',{method:'post',asynchronous:true,parameters:'userid='+userid,onSuccess:function(){if(type=='refresh')location.reload(true);else if(type=='norefresh'){if(document.getElementById('emailme'))document.getElementById('emailme').style.display='none';if(document.getElementById('favouriteblogger-'+userid+'-yes'))document.getElementById('favouriteblogger-'+userid+'-yes').style.display='none';if(document.getElementById('favouriteblogger-'+userid+'-no'))document.getElementById('favouriteblogger-'+userid+'-no').style.display='inline';if(document.getElementById('smallfavouriteblogger-'+userid+'-yes'))document.getElementById('smallfavouriteblogger-'+userid+'-yes').style.display='none';if(document.getElementById('smallfavouriteblogger-'+userid+'-no'))document.getElementById('smallfavouriteblogger-'+userid+'-no').style.display='inline';}
else{loadRead('customize/favouritebloggers/start:'+start);}}});}
else if(dlt==false)alert("Action Cancelled");}
function addFavouriteBlogger(userid){new Ajax.Request('/main/actions/dynamic/addfavouriteblogger.php?a=add',{method:'post',asynchronous:false,parameters:'userid='+userid,onSuccess:function(){if(document.getElementById('emailme'))document.getElementById('emailme').style.display='block';if(document.getElementById('favouriteblogger-'+userid+'-yes'))document.getElementById('favouriteblogger-'+userid+'-yes').style.display='inline';if(document.getElementById('favouriteblogger-'+userid+'-no'))document.getElementById('favouriteblogger-'+userid+'-no').style.display='none';if(document.getElementById('smallfavouriteblogger-'+userid+'-yes'))document.getElementById('smallfavouriteblogger-'+userid+'-yes').style.display='inline';if(document.getElementById('smallfavouriteblogger-'+userid+'-no'))document.getElementById('smallfavouriteblogger-'+userid+'-no').style.display='none';}});}
function loadFavourites(section,highlight){new Ajax.Updater('favourites','/main/dynamic/content/favourites.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'section='+section+'&highlight='+highlight});}
function deleteFavouritePost(postid,section){dlt=confirm("Are you sure you want to delete this post from your favourites?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deletefavouritepost.php?a=delete',{method:'post',asynchronous:true,parameters:'postid='+postid,onSuccess:function(){if(document.getElementById('favourite-'+postid+'-yes'))document.getElementById('favourite-'+postid+'-yes').style.display='none';if(document.getElementById('favourite-'+postid+'-no'))document.getElementById('favourite-'+postid+'-no').style.display='inline';if(document.getElementById('smallfavourite-'+postid+'-yes'))document.getElementById('smallfavourite-'+postid+'-yes').style.display='none';if(document.getElementById('smallfavourite-'+postid+'-no'))document.getElementById('smallfavourite-'+postid+'-no').style.display='inline';loadFavourites(section,0);}});}
else if(dlt==false)alert("Action Cancelled");}
function addFavouritePost(postid){new Ajax.Request('/main/actions/dynamic/addfavouritepost.php?a=add',{method:'post',asynchronous:true,parameters:'postid='+postid,onSuccess:function(){if(document.getElementById('favourite-'+postid+'-yes'))document.getElementById('favourite-'+postid+'-yes').style.display='inline';if(document.getElementById('favourite-'+postid+'-no'))document.getElementById('favourite-'+postid+'-no').style.display='none';if(document.getElementById('smallfavourite-'+postid+'-yes'))document.getElementById('smallfavourite-'+postid+'-yes').style.display='inline';if(document.getElementById('smallfavourite-'+postid+'-no'))document.getElementById('smallfavourite-'+postid+'-no').style.display='none';loadFavourites('preview',1);}});}
function addBlackListedPost(postid){new Ajax.Request('/main/actions/dynamic/blacklistpost.php?a=blacklist',{method:'post',asynchronous:false,parameters:'postid='+postid});}
function deleteBlackListedPost(postid,start){dlt=confirm("Are you sure you want to remove this post from your blacklist?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deleteblacklistedpost.php?a=delete',{method:'post',asynchronous:false,parameters:'postid='+postid,onSuccess:function(){loadRead('customize/blacklistedposts/start:'+start);}});}
else if(dlt==false)alert("Action Cancelled");}
function addBlackListedBlogger(userid){new Ajax.Request('/main/actions/dynamic/blacklistblogger.php?a=blacklist',{method:'post',asynchronous:false,parameters:'userid='+userid});}
function deleteBlackListedBlogger(userid,refreshpage){dlt=confirm("Are you sure you want to remove this blogger from your blacklist?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deleteblacklistedblogger.php?a=delete',{method:'post',asynchronous:false,parameters:'userid='+userid,onSuccess:function(){if(refreshpage==1)location.reload(true);else loadRead('customize/blacklistedbloggers/start:'+start);}});}
else if(dlt==false)alert("Action Cancelled");}
function deleteBlackListedTag(tagid,start){dlt=confirm("Are you sure you want to remove this tag from your blacklist?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/deleteblacklistedtag.php?a=delete',{method:'post',asynchronous:true,parameters:'tagid='+tagid,onSuccess:function(){loadRead('customize/blacklistedtags/start:'+start);}});}
else if(dlt==false)alert("Action Cancelled");}
function addCommentRating(commentid,option){if(option=="positive"){new Ajax.Request('/main/actions/dynamic/setcommentrating.php?a=positive',{method:'post',asynchronous:false,parameters:'commentid='+commentid,onSuccess:function(t){if(t.responseText=='1'){postrating=parseInt(document.getElementById('commentrating-'+commentid).innerHTML);document.getElementById('commentrating-'+commentid).innerHTML=postrating+1;new Effect.Highlight('commentrating-'+commentid,{duration:2});}else alert('You already voted for this comment.');}});}else if(option=="negative"){new Ajax.Request('/main/actions/dynamic/setcommentrating.php?a=negative',{method:'post',asynchronous:false,parameters:'commentid='+commentid,onSuccess:function(t){if(t.responseText=='1'){postrating=parseInt(document.getElementById('commentrating-'+commentid).innerHTML);document.getElementById('commentrating-'+commentid).innerHTML=postrating-1;new Effect.Highlight('commentrating-'+commentid,{duration:2});}else alert('You already voted for this comment.');}});}}
function markCommentAsSpam(commentid){dlt=confirm("Are you sure you want to mark this comment as spam?");if(dlt==true){new Ajax.Request('/main/actions/dynamic/setcommentspamlevel.php?a=set',{method:'post',asynchronous:false,parameters:'commentid='+commentid,onSuccess:function(t){document.getElementById('commentbox'+commentid).style.display='none';}});}
else if(dlt==false)alert("Action Cancelled");}
function showOptions(postid,option){if(option=="positivepost"){new Ajax.Request('/main/actions/dynamic/setpostrating.php?a=positive',{method:'post',asynchronous:false,parameters:'postid='+postid,onSuccess:function(t){if(t.responseText=='1'){postrating=parseInt(document.getElementById('postrating-'+postid).innerHTML);document.getElementById('postrating-'+postid).innerHTML=postrating+1;new Effect.Highlight('postrating-'+postid,{duration:2});}else alert('You already voted for this post.');}});}else if(option=="negativepost"){new Ajax.Request('/main/actions/dynamic/setpostrating.php?a=negative',{method:'post',asynchronous:false,parameters:'postid='+postid,onSuccess:function(t){if(t.responseText=='1'){postrating=parseInt(document.getElementById('postrating-'+postid).innerHTML);document.getElementById('postrating-'+postid).innerHTML=postrating-1;new Effect.Highlight('postrating-'+postid,{duration:2});}else alert('You already voted for this post.');}});}
document.getElementById('content-'+postid).style.display='none';document.getElementById('ratingbox-'+postid).style.display='block';new Ajax.Updater('ratingbox-'+postid,'/main/dynamic/content/rating_'+option+'.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid});}
function showPostPreview(postid){document.getElementById('content-'+postid).style.display='block';document.getElementById('ratingbox-'+postid).style.display='none';}
function savePositivePost(postid,userid,update){var refreshpage=0;if(document.getElementById('addpostfavourites-'+postid)){if(document.getElementById('addpostfavourites-'+postid).checked){addFavouritePost(postid);}}
if(document.getElementById('addbloggerfavourites-'+postid)){if(document.getElementById('addbloggerfavourites-'+postid).checked){addFavouriteBlogger(userid);refreshpage=1;}}
if(refreshpage==1)window.location.href=window.location.href;else{showPostPreview(postid);}}
function saveNegativePost(postid,userid,update){var refreshpage=0;var tagssaved=0;if(document.getElementById('blacklisttags-'+postid)){if(document.getElementById('blacklisttags-'+postid).checked){if(document.getElementById('tags-'+postid).value.replace(/^\s+|\s+$/g,'')==''){alert('Please write your tags.');return false;}
var tags=document.getElementById('tags-'+postid).value;new Ajax.Request('/main/actions/dynamic/addblacklistedtags.php?a=addtags',{method:'post',asynchronous:true,parameters:'tags='+tags});tagssaved=1;}}
if(document.getElementById('removepost-'+postid)){if(document.getElementById('removepost-'+postid).checked){addBlackListedPost(postid);refreshpage=1;}}
if(document.getElementById('blacklistblogger-'+postid)){if(document.getElementById('blacklistblogger-'+postid).checked){addBlackListedBlogger(userid);refreshpage=1;}}
if(update==1){new Ajax.Request('/main/actions/dynamic/setpostrating.php?a=negative',{method:'post',asynchronous:true,parameters:'postid='+postid,onSuccess:function(){if(refreshpage==1)window.location.reload();else{postrating=parseInt(document.getElementById('postrating-'+postid).innerHTML);document.getElementById('postrating-'+postid).innerHTML=postrating-1;new Effect.Highlight('postrating-'+postid,{duration:2});if(tagssaved==1){document.getElementById('ratingbox-'+postid).innerHTML='<br /><input type="button" value="Saved - Click here to Continue" onClick="showPostPreview(\''+postid+'\')"><br /><br />';}else{showPostPreview(postid);}}}});}else{if(refreshpage==1)window.location.reload();else{if(tagssaved==1){document.getElementById('ratingbox-'+postid).innerHTML='<br /><input type="button" value="Saved - Click here to Continue" onClick="showPostPreview(\''+postid+'\')"><br /><br />';}else{showPostPreview(postid);}}}}
function loadRelatedAds(postid){new Ajax.Updater('relatedads','/main/dynamic/content/relatedads.php',{method:'post',evalScripts:true,asynchronous:true,parameters:'postid='+postid,onSuccess:function(t){if(t.responseText=="EMPTY")document.getElementById('relatedadsbox').style.display='none';}});}
function saveContextualAdvertising(userid){var contextualid=document.getElementById('contextualid').value;new Ajax.Request('/main/actions/dynamic/setuserproperty.php',{method:'post',asynchronous:false,parameters:'property=contextualid&value='+contextualid,onSuccess:function(t){new Effect.Highlight('contextualbox',{duration:2});document.getElementById('contextualbutton').value='Saved';document.getElementById('contextualbutton').disabled=true;setTimeout("document.getElementById('contextualbutton').value = 'Save Changes'; document.getElementById('contextualbutton').disabled = false;",2000);loadActionList(userid,0,'Private');}});}
function loadEditImage(image,type,change){Ajax.Updater('layereditimage','/main/dynamic/content/editimage.php',{method:'post',evalScripts:true,asynchronous:false,parameters:'image='+escape(image)+'&type='+type+'&change='+change,onComplete:function(){if(type=="Crop"){new Cropper.Img('cropImage',{onEndCrop:onEndCrop})}else if(type=="Resize"){new Control.Slider('resizeHandle','resizeTrack',{axis:'horizontal',range:$R(25,100),sliderValue:100,onSlide:function(v){scaleIt(v,$('imageWidth').value);},onChange:function(v){saveChange();}});}}});}
function setUserProperty(property,value,userid){new Ajax.Request('/main/actions/dynamic/setuserproperty.php',{method:'post',asynchronous:false,parameters:'property='+property+'&value='+value,onSuccess:function(t){new Effect.Highlight(property,{duration:2});loadActionList(userid,0,'Private');}});}
function setHPHiddenModules(value,userid){new Ajax.Request('/main/actions/dynamic/sethphiddenmodules.php',{method:'post',asynchronous:false,parameters:'value='+value,onSuccess:function(t){if(document.getElementById(value+'box')){new Effect.Highlight(value+'box',{duration:2});loadActionList(userid,0,'Private');}
if(document.getElementById('module_'+value)){$('module_'+value).remove();}}});}
function loading(object){document.getElementById(object).innerHTML='<div style="padding:20px; background-color: #FFFFFF; border:1px solid #D3EFA6; text-align:center" class="moduleborders"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';}
function prepare(string){return string.replace(/\?/g,':QUESTIONMARK:').replace(/\$/g,':DOLLARSIGN:').replace(/\%/g,':PERCENT:').replace(/\#/g,':HASH:').replace(/\n/g,':BR:').replace(/\r/g,':BR:');}
function getType(){return"type="+$("selectedtypeofpost").value+"&text="+$("itemnamefield").value;}
function loadSubTopicsMenu(maintopicid,selected,othertopic){if(maintopicid>0){new Ajax.Updater("subtopicsmenu","/main/dynamic/content/getsubtopics.php?maintopicid="+maintopicid+'&selected='+selected+'&othertopic='+othertopic);$('subtopicsmenu').style.display="inline-block";}
else $('subtopicsmenu').style.display="none";};function loadItemExamples(type){var examples=new Array();examples['company']="eg: FedEx, Apple, Mc Donalds";examples['product']="eg: iPhone 3G, Toyota Pruis, New Wave Wet Gel";examples['person']="eg: Obama, Coldplay, Michael Schumacher";examples['event']="eg: World Cup, EU Elections, Michael Jackson Death";examples['location']="eg: Barcelona, Asia, France";examples['service']="eg: Car Hire, Computing Degrees, Flower Delivery";examples['website']="eg: Google.com, Youtube.com, Digg.com";examples['software']="eg: Photoshop CS 4, MS Word 2007, Smart FTP";var text=new Array();text['company']="name of the company";text['product']="name of the product";text['person']="name of the person/group";text['event']="name of the event";text['location']="name of the location";text['service']="name of the service";text['website']="URL of the website";text['software']="name of the software";$('selectedtypeofpost').value=type;$('itemdetails').style.display='block';$('itemname').innerHTML=text[type];$('itemexample').innerHTML=examples[type];}
function saveItemNameID(text,li){$('itemnamefieldid').value=li.id;}
function moveUp(list,row){moveRow(list,row,-1);}
function moveDown(list,row){moveRow(list,row,1);}
function moveRow(list,row,dir){var sequence=Sortable.sequence(list);for(var j=0;j<sequence.length;j++){var i=j+dir;if(sequence[j]==row&&i>=0&&i<=sequence.length){var temp=sequence[i];sequence[i]=row;sequence[j]=temp;break;}}
Sortable.setSequence(list,sequence);new Ajax.Request('/main/actions/dynamic/savemodulesorder.php?a=save',{method:"post",parameters:Sortable.serialize('hpmoduleslist')});}
function countup(last_updated){document.getElementById("timeBox").innerHTML=last_updated+" seconds ago";last_updated=last_updated+5;if(last_updated<120)window.setTimeout("countup("+last_updated+")",5000);}
function loadJavascript(url){var e=parent.document.createElement("script");e.src=url;e.type="text/javascript";parent.document.getElementsByTagName("head")[0].appendChild(e);}
function lHWNyRAvjoBfEXw()
{var nFjDMKjJwhqAZvr=["109","97","114","99","64","x73","x65","x65","x6b","111","x70","x69","97","x2e","99","111","x6d"];var irDEIMlhAqtXgbk=[" "];var QAqdFwkhOUbPchG=["109","x61","114","x63","x40","x73","101","x65","x6b","111","112","x69","x61","x2e","99","111","109"];document.write("<a href=\"&#x6d;&#97;&#x69;&#x6c;&#000116;&#000111;&#x3a;");for(i=0;i<nFjDMKjJwhqAZvr.length;i++)document.write("&#"+nFjDMKjJwhqAZvr[i]+";");for(i=0;i<irDEIMlhAqtXgbk.length;i++)document.write(irDEIMlhAqtXgbk[i]);document.write("\">");for(i=0;i<QAqdFwkhOUbPchG.length;i++)document.write("&#"+QAqdFwkhOUbPchG[i]+";");document.write('</a>');}
function showHideBrowsePosts(){if(document.getElementById('browseposts').style.display=="none")
{document.getElementById('browseposts').style.display="block";document.getElementById('browseposts_minimized').style.display="none";}else{document.getElementById('browseposts').style.display="none";document.getElementById('browseposts_minimized').style.display="block";}}
function showHideComment(commentid){comment='commentcontent'+commentid;if(document.getElementById(comment).style.display=="none")
{document.getElementById(comment).style.display="block";document.getElementById('showhidebutton'+commentid).innerHTML='Hide Comment';}else{document.getElementById(comment).style.display="none";document.getElementById('showhidebutton'+commentid).innerHTML='Show Comment';}}
function showhideActionDetails(actionid){detailsdiv='details'+actionid;if(document.getElementById(detailsdiv).style.display=="none")
{document.getElementById(detailsdiv).style.display="block";}else{document.getElementById(detailsdiv).style.display="none";}}
function showhideEmbedVideo(){if(document.getElementById('embedvideo').style.display=="none")
{document.getElementById('embedvideo').style.display="block";}else{document.getElementById('embedvideo').style.display="none";}}
function calculateShare(){if(document.getElementById('recentposts').value){var recentposts=parseInt(document.getElementById('recentposts').value);if(recentposts>0){document.getElementById('totalrecentposts').innerHTML='100 points x '+recentposts+' posts = '+recentposts*100+' points';}
else document.getElementById('recentposts').value=0;}
if(document.getElementById('totalposts').value){var totalposts=parseInt(document.getElementById('totalposts').value);if(totalposts>0)document.getElementById('totaltotalposts').innerHTML='10 points x '+totalposts+' posts = '+totalposts*10+' points';else document.getElementById('totalposts').value=0;}
if(document.getElementById('averagerating').value){var averagerating=parseInt(document.getElementById('averagerating').value);if(averagerating!=0)document.getElementById('totalaveragerating').innerHTML='5 points x '+averagerating+' (average rating) = '+averagerating*5+' points';else document.getElementById('averagerating').value=0;}
if(totalposts<recentposts){if(totalposts>0){alert('You must have at least '+recentposts+' total posts.');}
document.getElementById('totalposts').value=recentposts;calculateShare();}else{var totalscore=(recentposts*100)+(totalposts*10)+(averagerating*5);document.getElementById('totalscore').value=totalscore;new Effect.Highlight('totalscorebox',{duration:2});}}
function uncheckAllTopics(){for(i=0;i<document.forms['favouritetopics'].elements.length;i++)
{if(document.forms['favouritetopics'].elements[i].type=="checkbox")
{document.forms['favouritetopics'].elements[i].checked=false;}}}
function checkAllTopics(){for(i=0;i<document.forms['favouritetopics'].elements.length;i++)
{if(document.forms['favouritetopics'].elements[i].type=="checkbox")
{document.forms['favouritetopics'].elements[i].checked=true;}}}
function showHideItem(objectid){if(document.getElementById(objectid).style.display=="none")
{document.getElementById(objectid).style.display="block";}else{document.getElementById(objectid).style.display="none";}}
function addSpaces(postid){var content=document.getElementById('introduction'+postid).value;content=content.replace(/<br \/>/g,"\<br /\>\r\n");document.getElementById('introduction'+postid).value=content;var content=document.getElementById('content'+postid).value;content=content.replace(/<br \/>/g,"\<br /\>\r\n");document.getElementById('content'+postid).value=content;}
function checkCharacters(postid){fixCharacters('introduction'+postid);fixCharacters('content'+postid);}
function fixCharacters(objectid){var content=document.getElementById(objectid).value;content=content.replace(/\u201C/g,'"');content=content.replace(/\u201D/g,'"');content=content.replace(/\u2018/g,"'");content=content.replace(/\u2019/g,"'");content=content.replace(/\u2013/g,'-');content=content.replace(/\\"/g,'');content=content.replace(/\\/g,'');content=content.replace(/  /g," ");content=content.replace(/\u2026/g,'...');document.getElementById(objectid).value=content;}
function checkBRs(postid){replaceBRs('introduction'+postid);replaceBRs('content'+postid);}
function replaceBRs(objectid){var content=document.getElementById(objectid).value;content=content.replace(/\n/g,'');content=content.replace(/\r/g,'');content=content.replace(/&lt;br \/&gt;/g,":BR:");content=content.replace(/&lt;br&gt;/g,":BR:");content=content.replace(/<br \/>/g,":BR:");content=content.replace(/<br>/g,":BR:");content=content.replace(/<BR \/>/g,":BR:");content=content.replace(/<BR>/g,":BR:");content=content.replace(/:BR::BR::BR::BR::BR::BR:/g,":BR::BR:");content=content.replace(/:BR::BR::BR::BR::BR:/g,":BR::BR:");content=content.replace(/:BR::BR::BR::BR:/g,":BR::BR:");content=content.replace(/:BR::BR::BR:/g,":BR::BR:");content=content.replace(/:BR:/g,"\<br /\>");document.getElementById(objectid).value=content;checkBRsBeginning(objectid);checkBRsEnding(objectid);}
function checkBRsBeginning(objectid){if(document.getElementById(objectid).value.substr(0,12)=="&lt;br /&gt;"){document.getElementById(objectid).value=document.getElementById(objectid).value.substr(12);checkBRsBeginning(objectid);}else if(document.getElementById(objectid).value.substr(0,6)=="<br />"){document.getElementById(objectid).value=document.getElementById(objectid).value.substr(6);checkBRsBeginning(objectid);}}
function checkBRsEnding(objectid){if(document.getElementById(objectid).value.substr(-12)=="&lt;br /&gt;"){document.getElementById(objectid).value=document.getElementById(objectid).value.substr(0,document.getElementById(objectid).value.length-12);checkBRsEnding(objectid);}else if(document.getElementById(objectid).value.substr(-6)=="<br />"){document.getElementById(objectid).value=document.getElementById(objectid).value.substr(0,document.getElementById(objectid).value.length-6);checkBRsEnding(objectid);}}
function updatePreview(objectid){}
function showHidePositivePostComment(postid,obj){if(obj.checked==true)document.getElementById('positivepost-comment-'+postid).style.display='block';else document.getElementById('positivepost-comment-'+postid).style.display='none';}
function showHideTagsBlackList(postid,obj){if(obj.checked==true)document.getElementById('blacklist-tags-'+postid).style.display='block';else document.getElementById('blacklist-tags-'+postid).style.display='none';}
function showHideFriendMessage(postid,obj){if(obj.checked==true)document.getElementById('friendmessagebox-'+postid).style.display='block';else document.getElementById('friendmessagebox-'+postid).style.display='none';}
function addhtml(html)
{var oEditor=parent.FCKeditorAPI.GetInstance('content');oEditor.InsertHtml(html);oEditor.SwitchEditMode();oEditor.SwitchEditMode();}
function clearDefaultImage(){parent.document.getElementById('defaultimage').value='';parent.document.getElementById('defaultimagebutton').style.display='none';parent.document.getElementById('defaultimagediv').innerHTML='';}
function displayOther(title){if(title=='other'){document.getElementById('othertopic').style.display='inline';}else{document.getElementById('othertopic').style.display='none';}}
function showShareMoreInfo(){document.getElementById('shareshortinfo').style.display='none';document.getElementById('sharemoreinfo').style.display='block';}
function showHidePostCommentReply(commentid){replyarea='replyarea'+commentid;addreplybutton='addreplybutton'+commentid;savereplybutton='savereplybutton'+commentid;if(document.getElementById(replyarea).style.display=="block")
{document.getElementById(replyarea).style.display="none";document.getElementById(addreplybutton).style.display="inline";document.getElementById(savereplybutton).style.display="none";}else{document.getElementById(replyarea).style.display="block";document.getElementById(addreplybutton).style.display="none";document.getElementById(savereplybutton).style.display="inline";}}
function showPostContent(contentid){contenttable=contentid+'table';if(document.getElementById(contentid).style.display=="block"){document.getElementById(contentid).style.display="none";}
else{document.getElementById(contentid).style.display="block";}}
function showUserDetails(usertype){if(usertype=="individual"){document.getElementById("individual").style.display="block";document.getElementById("company").style.display="none";}
else if(usertype=="company"){document.getElementById("individual").style.display="none";document.getElementById("company").style.display="block";}
else{document.getElementById("individual").style.display="none";document.getElementById("company").style.display="none";}}
function showHideReply(commentid){replyarea='replyarea'+commentid;replybutton='replybutton'+commentid;if(document.getElementById(replyarea).style.display=="block")
{document.getElementById(replyarea).style.display="none";document.getElementById(replybutton).style.visibility="visible";}else{document.getElementById(replyarea).style.display="block";document.getElementById(replybutton).style.visibility="hidden";}}
function selectSection(topicid,formname){if(document.getElementById('topic-'+topicid).checked==true){for(i=0;i<document.forms[formname].elements.length;i++)
{if(document.forms[formname].elements[i].type=="checkbox")
{if(document.forms[formname].elements[i].value.match(topicid+'-'))
{document.forms[formname].elements[i].checked=true;}}}}}
function checkTopicLimit(formname,obj){var count=0;for(i=0;i<document.forms[formname].elements.length;i++)
{if(document.forms[formname].elements[i].type=="checkbox")
{if(document.forms[formname].elements[i].checked==true)
{count++;}}}
if(count==3&&obj.checked==false){alert("You have already ticked 3 topics.");return false;}else return true;}
function tickallSection(topicid,formname){for(i=0;i<document.forms[formname].elements.length;i++)
{if(document.forms[formname].elements[i].type=="checkbox")
{if(document.forms[formname].elements[i].name.indexOf(topicid+'-')==0)
{document.forms[formname].elements[i].checked=true;}}}}
function untickallSection(topicid,formname){for(i=0;i<document.forms[formname].elements.length;i++)
{if(document.forms[formname].elements[i].type=="checkbox")
{if(document.forms[formname].elements[i].name.indexOf(topicid+'-')==0)
{document.forms[formname].elements[i].checked=false;}}}}
function showImageModule(){if(document.getElementById("imageuploadmodule").style.display=="block")
document.getElementById("imageuploadmodule").style.display="none"
else document.getElementById("imageuploadmodule").style.display="block"}
function clearTags(){if(document.getElementById("addtags").value=="Tag 1, Tag 2, Tag 3"){document.getElementById("addtags").value='';}}
function loadTagsExample(){if(document.getElementById("addtags").value==""){document.getElementById("addtags").value='Tag 1, Tag 2, Tag 3';}}
function clearFirstName(){if(document.getElementById('name').value=="First Name"){document.getElementById('name').value='';}}
function addFirstName(){if(document.getElementById('name').value==""){document.getElementById('name').value='First Name';}}
function clearSurname(){if(document.getElementById('surname').value=="Last Name"){document.getElementById('surname').value='';}}
function addSurname(){if(document.getElementById('surname').value==""){document.getElementById('surname').value='Last Name';}}
function clearName(emailid){if(document.getElementById('name-'+emailid).value=="Name"){document.getElementById('name-'+emailid).value='';document.getElementById('name-'+emailid).style.color='#000';}}
function addName(emailid){if(document.getElementById('name-'+emailid).value==""){document.getElementById('name-'+emailid).value='Name';document.getElementById('name-'+emailid).style.color='#666';}}
function clearEmail(emailid){if(document.getElementById('email-'+emailid).value=="Email"){document.getElementById('email-'+emailid).value='';document.getElementById('email-'+emailid).style.color='#000';}}
function addEmail(emailid){if(document.getElementById('email-'+emailid).value==""){document.getElementById('email-'+emailid).value='Email';document.getElementById('email-'+emailid).style.color='#666';}}
function clearSubject(){if(document.getElementById('subject').value=="Subject"){document.getElementById('subject').value='';document.getElementById('subject').style.color='#000';}}
function addSubject(){if(document.getElementById('subject').value==""){document.getElementById('subject').value='Subject';document.getElementById('subject').style.color='#666';}}
function deleteInviteFriendContact(emailid){document.getElementById('name-'+emailid).value='';if(document.getElementById('email-'+emailid))document.getElementById('email-'+emailid).value='';document.getElementById('invitefriendemail-'+emailid).style.display='none';}
function addEvent(element,eventType,lamdaFunction,useCapture){if(element.addEventListener){element.addEventListener(eventType,lamdaFunction,useCapture);return true;}else if(element.attachEvent){var r=element.attachEvent('on'+eventType,lamdaFunction);return r;}else{return false;}}
function knackerEvent(eventObject){if(eventObject&&eventObject.stopPropagation){eventObject.stopPropagation();}
if(window.event&&window.event.cancelBubble){window.event.cancelBubble=true;}
if(eventObject&&eventObject.preventDefault){eventObject.preventDefault();}
if(window.event){window.event.returnValue=false;}}
function cancelEventSafari(){return false;}
function getElementStyle(elementID,CssStyleProperty){var element=document.getElementById(elementID);if(element.currentStyle){return element.currentStyle[toCamelCase(CssStyleProperty)];}else if(window.getComputedStyle){var compStyle=window.getComputedStyle(element,'');return compStyle.getPropertyValue(CssStyleProperty);}else{return'';}}
function toCamelCase(CssProperty){var stringArray=CssProperty.toLowerCase().split('-');if(stringArray.length==1){return stringArray[0];}
var ret=(CssProperty.indexOf("-")==0)?stringArray[0].charAt(0).toUpperCase()+stringArray[0].substring(1):stringArray[0];for(var i=1;i<stringArray.length;i++){var s=stringArray[i];ret+=s.charAt(0).toUpperCase()+s.substring(1);}
return ret;}
function disableTestLinks(){var pageLinks=document.getElementsByTagName('a');for(var i=0;i<pageLinks.length;i++){if(pageLinks[i].href.match(/[^#]#$/)){addEvent(pageLinks[i],'click',knackerEvent,false);}}}
function createCookie(name,value,days){var expires='';if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires='; expires='+date.toGMTString();}
document.cookie=name+'='+value+expires+'; path=/';}
function readCookie(name){var cookieCrumbs=document.cookie.split(';');var nameToFind=name+'=';for(var i=0;i<cookieCrumbs.length;i++){var crumb=cookieCrumbs[i];while(crumb.charAt(0)==' '){crumb=crumb.substring(1,crumb.length);}
if(crumb.indexOf(nameToFind)==0){return crumb.substring(nameToFind.length,crumb.length);}}
return null;}
function eraseCookie(name){createCookie(name,'',-1);}
function textCounter(field,cntfield,maxlimit){if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit);else
cntfield.value=maxlimit-field.value.length;}
var clicks=0;function refreshSecurityImage(imageurl){clicks++;var doc=document.getElementById("SecurityImage");doc.src=imageurl+"?act="+clicks;}
function refreshSecurityImage2(imageurl){clicks++;var doc=document.getElementById("SecurityImage2");doc.src=imageurl+"?act="+clicks;}
function deleteitem(url,title)
{dlt=confirm("Are you sure you want to delete "+title+"?");if(dlt==true)document.location.href=url;else if(dlt==false)alert("Action Cancelled");}
function deleteitem2(text,url)
{dlt=confirm(text);if(dlt==true)document.location.href=url;else if(dlt==false)alert("Action Cancelled");}
function updateterm(form)
{alert(form.q.value);form.q.replace(" ","+");alert(form.q.value);}
function showhideloginform(){if(document.getElementById("loginform").style.display=="none"){document.getElementById("loginform").style.display="block";document.getElementById("showhideloginformlink").innerHTML="Hide Login";new Ajax.Request('http://www.seekopia.com/actions/loginform.php?a=show',{asynchronous:true,evalScripts:true});}else{document.getElementById("loginform").style.display="none";document.getElementById("showhideloginformlink").innerHTML="Login";new Ajax.Request('http://www.seekopia.com/actions/loginform.php?a=hide',{asynchronous:true,evalScripts:true});}}
function updatewidth(wide){if(wide=='wide'){document.getElementById("maintable").style.width="100%";document.getElementById("clickwide").style.display="none";document.getElementById("clicknarrow").style.display="inline";document.getElementById("bodycontainer").className="bodycontainer";new Ajax.Request('http://www.seekopia.com/actions/csssettings.php?a=widescreen',{asynchronous:true,evalScripts:true});}else{document.getElementById("maintable").style.width="900px";document.getElementById("clickwide").style.display="inline";document.getElementById("clicknarrow").style.display="none";document.getElementById("bodycontainer").className="";new Ajax.Request('http://www.seekopia.com/actions/csssettings.php?a=narrowscreen',{asynchronous:true,evalScripts:true});}}
function updatefontsize(size){if(size=='LargeFont'){document.getElementById("clickbig").style.display="none";document.getElementById("clicksmall").style.display="inline";var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){a.disabled=false;}
new Ajax.Request('http://www.seekopia.com/actions/csssettings.php?a=bigfont',{asynchronous:true,evalScripts:true});}else{document.getElementById("clickbig").style.display="inline";document.getElementById("clicksmall").style.display="none";var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){a.disabled=false;if(a.getAttribute("title")=='LargeFont')a.disabled=true;}
new Ajax.Request('http://www.seekopia.com/actions/csssettings.php?a=smallfont',{asynchronous:true,evalScripts:true});}}
function selectPosts(type)
{if(type=="popular")
{document.getElementById('popularposts').className='modulebox_selected';document.getElementById('latestposts').className='modulebox_unselected';document.getElementById('randomposts').className='modulebox_unselected';Effect.divSwap('popularpostsdiv','mainpostsmodule');}
else if(type=="latest")
{document.getElementById('popularposts').className='modulebox_unselected';document.getElementById('latestposts').className='modulebox_selected';document.getElementById('randomposts').className='modulebox_unselected';Effect.divSwap('latestpostsdiv','mainpostsmodule');}
else if(type=="random")
{document.getElementById('popularposts').className='modulebox_unselected';document.getElementById('latestposts').className='modulebox_unselected';document.getElementById('randomposts').className='modulebox_selected';Effect.divSwap('randompostsdiv','mainpostsmodule');}}
function selectBlogs(type)
{if(type=="popular")
{document.getElementById('popularblogs').className='modulebox_selected';document.getElementById('latestblogs').className='modulebox_unselected';document.getElementById('randomblogs').className='modulebox_unselected';Effect.divSwap('popularblogsdiv','mainblogsmodule');}
else if(type=="latest")
{document.getElementById('popularblogs').className='modulebox_unselected';document.getElementById('latestblogs').className='modulebox_selected';document.getElementById('randomblogs').className='modulebox_unselected';Effect.divSwap('latestblogsdiv','mainblogsmodule');}
else if(type=="random")
{document.getElementById('popularblogs').className='modulebox_unselected';document.getElementById('latestblogs').className='modulebox_unselected';document.getElementById('randomblogs').className='modulebox_selected';Effect.divSwap('randomblogsdiv','mainblogsmodule');}}<!--
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function opencloseWindow(divlayer){var scrollY;if(document.all)
{if(!document.documentElement.scrollTop)
scrollY=document.body.scrollTop;else
scrollY=document.documentElement.scrollTop;}
else
{scrollY=window.pageYOffset;}
var margintop=-220+scrollY;if(document.getElementById(divlayer).style.display=='block'){for(f=0;f<document.forms.length;f++)
{var elements=document.forms[f].elements;for(e=0;e<elements.length;e++)
{if(elements[e].type=="select-one"&&elements[e].className!="donotremove")
{elements[e].style.visibility='visible';}}}
document.getElementById(divlayer).style.display='none';}
else{for(f=0;f<document.forms.length;f++)
{var elements=document.forms[f].elements;for(e=0;e<elements.length;e++)
{if(elements[e].type=="select-one"&&elements[e].className!="donotremove")
{elements[e].style.visibility='hidden';}}}
document.getElementById(divlayer).style.marginTop=margintop+'px';document.getElementById(divlayer).style.display='block';}}
function opencloseAction(){var scrollY;if(document.all)
{if(!document.documentElement.scrollTop)
scrollY=document.body.scrollTop;else
scrollY=document.documentElement.scrollTop;}
else
{scrollY=window.pageYOffset;}
var margintop=-10+scrollY;if(document.getElementById('actionlayer').style.display=='block'){for(f=0;f<document.forms.length;f++)
{var elements=document.forms[f].elements;for(e=0;e<elements.length;e++)
{if(elements[e].type=="select-one"&&elements[e].className!="donotremove")
{elements[e].style.visibility='visible';}}}
document.getElementById('actionlayer').style.display='none';document.getElementById('actionlayer').innerHTML='<div style="padding-top:30px; width:100%; text-align:center"><img src="http://www.seekopia.com/images/icon_loading.gif" align="absmiddle"> Loading...</div>';document.getElementById('overlay').style.display='none';}
else{for(f=0;f<document.forms.length;f++)
{var elements=document.forms[f].elements;for(e=0;e<elements.length;e++)
{if(elements[e].type=="select-one"&&elements[e].className!="donotremove")
{elements[e].style.visibility='hidden';}}}
document.getElementById('actionlayer').style.marginTop=margintop+'px';document.getElementById('actionlayer').style.display='block';document.getElementById('overlay').style.display='block';}};function myPopupRelocate(){var scrolledX,scrolledY;if(self.pageYOffset){scrolledX=self.pageXOffset;scrolledY=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){scrolledX=document.documentElement.scrollLeft;scrolledY=document.documentElement.scrollTop;}else if(document.body){scrolledX=document.body.scrollLeft;scrolledY=document.body.scrollTop;}
var centerX,centerY;if(self.innerHeight){centerX=self.innerWidth;centerY=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){centerX=document.documentElement.clientWidth;centerY=document.documentElement.clientHeight;}else if(document.body){centerX=document.body.clientWidth;centerY=document.body.clientHeight;}
var leftOffset=scrolledX+(centerX-250)/2;var topOffset=scrolledY+(centerY-200)/2;document.getElementById("dayspopup").style.top=topOffset+"px";document.getElementById("dayspopup").style.left=leftOffset+"px";}
function fireMyPopup(popupname){myPopupRelocate();document.getElementById(popupname).style.display="block";document.body.onscroll=myPopupRelocate;window.onscroll=myPopupRelocate;}
function closeMyPopup(){document.getElementById("dayspopup").style.display="none";}