var mult = 1;
var mult2 = -1;
var arCoords = new Array();
var orig_y;
var y1,y2;

function fixNav4() {
  if (is_nav4) {
    bottomcolumn.doc.tags.P.fontFamily = document.tags.P.fontFamily;
    bottomcolumn.doc.tags.P.fontSize = document.tags.P.fontSize;
    bottomcolumn.doc.tags.P.lineHeight = document.tags.P.lineHeight;
    bottomcolumn.doc.tags.EM.color = document.tags.EM.color;
    bottomcolumn.doc.tags.EM.fontStyle = document.tags.EM.fontStyle;
    bottomcolumn.doc.classes.greytext.all.color = document.classes.greytext.all.color;
    bottomcolumn.doc.classes.title.all.fontSize = document.classes.title.all.fontSize;
    bottomcolumn.doc.classes.title.all.fontWeight = document.classes.title.all.fontWeight;
  }
}

function showDesc(nro) {
  // hide the rest
  for (i=1; i<=DESC_N; i++) { if (i == nro) continue; eval("desc"+i+".hide()"); }
  // show the right description
  if (nro != -1) eval("desc"+nro+".show()");
}

function scrollBg() {
	if (!mouse_down) {
		if (tausta.y >= 0) mult = -1;
		else if (tausta.y <= -500) mult = 1;
    if (tausta2.y <= -500)  mult2 = 1;
    else if (tausta2.y >= 0) mult2 = -1;
    y1 = parseInt(mult*Math.random()*29);
    if (isNaN(y1)) y1 = 0;
    y2 = parseInt(mult2*Math.random()*10);
    if (isNaN(y2)) y2 = 0;
		tausta.moveBy(null,y1);
		tausta2.moveBy(null,y2);
	}
	setTimeout("scrollBg()", 250);
}

function getAnchorCoords() {
  for (i=0; i<maincolumn.doc.anchors.length; i++) {
    if (is_ie4up) {
      if (maincolumn.doc.anchors[i].id.indexOf("rot") < 0) continue;
      var par_obj = eval("maincolumn.doc.anchors["+i+"].offsetParent");
      var coord = eval("maincolumn.doc.anchors["+i+"].offsetTop");
      arCoords[i] = par_obj.offsetTop+coord;
    }
    else if (is_nav5up) {
      if (maincolumn.doc.anchors[i].id.indexOf("rot") < 0) continue;
      arCoords[i] = eval("maincolumn.doc.anchors["+i+"].offsetTop")-maincolumn.y-1;
    }
    else {
      if (maincolumn.doc.anchors[i].name.indexOf("rot") < 0) continue;
      arCoords[i] = eval("maincolumn.doc.anchors["+i+"].y")-1;
    }
  }
  changeLeftTopImg();
}

function pageUpDown(nro) {
  amount = arCoords[nro]-(orig_y+10);
  clipamount = maincolumn.y+amount;
  maincolumn.moveTo(null,-amount);
  maincolumn.clipBy(null,clipamount,null,clipamount);
  maincolumn.resetButtons();
}

function mouseOver(e) {
  if (this.id == "plusID")
    plus.changeImage('plusImg',plus_hi.src);
  else if (this.id == "miinusID")
    miinus.changeImage('miinusImg',miinus_hi.src);
}

function mouseOut(e) {
  if (this.id == "plusID")
    plus.changeImage('plusImg',plus_lo.src);
  else if (this.id == "miinusID")
    miinus.changeImage('miinusImg',miinus_lo.src);
}

function changeContent(obj,html) {
  var s = '<table border="0" cellpadding="0" cellspacing="0" width="460">\n';
  s += '<tr><td valign="top"><br>\n';
  s += html+'\n';
  s += '</td></tr></table>\n';
  obj.hide();
  obj.setContent(s);
  obj.resetScroll();
  obj.show();
}

