var Browser = {
	detect: function()
	{
		this.isWebKit = navigator.userAgent.indexOf('AppleWebKit/') > -1;
		this.isGecko = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1;
		this.isOpera = !!window.opera;
		this.isMobileSafari = !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
		this.isMSIE  = !!(window.attachEvent && !window.opera);
		this.isMSIE5 = this.isMSIE && !document.compatMode;
		this.isMSIE7 = this.isMSIE && window.XMLHttpRequest;
		this.isMSIE6 = this.isMSIE && !this.isMSIE5 && !this.isMSIE7;
	} // function detect
}
Browser.detect();

// popup
function popup(url,name,h,v,sc,st)
{
	var win;
	win = window.open(url,name,'width='+h+',height='+v+',scrollbars='+sc+',resizable=no,resize=no,toolbar=no,status='+st+',directories=no,menubar=no,location=no');
	win.focus();
} // function popup

function myPop(e)
{
	// gegen IE
	if (!e) var e = window.event;
	var a = e.target ? e.target : e.srcElement;

	// neues Fenster mit dem link aus href="..."
	if (typeof e != 'undefined' && e.tagName == "A") {
		var newwin = window.open(a.href);
	} else if (this.tagName == "A") {
		var newwin = window.open(this.href);
	}
	return !newwin;                               
} // function function myPop

function initNavigation()
{
	if (!document.getElementById('navi')) return;
	
	var oNavi = document.getElementById('navi');
	for (var i = (oNavi.childNodes.length - 1); i >= 0; --i)
	{
		if (oNavi.childNodes[i].nodeName == 'LI')
		{
			oNavi.childNodes[i].onmouseover = function()
			{
				this.className+= 'hover';
			} // function
			
			oNavi.childNodes[i].onmouseout = function()
			{
				this.className = this.className.replace('hover', '');
			} // function
		} // if
	} // for
} // function initNavigation

function openInWindow(mDropDown, sTarget)
{
	var oNewWin = null;
	
	if (typeof mDropDown == 'string')
	{
		document.getElementById('form-search-productname').elements['productname'].focus();
		oNewWin = window.open(mDropDown, sTarget);
	}
	else if (mDropDown.value != '')
	{
		document.getElementById('form-search-productname').elements['productname'].focus();
		oNewWin = window.open(mDropDown.value, sTarget);
	} // if (oDropDown.value != '')
	
	if (oNewWin)
	{
		oNewWin.focus();
	} // if (oNewWin)
	
	return false;
} // function openInWindow


window.onload = function()
{
	var links = document.getElementsByTagName('a');
	for (var i = links.length; i != 0; i--)
	{
		var a = links[i-1];
		if (!a.href) continue;
		if (a.className && a.className.indexOf('extern') != -1) a.onclick = myPop;
	} // for
	
	// Navigation fuer den IE<=6 aufbereiten
	if (Browser.isMSIE && !Browser.isMSIE7)
	{
		initNavigation();
	} // if 
} // function onload