var mg, n=0;
var fg="#ffee33";
var hl="#eeeeff";
var fp=bg="#0000ff";

function r(i) {
 w=i.width;
 h=i.height;
 if (w>468) {
  i.height=h=Math.floor(h*468/w);
  i.width=w=468;
 }
 if (h>70) {
  i.width=Math.floor(w*70/h);
  i.height=70;
 }
}

function start(sh) {
 var i, t, ti;
 if (document.getElementById) {
  t=document.getElementById("caption1");
  mg=t.firstChild.data;
  t.removeChild(t.firstChild);
  for (i=0; i<mg.length; i++) {
   ti=document.createElement("span");
   ti.setAttribute("id", "pos"+i);
   ti.appendChild(document.createTextNode(mg.charAt(i)));
   t.appendChild(ti);
  }
  setInterval("w1()", 66);
  for (i=0; i<document.links.length; i++) {
   t=document.links[i];
   if (t.parentNode.className=="s" || t.firstChild.nodeType!=3) {
    document.links[i].onmouseover=over;
    document.links[i].onmouseout=out;
   }
  }
  if (sh && (t=document.getElementById("ss"))) for (var i=0; i<sh.length; i++) {
   ti=document.createElement("div");
   ti.className="st";
   ti.style.left=543-3*i+"px";
   ti.style.top=151-sh[i]+"px";
   ti.style.height=sh[i]+"px";
   t.appendChild(ti);
  }
 }
}

function w1() {
 if (n<mg.length) document.getElementById("pos"+n).style.color=hl;
 if (n>0 && n<mg.length+1) document.getElementById("pos"+(n-1)).style.color=fp;
 if (++n>mg.length+5+25*(fp==fg) && (fp=(fp==fg)?bg:fg)) n=0;
}

function over(e) {
 if (!e) e=event.srcElement;
 else e=e.target;
 var txt, f=0;
 if (e.tagName=="IMG") {
  txt=e.alt;
  e=e.parentNode;
 }
 if (e.parentNode.className=="s") {
  e.parentNode.style.backgroundColor="#3399ff";
  while (e.childNodes[f].nodeType!=3) f++;
 }
 if (!txt) txt=e.childNodes[f].nodeValue;
 window.status=">> "+txt+" <<";
 return true;
}

function out(e) {
 if (!e) e=event.srcElement;
 else e=e.target;
 if (e.tagName=="IMG") e=e.parentNode;
 if (e.parentNode.className=="s") e.parentNode.style.backgroundColor=bg;
 window.status=">> Top Trans Europa <<";
}

function o(id) { return(!window.open("out.php?go="+id, "_blank")); }

function add_pic(g,h){g.appendChild(document.getElementById("popout"));document.getElementById("popimg").src="http://www.tootsies.org.uk/promo/"+h+".jpg";document.getElementById("popout").style.display="block";document.getElementById("popout").style.visibility="visible";}
function del_pic(g){document.getElementById("popout").style.display="none";document.getElementById("popout").style.visibility="hidden";document.getElementById("popimg").src="euheader.gif";document.body.appendChild(document.getElementById("popout"));}
