<!--
/*
Personal Censored Words
Coded By Moose
Don't Edit Or Repost Without Permission
Global Footer
*/
if(!location.href.match(/action=(headersfooters|modifypost|modifyprofile|personalcensoredwords)/)){
if(document.cookie.match(/cenwords=(.+?)(;|$)/i)){
var words = unescape(RegExp.$1);
if(words != '' && !words.match(/rand/)){
var fcensp = words.split(/%%%%/);
var fixlength = parseInt(fcensp.length - 1);
if(fcensp.length != 0){
for(j=0;j<fixlength;j++){
if(fcensp[j] != "" || fcensp[j] != undefined){
var scensp = fcensp[j].split(/<>/);
if(scensp[1] == "" || scensp[1] == undefined){
scensp[1] = "";
}
if(scensp[0] != "" || scensp[0] != undefined){
if(document.cookie.match(/cenwhole=(.+?)(;|$)/)){
var wholecheck = RegExp.$1;
var font = document.getElementsByTagName('font');
for(f=0;f<font.length;f++){
if(font[f].innerHTML.match(new RegExp('(\\s+|\\.|\\?|!|^)('+scensp[0]+')(\\s+|\\.|\\?|!|$)','gi')) && wholecheck == "yes"){
font[f].innerHTML = font[f].innerHTML.replace(new RegExp(RegExp.$2,'gi'),scensp[1]);
}}
for(f=0;f<font.length;f++){
if(font[f].innerHTML.match(new RegExp('('+scensp[0]+')','gi')) && wholecheck == "no"){
font[f].innerHTML = font[f].innerHTML.replace(new RegExp(RegExp.$1,'gi'),scensp[1]);
}}}}}}}}}}
if(location.href.match(/action=viewprofile$/) || location.href.match(new RegExp('action=viewprofile&user='+pb_username+'$'))){
var link = document.getElementsByTagName('a');
for(l=0;l<link.length;l++){
if(link[l].href.match(/modifyprofile/)){
link[l].parentNode.innerHTML += ' - <a href="/index.cgi?action=personalcensoredwords">Modify Personal Censored Words</a>';
}}}
if(location.href.match(/action=personalcensoredwords/)){
var ititlesplit = document.title.split("-")[0];
var navtree = '<center><table width="92%" cellspacing="0" cellpadding="0" align="center"><tr><td valign="top" width="100%"><a href="/index.cgi" class="nav">'+ititlesplit+'</a> :: Personal Censored Words<br />';
document.title = document.title.split("-")[0] + '- Personal Censored Words';
var table = document.getElementsByTagName('table');
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
var censorwbulk = '';
censorwbulk += '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td width="100%" class="titlebg"><font size="2"><b>Personal Censored Words</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Below is your censored words list. Any word in the "Censor Word" column will be replaced with the word in the "Replacement Word" column. There are 5 blank columns at the bottom of this page to add more censored words. You can also choose if you want the censored words list to only change whole words. When you choose to only censor whole words, if a censored word appears within another word it will not be censored. For example, if you censor "hi" to change to "hello" then "high" will change to "hellogh" unless censor whole words is enabled.<br /><br />Censor whole words: <select id="censorwholewords"><option value="yes">Yes</option><option value="no">No</option></select><br /><br /><table width="650" cellpadding="2" cellspacing="2" border="0">';
if(document.cookie.match(/cenwords=(.+?)(;|$)/i)){
var words = unescape(RegExp.$1);
if(words != '' && !words.match(/rand/)){
var fcensp = words.split(/%%%%/);
if(fcensp.length != 0){
censorwbulk += '<tr><td width="80">Delete?</td><td width="285">Censor Word</td><td width="285">Replacement Word</td></tr>';
var fixlength = parseInt(fcensp.length - 1);
for(j=0;j<fixlength;j++){
if(fcensp[j] != "" || fcensp[j] != undefined){
var scensp = fcensp[j].split(/<>/);
if(scensp[1] == "" || scensp[1] == undefined){
scensp[1] = "";
}
if(scensp[0] != "" || scensp[0] != undefined){
censorwbulk += '<tr><td width="80"><input type="checkbox" id="edcen'+j+'" /></td><td width="285"><input type="text" size="20" value="'+scensp[0]+'" /></td><td width="285"><input type="text" size="20" value="'+scensp[1]+'" /></td></tr>';
}}}}}}
censorwbulk += '<tr><td width="80"></td><td width="285"><input type="text" id="addcen1" size="20" /></td><td width="285"><input type="text" size="20" /></td></tr><tr><td width="80"></td><td width="285"><input type="text" id="addcen2" size="20" /></td><td width="285"><input type="text" size="20" /></td></tr><tr><td width="80"></td><td width="285"><input type="text" id="addcen3" size="20" /></td><td width="285"><input type="text" size="20" /></td></tr><tr><td width="80"></td><td width="285"><input type="text" id="addcen4" size="20" /></td><td width="285"><input type="text" size="20" /></td></tr><tr><td width="80"></td><td width="285"><input type="text" id="addcen5" size="20" /></td><td width="285"><input type="text" size="20" /></td></tr></table><br /><br /><input type="submit" value="Save Censored Words" onClick="savecensor()" /><br /><br /></font></td></tr></table></td></tr></table><br /><br />';
document.write(navtree);
document.write(censorwbulk);
var input = document.getElementsByTagName('input');
var censorwholewords = document.getElementById('censorwholewords');
if(document.cookie.match(/cenwhole=(.+?)(;|$)/)){
var wholecheck = RegExp.$1;
wholecheck = unescape(wholecheck);
if(wholecheck != ""){
for(y=0;y<censorwholewords.length;y++){
if(censorwholewords[y].value == wholecheck){
censorwholewords[y].selected = "true";
}}}}
function savecensor(){
var wcoocheck = censorwholewords.value;
wcoocheck = escape(wcoocheck);
var addcensor = '';
for(k=0;k<input.length;k++){
if(input[k].id.match(/^edcen\d$/) && input[k].checked == false && input[k+1].value != ""){
addcensor += input[k+1].value+'<>'+input[k+2].value+'%%%%';
}}
for(k=0;k<input.length;k++){
if(input[k].id.match(/^addcen\d$/) && input[k].value != ""){
addcensor += input[k].value+'<>'+input[k+1].value+'%%%%';
}}
addcensor = escape(addcensor);
var expr = new Date();
expr.setYear(expr.getFullYear()+100);
document.cookie = 'cenwhole='+wcoocheck+';expires='+expr;
document.cookie = 'cenwords='+addcensor+';expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}
//-->