1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<title>JWChat - Roster</title>
5
<meta http-equiv="content-type" content="text/html; charset=utf-8">
6
<script src="switchStyle.js"></script>
7
<script language="JavaScript1.2">
8
function toggleGrp(name) {
9
parent.top.roster.toggleGrp(name);
14
<div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
15
<nobr><div class="menuitems" func="roster.openChat">Start Chat</div></nobr>
16
<nobr><div class="menuitems" func="roster.openMessage">Send Message</div></nobr>
17
<nobr><div class="menuitems" func="openCustomPresence">Presence</div></nobr>
18
<nobr><div class="menuitems" func="openUserProps">Edit User</div></nobr>
19
<nobr><div class="menuitems" func="openUserInfo">Show Info</div></nobr>
20
<nobr><div class="menuitems" func="openUserHistory" id='hist_menuitem'>History</div></nobr>
21
<nobr><div class="menuitems" func="openUserNote">Edit Note</div></nobr>
22
<div class="menuitems" func="openSubscription">Resubscribe</div>
23
<div class="menuitems" func="removeUser">Remove</div>
25
<div id="gwMenu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
26
<nobr><div class="menuitems" func="openCustomPresence">Presence</div></nobr>
27
<nobr><div class="menuitems" func="openUserProps">Edit</div></nobr>
28
<nobr><div class="menuitems" func="openUserInfo">Show Info</div></nobr>
30
<div id="gChatMenu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
31
<nobr><div class="menuitems" func="openGroupchat">Show</div></nobr>
32
<nobr><div class="menuitems" func="openCustomPresence">Presence</div></nobr>
33
<nobr><div class="menuitems" func="openUserInfo">Show Info</div></nobr>
36
<div id="roster" class="roster">
39
<script language="JavaScript1.2">
41
/* set this variable to 1 if you wish the URLs of the highlighted menu
42
* to be displayed in the status bar
46
var ie5=document.all&&document.getElementById;
47
var ns6=document.getElementById&&!document.all;
49
var menuobj=document.getElementById("ie5menu");
51
var gwMenu=document.getElementById("gwMenu");
53
var gChatMenu=document.getElementById("gChatMenu");
56
function showmenuie5(e){
58
var firingobj=ie5? event.srcElement : e.target;
59
while (firingobj && (!firingobj.className || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected")))
60
firingobj = firingobj.parentNode;
61
if (!firingobj || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected"))
67
var user = parent.top.roster.getUserByJID(parent.top.cutResource(firingobj.id));
69
if (parent.top.isGateway(firingobj.id))
71
else if (user && typeof(user.type) != 'undefined' && user.type == 'groupchat')
74
menuobj = document.getElementById("ie5menu");
76
//Find out how close the mouse is to the corner of the window
77
var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX;
78
var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY;
80
//if the horizontal distance isn't enough to accomodate the width of the context menu
81
if (rightedge<menuobj.offsetWidth) {
82
//move the horizontal position of the menu to the left by it's width
83
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth;
84
if (menuobj.style.left < "2px")
85
menuobj.style.left = "2px";
88
//position the horizontal position of the menu where the mouse was clicked
89
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX;
91
//same concept with the vertical position
92
if (bottomedge<menuobj.offsetHeight) {
93
menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight;
94
if (menuobj.style.top < "2px")
95
menuobj.style.top = "2px";
98
menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY;
100
if (typeof(top.loghost) == 'undefined')
101
document.getElementById('hist_menuitem').style.display = 'none';
103
menuobj.style.visibility="visible";
107
function hidemenuie5(e){
108
menuobj.style.visibility="hidden";
111
function highlightie5(e){
112
var firingobj=ie5? event.srcElement : e.target;
113
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
114
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
115
firingobj.style.backgroundColor="Highlight";
116
// firingobj.style.color="HighlightText";
117
firingobj.style.color="black";
119
window.status=event.srcElement.url;
123
function lowlightie5(e){
124
var firingobj=ie5? event.srcElement : e.target;
125
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
126
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
127
firingobj.style.backgroundColor="Menu";
128
// firingobj.style.color="MenuText";
129
firingobj.style.color="black";
134
function jumptoie5(e){
135
var firingobj=ie5? event.srcElement : e.target;
136
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
137
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode;
138
if (firingobj.getAttribute("func")) {
139
var jid = selobj.id.substring(0,selobj.id.indexOf("/"));
140
eval("parent.top."+firingobj.getAttribute("func")+"('"+jid+"')");
145
var lastUserSelected;
146
function selectUser(el) {
148
lastUserSelected.className = "rosterUser";
149
el.className = "rosterUserSelected";
150
lastUserSelected = el;
153
function userClicked(el,jid) {
156
var user = parent.top.roster.getUserByJID(parent.top.cutResource(jid));
158
if(user && typeof(user.type) != 'undefined' && user.type == 'groupchat')
159
return parent.top.openGroupchat(jid);
161
if (!parent.top.isGateway(jid))
162
return parent.top.roster.openChat(jid);
165
menuobj.style.display='';
166
document.oncontextmenu=showmenuie5;
167
document.onclick=hidemenuie5;