<!--
/*
Buddy List Version 1.0
Coded By Moose
Don't Edit Or Repost Without Permission
Global Footer
*/
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=buddylist">Manage Buddy List</a>';
}}}
if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/i)){
var td = document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td[i].width=="20%" && td[i].innerHTML.match(/posts/i) && !td[i].innerHTML.match(/Guest/i)){
var link = td[i].getElementsByTagName('a');
for(a=0;a<link.length;a++){
if(link[a].href.match(/viewprofile&user=(\w+)/)){
td[i].innerHTML += '<br /><br /><a href="javascript: addMPBud(\''+RegExp.$1+'\',\''+link[a].getElementsByTagName('font')[0].innerHTML+'\')">Add Buddy</a>';
break;
}}}}
function addMPBud(user,display){
var addcon = confirm("Are you sure you want to add "+display+" as a buddy?");
if(addcon){
var list = '';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
list += RegExp.$1;
}
var addbuddy = display+'<>'+user+'<><>fr%%%%';
addbuddy = escape(addbuddy);
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
list += addbuddy;
document.cookie = 'budds='+list+';expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}}
if(location.href.match(/action=pmsend/)){
var td = document.getElementsByTagName('td');
for(t=0;t<td.length;t++){
if(td[t].width == "30%"  && td[t].className == "windowbg2" && td[t].innerHTML.match(/Message:/)){
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
var pmbudtab = '';
pmbudtab += '<br /><br /><br /><table width="35%" border="0" cellpadding="4" cellspacing="1" border="0" class="bordercolor"><tr><td width="100%" class="titlebg"><center><font size="2"><b>Buddies</b></font></center></td></tr><tr><td width="100%" class="windowbg"><font size="2">';
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
pmbudtab += '<a href="javascript: addPMBud(\''+budinfo[1]+'\')">'+budinfo[0]+'</a><br />';
}}
pmbudtab += '</font></td></tr></table><br /><br />';
td[t].innerHTML += pmbudtab;
}}}
function addPMBud(pmbuddy){
var toin = document.getElementsByName('to')[0];
if(toin.value.match(/^(\s+|)$/)){
toin.value = toin.value.replace(/^\s+$/,'');
toin.value += pmbuddy;
} else {
toin.value += ','+pmbuddy;
}}}
if(location.href.match(/action=buddylist$/)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Manage Buddy List';
var table = document.getElementsByTagName('table');
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> :: Manage Buddy List<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
document.write('<table border="0" width="75%" 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>Manage Buddy List</b></font></td></tr><tr><td width="100%" class="windowbg"><font id="optionhold" size="2"><a href="/index.cgi?action=buddylist&area=view">View Buddy List</a><br /><a href="/index.cgi?action=buddylist&area=add">Add Buddy</a><br /><a href="/index.cgi?action=buddylist&area=edit">Edit Buddy</a><br /><a href="/index.cgi?action=buddylist&area=delete">Delete Buddy</a><br /><a href="/index.cgi?action=buddylist&area=massdelete">Mass Delete Buddies</a></font></td></tr></table></td></tr></table><br /><br />');
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var optionhold = document.getElementById('optionhold');
var addpms = '';
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length-2;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
addpms += budinfo[1]+',';
}}
var lastbud = list[list.length-2].split(/<>/);
addpms += lastbud[1];
var br = document.createElement('br');
var link = document.createElement('a');
link.href = '/index.cgi?action=pmsend&to='+addpms;
var text = document.createTextNode('Mass PM Buddies');
link.appendChild(text);
optionhold.appendChild(br);
optionhold.appendChild(link);
}}
if(location.href.match(/action=buddylist&area=view/)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- View Buddy List';
var table = document.getElementsByTagName('table');
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> :: View Buddy List<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
document.write('<table border="0" width="75%" 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>View Buddy List</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Here you can view your buddies. There are multiple options as to what you can do to each buddy on your list.</font></td></tr></table></td></tr></table><br /><br />');
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
var status = '';
if(budinfo[3] == "fr"){
status = "Friend";
} else if(budinfo[3] == "bfr"){
status = "Best Friend";
} else if(budinfo[3] == "byf"){
status = "Boyfriend";
} else if(budinfo[3] == "glf"){
status = "Girlfriend";
} else {
status = "No Relation";
}
document.write('<table border="0" width="75%" 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>'+budinfo[0]+'</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Status: '+status+'<br /><br />'+budinfo[2]+'<br /><br /><a href="/index.cgi?action=pmsend&to='+budinfo[1]+'">PM Buddy</a> - <a href="/index.cgi?action=buddylist&area=edit&user='+budinfo[1]+'">Edit Buddy</a> - <a href="javascript: delQuiBud(\''+budinfo[1]+'\')">Delete Buddy</a></font></td></tr></table></td></tr></table><br /><br />');
}}}
function delQuiBud(qudeluse){
var delval = qudeluse;
var delcon = confirm("Are you sure you want to delete this buddy?");
if(delcon){
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
if(list.length < 3){
var expr = new Date("January 1, 1964");
expr = expr.toGMTString();
document.cookie = 'budds=;expires='+expr;
} else {
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var deleteit = unescape(RegExp.$1);
var firstcheck = deleteit.split(/%%%%/);
for(f=0;f<firstcheck.length;f++){
if(firstcheck[f] != ""){
var secondcheck = firstcheck[f].split(/<>/);
if(secondcheck[1] == delval){
var newregular = new RegExp(secondcheck[0]+'<>'+secondcheck[1]+'<>'+secondcheck[2]+'<>'+secondcheck[3]+'%%%%','i');
}}}
deleteit = deleteit.replace(newregular,'');
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
document.cookie = 'budds='+deleteit+';expires='+expr;
}}
location.href = '/index.cgi?action=viewprofile';
}}}}
if(location.href.match(/action=buddylist&area=add/)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Add Buddy';
var table = document.getElementsByTagName('table');
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> :: Add Buddy<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
document.write('<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>Add Buddy</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Here you can add a buddy to your buddy list. Simply fill out the fields below. Only the first two fields are required.<br /><br /><b>Add Buddy</b><hr size="1" /><table width="650" cellpadding="2" cellspacing="2" border="0"><tr><td width="160" valign="top"><font size="-1">Buddy Contact Appearance:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="budapp" /></font></td><td width="245" valign="top"><font size="-2">This is how your newly buddy will appear on your list. It\'s just a simple way to understand who they are in your contact book. It can be their display name or a pet name.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Buddy Username:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="buduser" /></font></td><td width="245" valign="top"><font size="-2">This is for the username of your buddy. Simply enter their username here.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Description:</font></td><td width="245" valign="top"><font size="-1"><textarea id="buddesp" rows="5" cols="32"></textarea></font></td><td width="245" valign="top"><font size="-2">Here you can enter a description for your buddy. It\'s not mandatory.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Status:</font></td><td width="245" valign="top"><font size="-1"><select id="budstatus" /><option value="fr">Friend</option><option value="bfr">Best Friend</option><option value="byf">Boyfriend</option><option value="glf">Girlfriend</option><option value="no">No Relation</option></select></font></td><td width="245" valign="top"><font size="-2">This is the status of your buddy to you. They can be just a friend, your best friend, boyfriend or girlfriend, or not be anything in relation to you. This is not mandatory.</font></td></tr><tr><td width="30" valign="top"><br /><input type="submit" value="Add Buddy" onClick="addBuddy()" /></td></tr></table></td></tr></table></td></tr></table></td></tr></table><br /><br />');
var budapp = document.getElementById('budapp');
var buduser = document.getElementById('buduser');
var buddesp = document.getElementById('buddesp');
var budstatus = document.getElementById('budstatus');
function addBuddy(){
var list = '';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
list += RegExp.$1;
}
var addbuddy = budapp.value+'<>'+buduser.value+'<>'+buddesp.value+'<>'+budstatus.value+'%%%%';
addbuddy = escape(addbuddy);
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
list += addbuddy;
document.cookie = 'budds='+list+';expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}
if(location.href.match(/action=buddylist&area=edit$/i)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Edit Buddy';
var table = document.getElementsByTagName('table');
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> :: Edit Buddy<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write('<span id="conholder" style="display:none"></span>');
document.write(navtree);
document.write('<span id="editbulk"></span>');
var editselectarea = '';
editselectarea += '<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>Edit Buddy</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
editselectarea += 'Please select the  buddy you wish to edit.<br/><br/><select id="editselect">';
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
editselectarea += '<option value="'+budinfo[1]+'">'+budinfo[0]+'</option>';
}}
editselectarea += '</select><br/><br/><input type="submit" value="Continue" onClick="editbuddychange()" />';
} else {
editselectarea += 'There are currently no buddies to edit.';
}
editselectarea += '</font></td></tr></table></td></tr></table><br /><br />';
var editbulk = document.getElementById('editbulk');
editbulk.innerHTML=editselectarea;
function editbuddychange(){
var buduname = '';
var budappname = '';
var buddescp = '';
var budrelation = '';
var editselect = document.getElementById('editselect');
var editvalue = editselect.value;
document.getElementById('conholder').innerHTML = editvalue;
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
if(budinfo[1] == editvalue){
buduname += budinfo[1];
budappname += budinfo[0];
buddescp += budinfo[2];
budrelation += budinfo[3];
var newregular = new RegExp(budappname+'<>'+buduname+'<>'+buddescp+'<>'+budrelation+'%%%%','i');
}}}}
var editbuddyarea = '<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>Edit Buddy</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Here you can edit a buddy on your buddy list. Simply fill out the fields below. Only the first two fields are required.<br /><br /><b>Edit Buddy</b><hr size="1" /><table width="650" cellpadding="2" cellspacing="2" border="0"><tr><td width="160" valign="top"><font size="-1">Buddy Contact Appearance:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="budapp" value="'+budappname+'" /></font></td><td width="245" valign="top"><font size="-2">This is how your newly buddy will appear on your list. It\'s just a simple way to understand who they are in your contact book. It can be their display name or a pet name.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Buddy Username:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="buduser" value="'+buduname+'" /></font></td><td width="245" valign="top"><font size="-2">This is for the username of your buddy. Simply enter their username here.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Description:</font></td><td width="245" valign="top"><font size="-1"><textarea id="buddesp" rows="5" cols="32">'+buddescp+'</textarea></font></td><td width="245" valign="top"><font size="-2">Here you can enter a description for your buddy. It\'s not mandatory.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Status:</font></td><td width="245" valign="top"><font size="-1"><select id="budstatus" /><option value="fr">Friend</option><option value="bfr">Best Friend</option><option value="byf">Boyfriend</option><option value="glf">Girlfriend</option><option value="no">No Relation</option></select></font></td><td width="245" valign="top"><font size="-2">This is the status of your buddy to you. They can be just a friend, your best friend, boyfriend or girlfriend, or not be anything in relation to you. This is not mandatory.</font></td></tr><tr><td width="30" valign="top"><br /><input type="submit" value="Edit Buddy" onClick="editBuddy()" /></td></tr></table></td></tr></table></td></tr></table></td></tr></table><br /><br />';
editbulk.innerHTML = editbuddyarea;
var budstatus = document.getElementById('budstatus');
for(z=0;z<budstatus.length;z++){
if(budstatus[z].value == budrelation){
budstatus[z].selected = "true";
}}}
function editBuddy(){
var buduname = '';
var budappname = '';
var buddescp = '';
var budrelation = '';
var editvalue = document.getElementById('conholder').innerHTML;
var budapp = document.getElementById('budapp');
var buduser = document.getElementById('buduser');
var buddesp = document.getElementById('buddesp');
var budstatus = document.getElementById('budstatus');
var editbuddy = budapp.value+'<>'+buduser.value+'<>'+buddesp.value+'<>'+budstatus.value+'%%%%';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
if(budinfo[1] == editvalue){
buduname += budinfo[1];
budappname += budinfo[0];
buddescp += budinfo[2];
budrelation += budinfo[3];
var newregular = new RegExp(budappname+'<>'+buduname+'<>'+buddescp+'<>'+budrelation+'%%%%','i');
}}}}
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.replace(newregular,editbuddy);
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
document.cookie = 'budds='+list+';expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}}
if(location.href.match(/action=buddylist&area=edit&user=(\w+)/i)){
var editvalue = RegExp.$1;
var buduname = RegExp.$1;
var budappname = '';
var buddescp = '';
var budrelation = '';
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Edit Buddy';
var table = document.getElementsByTagName('table');
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> :: Edit Buddy<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
if(budinfo[1] == editvalue){
budappname += budinfo[0];
buddescp += budinfo[2];
budrelation += budinfo[3];
var newregular = new RegExp(budappname+'<>'+buduname+'<>'+buddescp+'<>'+budrelation+'%%%%','i');
}}}}
document.write('<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>Edit Buddy</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">Here you can edit a buddy on your buddy list. Simply fill out the fields below. Only the first two fields are required.<br /><br /><b>Edit Buddy</b><hr size="1" /><table width="650" cellpadding="2" cellspacing="2" border="0"><tr><td width="160" valign="top"><font size="-1">Buddy Contact Appearance:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="budapp" value="'+budappname+'" /></font></td><td width="245" valign="top"><font size="-2">This is how your newly buddy will appear on your list. It\'s just a simple way to understand who they are in your contact book. It can be their display name or a pet name.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Buddy Username:</font></td><td width="245" valign="top"><font size="-1"><input type="text" size="30" id="buduser" value="'+buduname+'" /></font></td><td width="245" valign="top"><font size="-2">This is for the username of your buddy. Simply enter their username here.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Description:</font></td><td width="245" valign="top"><font size="-1"><textarea id="buddesp" rows="5" cols="32">'+buddescp+'</textarea></font></td><td width="245" valign="top"><font size="-2">Here you can enter a description for your buddy. It\'s not mandatory.</font></td></tr><tr><td width="160" valign="top"><font size="-1">Status:</font></td><td width="245" valign="top"><font size="-1"><select id="budstatus" /><option value="fr">Friend</option><option value="bfr">Best Friend</option><option value="byf">Boyfriend</option><option value="glf">Girlfriend</option><option value="no">No Relation</option></select></font></td><td width="245" valign="top"><font size="-2">This is the status of your buddy to you. They can be just a friend, your best friend, boyfriend or girlfriend, or not be anything in relation to you. This is not mandatory.</font></td></tr><tr><td width="30" valign="top"><br /><input type="submit" value="Edit Buddy" onClick="quedBuddy()" /></td></tr></table></td></tr></table></td></tr></table></td></tr></table><br /><br />');
var budstatus = document.getElementById('budstatus');
for(z=0;z<budstatus.length;z++){
if(budstatus[z].value == budrelation){
budstatus[z].selected = "true";
}}}
function quedBuddy(){
if(location.href.match(/action=buddylist&area=edit&user=(\w+)/i)){
var editvalue = RegExp.$1;
var buduname = RegExp.$1;
var budappname = '';
var buddescp = '';
var budrelation = '';
}
var budapp = document.getElementById('budapp');
var buduser = document.getElementById('buduser');
var buddesp = document.getElementById('buddesp');
var budstatus = document.getElementById('budstatus');
var editbuddy = budapp.value+'<>'+buduser.value+'<>'+buddesp.value+'<>'+budstatus.value+'%%%%';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
if(budinfo[1] == editvalue){
budappname += budinfo[0];
buddescp += budinfo[2];
budrelation += budinfo[3];
var newregular = new RegExp(budappname+'<>'+buduname+'<>'+buddescp+'<>'+budrelation+'%%%%','i');
}}}}
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.replace(newregular,editbuddy);
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
document.cookie = 'budds='+list+';expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}
if(location.href.match(/action=buddylist&area=delete/i)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Delete Buddy';
var table = document.getElementsByTagName('table');
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> :: Delete Buddy<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
var deletearea = '<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>Delete Buddy</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">';
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
deletearea += 'Please select the buddy you wish to delete.<br/><br/><select id="deleteselect">';
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
for(l=0;l<list.length;l++){
if(list[l] != ""){
var budinfo = list[l].split(/<>/);
deletearea += '<option value="'+budinfo[1]+'">'+budinfo[0]+'</option>';
}}
deletearea += '</select><br/><br/><input type="submit" value="Delete Buddy" onClick="deleteBud()" />';
} else {
deletearea += 'There are no buddies to delete.';
}
deletearea += '</font></td></tr></table></td></tr></table><br /><br />';
document.write(deletearea);
function deleteBud(){
var delcon = confirm("Are you sure you want to delete this buddy?");
if(delcon){
var deleteselect = document.getElementById('deleteselect');
var delval = deleteselect.value;
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var list = unescape(RegExp.$1);
list = list.split(/%%%%/);
if(list.length < 3){
var expr = new Date("January 1, 1964");
expr = expr.toGMTString();
document.cookie = 'budds=;expires='+expr;
} else {
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
var deleteit = unescape(RegExp.$1);
var firstcheck = deleteit.split(/%%%%/);
for(f=0;f<firstcheck.length;f++){
if(firstcheck[f] != ""){
var secondcheck = firstcheck[f].split(/<>/);
if(secondcheck[1] == delval){
var newregular = new RegExp(secondcheck[0]+'<>'+secondcheck[1]+'<>'+secondcheck[2]+'<>'+secondcheck[3]+'%%%%','i');
}}}
deleteit = deleteit.replace(newregular,'');
var expr = new Date("January 1, 6000");
expr = expr.toGMTString();
document.cookie = 'budds='+deleteit+';expires='+expr;
}}
location.href = '/index.cgi?action=viewprofile';
}}}}
if(location.href.match(/action=buddylist&area=massdelete/)){
var ititlesplit = document.title.split("-")[0];
document.title = document.title.split("-")[0] + '- Mass Delete Buddies';
var table = document.getElementsByTagName('table');
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> :: Mass Delete Buddies<br />';
for(i=4;i<table.length;i++){
table[i].style.display="none";
}
document.write(navtree);
document.write('<table border="0" width="75%" 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>Mass Delete Buddies</b></font></td></tr><tr><td width="100%" class="windowbg"><font size="2">');
if(document.cookie.match(/budds=(.+?)(;|$)/i)){
document.write('From here you may mass delete your buddies. This will remove all of your buddies. Be warned once they have been deleted they can not be recovered. It is suggested you back up all buddies before using this feature so you can re add them if you want them back.<br /><br /><input type="submit" value="Mass Delete Buddies" onClick="massdelBuds()" /><br />');
} else {
document.write('You currently have no buddies to delete.');
}
document.write('</font></td></tr></table></td></tr></table></center><br /><br /><br /><br />');
function massdelBuds(){
var delcon = confirm("Are you sure you want to mass delete your buddies?");
if(delcon){
var expr = new Date("January 1, 1964");
expr = expr.toGMTString();
document.cookie = 'budds=;expires='+expr;
location.href = '/index.cgi?action=viewprofile';
}}}
//-->