function onEnter(event)
{
	var bolOldBrowser = (document.layers) ? true : false;
	var intKeyCode = 0;
	if (bolOldBrowser) { intKeyCode = event.which; } else {	intKeyCode = event.keyCode; }
	if (intKeyCode == 13) { document.GlobalForm.action = 'web_search.asp'; }
}

function OpenInfoDB()
{
	InfoDBWindow = window.open('infodb.asp','InfoDB_DE','width=690,height=700,left=100,top=100,resizable=yes');		
	InfoDBWindow.focus();
}

function OpenProductLevelDB(ProductLevelID)
{
	ProductLevelWindow = window.open('infodb.asp?InfoDB=productlevel&ShowTable=0&ProductLevelID=' + ProductLevelID,'Datenbank','width=690,height=700,left=100,top=100,resizable=yes');
	ProductLevelWindow.focus();
}

function OpenMarketDB(MarketID)
{
	MarketWindow = window.open('infodb.asp?InfoDB=market&ShowTable=0&MarketID=' + MarketID,'Datenbank','width=690,height=700,left=100,top=100,resizable=yes');
	MarketWindow.focus();
}

function OpenPopup(PopupID)
{
	PopupWindow = window.open('popup.asp?PopupID=' + PopupID,'Popupfenster','width=480,height=630,left=100,top=100,resizable=yes');	
	PopupWindow.focus();
}

function OpenDiashow(DiaShowID)
{
	DiaShowWindow = window.open('diashow.asp?DiaShowID=' + DiaShowID,'Diashowfenster','width=500,height=470,left=100,top=100,scrollbars=yes,resizable=yes');	
	DiaShowWindow.focus();
}

function OpenPrintPopup(PrintFlag, PrintPopupID)
{
	if (PrintFlag == "MarketID")
	{
		window.open('print_popup.asp?MarketID=' + PrintPopupID,'Popupfenster','width=480,height=630,left=100,top=100,resizable=yes,scrollbars=yes');	
	}
	else
	{
		window.open('print_popup.asp?ProductLevelID=' + PrintPopupID,'Popupfenster','width=480,height=630,left=100,top=100,resizable=yes,scrollbars=yes');	
	}	
}

function OpenSitemap()
{
	SitemapWindow = window.open('sitemap.asp','Sitemapfenster','width=480,height=630,left=100,top=100,resizable=yes,scrollbars=yes');
	SitemapWindow.focus();
}

function OpenImpressum(PopupID)
{
	ImpressumWindow = window.open('popup.asp?PopupID=' + PopupID,'Impressumfenster','width=480,height=630,left=100,top=100,resizable=yes,scrollbars=yes');
	ImpressumWindow.focus();
}

function OpenPopupFromInfoDB(PopupID)
{
	window.open('popup.asp?PopupID=' + PopupID,'Popupfenster','width=480,height=630,left=100,top=100,resizable=yes,scrollbars=yes');	
}

function OpenProductDetails(ASPFile, ProductID, LanguageID)
{
	window.open(ASPFile + '?LanguageID=' + LanguageID + '&ProductID=' + ProductID,'Produktdetail','width=100,height=100,left=100,top=100,resizable=yes,scrollbars=auto');
}

// Sprachlayer anzeigen
var MausX=0, MausY=0;
var gezeigt = null;
window.onload = init;

function init()
{
	if (window.Event)
		if (navigator.userAgent.indexOf("Konqueror") > -1) window.captureEvents(Event.MOUSEMOVE);
	else
		document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = MausXY;
}

function MausXY(e)
{
	if (document.all)
	{
		MausX = event.clientX + document.body.scrollLeft;
		MausY = event.clientY + document.body.scrollTop;
	}
	else
	{
		MausX = e.pageX;
		MausY = e.pageY;
	}
	if (MausX < 0) MausX = 0;
	if (MausY < 0) MausY = 0; 
	return true;
}

function holeKasten(id) 
{
	if (document.all) return document.all(id);
	else if (document.layers) return document.layers[id];
	else if (document.getElementById) return document.getElementById(id);
}

function holeKastenStyle(id) 
{
	if (document.layers) return holeKasten(id);
	else if (document.all || document.getElementById) return holeKasten(id).style;
}

function offsetX()
{
	if (document.all) return document.body.scrollLeft;
	else if (document.layers || document.getElementById) return window.pageXOffset;
}

function offsetY()
{
	if (document.all) return document.body.scrollTop;
	else if (document.layers || document.getElementById) return window.pageYOffset;
}

function HideLanguageLayer(id) 
{
	holeKastenStyle('LanguageLayer').visibility = "hidden";
}

function aktuellVerstecken()
{
	if (gezeigt != null) HideLanguageLayer(gezeigt);
}

function ShowLanguageLayer(id)
{
	aktuellVerstecken();
	gezeigt = id;
	var NeuX = MausX + 5; 
	if (NeuX < offsetX()) NeuX = offsetX();
	var NeuY = MausY + 5; 
	if (NeuY < offsetY()) NeuY = offsetY();
	if (document.all && holeKastenStyle(id).posLeft)
	{
		holeKastenStyle(id).posLeft = NeuX;
		holeKastenStyle(id).posTop = NeuY;
	}
	else if (document.getElementById)
	{
		holeKastenStyle(id).left = NeuX + "px";
		holeKastenStyle(id).top = NeuY + "px";
	}
	else if (document.layers)
	{
		holeKastenStyle(id).left = NeuX;
		holeKastenStyle(id).top = NeuY;
	}
	holeKastenStyle(id).visibility = "visible";
}
// Sprachlayer anzeigen
