<!--
/*
Buddy List Version 1.0
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 and set several options for each of them.</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 new 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 user name:</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">Enter your buddy\'s user name here (not their display name).</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. This is optional.</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. They can be just a friend, your best friend or your boyfriend/girlfriend or not be anything in relation to you. This is optional.</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 new 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 user name:</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">Enter your buddy\'s user name here (not their display name).</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. This is optional.</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. They can be just a friend, your best friend or your boyfriend/girlfriend or not be anything in relation to you. This is optional.</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 new 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 user name:</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">Enter your buddy\'s user name here (not their display name).</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. This is optional.</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. They can be a friend, your best friend or your boyfriend/girlfriend or not be anything in relation to you. This is optional.</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. Once they have been deleted, they can not be recovered.<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';
}}}
//-->