texts = new Array(7);
buts = new Array(7);
dyntexts = new Array(5);
dyntitles = new Array(5);

buts[0] = new Array(2);
buts[1] = new Array(2);
buts[2] = new Array(2);
buts[3] = new Array(2);
buts[4] = new Array(2);
buts[5] = new Array(2);
buts[6] = new Array(2);

buts[6][0]="/images/main2x2a.jpg";
buts[6][1]="/images/main2x2b.jpg";
texts[6]="Home Page";
buts[1][0]="/images/a_alife2.gif";
buts[1][1]="/images/a_site5.gif";
texts[1]="Alife, GA, CA experiments in Java and Tcl/Tk";
buts[2][0]="/images/a_dolls2.gif";
buts[2][1]="/images/a_site5.gif";
texts[2]="3D assemblage pictures based on plastic dolls";
buts[3][0]="/images/a_exp2.gif";
buts[3][1]="/images/a_site5.gif";
texts[3]="Miscellaneous experiments in Alife and Web design";
buts[4][0]="/images/a_misc2.gif";
buts[4][1]="/images/a_site5.gif";
texts[4]="Some info about myself";
buts[5][0]="/images/picsite.gif";
buts[5][1]="/images/a_empty.gif";
texts[5]="Ariel Dolan's Web Site";
buts[0][0]="/images/a_site5.gif";
buts[0][1]="/images/a_site5.gif";
texts[0]="Ariel Dolan's Web Site";

dyntitles[0] = "<b>Ariel Dolan's Web Site: Artificial Life and Other Experiments</b>";

dyntexts[0] = "This web site contains the <a class='linkcol' href='ofiles/JavaFloys.html' title='Floys: Social, territorial alife reatures'><b>Floys</b></a> Alife applets, the <a class='linkcol' href='ofiles/ga/gaa/gaa.html' title='Genetic Algorithm toolkit implemented in Java'><b>GA Playground</b></a> genetic algorithm toolkit and the online <a class='linkcol' href='/aldb/default.asp' title='Online database of Alife-related sites on the web'><b>Alife Database</b></a> of Alife-related sites on the net. The Alife experiments are written in Java or Tcl/Tk and the source code is free to download. Other sections include the <a class='linkcol' href='ofiles/dolls.html' title='3D assemblage pictures based on dolls'><b>Dolls</b></a> 3D assemblage pictures, the Java <a class='linkcol' href='ofiles/PictureBrowser/Demo/PictureBrowser.html' title='Java Annotated Picture Browser'><b>Annotated Picture Browser</b></a>, and various <a class='linkcol'  href='ofiles/Experiments.html' title='Experiments in this and that'><b>experiments</b></a> in web design and <a class='linkcol' href='/xml/xml.html' title='XML Experiments in web navigation'><b>XML</b></a>.";

dyntitles[1] = "<b>Artificial Life Applets in Java and Tcl/Tk</b>";

dyntexts[1] = "<b>Floys</b> (social, territorial alife creatures), <b>GA Playground</b> (genetic algorithm toolkit implemented in Java), <b>JcaToi</b> (Java cellular automata as a demo for a new user interface), <b>tFloys</b> (flocking tclet implemented in Tcl/Tk), and an interactive, open, modifiable <b>Alife Database</b> for Alife related sites on the web. All Alife programs are downloadable, with free source code.";

dyntitles[2] = "<b>3D Assemblage Pictures Based on Small Plastic Dolls</b>";

dyntexts[2] = "An exhibition of 3D assemblage pictures of small plastic dolls. Each picture represents a specific thought or a personal experience. The pictures themselves, that once decorated the walls of my appartment are now lost, but their photographs remained, so here they are, this time on the Internet wall.";

dyntitles[3] = "<b>Miscellaneous Experiments in This and That</b>";

dyntexts[3] = "Unfinished trials, old versions, experiments of all sorts, mainly in alife, web design and user interfaces. One of these experiments, the <b>Dynamic Navigation System</b> is a trial at a database-driven, focus+context web site menu system that I used for navigating this site in its previous version.";

dyntitles[4] = "<b>Miscellaneous Topics, Info about Myself, and Credits</b>";

dyntexts[4] = "Some info about myself, contact information, a note about code-sharing, and credits to all those I borrowed from.<br>Also in this section, the <b>Annotated Picture Browser</b> applet, a Java tool for displaying pictures online, together with their corresponding annotation and descriptions.";


nbuts = 7;
active = 0;
counter = 0;
countmax = 4;
nmode = 2;
menu=0;
menuitem=0;
clicked=0;

var browser = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";

var msie = (navigator.userAgent.indexOf("MSIE") != -1);
var ie5 = (navigator.userAgent.indexOf("MSIE 5") != -1);

butsImg = new Array()
for(i=0; i < nbuts; i++) {
   butsImg[i] = new Array(nmode);
   for (j=0;j<2;j++) {
      butsImg[i][j] = new Image();
      butsImg[i][j].src = buts[i][j];
   }
}

function updateStatus(txt) {
	if (browser) { 
	 	window.status = txt;
 	}
}

function move_in(num){
if (clicked==0)
   document['a'+num].src=buts[num][0];
window.status = "clicked= "+clicked;
//window.status=texts[num];
return true
}

function move_out(num){
if (active == num)
   document['a'+num].src=buts[num][2];
else
   document['a'+num].src=buts[num][1];
if (clicked > 0)
   clicked=clicked-1;
window.status = "clicked= "+clicked;
//window.status=' ';
return true
}

function move_click(num) {
   document['a'+num].src=buts[num][2];
   document['a'+active].src=buts[active][1];
   active = num;
   clicked=2;
}

function move_init(num) {
   //document['a'+num].src=buts[num][2];
}

function move_in_ext(num,ext){
   if (msie) {
      document.all.dyntext.innerHTML = dyntexts[ext];
      document.all.dyntitle.innerHTML = dyntitles[ext];
   }
   document['a'+num].src=buts[ext][0];

   window.status=texts[ext];
   return true
}

function move_out_ext(num,ext){
    if (msie) {
       document.all.dyntext.innerHTML = dyntexts[0];
       document.all.dyntitle.innerHTML = dyntitles[0];
    }
    document['a'+num].src=buts[ext][1];
    
    window.status=' ';
    return true
}

function move_click_ext(num,ext){
menu=ext;
clicked=3;
document['a'+num].src=buts[ext][2];
}

function move_click_ext_rand(num,ext){
document['a'+num].src=buts[counter][2];
counter++;
if (counter >  countmax)
   counter = 0;
}

function showItem(menuitem)
{

txt = menus[menu-1][menuitem];
window.location.href = txt;
//alert("menu= "+menu+"  item= "+menuitem+" : "+menus[menu-1][menuitem]);

}

function move_plain(num,ext,but){
   document['a'+num].src=buts[ext][but];
return true
}

