isIE=document.all?1:0;
isNS4=(document.layers)?1:0;
isNS6=(!document.all && document.getElementById)?1:0;

function makeObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.';
	if (isIE) {
		this.css=eval('document.all.'+obj+'.style');
	} else { 
		if (isNS6) {
			this.css=eval('document.getElementById("' + obj + '").style');
		} else {
			this.css=eval(nest+'document.'+obj);
		}
	}
	return this;
}

oben = 0;
offset = 10;
interval = 50;
hoch = "";
runter = ""
run = false;
divIsReady = false;		
grenze1 = new Array(0,-290,-120);
grenze2 = new Array(-180,0);
grenze3 = new Array(0,-770,-490);
grenze4 = new Array(0,0);
grenze5 = new Array(0,0);

function showPos() {
	alert(oben);
	setTimeout('showPos()', 5000);
}
//setTimeout('showPos()', 5000);

function Init() {
	content = new makeObj('DivContent','DivMain');
	content.css.top = oben;
	content.css.left = 0;
	content.css.visibility = 'visible';
	divIsReady = true;
}

function startHoch() {
	if(oben >= 0 || !divIsReady) return;
	run = true;
	oben += offset;
	content.css.top = oben;
	hoch = setTimeout("startHoch()", interval);
}

function stopHoch() {
	if(!run) return;
	clearTimeout(hoch);
}

function startRunter() {
	eval('grenze = grenze' + top.menu.selMain + '[' + top.menu.selSub + ']'); 
	if(oben <= grenze || !divIsReady) return;
	run = true;
	oben -= offset;
	content.css.top = oben;
	runter = setTimeout("startRunter()", interval);
}

function stopRunter() {
	if(!run) return;
	clearTimeout(runter);
}

function doNothing() {
}

