2003-04-10 00:50:15 +02:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta http-equiv="cache-control" content="no-cache">
|
|
|
|
<title>Chat Session</title>
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
var currUsername = window.parent.frames['data'].currUsername;
|
|
|
|
var data = window.parent.frames['data'].data;
|
|
|
|
function printChat() {
|
|
|
|
for (var i in data) {
|
|
|
|
if (data[i][0] == '') {
|
|
|
|
// server message
|
|
|
|
document.write("<div class='chat-statement'><span class='server-message'>"
|
|
|
|
+ data[i][1] + "</span></div>");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// conversation part
|
|
|
|
var partialClassName = (data[i][0] == currUsername) ? "-user" : "";
|
|
|
|
document.write("<div class='chat-statement'><span class='chat-username"
|
|
|
|
+ partialClassName + "'>" + data[i][0]
|
|
|
|
+ ":</span> <span class='chat-text"+ partialClassName
|
|
|
|
+ "'>" + data[i][1] + "</span></div>");
|
|
|
|
}
|
|
|
|
}
|
2003-04-11 20:43:06 +02:00
|
|
|
window.focus();
|
2003-04-10 00:50:15 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
|
|
.chat-username { font-weight : bold; color : blue; }
|
|
|
|
.chat-username-user { font-weight : bold; color : red; }
|
|
|
|
.chat-statement { padding-bottom : 3px; }
|
|
|
|
.server-message { font-color : #999; font-style : italic; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body bgcolor="#ffffff" leftmargin="5">
|
|
|
|
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
printChat();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
var data = window.parent.frames['data'].data;
|
|
|
|
if (data != null) {
|
|
|
|
self.scrollTo(0,(30*data.length));
|
|
|
|
// Do not delete second line! IE needs it for some reason...
|
|
|
|
self.scrollTo(0,(30*data.length));
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|