<HTML>
<HEAD>
<TITLE>Siplet</TITLE>
<LINK REL=StyleSheet HREF="term.css" TYPE="text/css">
	<link rel="coffeemud icon" href="../images/coffeemud.ico" >
<SCRIPT LANGUAGE=JavaScript src="floater.js"></SCRIPT>
<script language=JavaScript>
var allwindows=new Array(10);
var alldivs = new Array(10);
var allapplets=new Array(10);
var currentWindow=0;
for(var i=0;i<10;i++)
	alldivs[i]=null;
function closeWindow()
{
	allwindows[currentWindow].closeWindow();
}
function addToWindow(s)
{
	allwindows[currentWindow].addToWindow(s);
}
function reconnect(s)
{
	allwindows[currentWindow].reconnect();
}
function sendData(me)
{
	allwindows[currentWindow].sendData(me);
}
function addToPrompt(x,att)
{
	allwindows[currentWindow].addToPrompt(x,att);
}
function goDefault(x)
{
	allwindows[currentWindow].goDefault(x);
}
function windowsOpen() 
{
	var num = 0;
	for(var i=0;i<10;i++)
		if(alldivs[i]!=null)
			num++;
	return num;
}
	
function openWindow()
{
	var foundX = -1;
	for(var i=0;i<10;i++)
		if(alldivs[i]==null)
		{
			foundX=i;
			break;
		}
	if(foundX<0)
		window.alert("Unable to open another window.  10 is the limit!");
	else
		openThisWindow(foundX);
}
function openThisWindow(foundX)
{
	currentWindow=foundX;
	var wname='dwindow'+currentWindow;
    var thespan=document.getElementById("EWINDOW" + currentWindow);
    alldivs[currentWindow] = thespan;
    thespan.innerHTML=thespan.innerHTML+getFrameHTML(wname,currentWindow);
    loadwindow('term.cmvp?wnum='+currentWindow,730,355,wname,currentWindow);
}
function rotateWindow()
{
	if(windowsOpen()==0) return;
	var wname='dwindow'+currentWindow;
    var thespan=document.getElementById(wname);
    thespan.style.display='none';
    
    currentWindow++;
    if(currentWindow==10) currentWindow=0;
    while((currentWindow<10)&&(alldivs[currentWindow]==null))
    	currentWindow++;
    if(currentWindow>=10) return;
	wname='dwindow'+currentWindow;
    thespan=document.getElementById(wname);
    thespan.style.display='';
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR=BLACK>
<DIV ID=EWINDOW1 NAME=EWINDOW1>
</DIV>
<DIV ID=EWINDOW2 NAME=EWINDOW2>
</DIV>
<DIV ID=EWINDOW3 NAME=EWINDOW3>
</DIV>
<DIV ID=EWINDOW4 NAME=EWINDOW4>
</DIV>
<DIV ID=EWINDOW5 NAME=EWINDOW5>
</DIV>
<DIV ID=EWINDOW6 NAME=EWINDOW6>
</DIV>
<DIV ID=EWINDOW7 NAME=EWINDOW7>
</DIV>
<DIV ID=EWINDOW8 NAME=EWINDOW8>
</DIV>
<DIV ID=EWINDOW9 NAME=EWINDOW9>
</DIV>
<DIV ID=EWINDOW0 NAME=EWINDOW0>
</DIV>
<SCRIPT LANGUAGE=JavaScript>
window.onload=new Function('openWindow()');
</SCRIPT>
</BODY></HTML>