// zähler für activate-versuche
retryCount = 0;

// check whether frameset exists in order to restore frame-pages
function init()
{
	if (!top.frames.nav) {
		top.location.replace('index.html');
	}
		
	if (document.layers && !document.getElementById)
		window.onresize = nnresize;
}

function nnresize()
{
	top.nav.location.reload();
	top.content.location.reload();
}

function activate(elId)
{
	if (top.frames && top.frames.nav && top.frames.nav.document && top.frames.nav.document.getElementById(elId)) {
		top.frames.nav.select(top.frames.nav.document.getElementById(elId), "");
		retryCount = 0;
	}
	else {
		// falls element noch nicht existiert, nach verzögerung erneut aufrufen (aber nicht endlios)
		retryCount++;
		if (retryCount <= 100) {
			setTimeout("activate('"+elId+"')", 500);
		}
	}	
}
