var macOrWin;
var browserName;
var hidden;
var visible;
var angebotWidth;

var leftPosModifier; // general modifier for left layout position
var angebotLeftPosModifier; // modifier for left layout position of angebote

if (navigator.platform.indexOf("Win") > -1)
	{macOrWin = "Win";}
	else
	{macOrWin = "Mac";}

if (navigator.appName.indexOf("Explorer") > -1)
	{browserName = "IE";}
	else if (parseInt(navigator.appVersion)>= 5)
	{browserName = "Netscape6";}
	else
	{browserName = "Netscape";}

if ((macOrWin == "Mac") && (browserName == "IE"))
	{leftPosModifier = 0;
	 angebotLeftPosModifier = 10;}
	else if ((macOrWin == "Win") && (browserName == "IE"))
	{leftPosModifier = -25;
	 angebotLeftPosModifier = 0;}
	else if ((macOrWin == "Mac") && (browserName == "Netscape"))
	{leftPosModifier = -5;
	 angebotLeftPosModifier = 0;}
	else if ((macOrWin == "Win") && (browserName == "Netscape"))
	{leftPosModifier = 0;
	 angebotLeftPosModifier = 0;}
	else if ((macOrWin == "Mac") && (browserName == "Netscape6"))
	{leftPosModifier = 0;
	 angebotLeftPosModifier = 0;}
	else
	{leftPosModifier = 0;
	 angebotLeftPosModifier = 0;}
	
var windowWidth;
var scrollBarWidth = 20;

if (window.outerWidth)
{
	windowWidth = window.outerWidth - scrollBarWidth;
}
else
// a browser that cannot return the width of the window right from
// the get go - tsssss
{
	windowWidth = screen.width - 100 - scrollBarWidth; //document.body.offsetWidth;
}
// END a browser that cannot return the width of the window 


function ReloadPage() 
{
	document.location=document.location;
}


function InitializeVisibilityVars ()
{
	if (document.all)
	{
		hidden = "hidden";
		visible = "visible";
	}
	else if (document.layers)
	{
		hidden = "hide";
		visible = "show";
	}
	else if (document.getElementById)
	{
		hidden = "hidden";
		visible = "visible";
	}
}


function InitializeWindowStuff ()
{
	if (!(window.outerWidth))
	// a browser that cannot return the width of the window right from
	// the get go - tsssss
	{
		windowWidth = document.body.offsetWidth + scrollBarWidth;
		// angebotLeft = parseInt((windowWidth/2) - (angebotWidth/2))+leftPosModifier+angebotLeftPosModifier;
	}
	// END a browser that cannot return the width of the window
	
	// another browser that cannot resize a window without loosing all style information
	if (document.layers)
	{
		window.onResize=ReloadPage;
	}
	// END another browser that cannot resize a window END
}

function SetWindowStatus (thetext)
{
	window.status = thetext;
}

function SetWindowStatusUpper (thetext, thetextToUpper)
{
	SetWindowStatus (thetext + ' '+ thetextToUpper.toUpperCase());
}

