version = parseInt(navigator.appVersion);

if (navigator.appVersion.indexOf('5.')>-1)
	version=5;

browser='OTHER';

if (navigator.appName=='Netscape')
	browser='NS'+version;

if (navigator.appName=='Microsoft Internet Explorer')
	browser='IE'+version;

if (navigator.appVersion.indexOf('MSIE 3')>0)
	browser='IE3';

if (browser == 'NS5')
	browser='NS6';

function popupPicture(file,w,h)
{
	browserWidth = screen.width;
  	browserHeight = screen.height;

	offsetLeft = Math.floor((browserWidth - w) / 2);
	offsetTop = Math.floor((browserHeight - h) / 2);

	new_win = window.open(" ",'','width='+w+',height='+h+',screenX='+offsetLeft+',screenY='+offsetTop+',location=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no');
   new_win.document.open();
	new_win.document.write("<html><title>Show Picture</title><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><img src=\""+file+"\"></body></html>");
	new_win.moveTo(offsetLeft, offsetTop);
}

function openLink(url)
{
	if (tab != 'chat')
		this.location.href = url;
	else
	{
		luxusbuerg_win = window.open(url,'','width='+eval(screen.width-100)+',height='+eval(screen.height-200)+',screenX=0,screenY=0,location=yes,toolbar=yes,directories=no,menubar=yes,resizable=yes,status=yes,copyhistory=yes');
		luxusbuerg_win.moveTo(0,0);
	}
}

function openURL(address, target)
{
	if (tab == 'chat' || target == '_blank')
	{
		luxusbuerg_win = window.open(address,'','width='+eval(screen.width-100)+',height='+eval(screen.height-200)+',screenX=0,screenY=0,location=yes,toolbar=yes,directories=no,menubar=yes,resizable=yes,status=yes,copyhistory=yes');
		luxusbuerg_win.moveTo(0,0);
	}
	else
		top.location.href = address;
}

function SwitchLanguage(lg, url)
{
	var link = "";

	if (url == "")
		url = this.location.href;

	for (var n=1; n <= url.length; n++)
		link += (url.substring(n-1,n) == "&") ? "%26" : url.substring(n-1,n);

	this.location.href = "index.php?tab=language&lg="+lg+"&link="+link;
}

function popupFile(file,w,h)
{
	offsetLeft = Math.floor((screen.width - w) / 2);
	offsetTop = Math.floor((screen.height - h) / 2);

	new_win = window.open(file,'lxb_popup','width='+w+',height='+h+',screenX='+offsetLeft+',screenY='+offsetTop+',location=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no');
	new_win.moveTo(offsetLeft, offsetTop);
}

function ipWarningOk(){
  document.getElementById('IpWarning').style.visibility='hidden';
}
