
var dom = document.getElementById?1:0;
var ns4 = document.layers?1:0;

function init()
{

 posx = (( screen.availWidth / 2 ) + 200);

 if (dom) 
 {
 //document.getElementById("news").style.visibility = "visible";
 document.getElementById("news").style.left = posx;
 }
 else if(ns4) {
 //document['news'].visibility = "visible";
 document['news'].left = posx;
 }
}


function newWin(file, name, w, h, center, posx, posy, menu, tool, location, scroll, status, resize)
{

	h = h + 15;

	if ( h > 600 )
	{
		h = 600;
		w  = w + 19;
		scroll = '1';
		resize = '1';
	}
		
	if ( w > 800 )
	{ 
		w = 800;
		h = h + 19;
		scroll = '1';
		resize = '1';
	}

	infoWin = open('', '', ',width=' + w + ',height=' + h  + ',menubar=' + menu + ',toolbar=' + tool + ',location=' + location
						 		   + ',scrollbars=' + scroll + ',status=' + status + ',resizable=' + resize + "'");

	infoWin.document.writeln('<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">');
	infoWin.document.writeln('');
	infoWin.document.writeln('<html>');
	infoWin.document.writeln('<head>');
	infoWin.document.writeln('	<title>Zoom</title>');
	infoWin.document.writeln('<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\">');	
	infoWin.document.writeln('</head>');
	infoWin.document.writeln('');
	infoWin.document.writeln('<body leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\" marginheight=\"0\">');
	infoWin.document.writeln('');
	infoWin.document.writeln('');
	infoWin.document.writeln('<img src=\"'+ file+'\" border=\"0\">');
	infoWin.document.writeln('');		
	infoWin.document.writeln('<center><a class=\"nav\" href=\"javascript:self.close()\">Fenster schliessen!</a></center>');	
	infoWin.document.writeln('');		
	infoWin.document.writeln('</body>');
	infoWin.document.writeln('</html>');
	
	if (center == true)
		{
				posx = ( screen.availWidth - w ) / 2;
				posy = ( screen.availHeight - h ) / 2;
		}

		
	infoWin.moveTo(posx,posy);
	infoWin.focus();
}



function zoomWin(file, name, w, h, center, posx, posy, menu, tool, location, scroll, status, resize)
{

	prefix = '../';
	
	y = h + 80;
	x = w + 30;
	
	galWin = open(file, 'zoom', ',width=' + x + ',height=' + y  + ',menubar=' + menu + ',toolbar=' + tool + ',location=' + location
						 		   + ',scrollbars=0'  + ',status=' + status + ',resizable=' + resize + "'");
								   
	if (center == true)
		{
				posx = ( screen.availWidth - x ) / 2;
				posy = ( screen.availHeight - y ) / 2;
		}

		
	galWin.moveTo(posx,posy);
	galWin.focus();
}
