<HTML>
<HEAD>
<LINK REL=StyleSheet HREF="/siplet/term.css" TYPE="text/css">
<link rel="coffeemud icon" href="../images/coffeemud.ico" >
<SCRIPT LANGUAGE=JavaScript src="/siplet/dropdown.js"></SCRIPT>
<SCRIPT LANGUAGE=JavaScript src="/siplet/siplet.js"></SCRIPT>
<SCRIPT LANGUAGE=JavaScript src="/siplet/termsupport.js"></SCRIPT>
</HEAD>
<BODY BGCOLOR=BLACK ONCLICK="top.term.front(myname,mynum);">
<script language=JavaScript>
setTimeout(connectChecker,10001);
function closeWindow()
{
if(theSiplet)
{
window.console.info("Siplet term closeWindow");
theSiplet.disconnectFromURL();
}
top.document.location.href='/index.cmvp';
}
function reconnect()
{
window.console.info("Siplet term reconnect");
if(theSiplet)
{
if(!theSiplet.isConnecting())
theSiplet.disconnectFromURL();
}
if((!theSiplet) || (!theSiplet.isConnecting()))
setTimeout('connect(top.conndomain,top.connport);',500);
}
function goOffline()
{
//window.console.info("Siplet term go offline.");
theSiplet.disconnectFromURL();
theSiplet=new Siplet();
goRed();
}
var receivedData = function(connected, txt)
{
if(!connected || (!txt) || (txt.substr(0,5)!='true;'))
{
if(!connected)
window.console.info("Siplet not connected.");
else
if(!txt)
window.console.info("Siplet received no packet.");
else
window.console.info("Siplet received bad packet: "+txt.substr(0,5));
goOffline();
}
else
{
txt=txt.substr(5);
var tk=theSiplet.token+";";
handlePacket(txt,tk);
}
}
function displayData()
{
if(!theSiplet.isConnectedToURL())
{
//window.console.info("Siplet: No longer connected for display.");
goOffline();
}
else
theSiplet.getURLData(receivedData);
}
function sendData(me)
{
var s=''+me;
theSiplet.sendData(s,receivedData);
}
function connect(url,port,tries)
{
errorState=false;
goCaution();
gauges=new Array(0);
theSiplet.connectToURL(url,@WebServerPort?CURRENT@,port,function(connectWorked, txt)
{
theSiplet.callback = receivedData;
var s='';
var x=txt.indexOf(';');
if(x<0)
connectWorked=false;
else
{
connectWorked = connectWorked && txt.substr(0,x) == "true";
if(connectWorked == true)
{
txt=txt.substr(x+1);
x=txt.indexOf(';');
theSiplet.token=txt.substr(0,x);
top.term.allapplets[top.term.currentWindow] = theSiplet;
txt=txt.substr(x+1);
var tk=theSiplet.token+";";
var x=txt.indexOf(tk);
if(x<0)
connectWorked=false;
else
s=txt.substr(0,x);
}
}
//window.onerror=null;
var thespan=top.term.document.getElementById(myname+'namer');
thespan.innerHTML=s
gauges=new Array(0);
if(!connectWorked)
{
goRed();
}
else
{
goGreen();
lastReceived = new Date().getTime();
setTimeout('displayData(); top.entry.boxFocus();',pingDelay);
}
});
}
</SCRIPT>
<BR>
<DIV ID=DISPLAYSPAN NAME=DISPLAYSPAN>
</DIV>
<DIV ID=NODISPLAY NAME=NODISPLAY></DIV>
<SPAN ID=musicplayer NAME=musicplayer style="display:none"></SPAN>
<SPAN ID=soundplayer NAME=soundplayer style="display:none"></SPAN>
<script language=JavaScript>
<!--
if(!top.connport)
top.connport=@MudInfo?PORT@;
if(!top.conndomain)
top.conndomain="@MudInfo?DOMAIN@";
theSiplet=new Siplet();
top.term.allapplets[top.term.currentWindow] = theSiplet;
setTimeout('connect(top.conndomain,top.connport);',500);
//-->
</script>
</BODY></HTML>