// 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_volo.gif',1);
MM_swapImage('signal','','imwindow_images/signal.gif',1);
MM_swapImage('subnet','','imwindow_images/subnet.gif',1);
MM_swapImage('video','','imwindow_images/vid_volo.gif',1);
clearTimeout(timer);
startTyping(answer, 50, "textDestination");
}

var answer1="Yeah, I guess I miss him. I love being on my own, though. Undula cruises me home pretty often, so we hang out and fly once in a while. He gets to work on my ship and bling it out (I just learned that phrase of yours) with sweet upgrades. He's the one who added the invisibility system. I used it against Komodo once and it was so funny … oops, I'm not supposed to tell you stuff that happens in Scribo's stories. Don't tell him or he'll get his wires all crossed about it.";
var answer2="You don't know me nearly well enough for that. The only ones who know are my family. There seems to be something more, too. I can't put my finger on it. But I can't shake the feeling that I'm about to find out something bigger … something very unexpected about my secret.";
var answer3="I got them for my birthday when I was a kid. I swore I'd never take them off in public. Why? It's not really any of your business, and I don't talk to anyone about that.";
var answer4="Because I don't have to be like anyone else when I'm flying. I control everything. And, by the way, I'm the best pilot in the Universe. Did you know that?";
var answer5="Ha! Might as well ask why I breathe! It's so easy. He's such a grump and a bore. I can set him off in a nanosecond. Since I'm a kid he won't beat me up. It's perfect. I figure I've got 3-4 more years of this and then I'll stop, or he'll smash me flat.";
var answer6="I'm not afraid of anyone. But there is something really sketchy about Komodo ... he doesn't seem to mind when someone gets hurt or dies. He's got a major screw loose. He definitely creeps me out. But, afraid? No.";
var answer7="That's easy. When I was four, before my parents let me fly, I decided I was going to fly. I took boosters from my uncle's ship repair shop and fitted them on a sandsurfer. Do you have sandsurfers? Kinda like a snowboard but for sand dunes. Anyway, I built little wings on it, bolted the boosters on. If I'd made a harness to hold myself in, I'd be dead, because I flew 300 feet off a canyon and landed in a small lake. The boosters sunk the board like a rock, but since I wasn't harnessed in, I barely escaped and swam to shore. Scariest part of my life. Do NOT tell my parents.";
var answer8="Maybe, maybe not. What, Scribo? Get off me, you penhead! I'm not telling them anything important from your precious little stories. I don't climb all over you when you're messaging. Sorry bout that. Scribo was freaking for a second. Anyway, I'm not supposed to say whether I've been to Earth. But if I haven't been there, I'm coming soon! Oh, blogdroppings, here comes Scribo again to delete this whole message. Too slow Screee-bowww!!! I'm hittin' send before you roll your skinny self over here! Ha!";
var answer9="";
var answer10="";
var answer11="";
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();
}
