<script language="Javascript">
function getHumanName(emailAddress)
{	return Blim.getUmanName(emailAddress);	}
function setHumanName(emailAddress, newName)
{	return Blim.setUmanName(emailAddress, newName);	}
function MessengerIsOkay()
{	return ( Blim.isAlive() );
}
function isFriend(emailAddress)
{	return Blim.isInList("FL", emailAddress);
}
function isBlocked(emailAddress)
{	return Blim.isInList("BL", emailAddress);
}
function isAllowed(emailAddress)
{	return Blim.isInList("AL", emailAddress);
}
// policy: if the user adds a friend, we automatically allow and unblock
// the person at the same time
function befriendThisPerson(emailAddress)
{	Blim.addToList("FL", emailAddress);
var executeAllow = "allowThisPerson('" + emailAddress + "');";
var executeUnblock = "unblockThisPerson('" + emailAddress + "');";
setTimeout(executeAllow, 1*1000);
setTimeout(executeUnblock, 2*1000);
}
// policy: do not block when un-buddying-- make sure person is on allow list
function defriendThisPerson(emailAddress)
{	Blim.removeFromList("FL", emailAddress);
var executeAllow = "allowThisPerson('" + emailAddress + "');";
setTimeout(executeAllow, 1*500);
}
function blockThisPerson(emailAddress)
{	Blim.removeFromList("AL", emailAddress);
setTimeout("blockThisPersonCore('" + emailAddress + "');", 1*1000);
}
function blockThisPersonCore(emailAddress)
{	Blim.addToList("BL", emailAddress);
}
function unblockThisPerson(emailAddress)
{	Blim.removeFromList("BL", emailAddress);
setTimeout("allowThisPersonCore('" + emailAddress + "');", 1*1000);
}
function allowThisPerson(emailAddress)
{	Blim.removeFromList("BL", emailAddress);
setTimeout("allowThisPersonCore('" + emailAddress + "');", 1*1000);
}
function allowThisPersonCore(emailAddress)
{	Blim.addToList("AL", emailAddress);
}
function disallowThisPerson(emailAddress)
{	Blim.removeFromList("AL", emailAddress);
setTimeout("blockThisPersonCore('" + emailAddress + "');", 1*1000);
}
// convenience: start a conversation
function StartConversation(emailAddress)
{	Blim.openConversation( emailAddress ); Blim.openMessagesPanel();
}	// convenience: bring up the main Messenger panel
function ShowMessengerPanel()
{	Blim.openMessagesPanel();
}
</script>
<HTML>
<head>
<title>	Choose who can send messages
</title>
<script language="Javascript">
var theList;
var listCount;
var i;
var buttonText;
if ( Blim.isClosedMode() )
{	theList = "AL";
otherList = "BL";
buttonText = "Block";
messageString = "Blocking";
}
else
{	theList = "BL";
otherList = "AL";
buttonText = "Allow";
messageString = "Allowing";
}
listCount = Blim.listLength('FL');
function removePersonFromList(ID)
{	ID = unescape(ID);
window.open("client:showsplash?message=" + messageString + "&action=client:donothing");
Blim.removeFromList(theList, ID);
var stickyListString = 'Blim.addToList("' + otherList + '", "' + ID + '");';
setTimeout(stickyListString, 1*1000);
if (Blim.isClosedMode())
{	var executeMe = "Blim.removeFromList('FL', '" + ID + "');";
setTimeout(executeMe, 2*1000);
}
setTimeout("Reloader();", 3*1000);
}
function Reloader()
{	location.reload(true);
}
function emitSingleItem(ID, humanName)
{	document.write('<form>');
document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td valign=top align=left>");
document.write('<FONT size=-1 COLOR="#E7CE4A"><SHADOW>');
document.write('<input type=button name=singlePerson value="' + buttonText + '"');
document.write(' BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" USESTYLE ');
document.write(' onclick="javascript:void(removePersonFromList(\'' + ID + '\'))" >');
document.write('</SHADOW></FONT>');
document.write("<td width=15><spacer type=horizontal width=15>");
document.write("<td valign=top align=left>");
document.write(humanName + "<br><font size=-1>" + ID);
document.write("</td></tr><tr><td height=10></table>");
document.write('</form><p>');
}
</script>
</head>
<display nosave>
<body bgcolor="#2E2E2A" text="#CBCBCB" link="#FFE99B" vlink="#FFE99B" hspace=0 vspace=0 fontsize="medium">
<table cellspacing=0 cellpadding=0 border=0 bgcolor=#645D5F>
<tr>
<td height=7 colspan=4>
<tr>
<td width=7>
<td width=87 href="wtv-home:/home">
<img src="/ROMCache/WebTVLogoJewel.gif" width=87 height=67>
<td width=7>
<td width=459 valign=bottom>
<img src="wtv-setup:/images/Settings.gif" width=197 height=58>
<tr>
<td height=5 colspan=4>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=15 height=25 bgcolor=#645D5F>
<td width=545 height=25 bgcolor=#2E2E2A gradcolor=#23231F gradangle=90>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td width=8 height=25 valign=top>
<img src="wtv-setup:/images/CornerTop.gif" width=8 height=8>
<td width=78>
<td abswidth=392 valign=middle maxlines=1>
<blackface><font color=#D6D6D6>	Choose who can send messages
</font></blackface>
<td width=21>
<img src="wtv-setup:/images/widget.gif" width=16 height=16>
<td width=34>
<spacer type=vertical size=1><br>
<a href="wtv-guide:/help?topic=Messenger&subtopic=Index"><font sizerange=small color=#E7CE4A><b>Help</b></font></a>
<td width=12>
<img width=1 height=1 src="wtv-mail:/update-light-wtv-token-2295058104-7A30D06D2B14D07410FB5D0C4FABA9FF">
</table>
</table>
<table cellspacing=0 cellpadding=0>
<tr>
<td width=15 rowspan=2 bgcolor=#645D5F>
<td width=48 rowspan=2>
<td width=497 height=237 valign=top>
<form action="wtv-setup:/messenger-validate-list" name="editListForm">
<table cellspacing=0 cellpadding=0>
<tr>
<td height=12 colspan=3>
<tr>
<td abswidth=420 valign=top>
<table border=0 cellspacing=10 cellpadding=0>
<tr>
<td width=10></td>
<td>
<script language="Javascript">
for ( i=0; i<listCount; i++)
{	var ID = Blim.listItem('FL', i);
var humanName = getHumanName(ID);
ID = escape(ID);	document.write("<br>");
emitSingleItem(ID, humanName);
}
</script>
</td>
<td width=10>
</tr>
</table>
</table>
<tr>
<td align=right>
<table cellspacing=0 cellpadding=0>
<tr>
<td>
<spacer type=horizontal size=12>
<font color="#E7CE4A" size=-1><shadow>
<input
type=submit selected
value=Done name="Done" usestyle selected
borderimage="file://ROM/Borders/ButtonBorder2.bif"
width=103>
</shadow></font></form>
<td abswidth=12>
<tr>
<td height=12 colspan=2>
</table>
</table>
</body>
</HTML>
