var result;function spjLoadTool(url,target,imageFile){if(imageFile!=''){document.getElementById(target).innerHTML='


'}jQuery('#'+target).load(url)}function spjClearIt(target){document.getElementById(target).innerHTML=''}function spjValidatePostForm(theForm,guest,topic,img){var reason='';if(guest==1&&theForm.guestname!='undefined')reason+=spjValidateThis(theForm.guestname,sp_forum_vars.noguestname);if(guest==1&&theForm.guestemail!='undefined')reason+=spjValidateThis(theForm.guestemail,sp_forum_vars.noguestemail);if(topic==1&&theForm.newtopicname!='undefined')reason+=spjValidateThis(theForm.newtopicname,sp_forum_vars.notopictitle);reason+=spjEdValidateContent(theForm.postitem,sp_forum_vars.nocontent);var thisPost=spjEdGetEditorContent(theForm);var found=false;var checkWords=new Array();checkWords[0]='MsoPlainText';checkWords[1]='MsoNormal';checkWords[2]='mso-layout-grid-align';checkWords[3]='mso-pagination';checkWords[4]='white-space:';for(i=0;i"+sp_forum_vars.rejected+"
"}if(thisPost.match('"+sp_forum_vars.iframe+"
"}if(reason!=''){var msg=sp_forum_vars.problem+'
'+reason;jQuery('#spPostNotifications').html(msg);jQuery('#spPostNotifications').show('slow');return false}var saveBtn=document.getElementById('sfsave');saveBtn.value=sp_forum_vars.savingpost;var msg='
'+sp_forum_vars.savingpost+' - '+sp_forum_vars.wait+'
';spjDisplayNotification(msg);return true}function spjValidateThis(theField,errorMsg){var error='';if(theField.value.length==0){error=''+errorMsg+'
'}return error}function spjOpenEditor(editorId,formType){jQuery(document).ready(function(){jQuery('#'+editorId).show('slide');var obj=document.getElementById(editorId);obj.scrollIntoView();if(formType=='topic'){document.addtopic.spTopicTitle.focus()}else{spjEdOpenEditor()}})}function spjToggleLayer(whichLayer,speed){if(!speed)speed='slow';jQuery('#'+whichLayer).slideToggle(speed);var obj=document.getElementById(whichLayer);if(whichLayer=='spPostForm'||whichLayer=='sfsearchform'){obj.scrollIntoView()}}function spjQuotePost(postid,intro,forumid,quoteUrl){quoteUrl+='&post='+postid+'&forumid='+forumid;jQuery('#spPostForm').show(function(){jQuery('#postitem').load(quoteUrl,function(content,b){document.getElementById('spPostForm').scrollIntoView();spjEdInsertContent(intro,content)})})}function spjSetPostButton(result,val1,val2,gbuttontext,bbuttontext){var button=document.addpost.newpost;if(result.value==(val1+val2)){button.disabled=false;button.value=gbuttontext}else{button.disabled=true;button.value=bbuttontext}}function spjSetTopicButton(result,val1,val2,gbuttontext,bbuttontext){var button=document.addtopic.newtopic;if(result.value==(val1+val2)){button.disabled=false;button.value=gbuttontext}else{button.disabled=true;button.value=bbuttontext}}function spjChangeURL(menuObj){var i=menuObj.selectedIndex;if(i>0){if(menuObj.options[i].value!='#'){window.location=menuObj.options[i].value}}}function spjReDirect(url){window.location=url}function spjDisplayNotification($m){var offset=jQuery('#spMainContainer').offset();jQuery('html').prepend($m);jQuery('#spNotification').css('left',offset.left);jQuery('#spNotification').show();jQuery('#spNotification').fadeOut(6000,function(){jQuery('#spNotification').remove()})}function spjAutoUpdate(url,timer){var sfInterval=window.setInterval("spjPerformUpdates('"+url+"')",timer)}function spjPerformUpdates(url){updates=url.split('%');for(i=0;i');jQuery('#'+avatarTarget).load(ahahURL);jQuery('#spDeleteUploadedAvatar').hide();return}function spjRemovePool(ahahURL,avatarTarget,spinner){jQuery('#'+avatarTarget).html('');jQuery('#'+avatarTarget).load(ahahURL);jQuery('#spDeletePoolAvatar').hide();return}function spjRemoveNotice(ahahUrl,noticeId){jQuery('#'+noticeId).slideUp();jQuery('#'+noticeId).load(ahahUrl)}function spjSelAvatar(file,msg){document.getElementById('spPoolAvatar').value=file;jQuery('#spPoolStatus').html('

'+msg+'

');return}function spjSpoilerToggle(id,reveal,hide){spjToggleLayer('spSpoilerContent'+id,'fast');cur=jQuery('#spSpoilerState'+id).val();if(cur==0){jQuery('#spSpoilerState'+id).val(1);jQuery('#spRevealLink'+id).html(hide)}else{jQuery('#spSpoilerState'+id).val(0);jQuery('#spRevealLink'+id).html(reveal)}}function spjGetCategories(ahahURL,checked,spinner){if(checked){jQuery('#spCatList').html('');jQuery('#spCatList').show('slide');jQuery('#spCatList').load(ahahURL)}else{jQuery('#spCatList').hide()}}function spjSetProfileDataHeight(){baseHeight=Math.max(jQuery("#spProfileData").outerHeight(true)+10,jQuery("#spProfileMenu").outerHeight(true));jQuery("#spProfileContent").height(baseHeight+jQuery("#spProfileHeader").outerHeight(true))}function spjPopupImage(source,iWidth,iHeight){imgSource='';if(iWidth=='auto'){iWidth="'auto'"}else{iWidth=(Math.floor(iWidth)+10)}if(iHeight=='auto'){iHeight="'auto'"}else{iHeight=(Math.floor(iHeight)+60.8)}jQuery(imgSource).dialog({show:'slide',hide:'clip',position:'center',draggable:true,resizable:true,closeText:'',modal:true,closeOnEscape:true,width:iWidth,height:iHeight,autoOpen:true})}