var IE4 = false, NS4 = false, NS6 = false, DOM = false;

if ((navigator.appName == "Netscape") && (navigator.appVersion.substring (0, 1) == "4")) NS4 = true;
if ((navigator.appName == "Netscape") && (navigator.appVersion.substring (0, 1) >= "5")) NS6 = true;
if ((document.all) && (navigator.userAgent.indexOf ('MSIE 4') >= 0)) IE4 = true;
if (document.getElementById) DOM = true;

var ie4 = IE4, ns4 = NS4, ns6 = NS6, dom = DOM;

function updateNavig (dir, lang)
{
	if (dom)
		parent.navig.location.href = dir + 'navig.php?l=' + lang
	else
		parent.frames.navig.location.href = dir + 'navig.php?l=' + lang;
}

function updateHeader (dir, lang)
{
	if (dom)
		parent.header.location.href = dir + 'header.php?l=' + lang
	else
		parent.frames.header.location.href = dir + 'header.php?l=' + lang;
}

function updateFrames (url_navig, url_content)
{
	if (dom) {
		parent.navig.location.href = 'navig.php?' + url_navig;
		parent.content.location.href = url_content;
	}
	else {
		parent.frames.navig.location.href = 'navig.php?' + url_navig;
		parent.frames.content.location.href = url_content;
	}
}

function checkTextObj (textobj, minlen)
{
	var str = new String(textobj.value);
	if (textobj.name.indexOf("email") >= 0) {
		if ((str.indexOf("@") < 1) || (str.lastIndexOf(".") < str.lastIndexOf("@"))) return (-2);
	}
	if (str.length < minlen) return (-1);
	return 0;
}

function dm (msgStr)
{
	document.returnValue = false;
	if (document.images) {
			window.status = msgStr;
			document.returnValue = true;
	}
}

function openWin (winname, location, winwidth, winheight, scrollbars)
{
	if (scrollbars == "") { scrollbars = ",scrollbars=no," } else { scrollbars = "," + scrollbars + "," }
	fenster = window.open('', winname, 'width=' + winwidth + ',height=' + winheight + scrollbars + 'resizable=yes,toolbar=no,status=no,directories=no,menubar=no,location=no');
	fenster.moveTo(screen.width/2-(winwidth/2),screen.height/2-(winheight/2));
	fenster.location.href = location; // muss sein wg. IE-Bug...
	fenster.focus();
}
