// JavaScript Document
var timer;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function launchIMWindow(answer) {

MM_showHideLayers('com_window','','show');
MM_swapImage('status','','imwindow_images/status_chrona.gif',1);
MM_swapImage('signal','','imwindow_images/signal.gif',1);
MM_swapImage('subnet','','imwindow_images/subnet.gif',1);
MM_swapImage('video','','imwindow_images/vid_chrona.gif',1);
clearTimeout(timer);
startTyping(answer, 50, "textDestination");
}

var answer1="It is the strangest thing to describe. It begins, for the briefest moment, with everything moving in fast motion. Then it seems as though I've ceased to exist at all. Everything goes blank and without any sensation of time passing, there's another blur as I arrive in the destination time and everything around me clears up and stops. There is an arrival dizziness that I've learned to control. When we are kids and just learning to time travel, everyone falls over after arriving in another time. Even traveling two seconds forward or backward, kids teeter over and fall. It's probably the funniest thing I've ever seen.";
var answer2="On the contrary, I can't travel anywhere. I can only travel in time, not in space. That's one reason time travel is so dangerous. I will arrive in the exact spot I left, every time. The problem is, everything in the universe is constantly moving, so three seconds after I disappear, a building might occupy that exact spot. If I materialized at the wrong moment, I'd be killed instantly. That's why I carry my 'timekeeper' everywhere I go. It's a portable version of our temporal supercomputers at home. It calculates arrival times and movement of everything nearby so I have a safe time to rematerialize.";
var answer3="Not the way I do it. No other race that we know of can do what we do. I'm not allowed to share any of our time travel knowledge, anyway. We take an oath.";
var answer4="The way you measure, I think I weigh something like 275 kilograms, or 605 pounds. Mostly muscle and brain, of course.";
var answer5="Very funny. You should go hang out with Volo. He thinks he's pretty funny, too.";
var answer6="If I had, I wouldn't be here. I would have either turned myself in (we take an oath against that kind of thing), or the time-traveling police from home would have called me to come home and be punished.";
var answer7="I don't have much cause to defend myself. No one messes with me much. I think they might be afraid of me.";
var answer8="I promised Scribo I wouldn't talk about things that happen in the stories he sends to Earth (Cogno: The Legends). So I can't talk about unfurling. Wouldn't want to mess up Scribo's precious stories.";
var answer9="My timekeeper's operation cannot be revealed to anyone who is not a Chroni. But I can tell you it is basically a compact supercomputer. Only 10 beings from my world have them, because they are incredibly expensive to construct and very few are trusted to time travel without government approval for each trip. The fact is most of my people never leave our planet. I was granted permission to join Cogno's team and go trotting around the galaxy. Sometimes I want to just go home and sit in my comfy chair for a few years.";
var answer10="Yes, there are many, unfortunately. They arise from a number of causes: 1) On rare occasions, kids are born whose time traveling ability develops too early. Lacking maturity and training, the child will (accidentally or on purpose) travel in time without the guidance of the temporal supercomputer (TS). Sadly, they don't last long; 2) Idiots who think it is daring to do manual calculations instead of using the TS; and finally, 3) Criminals who have been denied access to the TS but still take their chances time traveling. They don't last long either.";
var answer11="Ha! I've never been asked that before. No, it doesn't seem to matter. The process draws energy from dark energy, so … well, I shouldn't say any more. I'm not supposed to talk about how time travel works.";
var answer12="My timekeeper is synchronized to my body's electrical currents. In a sense, it is seen as part of my body, by the forces that cause time travel. I can use the timekeeper to calculate and bridge to other beings as well, so I can take others on time traveling trips if it is necessary and does not violate our laws.";
var answer13="I'll tell you why. He has absolutely no discipline. He thinks everything is one big joke for him to play on everyone else. The lives of millions can be on the line, and he's playing around. Then there are the nicknames, his never being around when you need him … I could go on forever. That kid is going to drive me over the edge.";
var answer14="I was sent to help a detective solve a murder case involving a rogue Chroni criminal. I was in what used to be a secret division of our time traveling police. The detective in the case was Quaestor, who is now a member of the Icari team. After joining the Icari, Quaestor nominated me to join the Icari, and I was ultimately invited by Cogno.";
var answer15="Yes, but only serious ones. What I mean is, we participate in sports to improve serious skills. The only two skills that matter for us are time traveling and self defense. We have time traveling Olympics every year, which are amazing and quite dangerous. But they advance the art of time travel and cause us to remain in top form.";
var answer16="Our temporal supercomputer calculates all proposed time travel, so it tracks when (in time) every citizen exists. It's not a problem knowing our population. We do have two population counts, though: 1) Momentary Population: This is the number of beings currently on the planet, including those who are visiting from the past or future; and 2) Actual Population: The number of beings from our time, regardless of where they might be in time at the moment. Confused yet?";
var endText="<b>Isagog session timed out: Lens resources reallocated to Kimmeroi Station subnet.</b>";
var delay=50;
var currentChar=1;
var destination="[not defined]";


function type()
{
  if (document.getElementById)
  {
    var dest=document.getElementById(destination);
    if (dest)// && dest.innerHTML)
    {
      dest.innerHTML=text.substr(0, currentChar);
      //dest.innerHTML+=text[currentChar-1];
      currentChar++
      if (currentChar>text.length)
      {
        currentChar=1;
         timer = setTimeout("endKimmeroiLink(endText, 0, 'textDestination')", 90000);
      }
      else
      {
         timer = setTimeout("type()", delay);
      }
    }
  }
}

function startTyping(textParam, delayParam, destinationParam)
{
  text=textParam;
  delay=delayParam;
  currentChar=1;
  destination=destinationParam;
  type();
}
function endKimmeroiLink(textParam, delayParam, destinationParam)
{
  text=textParam;
  delay=delayParam;
  currentChar=1;
  destination=destinationParam;
  MM_swapImage('status','','imwindow_images/status_f2.gif',1);
  MM_swapImage('signal','','imwindow_images/signal_f2.gif',1);
  MM_swapImage('subnet','','imwindow_images/subnet_f2.gif',1);
  MM_swapImage('video','','imwindow_images/video_f2.gif',1);
  type();
}
