function calcrelpath() {
 relpath = '';
 for (i=1; i< param.level; i++) relpath += '../';
 relpath += 'topimages/';
 return param.currentHome ? param.currentHome : relpath;
}

TopImagesDir = calcrelpath();

document.writeln('<link rel="STYLESHEET" href="'+TopImagesDir+(param.css ? param.css : 'sitestyle.css')+'" type="text/css">');

var topbar_activemc = 0;
var topbar_toutid = 0;
var topbar_captions = new Array(9);
topbar_captions[0] = new Image();
topbar_captions[0].src = TopImagesDir+"../../common/images/spacer.gif";
for (topbar_i=1; topbar_i<9; topbar_i++) {
 topbar_captions[topbar_i] = new Image();
 topbar_captions[topbar_i].src = TopImagesDir+'caption_' + topbar_i + '.gif';
}

function topbar_commenta(x) {
 if (topbar_toutid != 0) clearTimeout(topbar_toutid);
 if (x == topbar_activemc) return;
 if (x == 0) {
  topbar_toutid = setTimeout("topbar_doclearcommento()",1000);
 } else {
  topbar_activemc=x;
  topbar_docommenta();
 }
}

function topbar_doclearcommento() {
 topbar_activemc = 0;
 topbar_toutid = 0;
 topbar_docommenta();
}

function topbar_docommenta() {
 document.images['caption'].src = topbar_captions[topbar_activemc].src;
}
