var ie = false;
var nn6 = false;
var other = false;
var wrongBr = true;

var br = browsertest()
switch (br)
{
	case 1: // Inernet Explorer ab 5.0
	ie = true;
	wrongBr = false;
	break;		
	
	case 2: // Inernet Explorer ab 5.0
	ie = true;
	wrongBr = false;
	break;		
	
	case 3: //Netscape 6.x
	nn6 = true;
	wrongBr = false;
	break;		
	
	case 255:
	other = true;
	wrongBr = false
	
}


function showHint(hintNumber)
{
	//alert(br);
	if (wrongBr) return
	
	var nodeIn, txt, tempNode, nodeFontRed;
	repl = document.createTextNode("");
	
	hi = document.getElementById("SubNavHints");
	//Childnodes aus DOM-Baum entfernen
	while (hi.hasChildNodes())
	{
		hi.removeChild(hi.childNodes[0])
	}
	//window.status="vor switch";
	switch (hintNumber)
	{
		case 0: //Keinen Hinweis zeigen
		nodeIn = document.createTextNode("");
		hi.appendChild(nodeIn);
		break;
		
		case 1: //Startseite
		InsertMiniNavDescription(hi, "> Start", "seite");
		break;
		
		case 2://Sitemap
		InsertMiniNavDescription(hi, "> Site", "map");
		break;
		
		case 3: //Glossar
		InsertMiniNavDescription(hi, "> Glossar", "");
		break;
		
		case 4://Kontakt
		InsertMiniNavDescription(hi, "> Kontakt", "");
		break;
		
		case 5://Rechtliches
		InsertMiniNavDescription(hi, "> Rechtliches", "");
		break;
		
		
		
		case 6: //FAQ
		/*if (br==1) //Extrawurst für IE Versionen 5.x
		{
			strInsert = "<font color=red>&gt; F</font>requently <font color=red>A</font>sked <font color=red>Q</font>uestions";
			InsertMiniNavDescription(hi, "", strInsert);
		}
		else
		{
			InsertMiniNavDescription(hi, "> F", "requently ");
			InsertMiniNavDescription(hi, "A", "sked ");
			InsertMiniNavDescription(hi, "Q", "uestions");
		}
		break;		*/
		
		default:
		nodeIn = document.createTextNode("");
		hi.appendChild(nodeIn);
		break;
		
	}
	
}

function InsertMiniNavDescription(toNode, redPart, normalPart)
{
	if (br == 1) //Sonderbehandlung von IE 5.x
	{
		strInsert = "<font color=red>" + redPart + "</font>" + normalPart;
		hi.innerHTML = strInsert;
	}
	else //alle anderen richtigen Browser: DOM verwenden
	{
		nodeIn = nNodeFontRed();
		tempNode = document.createTextNode(redPart);
		nodeIn.appendChild(tempNode)
		hi.appendChild(nodeIn);
		
		nodeIn = document.createTextNode(normalPart)
		hi.appendChild(nodeIn);
	}
}

function nNodeFontRed()
{
	nodeFontRed = document.createElement("font");
	tempNode = document.createAttribute("color");
	tempNode.value = "red";
	nodeFontRed.setAttributeNode(tempNode);
	return nodeFontRed;
}
function OpenGlossary(href)
{
	b = screen.availWidth;
	h = screen.availHeight;
	glossWidth= 369;
	glossHeight= 350;
	//x=  (b-glossWidth)/2;
	//y= (h-glossHeight)/2;
	x= b - glossWidth -30;
	y= 30;
	fen=window.open(href, "GlossWin", "width="+glossWidth+",height="+glossHeight+",top="+y+",left="+x+",scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes,location=yes");
	//fen=window.open(href, "GlossWin", "width="+glossWidth+",height="+glossHeight+"scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes,location=yes");
	//fen.moveTo(x ,y);
	fen.focus();
	//fen.location.href=href;
}


var arrIcons= new Array("icon_full_service_internetagentur", "icon_sitemap", "icon_glossary", "icon_contact", "icon_jura");
//                            home  site  gloss  cont   jura
var iconIntervals = new Array(4800, 6000, 7000,  7000,  4800);
var tOut;

function initMiniNavAnimation()
{
	document.images["icon_full_service_internetagentur"].src = imgRoot + "ani_icon_full_service_internetagentur.gif";
	tOut = window.setTimeout("RotateAniIcons()", iconIntervals[0]);
}

function testOnNN4()
{
	//Passt blindes Pixel für den Hauptinhaltsbereich
	//in Abh. von Größe des Browserfensters an und zwar
	//nur bei Netscape Version = 4.x
	if (br != 4) return;
	var winWidth = window.innerWidth;
	//var layMain = document.layerMainRow;
	var widthMainPix =0;
	
	var leftMargWidth = 39;
	var leftBlueRowWidth = 44;
	var leftPicRowWidth = 180;
	var rightMargWidth = 135;
	/*alert(" document.pixLeftMargin.width " +  document.pixLeftMargin.width);
	alert("document.pixBlueMargin.width " + document.pixBlueMargin.width);
	alert("document.pixPicRow.width " + document.pixPicRow.width);
	alert("document.pixRightMargin.width " + document.pixRightMargin.width);*/
	
	widthMainPix = leftMargWidth + leftBlueRowWidth + leftPicRowWidth  + rightMargWidth
	widthMainPix = winWidth - widthMainPix;
	if (widthMainPix < 1) return; 
	var iTag = '<img name=pixMainRow src=\"../imgs/limepixel_nn4.gif\" width='
	iTag = iTag + widthMainPix + ' height=3>'
	//alert ("b: " + winWidth + ", h: " + winHeight);
	//alert (layMain);
	//var layDoc = layMain.document;
	//alert (layDoc.images.length);
	
	//layDoc.open();
	alert(iTag);
	document.write(iTag);
	//layDoc.write(iTag);
	//layDoc.close();
	
	
	
	
}

function RotateAniIcons()
{
	window.clearTimeout(tOut);
	idx = 0;
	do 
	{
		img = document.images[arrIcons[idx]];
		idx = idx + 1;
	}
	while (img.src != imgRoot + "ani_" + arrIcons[idx-1] + ".gif")
	if (idx >= arrIcons.length) idx = 0
		
	for (cnt=0; cnt< arrIcons.length; cnt++)
	{
		img = document.images[arrIcons[cnt]];
		
		if (cnt!=idx)
		{
			img.src = imgRoot + arrIcons[cnt] + ".gif";
			
		}
		else
		{
			img.src = imgRoot + "ani_" + arrIcons[cnt] + ".gif";
			interval = iconIntervals[cnt];
		}
	}
	window.setTimeout("RotateAniIcons()", interval);
}