
thetable = "";

browser = navigator.appName + " " + navigator.appVersion;


function cell(s)
{
	text = "<td><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><center>" 
			+ s + "</center><FONT></td>";
	return text;
}

function cell2(s)
{
	text = "<td><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'>" 
			+ s + "<FONT></td>";
	return text;
}

function feature(b)
{
	if (b=="") return cell("-");
	else if (b=="+") return cell("<img src='../images/tick.gif' width=11 height=11>");
	else return (cell(b));
}

function row3(name,a,b)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(name) + feature(a) + feature(b) + "</tr>";
	thetable += text;
}

function row(name,a,b,c,d)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(name) + feature(a) + feature(b) + feature(c) 
			+ feature(d) + "</tr>";
	thetable += text;
}

function row11(name,a,b,c,d,e,f,g,h,i,j)
{
	text = "<tr bgcolor='ffeeaa'>" + cell2(name) + feature(a) + feature(b) + feature(c) 
			+ feature(d) + feature(e) + feature(f) + feature(g) + feature(h) + feature(i) 
			+ feature(j) + "</tr>";
	thetable += text;
}

function row10(name,a,b,c,d,e,f,g,h,i)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(name) + feature(a) + feature(b) + feature(c) 
			+ feature(d) + feature(e) + feature(f) + feature(g) + feature(h) + feature(i) 
			+ "</tr>";
	thetable += text;
}

function row8(name,a,b,c,d,e,f,g)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(name) + feature(a) + feature(b) + feature(c) 
			+ feature(d) + feature(e) + feature(f) + feature(g)  
			+ "</tr>";
	thetable += text;
}

function row6(name,a,b,c,d,e)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(name) + feature(a) + feature(b) + feature(c) 
			+ feature(d) + feature(e) 
			+ "</tr>";
	thetable += text;
}

function add(a,b,c)
{
	text = "<tr bgcolor='ffccaa'>" + cell2(a) + cell2(b) + cell2(c) + "</tr>";
	thetable += text;
}

function titles(a)
{
	text = "<tr bgcolor='ff8866'><td colspan=" + cols + "><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong>";
	text += a 
	text += "</strong></font></td></tr>";
	thetable += text;
}

function subtitles(a)
{
	text = "<tr bgcolor='ffccaa'><td colspan=" + cols + "><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'>";
	text += a 
	text += "</font></td></tr>";
	thetable += text;
}

cols = 3;
function setCols(n)
{
	cols = n;
}
width = new Array();
width[0] = "33%";
width[1] = "33%";
width[2] = "33%";
title = new Array();
title[0] = "1";
title[1] = "2";
title[2] = "3";


function setWidths3(a,b,c)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;

}
function setTitles3(a,b,c)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
}
function setTitles6(a,b,c,d,e,f)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
	title[3] = d;
	title[4] = e;
	title[5] = f;
}

function setWidths(a,b,c,d,e)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;
	width[3] = d;
	width[4] = e;
}
function setTitles(a,b,c,d,e)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
	title[3] = d;
	title[4] = e;
}
function setWidths6(a,b,c,d,e,f)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;
	width[3] = d;
	width[4] = e;
	width[5] = f;
}
function setWidths8(a,b,c,d,e,f,g,h)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;
	width[3] = d;
	width[4] = e;
	width[5] = f;
	width[6] = g;
	width[7] = h;
}
function setWidths10(a,b,c,d,e,f,g,h,i,j)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;
	width[3] = d;
	width[4] = e;
	width[5] = f;
	width[6] = g;
	width[7] = h;
	width[8] = i;
	width[9] = j;
}
function setWidths11(a,b,c,d,e,f,g,h,i,j,k)
{
	width[0] = a;
	width[1] = b;
	width[2] = c;
	width[3] = d;
	width[4] = e;
	width[5] = f;
	width[6] = g;
	width[7] = h;
	width[8] = i;
	width[9] = j;
	width[10] = k;
}
function setTitles8(a,b,c,d,e,f,g,h)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
	title[3] = d;
	title[4] = e;
	title[5] = f;
	title[6] = g;
	title[7] = h;
}
function setTitles10(a,b,c,d,e,f,g,h,i,j)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
	title[3] = d;
	title[4] = e;
	title[5] = f;
	title[6] = g;
	title[7] = h;
	title[8] = i;
	title[9] = j;

}
function setTitles11(a,b,c,d,e,f,g,h,i,j,k)
{
	title[0] = a;
	title[1] = b;
	title[2] = c;
	title[3] = d;
	title[4] = e;
	title[5] = f;
	title[6] = g;
	title[7] = h;
	title[8] = i;
	title[9] = j;
	title[10] = k;
}

function starttable()
{
	if (thetable=="") text = "<table width=100% border=0><tr bgcolor='ff8866'>";
	else text = "<tr bgcolor='ff8866'>"
	for (i=0; i<cols; i++)
	{
		text += "<td width=" + width[i] + ">";
		text += "<FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong><center>";
		text += title[i];
		text += "</center></strong></font></td>";
	}
	text += "</tr>";
	thetable += text;
}

function starttable11()
{
	if (thetable=="") text = "<table width=100% border=0><tr bgcolor='aaaaaa'>";
	else text = "<tr bgcolor='aaaaaa'>"
	for (i=0; i<cols; i++)
	{
		text += "<td width=" + width[i] + ">";
		text += "<FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong><center>";
		text += title[i];
		text += "</center></strong></font></td>";
	}
	text += "</tr>";
	thetable += text;
}

function addsubtitles()
{
	text = "<table width=100% border=0><tr bgcolor='ff8866'>";
	text += "<tr bgcolor='ffccaa'>";
	text += "<td></td>";
	text += "<td colspan=2><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong><center>iSlide Pro-X</center></strong></font></td>";
	text += "<td colspan=4><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong><center>iSlide Pro</center></strong></font></td>";
	text += "<td colspan=3><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong><center>iSlide Express</center></strong></font></td>";		
	text += "</tr>";
	thetable += text;

}


function writetable()
{
	document.write(thetable + "</table>");
}






function d_cell(s)
{
	text = "<td align=top><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><center>" 
			+ s + "</center><FONT></td>";
	return text;
}

function d_cell2(s)
{
	text = "<td align=top><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'>" 
			+ s + "<FONT></td>";
	return text;
}

function d_cell3(a,s)
{
	text = "<td align=top><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><a href='/downloads/" + s + "'>" + a + "</a><FONT></td>";
	return text;
}

function d_celldown(s)
{
	text = "<td align=top bgcolor='ccffcc'><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><center><a href='http://www2.imint.com/downloads/" 
			+ s + "'><img src='one.gif' width=20 height=20 border=0 alt='Click here to download'></a><sup>or</sup><a href='http://www3.imint.com/downloads/" 
			+ s + "'><img src='two.gif' width=20 height=20 border=0 alt='Click here to download'></a></center><FONT></td>";
	return text;
}




function d_cellstr(s)
{
	text = "<td align=top><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><strong>" 
			+ s + "</strong><FONT></td>";
	return text;
}

function d_cellstr10(s)
{
	text = "<td align=top width=12%><FONT SIZE=1 FACE='VERDANA,ARIAL,HELVETICA'><center><strong>" 
			+ s + "</strong></center><FONT></td>";
	return text;
}



 

function d_row(a,b,c,d,e,f)
{
	text = "<tr bgcolor='eeeeee'>";
	text += d_cell3(a,f) + d_cell(b) + d_celldown(f) + d_cell(c) + d_cell(d)    + "</tr>";
	document.write(text);
}

function d_rowstr(a,b,c,d,e,f)
{
	text = "<tr bgcolor='cccccc'>";
	text += d_cellstr(a) + d_cellstr10(b) + d_cellstr10(f) + d_cellstr10(c) + d_cellstr10(d) +  "</tr>";
	document.write(text);
}






function undo()
{
	document.itree.undo();
	
}


function add0()
{
	// rem: can't send arrays to an applet, only single strings and integers
	if (document.itree.setEditItem(0,-1))
	{
		newItem = "text:George;id=george| | | | ";	// line of xixl, with | separators between 5 items
		document.itree.addItem(newItem,-1);
	}
	
	
}

function add1()
{
	// rem: can't send arrays to an applet, only single strings and integers
	if (document.itree.setEditItem("Henry",-1))
	{
		newItem = "text:Bob| | | | ";	// line of xixl, with | separators between 5 items
		document.itree.addItem(newItem,-1);
	}
	else alert("Henry is no more - undo or reload.");	
	
}

function add2()
{
	// rem: can't send arrays to an applet, only single strings and integers	
	if (document.itree.setEditItem("Henry",-1))
	{
		newItem = "text:Fred| | | | ";	// line of xixl, with | separators between 5 items
		document.itree.addItem(newItem,1);
	}
	else alert("Henry is no more - undo or reload.");	
}

function add3()
{
	// rem: can't send arrays to an applet, only single strings and integers
	if (document.itree.setEditItem("Henry",-1))
	{
		newItem = "text:Little Henry| | | | ";	// line of xixl, with | separators between 5 items
		document.itree.addItem(newItem,0);
	}
	else alert("Henry is no more - undo or reload.");	
}



function edit()
{
	// rem: can't send arrays to an applet, only single strings and integers
	if (document.itree.setEditItem("Henry",-1))
	{
		newItem = "text:Henrietta;ID=henry| | | | ";	// line of xixl, with | separators between 5 items
		document.itree.setMenuItem(newItem);
	}
	else alert("Henry is no more - undo or reload.");	

}


function cut()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.cut();
	else alert("Henry is no more - undo or reload.");
}

function copy()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.copy();
	else alert("Henry is no more - undo or reload.");	
}

function copyall()
{
	document.itree.copyAll();	
}

function deleet()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.deleteItem();
	else alert("Henry is no more - undo or reload.");	
}

function paste1()
{
	if (!document.itree.setEditItem("Henry",-1)) {alert("Henry is no more - undo or reload."); return;}
	if (!document.itree.setEditItem("George",-1)) add0();
	if (document.itree.setEditItem("Henry",-1)) cut();
	if (document.itree.setEditItem("Henry",-1)) cut();	

	document.itree.setEditItem("George",-1)
	document.itree.paste(-1);
}

function paste2()
{
	if (!document.itree.setEditItem("Henry",-1)) {alert("Henry is no more - undo or reload."); return;}
	if (!document.itree.setEditItem("George",-1)) add0();
	if (document.itree.setEditItem("Henry",-1)) cut();
	if (document.itree.setEditItem("Henry",-1)) cut();	

	document.itree.setEditItem("George",-1)	
	document.itree.paste(1);	
}

function paste3()
{
	if (!document.itree.setEditItem("Henry",-1)) {alert("Henry is no more - undo or reload."); return;}
	if (!document.itree.setEditItem("George",-1)) add0();
	if (document.itree.setEditItem("Henry",-1)) cut();
	if (document.itree.setEditItem("Henry",-1)) cut();	
	document.itree.setEditItem("George",-1)
	document.itree.paste(0);
}

function move1()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(0);
	else alert("Henry is no more - undo or reload.");	
	
}

function move2()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(1);
	else alert("Henry is no more - undo or reload.");	
	
}

function move3()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(2);
	else alert("Henry is no more - undo or reload.");	
	
}

function move4()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(3);
	else alert("Henry is no more - undo or reload.");	
	
}

function move5()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(4);
	else alert("Henry is no more - undo or reload.");	
	
}

function move6()
{
	if (document.itree.setEditItem("Henry",-1)) document.itree.move(5);
	else alert("Henry is no more - undo or reload.");	
	
}



function save()
{
	// for cross-browser compatibility, only allow javascript to extract simple strings and integers from an applet
	var menuSize = document.itree.getMenuSize(0); // gets size of tab 0
	var menuArray = new Array();
	for (i=0; i<menuSize; i++)
	{
		document.itree.setEditItem(i,0);	// set pointer to next line
		menuArray[i] = document.itree.getMenuItem();
	}
	// display first 10 lines
	alertString = "These are the first 10 lines:\t\t\t\t\t\t\t\n\n";
	for (i=0; i<10; i++)
	{
		alertString += "\t" + menuArray[i] + "\n"; 	
	}
	alert(alertString);
}

function cm1()
{
	document.itree.enableEditor(1);
}


function cm2()
{
	document.itree.enableEditor(-1);
}


function dnd1()
{
	document.itree.enableEditor(2);
}


function dnd2()
{
	document.itree.enableEditor(-2);
}

function addChat()
{

	chat = "<!-- Boldchat Chat Button HTML v2.10 (My Chat)--><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td align=\"center\"><a href=\"http://chat.boldchat.com/chat/visitor.jsp?cdid=3266080084\" target=\"_blank\" onClick=\"this.newWindow = window.open('http://chat.boldchat.com/chat/visitor.jsp?cdid=3266080084&url=' + document.location, 'Chat', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=480'); this.newWindow.focus(); this.newWindow.opener = window;return false;\"><script type=\"text/javascript\">document.write('<img src=\"http://www.boldchat.com/bh.ci/3266080084?kill=' + (new Date()).getTime() + '\" width=\"133\" height=\"34\" border=\"0\">');</script><noscript><img alt=\"Chat Now!\" src=\"http://www.boldchat.com/bh.ci/3266080084\" width=\"133\" height=\"34\" border=\"0\"></noscript></a></td></tr></table><!-- /Boldchat Chat Button HTML v2.10 -->";

	document.write(chat);

}
