function blink() {
  // make cursor blibk ..... TODO
  
}



/*
red - AB0000
cyan - 63ffcb
purple - B71BE7
green - 43E343
blue - 2f2feb
yellow - FFFF23
brown - B77323
dark brown - 73633F
pink - E37373
dark grey - 5B5B5B
mid grey - 7B7B7B
light green - AFFFA7
light blue - 00CFFF
light grey - D3D3D3
*/

c64colors = new Array();

c64colors[0] = "#000000";
c64colors[1] = "#ffffff";
c64colors[2] = "#ab0000";
c64colors[3] = "#63ffcb";
c64colors[4] = "#b71be7";
c64colors[5] = "#43e343";
c64colors[6] = "#2f2feb";
c64colors[7] = "#ffff23";
c64colors[8] = "#b77323";
c64colors[9] = "#73633f";
c64colors[10] = "#e37373";
c64colors[11] = "#5b5b5b";
c64colors[12] = "#7b7b7b";
c64colors[13] = "#afffa7";
c64colors[14] = "#00cfff";
c64colors[15] = "#d3d3d3";
c = 1

if (document.images) { // Preloaded images
demo1 = new Image();
demo1.src = "/_images/bird1.gif";

demo2 = new Image();
demo2.src = "/_images/bird2.gif";

demo3 = new Image();
demo3.src = "/_images/bird3.gif";

demo4 = new Image();
demo4.src = "/_images/bird2.gif";
}


function timeimgs(numb) { // Reusable timer
thetimer = setTimeout("imgturn('" +numb+ "')", 180);
}

function imgturn(numb) { // Reusable image turner
  if (document.images) {
    if (numb == "4") { // This will loop the image
      document["demo"].src = eval("demo4.src");
      timeimgs('1');
    }
    else { document["demo"].src = eval("demo" + numb + ".src");
      timeimgs(numb = ++numb);
    }
  }
}


function randBG() {
  a = Math.round(Math.random()*15)
  document.body.style.background = c64colors[a]
}

function timeout(){
  randBG()
  c ++;
  if (c >= 20) {stopit();return false}	
  setTimeout("timeout()",1)
}

function stopit () {
  document.body.style.background = "#7c70da"
  location.href = "/loaded/?" + location.search.substr(1)
  //location.href = "/birdy/birdy_loaded.html"
}

function hidenav() {
  document.getElementById("navigation").style.display = "none"
  document.getElementById("navigationbg").style.display = "none"
  document.getElementById("opennav").style.display = "block"
}

function shownav() {
  document.getElementById("navigation").style.display = "block"
  document.getElementById("navigationbg").style.display = "block"
  document.getElementById("opennav").style.display = "none"
}


function loadrun() {
  setTimeout("run()",1000)
}
function run() {
  goUrl = location.search.substr(1);
  if (goUrl) {
    location.href = "/" + goUrl + "/"
  } else {
    location.href = "/"
  }
}


