
function hoover(obj, x){
	obj.src = "gfx/" + hooverpic[x];
}

function dehoover(obj, x){
	obj.src = "gfx/" + menupic[x];
}

function center_main_site(){
	if (window.innerWidth) {
    width = window.innerWidth;
    height = window.innerHeight;
  } else if (document.body && document.body.offsetWidth) {
    width = document.body.offsetWidth;
    height = document.body.offsetHeight;
  } else {
    width =  0;
  }
  if (width < 1000){
  	nLeft = 0;
  }else{
  	nLeft = Math.floor((width - 1000) / 2);
  }
  if (height < 635){
  	nTop = 0;
  }else{
  	nTop = Math.floor((height - 635) / 2);
  }
  document.getElementById('main_site').style.left = nLeft;
  document.getElementById('main_site').style.top = nTop;
}
window.onresize = center_main_site;

var aktiv = 0;

function go_down(){
		var top = 0;
		top = document.getElementById("content").style.top;
		top = parseInt(top);
		if (Math.abs(top) < max_scroll) top = top - 1;
		document.getElementById("content").style.top = top;
	}
function go_up(){
		var top = 0;
		top = document.getElementById("content").style.top;
		top = parseInt(top);
		if (top < 0) top = top + 1;
		document.getElementById("content").style.top = top;
	}

function down(){
	aktiv = window.setInterval('go_down()',20);
}

function up(){
	aktiv = window.setInterval('go_up()',20);
}

function stop(){
	clearInterval(aktiv);
}


var aktiv2 = 0;

function go_down2(){
		var top = 0;
		top = document.getElementById("content2").style.top;
		top = parseInt(top);
		if (Math.abs(top) < max_scroll2) top = top - 1;
		document.getElementById("content2").style.top = top;
	}
function go_up2(){
		var top = 0;
		top = document.getElementById("content2").style.top;
		top = parseInt(top);
		if (top < 0) top = top + 1;
		document.getElementById("content2").style.top = top;
	}

function down2(){
	aktiv2 = window.setInterval('go_down2()',20);
}

function up2(){
	aktiv2 = window.setInterval('go_up2()',20);
}

function stop2(){
	clearInterval(aktiv2);
}

var aktiv3 = 0;

function go_down3(){
		var top = 0;
		top = document.getElementById("content3").style.top;
		top = parseInt(top);
		if (Math.abs(top) < max_scroll3) top = top - 1;
		document.getElementById("content3").style.top = top;
	}
function go_up3(){
		var top = 0;
		top = document.getElementById("content3").style.top;
		top = parseInt(top);
		if (top < 0) top = top + 1;
		document.getElementById("content3").style.top = top;
	}

function down3(){
	aktiv3 = window.setInterval('go_down3()',20);
}

function up3(){
	aktiv3 = window.setInterval('go_up3()',20);
}

function stop3(){
	clearInterval(aktiv3);
}
