var timer;
var i=0;

function scrollDown(){
	clearTimeout(timer);
	d=document.getElementById('content')
	y=d.scrollTop;
	if (y<d.scrollHeight-d.offsetHeight){
		y++;
		d.scrollTop=y;
		timer=setTimeout('scrollDown()',3);
	} else {
		clearTimeout(timer);
	}

}

function scrollUp(){
	clearTimeout(timer);
	d=document.getElementById('content');
	y=d.scrollTop;
	if (y<=d.scrollHeight-d.offsetHeight){
		y--;
		d.scrollTop=y;
		timer=setTimeout('scrollUp()',3);
	} else {
		clearTimeout(timer);
	}
}

function has_scrollbar(elem) { 
	if (elem.clientHeight < elem.scrollHeight) { 
		return true;
	} else { 
		return false;
	} 
}


function no_scrollbar() {
	var content = document.getElementById('content');
	if (has_scrollbar(content)) { 
		content.style.overflow = "hidden";
		document.getElementById('scroll_up').style.visibility = "visible";   
		document.getElementById('scroll_down').style.visibility = "visible";
	}
}


function openWindowAdmin(Url,winName,height,width) {
	window.open(Url,winName,'scrollbars=yes,toolbar=no,status=no,resizable=yes,width='+width+',height='+height+'');
}

function drucken(url) {
	window.open(url,'print','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=700,height=700');
}




function openWindowAdmin(url,winName) {
	var width = 950;
	var height = 568;
	if ((document.all) && (window.offscreenBuffering) && (!window.XMLHttpRequest)) {
		width = 949;
		height = 560;
	}
	if ((document.all) && (window.offscreenBuffering) && (window.XMLHttpRequest)) {
		width = 949;
		height = 565;
	}
	window.open(url,winName,'scrollbars=no,toolbar=no,status=no,resizable=no,width='+width+',height='+height+'');
}

function checkTuut() {
	alert('juhu');
}
