
function ToggleTree() {
	
	txt1 = "<cc1:TreeLink id='TreeLink1' runat='server' QueryID='xml' TemplatePath='~/SmartLinks/esTree.ascx' XmlDataSource='~/tree.xml'></cc1:TreeLink></div>";
	txt2 = "1234";
	
	//document.all.item("leftpanel").innerHTML = txt1;
	TreeLink1.Visible = !TreeLink1.Visible;
	
}

function UpdateHeaderTitle(txt) {
	document.all.item("PageTitle").innerHTML = txt;
}
		
function OnNodeClick(node) {
	var txt = "";
	//txt = DMAPI.getValue(node, "StaticUrl");
	
	if ((DMAPI.getValue(node, "StaticUrl") != null) && (DMAPI.getValue(node, "StaticUrl") != ""))
		txt += "<a href=" +  DMAPI.getValue(node, "StaticUrl") + ">";
	txt += "<b>" + DMAPI.getValue(node,"Message") + "</b><br>";
	if ((DMAPI.getValue(node, "StaticUrl") != null) && (DMAPI.getValue(node, "StaticUrl") != ""))
		txt += "</a>";
	txt += DMAPI.getValue(node, "Description") + "<br>";  
	document.all.msg.innerHTML = txt;
	return 3;
	

	alert(txt);
}
					
//function OnNodeClick(node) {
function GetNodeDescription(node) {
	var a = node.type ? node.a : node;
	var href = a.href;
	n = href.indexOf("=");
	ref = href.substring(n+1);
	txt = ref;

	if (ref == "") txt = "Home";

	else if (ref == "+1+1") txt = "<b>Home</b><br>Back to the web site home page (there are two versions)";
	else if (ref == "+2") txt = "<b>Asp.Net based web site</b><br>The pages here are .aspx files";
	else if (ref == "+3") txt = "<b>Html based web site</b><br>The pages here are Html files";

	else if (ref == "+4+4") txt = "<b>Artificial Life</b><br>Alife and Cellular Automata applets";
	else if (ref == "+5+5") txt = "<b>Floys: Territorial alife critters</b><br>Floys - Social, Territorial, Evolving  Java Alife Animals: Floys are simple Artificial Life creatures implemented in Java (and Tcl/Tk). Their life-like emergent behavior is dictated by a few very simple rules. They extend the family of Boids-like programs by adding an aggressive territorial behavior towards strangers. There are three Java versions: Floys are the basic kind, iFloys can have individual personalities and eFloys can also evolve: their evolution is implemented by a genetic algorithm. The fourth version is tFloys, implemented in tcl/Tk";
	else if (ref == "+6+6") txt = "<b>Floys</b><br>Floys belong to the flocking Alife creatures variety, sharing with them the social tendency to stick together,  and the lifelike emergent behavior which is based on a few simple, local rules. They differ from most other Alife flocking (Boids-type) implementations by being territorial animals that defend their territory against intruders. They are implemented as Java applets.";
	else if (ref == "+7") txt = "<b>Floys Overview</b><br>The description below covers the eFloys applet, but applies to Floys and iFloys where it is relevant. The rules of behavior are identical to all three species. The parts dealing with evolution apply only to eFloys. Other sections might be relevant to other applets. although the property names and button labels can be different. ";
	else if (ref == "+8") txt = "<b>Basic Floys</b><br>The basic Floys applet"; 
	else if (ref == "+9") txt = "<b>Individualistic Floys</b><br>iFloys look like ordinary Floys, but they are basically different: While ordinary Floys are all of the same kind, sharing the same properties, iFloys can have an individual character. Each iFloy possesses its own traits, defined by a single chromosome.  In this applet you can assign different traits to different iFloys, and watch the effect on the emergent behavior."; 
	else if (ref == "+10") txt = "<B>Evoloving Floys</B> (evolving Floys), are social,  territorial, evolving artificial life creatures, implemented in Java"; 
	else if (ref == "+11") txt = "<b>Download</b><br>Source Code Download (of all Floys applets)"; 

	else if (ref == "+12") txt = "<b>VML / DHTML Game of Floys</b><br>Game of Floys is a purely browser implemented version of the Floys alife program. It is written in DHTML and VML and does not require either Java or ActiveX. However, it does require MSIE 5.01 or later with the VML option installed"; 
	else if (ref == "+13") txt = "<b>Tcl/Tk Floys</b><br>Floys implemented as a Tcl/Tk tclet"; 
	else if (ref == "+14") txt = "<b>Floys Screen Saver</b><br>The Floys screen saver displays a group of red Floys swimming in an aquarium. A yellow Floy, a stranger, is chased and hit by the red ones, who cannot stand any foreigner in their territory. <p>This is a screen saver implementation of the Floys Alife Java applet. The Floys behavior is discussed in the Floys Overview page. <p>The Floys Screen Saver is fully customizable: you can define its size, the number of Floys, the speed of movement, the background image (you can put one of your own) and other behavioral parameters";
	else if (ref == "+15") txt = "<b>Floys are evolving.</b><br>New species of Floys come into existence, done by Alifers who took the Floys code and evolved it.";

	else if (ref == "+16+16") txt = "<b>Cellular Automata</b><br>";
	else if (ref == "+17") txt = "<b>JcaToi Applet</b><br>This Cellular Automata applet uses the classic Conway's Game of Life rules. However, the CA world (implemented here as an arbitrary background picture) is shared by two parallel, independent, overlapping CA's. <p>It is an interactive applet, where control is achieved through clicking on textual links rather then by the orthodox use of buttons and menus. This enables a  friendlier and more descriptive user interface, not limited by the shorthand language of button and menu captions. <p>You are welcome to follow the text and play with the extremely <B>simple</B>, absolutely <B>deterministic</B> and (almost) totally <B>unpredictable</B> Cellular Automata.";

		
	else if (ref == "+18+18") txt = "<b>Genetic Algorithms</b><br>A general GA toolkit implemented in Java, for experimenting with genetic algorithms and handling optimization problems";
	else if (ref == "+19+19") txt = "<b>GA Playground: Genetic algorithms toolkit in Java</b><p>The GA Playground is a general purpose GA toolkit implemented in Java, designed for experimenting with genetic algorithms and handling optimization problems. New problem definition requires only coding of a fitness function and supplying parameters by an Ascii file (similar to Windows ini file). However,  the structure of the program is very modular and supports overwriting of any GA operator or function, if required.";
	else if (ref == "+20") txt = "<b>Documentation</b><br>Program description, features and parameters";
	else if (ref == "+21") txt = "<b>Examples</b><br>Various examples of optimization problems";
	else if (ref == "+22") txt = "<b>Download</b><br>Download GA Playground for running locally";

	else if (ref == "+23") txt = "<b>GA-List Archives</b><br>The Genetic Algorithms (GA-List) Archive is a repository for information related to research in genetic algorithms and other forms of evolutionary computation. This database application enables searching, filtering and sorting of archived GA-List digests. A form is used to define a query, the query retrieves a list of corresponding postings, and selecting any posting will display the full text in a separate pane";
	

	else if (ref == "+24+24") txt = "<b>Alife Database of Alife-related sites</b><br>A Searchable Database for Artificial Life and Alife related sites on the Net. The data is automatically gathered by an intelligent search bot that scans the world wide web for Alife related pages. The interactive database is open to all Alife authors for modifying existing entries or adding new ones.";
	else if (ref == "+25+25") txt = "<b>Interactive</b><br>The interactive version of the database";
	else if (ref == "+26") txt = "<b>Overview</b><br>Overview of the Alife database";
	else if (ref == "+27") txt = "<b>Search</b><br>Alife Database Search form";
	else if (ref == "+28") txt = "<b>Edit</b><br>Editing an existing record";
	else if (ref == "+29") txt = "<b>Add</b><br>Adding a new record";

	else if (ref == "+30+30") txt = "<b>Static (Html)</b><br>Alife Database formatted as static Html pages";
	else if (ref == "+31") txt = "<b>Alife</b><br>Artificial Life links";
	else if (ref == "+32") txt = "<b>Genetic Algorithms</b><br>Genetic Algorithmes and Evolutionary Computing links";
	else if (ref == "+33") txt = "<b>Cellular Automata</b><br>Cellular Automata and Game of Life links";
	else if (ref == "+34") txt = "<b>Prisoner's Dilemma</b><br>Prisoner's Dilemma and Iterated Prisoner's Dilema (IPD) links";
	else if (ref == "+35") txt = "<b>Neural Networks</b><br>Neural Networks links";
	else if (ref == "+36") txt = "<b>L-Systems</b><br>L-System links";
	else if (ref == "+37") txt = "<b>Complexity</b><br>Complexity and Chaos links";
	else if (ref == "+38") txt = "<b>Memetics</b><br>Memetics links";
	else if (ref == "+39") txt = "<b>Bots</b><br>Intelligent bots links";

	else if (ref == "+40") txt = "<b>Web Service</b><br>Getting Alife Database data programmatically: The Web Service uses the same database as the interactive version described above. It enables sending a query to the database programmatically, either in SOAP format or in HTTP GET or POST, and receive the requested data in XML format (for using the data in another application) or in HTML format (for displaying the data in a browser). ";
	
	else if (ref == "+41+41") txt = "<b>Dolls Gallery</b><br>3D Dolls Pictures - A photo gallery of assemblage dolls art";
	else if (ref == "+42") txt = "<b>Dolls Gallery Introduction</b><br>Many years ago I had an artistic period, and I created a series of three dimensional collage pictures based on small plastic dolls. A few dozens of them covered the walls of my apartment, but almost all were destroyed when an Iraqi Scud missile crashed my house during the Gulf War. Each of these pictures represented a specific thought or a personal experience, and they were dear to me. Several photographs remained, so I decided to put them again, this time on this Internet wall.";
	else if (ref == "+43+43") txt = "<b>Gallery Walls</b><br>The pictures are displayed on four virtual gallery walls. Clicking on a pictures displays it in elarged format";
	else if (ref == "+44") txt = "<b>Wall #1</b><br>Gallery's first wall";
	else if (ref == "+45") txt = "<b>Wall #2</b><br>Gallery's second wall";
	else if (ref == "+46") txt = "<b>Wall #3</b><br>Gallery's third wall";
	else if (ref == "+47") txt = "<b>Wall #4</b><br>Gallery's fourth wall";
		
	else if (ref == "+48") txt = "<b>Gallery Store (IBuySpy)</b><br>A fictituous gallery store for selling the dolls pictures. A full featured online store built on the IBuySpy template. Demo only";
	else if (ref == "+49") txt = "<b>Picture Browser</b><br>The Gallery Dolls pictures displayed in the Annotated Picture Browser";
	
	else if (ref == "+50+50") txt = "<b>Experiments</b><br>Various experiments in web site design, ASP, XML and Alife";
	else if (ref == "+51+51") txt = "<b>XML/XSL Site Navigation</b><br>XML Site Navigation: Four versions of web site navigation systems based on the same XML file (used for navigating this site). This site navigation map is generated by combining an XML file (defining site structure) with different XSL files and some Javascript and Dhtml code, resulting in different navigation Guis";
	else if (ref == "+52") txt = "<b>Overview</b><br>Overview of the site navigation versions";
	else if (ref == "+53") txt = "<b>The XML Master File</b><br>The Xml file containing the site definition";
	else if (ref == "+54") txt = "<b>Site Navigation Version #1</b><br>This site navigation map is generated by combining an XML file (defining site structure) with an XSL file and some Javascript code. The menu is static multi-level (supports all levels defined in the XML) and displays a short description alongside each item. The XML file is directly loaded into the browser";
	else if (ref == "+55") txt = "<b>Site Navigation Version #2</b><br>This site navigation page uses the same XML file as Version #1 combined with a different XSL file. The menu in this case is compact, two-level and dynamic, updating itself for each selection of a main subject. The descriptions are displayed in the status bar. In this version the XML and XSL files are loaded into a DOM object in a parent Html file, and the output is displayed via Dhtml";
	else if (ref == "+56") txt = "<b>Java Popup Menu</b><br>Navigating the web site using a Java popup menu";
	else if (ref == "+57") txt = "<b>Javascript Static Menu</b><br>Navigating the web site using a Javascript menu";
		
	else if (ref == "+58") txt = "<b>VML / DHTML Game of Floys</b><br>Game of Floys is a purely browser implemented version of the Floys alife program. It is written in DHTML and VML and does not require either Java or ActiveX. However, it does require MSIE 5.01 or later with the VML option installed (see VML Support below). This version is more user friendly than its Java predecessors, and enables easier interactivity and experimentation";
	else if (ref == "+59") txt = "<b>The Site Menu as an IVR Application</b><br>This IVR (Interactive Voice Response) application presents the navigation menu of the site in VoiceXML, enabling to grasp the structure and content of the web site by using the phone";
	else if (ref == "+60+60") txt = "<b>Web Services Experiments</b><br>Web Services inplementations and Web Services related applications";
	else if (ref == "+61") txt = "<b>Alife Database Web Service</b><br>Getting Alife Database data programmatically: The Web Service uses the same database as the interactive version described above. It enables sending a query to the database programmatically, either in SOAP format or in HTTP GET or POST, and receive the requested data in XML format (for using the data in another application) or in HTML format (for displaying the data in a browser)";
	else if (ref == "+62") txt = "<b>Gallery of Free Web Services</b><br>The Gallery of Free Web Services. Web services consumer application based on the IBuySpy portal template. Converted to use MS Access";
		
	else if (ref == "+63+63") txt = "<b>ASP.NET IBuySpy Experiments</b><br>Web application based on modifying the IBuySpy demo applications";
	else if (ref == "+64") txt = "<b>Doll Strore: IBuySpy Store</b><br>A fictitious store for selling the Dolls Gallery pictures";
	else if (ref == "+65") txt = "<b>Free Web Services: IBuySpy Portal</b><br>The Gallery of Free Web Services. Web services consumer application based on the IBuySpy portal template. Converted to use MS Access";
	
	else if (ref == "+66+66") txt = "<b>Annotated Picture Browser Experiments</b><br>";
	else if (ref == "+67") txt = "<b>Introduction</b><br>The Annotated Picture Browser is a tool for browsing a collection of pictures together with their corresponding texts or annotations. This is a Java applet, suitable for Internet use, and is freely downloadable. Here is a demo showing traffic signs. Other demos can be accessed by the links on this page, below the applet.<p>The input data for the applet is assigned to the applet parameters in the Html page. The applet is customizable, many of its attributes are user defined, and is free for non commercial use. It is downloadable from the Picture Browser Download Page";
	else if (ref == "+68") txt = "<b>Dancing Baby</b><br>Watch how Dancing Baby recites The Raven by  Edgar Allen Poe";
	else if (ref == "+69") txt = "<b>Framed Version</b><br>The Annotated Picture Browser in Frames format";
	else if (ref == "+70") txt = "<b>Dolls</b><br>The Annotated Picture Browser displaying pictures of the Dolls Gallery";
	else if (ref == "+71") txt = "<b>Download</b><br>Download the Annotated Picture Browser for personal use";

	
	else if (ref == "+72+72") txt = "<b>About</b><br>Some information about myself, credits to the people I borrowed from and a note about code sharing with a special reference to alife";
	else if (ref == "+73") txt = "<b>My topics of interest</b><br>My main topics of interest are Evolution, Artificial Life and Computers<br>I became fascinated by these three ideas:<UL><LI><B>The idea that</B> complex, sophisticated, adaptive solutions can be generated by automatic, blind, knowledge-lacking mechanisms (Evolution)<LI><B>The idea that </B>complex systems, such as life, are actually the emergent behaviors of systems with many elements that operate according to simple, local rules (Artificial Life)<LI><B>The idea that</B> a personal computer can be an important scientific laboratory tool, and that new insights and new knowledge can (potentially) be achieved by using inexpensive equipment for conducting scientific experiments from ones home</UL>";
	else if (ref == "+74") txt = "<b>Credits</b><br>In the process of designing this site and developing the software, I borrowed a lot from others. <br>Here are the due credits";
	else if (ref == "+75") txt = "<b>Code Sharing</b><br>Code Sharing as an Alife Experiment in Memetic Evolution";
	else if (ref == "+76") txt = "<b>Links</b><br>This page does not list the web pages that I find intresting (too many of those). This page is linking to sites which seem to be less known in spite of their great value";

	else
		txt = "Not found: " + ref;
		
	msg.innerHTML = txt;
	return false;
}

function PutMfloys() {

	var txt = "<applet code='miniFloys.class' width=294 height=247>";
	txt += "<PARAM NAME=NF VALUE='15'>";
	txt += "<PARAM NAME=AppletBackground VALUE='My'>";
	txt += "<PARAM NAME=SLEEP VALUE='100'>";
	txt += "<PARAM NAME=SEED VALUE='1234567890'>";
	
	document.all.midpanel.innerHTML = txt;

}


function move_in(num){
   //document.all.aa1.zindex = -10;
return true
}

function move_out(num){
	//document["a1"].src = "/images/main2x3.jpg";
return true
}


function isJava11Available() {
  if (java.awt.event.MouseEvent)
     alert("awt");
  else
    alert("no awt");
}


function testJavaVersion() {

	var jv = "";
	jv = document.getjv.jv;

	var txt;
	if (jv.indexOf("1.4") >= 0) 
	{
		txt = "Your current Java version is: " + jv;
		txt += "\n\nThe examples of GA Playground function properly";
		txt += "\nonly with Java versions prior to 1.4, sorry";
		alert(txt);
	}
	
}

function insertBottomSection(lines)
{
    var str;

    str = "";
    for (i=0;i<lines;i++)
        str += "<p>&nbsp;</p>";

    str += "<p><hr>";
    str += "<center>";
    str += "| ";
    str += "<A HREF='/default.aspx'>&nbsp;Home Page&nbsp;</A> |";
    str += "<A HREF='/ofiles/alife.aspx'>&nbsp;Artificial Life&nbsp;</A> |";
    str += "<A HREF='/ofiles/dolls_page.aspx'>&nbsp;Dolls Gallery&nbsp;</A> |";
    str += "<A HREF='/ofiles/bi.aspx'>&nbsp;Bioinformatics&nbsp;</A> |";
    str += "<A HREF='/ofiles/experiments.aspx'>&nbsp;Experiments&nbsp;</A> |";
    str += "<A HREF='/pics/index.html'>&nbsp;Photos&nbsp;</A> |";
    str += "<A HREF='/ofiles/deepzoom.aspx'>&nbsp;DeepZoom&nbsp;</A> |";
    str += "<A HREF='/ofiles/misc.aspx'>&nbsp;Miscellaneous&nbsp;</A> |";    
    str += "</center>";

    str += "<hr>";
    str += "<Address><B> Ariel Dolan</B><br>";
    str += "<A href='mailto:aridolan@netvision.net.il'> aridolan@netvision.net.il</A><br>";

    document.write("<font size='-1'>" + str + "</font>");
}
