<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR = "#FFFFFF">
<HR NOSHADE>
<SCRIPT LANGUAGE = "JavaScript">
// Tree.js
//
// Javascript expandable/collapsable tree class.
// Written by Jef Pearlman (jef@mit.edu)
//
///////////////////////////////////////////////////////////////////////////////
// class Tree
// {
// public:
// // These functions can be used to interface with a tree.
// void TreeView(params);
// // Constructs a TreeView. Params must be an object containing the
// // following properties:
// // id: UNIQUE id for the tree
// // items: Nested array of strings and arrays determining the tree
// // structure and content.
// // x: Optional x position for tree.
// // y: Optional y position for tree.
// int getHeight();
// // Returns the height of the tree, fully expanded.
// int getWidth();
// // Returns the width of the widest section of the tree,
// // fully expanded.
// int getVisibleHeight();
// // Returns the height of the visible tree.
// int getVisibleWidth();
// // Returns the width of the widest visible section of the tree.
// int getX();
// // Returns the x position of the tree.
// int getY();
// // Returns the y position of the tree.
// Object getLayer();
// // Returns the layer object enclosing the entire tree.
// }
function TreeNode(content, enclosing, id, depth, y)
// Constructor for a TreeNode object, creates the appropriate layers
// and sets the required properties.
{
this.id = id;
this.enclosing = enclosing;
this.children = new Array;
this.maxChild = 0;
this.expanded = false;
this.getWidth = TreeNode_getWidth;
this.getVisibleWidth = TreeNode_getVisibleWidth;
this.getHeight = TreeNode_getHeight;
this.getVisibleHeight = TreeNode_getVisibleHeight;
this.layout = TreeNode_layout;
this.relayout = TreeNode_relayout;
this.childLayer = null;
this.parent = this.enclosing.node;
this.tree = this.parent.tree;
this.depth = depth;
// Write out the content for this item.
// Ave - replaced gifs with + / - / o
document.write("<LAYER TOP="+y+" LEFT="+(this.depth*10)+" ID=Item"+this.id+">");
document.write("<LAYER ID=Buttons WIDTH=9 HEIGHT=9>");
document.write("<LAYER ID=Minus VISIBILITY=HIDE WIDTH=9 HEIGHT=9>-</LAYER>");
document.write("<LAYER ID=Plus WIDTH=9 VISIBILITY=HIDE HEIGHT=9>+</LAYER>");
document.write("<LAYER ID=Disabled VISIBILITY=INHERIT WIDTH=9 HEIGHT=9>o</LAYER>");
document.write("</LAYER>"); // Buttons
this.layer = this.enclosing.layers['Item'+this.id];
this.layers = this.layer.layers;
document.write("<LAYER ID=Content LEFT="+(this.layers['Buttons'].x+10)+">"+content+"</LAYER>");
document.write("</LAYER>"); // Item
// Move the buttons to the right position (centered vertically) and
// capture the appropriate events.
// Ave - now aligned top
//this.layers['Buttons'].moveTo(this.layers['Buttons'].x, this.layers['Content'].y+((this.layers['Content'].document.height-9)/2));
this.layers['Buttons'].moveTo(this.layers['Buttons'].x, this.layers['Content'].y);
this.layers['Buttons'].layers['Plus'].captureEvents(Event.MOUSEDOWN);
this.layers['Buttons'].layers['Plus'].onmousedown=TreeNode_onmousedown_Plus;
this.layers['Buttons'].layers['Plus'].node=this;
this.layers['Buttons'].layers['Minus'].captureEvents(Event.MOUSEDOWN);
this.layers['Buttons'].layers['Minus'].onmousedown=TreeNode_onmousedown_Minus;
this.layers['Buttons'].layers['Minus'].node=this;
// Note the height and width;
this.height=this.layers['Content'].document.height;
this.width=this.layers['Content'].document.width + 10 + (depth*10);
}
function Tree_build(node, items, depth, nexty)
// Recursive function builds a tree, starting at the current node
// using the items in items, starting at depth depth, where nexty
// is where to locate the new layer to be placed correctly.
{
var i;
var nextyChild=0;
if (node.tree.version >= 4)
{
// Create the layer for all the children.
document.write("<LAYER TOP="+nexty+" VISIBILITY=HIDE ID=Children>");
node.childLayer = node.enclosing.layers['Children'];
node.childLayer.node = node;
}
else
{
// For Navigator 3.0, create a nested unordered list.
document.write("<UL>");
}
for (i=0; i<items.length; i++)
{
if(typeof(items[i]) == "string")
{
if (node.tree.version >= 4)
{
// Create a new node as the next child.
node.children[node.maxChild] = new TreeNode(items[i], node.childLayer, node.maxChild, depth, nextyChild);
nextyChild+=node.children[node.maxChild].height;
}
else
{
// Create a new item.
document.write("<LI>"+items[i]);
}
node.maxChild++;
}
else
if (node.maxChild > 0)
{
// Build a new tree using the nested items array, placing it
// under the last child created.
if (node.tree.version >= 4)
{
Tree_build(node.children[node.maxChild-1], items[i], depth+1, nextyChild);
nextyChild+=node.children[node.maxChild-1].getHeight()-node.children[node.maxChild-1].height;
node.children[node.maxChild-1].layer.layers['Buttons'].layers['Disabled'].visibility="hide";
node.children[node.maxChild-1].layer.layers['Buttons'].layers['Plus'].visibility="inherit";
}
else
Tree_build(node, items[i], depth+1, nextyChild);
}
}
// End the layer or nested unordered list.
if (node.tree.version >= 4)
document.write("</LAYER>"); // childLayer
else
{
document.write("</UL>");
}
}
function Reposition_footer( )
{
var footer = document.layers[ "Footer" ];
if ( footer != null )
{
footer.moveTo( 5, firstTree.getY() + firstTree.getVisibleHeight() );
}
}
function TreeNode_onmousedown_Plus(e)
// Handle a mouse down on a plus (expand).
{
var node=this.node;
var oldHeight=node.getVisibleHeight();
// Switch the buttons, set the current node expanded, and
// relayout everything below it before before displaying the node.
node.layers['Buttons'].layers['Minus'].visibility="inherit";
node.layers['Buttons'].layers['Plus'].visibility="hide";
node.expanded=true;
node.parent.relayout(node.id,node.getVisibleHeight()-oldHeight);
node.childLayer.visibility='inherit';
Reposition_footer();
return false;
}
function TreeNode_onmousedown_Minus(e)
// Handle a mouse down on a minus (collapse).
{
var node=this.node;
var oldHeight=node.getVisibleHeight();
// Switch the buttons, set the current node collapsed, and
// hide the node before relaying out everything below it.
node.layers['Buttons'].layers['Plus'].visibility="inherit";
node.layers['Buttons'].layers['Minus'].visibility="hide";
node.expanded=false;
node.childLayer.visibility='hide';
node.parent.relayout(node.id,node.getVisibleHeight()-oldHeight);
Reposition_footer();
return false;
}
function TreeNode_getHeight()
// Get the Height of the current node and it's children.
{
// Recursively add heights.
var h=0, i;
for (i = 0; i < this.maxChild; i++)
h += this.children[i].getHeight();
h += this.height;
return h;
}
function TreeNode_getVisibleHeight()
// Get the Height of the current node and it's visible children.
{
// Recursively add heights. Only recurse if expanded.
var h=0, i;
if (this.expanded)
for (i = 0; i < this.maxChild; i++)
h += this.children[i].getVisibleHeight();
h += this.height;
return h;
}
function TreeNode_getWidth()
// Get the max Width of the current node and it's children.
{
// Find the max width by recursively comparing.
var w=0, i;
for (i=0; i<this.maxChild; i++)
if (this.children[i].getWidth() > w)
w = this.children[i].getWidth();
if (this.width > w)
return this.width;
return w;
}
function TreeNode_getVisibleWidth()
// Get the max Width of the current node and it's visible children.
{
// Find the max width by recursively comparing. Only recurse if expanded.
var w=0, i;
if (this.expanded)
for (i=0; i<this.maxChild; i++)
if (this.children[i].getVisibleWidth() > w)
w = this.children[i].getVisibleWidth();
if (this.width > w)
return this.width;
return w;
}
function TreeView_getX()
// Get the x location of the main tree layer.
{
// Return the x property of the main layer.
return document.layers[this.id+"Tree"].x;
}
function TreeView_getY()
// Get the y location of the main tree layer.
{
// Return the y property of the main layer.
return document.layers[this.id+"Tree"].y;
}
function getLayer()
// Get the main layer object.
{
// Returnt he main layer.
return document.layers[this.id+"Tree"];
}
function TreeNode_layout()
// Layout the entire tree from scratch, recursively.
{
var nexty=0, i;
// Set the layer visible if expanded, hidden if not.
if (this.expanded)
this.childLayer.visibility="inherit";
else
if (this.childLayer != null)
this.childLayer.visibility="hide";
// If there is a child layer, move it to the appropriate position, and
// move the children, laying them each out in turn.
if (this.childLayer != null)
{
this.childLayer.moveTo(0, this.layer.y+this.height);
for (i=0; i<this.maxChild; i++)
{
this.children[i].layer.moveTo((this.depth+1)*10, nexty);
this.children[i].layout();
nexty+=this.children[i].height;
}
}
}
function TreeNode_relayout(id, movey)
{
// Move all children physically below the current child number id of
// the current node. Much faster than doing a layout() each time.
// Move all children _after_ this child.
for (id++;id<this.maxChild; id++)
{
this.children[id].layer.moveBy(0, movey);
if (this.children[id].childLayer != null)
this.children[id].childLayer.moveBy(0, movey);
}
// If there is a parent, move all of its children below this node,
// recursively.
if (this.parent != null)
this.parent.relayout(this.id, movey);
}
function Tree(param)
// Instantiates a tree and displays it, using the items, id, and optional
// x and y in param.
{
// Set up member variables and functions. Also duplicate important TreeNode
// member variables so this can serve as a TreeNode (vaguely like
// subclassing)
this.version=eval(navigator.appVersion.charAt(0));
this.id = param.id;
this.children = new Array;
this.maxChild = 0;
this.expanded = true;
this.layout = TreeNode_layout;
this.relayout = TreeNode_relayout;
this.getX = TreeView_getX;
this.getY = TreeView_getY;
this.getWidth = TreeNode_getWidth;
this.getVisibleWidth = TreeNode_getVisibleWidth;
this.getHeight = TreeNode_getHeight;
this.getVisibleHeight = TreeNode_getVisibleHeight;
this.depth = -1;
this.height = 0;
this.width = 0;
this.tree = this;
var items = eval(param.items);
var left = "";
var top = "";
if (param.x != null && param.x != "")
left += " LEFT="+param.x;
if (param.y != null && param.y != "")
top += " TOP="+param.y;
if (this.version >= 4)
{
// Create a surrounding layer to guage size and control the entire tree.
// Also create a secondary internal layer so that the code can treat
// the tree itself correctly as a node (must have an enclosing layer
// and a children layer).
document.write("<LAYER VISIBILITY=HIDE ID="+this.id+"Tree"+left+top+">");
document.write("<LAYER ID=mainLayer>");
this.enclosing = document.layers[this.id+"Tree"].layers['mainLayer'];
this.layers = this.enclosing.layers;
this.layer = this.enclosing;
this.enclosing.node = this;
}
Tree_build(this, items, 0, 0); // Build the tree.
if (this.version >= 4)
{
// Finish output, record size;
document.write("</LAYER></LAYER>");
this.layout();
document.layers[this.id+"Tree"].visibility="inherit";
}
}
</SCRIPT>
<SCRIPT LANGUAGE = "JavaScript">
firstTree = new Tree (
{
id:
"sitemap",
items:
"['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/\">Canon Research Centre Home Page</A></DT><DD>· overview of CRE · technology overview · job opportunities · · where we are · press releases · other canon sites · Canon Research Centre Europe, 1 Occam Court, Occam Road, Surrey Research Park, Guild</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/othrsite.htm\">Other Canon Sites</A></DT><DD>Canon Information Systems Research Australia performs a variety of research and development work for Canon and is one of Australia's leading research and development organisations. Canon Information S</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/index.htm\">Where We Are</A></DT><DD>Canon Research Centre Europe Ltd 1 Occam Court Occam Road Surrey Research Park Guildford, Surrey GU2 5YJ United Kingdom Tel: +44 1483 448844 Fax: +44 1483 448845 From 9am, there is also h+05 (431). ©</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/email.htm\">Contact E-mail Addresses</A></DT><DD>We are only able to answer queries relating to this web site and our research. For answers to any technical questions regarding any existing Canon products or printer drivers, please contact your loc</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/map1.htm\">Surrey</A></DT><DD>This is an active map of Guildford and London. Coming from London, take the second exit signposted to Guildford. Zoom In This page was last updated on 25/01/99 ©Copyright Canon Research Centre Europe </DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/m3.htm\">The M3 Motorway</A></DT><DD>The M3 Motorway The M3 goes out southwest from London, to Portsmouth, Southampton and the Isle of Wight. Coming from London, turn south onto the M25 and then south onto the A3 to get to CRE. This page</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/m4.htm\">The M4 Motorway</A></DT><DD>The M4 Motorway This page was last updated on 25/01/99 ©Copyright Canon Research Centre Europe Ltd 1998</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/heathrow.htm\">Heathrow Airport</A></DT><DD>Take the M4 west away from London, then the M25 south towards Gatwick. General enquiries: +44 181 759 4321 British Airways: +44 181 759 2525 This page was last updated on 25/01/99 ©Copyright Canon Res</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/london.htm\">London</A></DT><DD>To get to CRE from London, you can either go by car, taking the M3, M25, and A3. The London Underground system (the Tube) goes all the way out to Heathrow Airport. Both Waterloo and Victoria are on th</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/gatwick.htm\">Gatwick Airport</A></DT><DD>Take the M23 north towards London, then the M25 west towards Heathrow. General enquiries: +44 1293 535353 To confirm which terminal to use: +44 1293 567675 Car park enquiries: +44 1293 567161 British </DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/waterloo.htm\">By Train from Waterloo</A></DT><DD>There are normally two fast trains an hour from Waterloo to Guildford. Waterloo is in Central London, just south of the river. Rail Information This page was last updated on 11/03/99 ©Copyright Canon </DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/map2.htm\">Guildford</A></DT><DD>Guildford This is an active map of Guildford and London. Click on the red spheres for more information on how to get to CRE, or zoom in to see the location of CRE in the Surrey Research Park. Zoom In </DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/map3.htm\">University of Surrey Research Park</A></DT><DD>University of Surrey Research Park The following map shows our location on the Research Park. Zoom Out This page was last updated on 25/01/99 ©Copyright Canon Research Centre Europe Ltd 1998</DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/m40.htm\">The M40 Motorway</A></DT><DD>The M40 Motorway The M40 goes out northwest from London, to Oxford. It is also a good route to Manchester. Whichever direction you are coming from along it, turn south onto the M25 and then south onto</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/m23.htm\">The M23 Motorway</A></DT><DD>The M23 Motorway The M23 goes out south from London, past Gatwick Airport, to Brighton on the south coast. The journey from Gatwick will take about 40 minutes. This page was last updated on 25/01/99 ©</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/a3.htm\">The A3 Motorway</A></DT><DD>The A3 is not a motorway, but it is as good as a motorway between the M25 and Guildford. Coming from London, this is not the first exit signposted to Guildford. This page was last updated on 25/01/99 </DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/where/m25.htm\">The M25 Motorway</A></DT><DD>The M25 runs all the way around London. Very congested during the morning and evening rush hour. Furthermore, there are major roadwork's underway on either side of the junction where you turn off for </DD></DL>',],],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/press/index.htm\">Press Releases</A></DT><DD>We are planning on updating this page with details of publications and papers that have been produced within CRE. Please return to hear the latest news. This page was last updated on 25/01/99 ©Copyri</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/copy2.htm\">Copyright</A></DT><DD>© Copyright Canon Research Centre Europe Ltd All rights reserved Canon hereby authorizes you to copy documents and information published by Canon on the World Wide Web (henceforth referred to by "docu</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/jobs/index.htm\">Job Opportunities</A></DT><DD>Software Engineering for Speech and Language Technology. If you have any queries please contact: Tel: +44 1483 448844 Fax: +44 1483 448845 This page was last updated on 11/03/99 ©Copyright Canon Resea</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/jobs/softengslt.htm\">Software Engineering for Speech and Language Technology</A></DT><DD>The Speech and Language Division at CRE has a new position for a top quality software engineer. Because of British law, preference will be given to applicants who already have the right to work in th</DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/index.htm\">Overview of CRE</A></DT><DD>What we want to achieve and how we'll do it. A summary of the principles CRE work to. Canon's world-wide corporate philosophy. This page was last updated on 25/01/99 ©Copyright Canon Research Centre E</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/past%20achieve.htm\">Past Achievements</A></DT><DD>Our work at CRE has already led to the formation of two spin-off Canon businesses to exploit our technologies world-wide: Canon Audio: A unique new concept in loudspeakers was developed by CRE, calle</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/kyosei/kyosei.htm\">Kyosei</A></DT><DD>Canon's Philosophy of kyosei means living and working together for the common good. Addressing Imbalances In today's world, there are several imbalances that are obstacles to kyosei. Doing this will r</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/kyosei/commnty.htm\">In the Community</A></DT><DD>University of Surrey - National Science, Mathematics & Engineering Conference University of Essex - Centre for Audio Research & Engineering Busbridge C of E School, Godalming Boxgrove Primary School, </DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/people/index.htm\">Our People</A></DT><DD>Paul Otto, Director of CRE Tim O'Donoghue, Head of Solutions and Systems Eli Tzirkel-Hancock, Head of Speech and Language Allan Davison, Head of Computer Vision This page was last updated on 25/01/99 </DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/people/paulotto.htm\">Paul Otto</A></DT><DD>When Paul Otto walks into a room, he makes an instant impression. "I like the spirit underlying the company," he says. Away from work, Paul spends time with his wife and two children, and has recently</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/people/allan.htm\">Allan Davison</A></DT><DD>Allan joined CRE six-and-a-half years ago, having lectured at London University for the previous ten. " I was looking for a research environment," he explains, "but one that provided more focused work</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/people/tim.htm\">Tim O'Donoghue</A></DT><DD>Tim arrived at CRE direct from the University of Leeds seven years ago, where he'd studied computer science and language processing. The nature of Tim's work means he spends around 30 per cent of his </DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/people/eli.htm\">Eli Tzirkel-Hancock</A></DT><DD>Eli's story is an interesting one. Eli enjoys swimming, ice-skating, chess, bridge and reading, and he can tell you some good stories about his scuba diving. This page was last updated on 25/01/99 ©Co</DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/workcre.htm\">Working at CRE</A></DT><DD>There's more to work than mere work. We will also endeavour - within reason - to supply you with any hardware, software or reference books you may need to facilitate your particular project. Massage a</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/mission.htm\">CRE Mission - Technological Innovation for Cano</A></DT><DD>To ensure Canon has a technical edge where it matters - by providing world-leading R&D, and world-class development and support. CRE is part of Canon's commitment to research and development with worl</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/overview/prncpls.htm\">Canon's R&D Principles</A></DT><DD>We do not conduct R&D that is not desirable from an ecological point of view. 3. We create previously unexplored technologies and product categories. 4. This page was last updated on 23/02/99 ©C</DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/techover/index.htm\">Technology Overview</A></DT><DD>Solutions and Systems Speech and Language Computer Vision Each of these working groups shares CRE's commitment to research and development This page was last updated on 25/01/99 ©Copyright Canon Resea</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/techover/s&lg.htm\">Speech and Language Division</A></DT><DD>With around 20 members, the Speech and Language Group is the largest research group at CRE. Whilst the main focus of the group is to perform world-class research, we are also engaged in the transfer o</DD></DL>','<DD><DT><A HREF = \"http://www.cre.canon.co.uk/techover/s&s.htm\">Solutions and Systems Division</A></DT><DD>The group's highest-profile project to date has undoubtedly been the development of Adroit, a memory-based translation system which is used by Canon Europa to assist in the localisation of Canon's pro</DD></DL>',['<DD><DT><A HREF = \"http://www.cre.canon.co.uk/techover/adroit.htm\">Adroit</A></DT><DD>The Adroit system is used by Canon Europa to assist in the localisation and production of user documentation in Europe. The translation component of Adroit utilises a large database of previously tran</DD></DL>',],'<DD><DT><A HREF = \"http://www.cre.canon.co.uk/techover/cvg.htm\">Computer Vision Group</A></DT><DD>A relaxed and professional atmosphere prevails in the Computer Vision Group, which has members drawn from a variety of backgrounds including university research, consultancy and other commercial resea</DD></DL>',],],]"});
</SCRIPT>
<LAYER ID = "Footer">
<TABLE BORDER=1>
<TR><TD>+</TD>
<TD>Click to expand sub-pages</TD>
<TR><TD>-</TD>
<TD>Click to contract sub-pages</TD>
<TR><TD>o</TD>
<TD>No sub-pages</TD>
</TABLE>
<HR NOSHADE>
<TABLE WIDTH = "100%">
<TR>
<TD VALIGN = "TOP" ALIGN = "LEFT">
sitemapper.pl version 1.007
</TD>
<TD VALIGN = "TOP" ALIGN = "RIGHT">
<A HREF = "mailto:Ave.Wrigley@itn.co.uk">Ave.Wrigley@itn.co.uk</A>
</TD>
</TR>
<TR>
<TD COLSPAN = 2 VALIGN = "TOP" ALIGN = "LEFT">
Generated on Thursday the 25th of March 1999 at 03:42:28 PM
</TD>
</TR>
</TABLE>
</LAYER>
<SCRIPT LANGUAGE = "JavaScript">
Reposition_footer();
</SCRIPT>
</BODY>
</HTML>