if (document.getElementById) {
  document.write("<link rel=\"stylesheet\" href=\"/css/home.css\" type=\"text/css\" />");
}

var ld, nd, nv, ci, tt, jj;
window.onload = start;

function start() {
  if (document.getElementById) {
    ld = document.getElementById("loading");
    nd = document.getElementById("namedate");
    nv = document.getElementById("nav");
    ci = document.getElementById("circles");
    tt = document.getElementById("theT");
    jj = document.getElementById("theJ");
    ld.style.display = "none";
    tt.style.backgroundImage = "url(/images/t.gif)";
    jj.style.backgroundImage = "url(/images/j.gif)";
    tt.style.top = jj.style.top = ""+(ci.offsetTop+71)+"px";
    tt.style.left = ""+(ci.offsetLeft+110)+"px";
    jj.style.left = ""+(ci.offsetLeft+308)+"px";
    tt.style.display = jj.style.display = "block";
    nv.style.top = ""+ci.offsetTop+"px";
    nv.style.left = ""+(ci.offsetLeft+245)+"px";
    nd.style.top = ""+(ci.offsetTop+129)+"px";
    nd.style.left = ""+(ci.offsetLeft+44)+"px";
    window.setTimeout("moveTJ(0,20,"+(ci.offsetLeft+110)+","+(ci.offsetLeft+308)+")",400);
  }
}

function moveTJ(t,tmax,initT,initJ) {
  if (t<tmax) {
    var tx = discreteQuad(40,tmax,.75,t);
    var jx = discreteQuad(150,tmax,.75,t);
    tt.style.left = ""+(initT-tx)+"px";
    jj.style.left = ""+(initJ-jx)+"px";
    changeOpacity("theT",100-4*t);
    changeOpacity("theJ",100-4*t);
//    changeOpacity("circles",100-2*t);		// slows Firefox down something awful
    t = t+1;
    window.setTimeout("moveTJ("+t+","+tmax+","+initT+","+initJ+")",20);
  } else {
    nd.style.display = nv.style.display = "block";
  }
}
