var ticker = '';
function hoverCell(id, lev, action) {
	if (document.getElementById) {
		if (action=='in') {
			document.getElementById(id).className='navihover' + lev;
		}
		else {
			document.getElementById(id).className='navi' + lev;
		}
	}
}

function pageInit() {
	//showTicker(100); //deaktiviert
	//Printable Version:
	if (location.search.indexOf('print=yes')>0) {
		window.print();
	}
}

function openPrintableVersion(theUrl) {
	var w,h;
	w = 760;
	h = 1000;
	if (h>screen.availHeight-30) {
		h = screen.availHeight-30;
	}
	if (w>screen.availWidth-30) {
		w = screen.availWidth-30;
	}
	f1 = open(theUrl,'print','width=' + w + ',height=' + h + ',scrollbars=yes,toolbar=no,navbar=no,resizable=no,status=no'); 
	f1.moveTo(0,0);
	f1.focus();
	
}

function fullsizeImage(theUrl) {
	var w,h;
	h = screen.availHeight-30;
	w = screen.availWidth-10;
	f1 = open('../artikel/fullsizeImage.aspx?url=' + theUrl,'print','width=' + w + ',height=' + h + ',scrollbars=yes,toolbar=no,navbar=no,resizable=no,status=no'); 
	f1.moveTo(0,0);
	f1.focus();
	
}

function recommendArticle(path) {
	f1 = open('../artikel/artikelEmpfehlen.aspx?url=' + path,'recommend','scrollbars=no,toolbar=no,navbar=no,resizable=yes,status=no');
	
}

function newWindow(url, windowName, width, height) {
	f1 = open(url,windowName,'width=' + width + ',height=' + height+ ',scrollbars=yes,toolbar=yes,navbar=yes,resizable=yes,status=yes,location=yes'); 
}

function showLoginForm() {
	f1 = open('../login/mainLogin.aspx','login','width=150,height=150,scrollbars=no,toolbar=no,navbar=no,resizable=no,status=no'); 
	//f1.moveTo(0,0);
	f1.focus();
}

function panavision(url) {
	f1 = open(url,'panavision','width=380,height=300,scrollbars=no,toolbar=no,navbar=no,resizable=no,status=no'); 
	f1.focus();
}
/* -- Ticker --*/
function showTicker(speed) {
	var msg=ticker;
	var out = " ";
	var c   = 1;
	
	if (speed > 100) {
		speed--;
		cmd="showTicker("+speed+")";
		timerTwo=window.setTimeout(cmd,100);
	}
	else if (speed <= 100 && speed > 0) {
		for (c=0 ; c < speed ; c++) {
			out+=" ";
		}
		out+=msg;
		speed--;
		window.status=out;
		cmd="showTicker("+speed+")";
		timerTwo=window.setTimeout(cmd,100);
	}
	else if (speed <= 0) {
		if (-speed < msg.length) {
			out+=msg.substring(-speed,msg.length);
			speed--;
			window.status=out;
			cmd="showTicker("+speed+")";
			timerTwo=window.setTimeout(cmd,100);
		}
		else {
			window.status=" ";
			timerTwo=window.setTimeout("showTicker(100)",75);
		}
	}
}