function OpenNewWindow(img,popup_width,popup_height) {
	
	status_height=20;

	xsize = popup_width;
	ysize = popup_height+status_height;
	    
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	
	xpos = (ScreenWidth/3)-(xsize/3);
	ypos = (ScreenHeight/3)-(ysize/3);
		
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
	NewWindow.document.write ('<html>');
	NewWindow.document.write ('<head>');
	NewWindow.document.write ('<title>hogla</title>');
	NewWindow.document.write ('<link rel="stylesheet" href="/styles.css">');
	NewWindow.document.write ('</head>');
	NewWindow.document.write ('<body style="background-color:white;margin:0px;">');
	NewWindow.document.write ('<table cellspacing="0" cellpadding="0" border="0">');
	NewWindow.document.write ('<tr>');
	NewWindow.document.write ('<td><img src="'+img+'"></td>');
	NewWindow.document.write ('</tr>');
	NewWindow.document.write ('<tr>');
	NewWindow.document.write ('<td height="'+status_height+'" align="right"><a href="javascript:window.close();" onMouseOver="window.status=\'Fenster schliessen\'; return true;" onMouseOut="window.status=\'\'; return true;">Fenster schliessen</a></td>');
	NewWindow.document.write ('</tr>');
	NewWindow.document.write ('</table>');
	NewWindow.document.write ('</body>');
	NewWindow.document.write ('</html>');
	NewWindow.document.close();
}

function OpenNewWindow2(img,titel,popup_width,popup_height) {
	
	head_height=20;
	status_height=20;

	xsize = popup_width;
	ysize = popup_height+head_height+status_height;
	    
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	
	xpos = (ScreenWidth/3)-(xsize/3);
	ypos = (ScreenHeight/3)-(ysize/3);
		
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
	NewWindow.document.write ('<html>');
	NewWindow.document.write ('<head>');
	NewWindow.document.write ('<title>hogla</title>');
	NewWindow.document.write ('<link rel="stylesheet" href="/styles.css">');
	NewWindow.document.write ('</head>');
	NewWindow.document.write ('<body style="background-color:white;margin:0px;">');
	NewWindow.document.write ('<table cellspacing="0" cellpadding="0" border="0">');
	NewWindow.document.write ('<tr>');
	NewWindow.document.write ('<td height="'+head_height+'" align="center"><b>'+titel+'</b></td>');
	NewWindow.document.write ('</tr>');
	NewWindow.document.write ('<tr>');
	NewWindow.document.write ('<td><img src="'+img+'"></td>');
	NewWindow.document.write ('</tr>');
	NewWindow.document.write ('<tr>');
	NewWindow.document.write ('<td height="'+status_height+'" align="right"><a href="javascript:window.close();" onMouseOver="window.status=\'Fenster schliessen\'; return true;" onMouseOut="window.status=\'\'; return true;">Fenster schliessen</a></td>');
	NewWindow.document.write ('</tr>');
	NewWindow.document.write ('</table>');
	NewWindow.document.write ('</body>');
	NewWindow.document.write ('</html>');
	NewWindow.document.close();
}

// dynamic scrollbar
function content_layer() {

browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;


xpos=308;
ypos=192;
width=620;
padding="0px 0px 0px 0px";
top_padding=0;
document_offset = 212;

if ((navigator.userAgent.indexOf("Win") != -1)){

	if (browser_type == "Netscape") {
	
	height=window.innerHeight-document_offset;
	height=top_padding+Math.round(height/14)*14;
	
	document.write(' <div id="content_test" style="Z-INDEX: 30; LEFT: '+xpos+'px; TOP: '+ypos+'px; VISIBILITY: visible; WIDTH: '+width+'px; HEIGHT: '+height+'px; POSITION: absolute; overflow: auto;"> ');

	document.write('<table border="0" cellspacing="0" cellpadding="0"> ');
	document.write('<tr> ');
	document.write('	<td valign="top" style="padding: '+padding+'"> ');

	}
	
	else {
	
	height=document.body.clientHeight-document_offset;
	height=top_padding+Math.round(height/14)*14;
	
	document.write(' <div id="content_test" style="Z-INDEX: 30; LEFT: '+xpos+'px; TOP: '+ypos+'px; VISIBILITY: visible; WIDTH: '+width+'px; HEIGHT: '+height+'px; POSITION: absolute; overflow: auto;"> ');

	document.write('<table border="0" cellspacing="0" cellpadding="0"> ');
	document.write('<tr> ');
	document.write('	<td valign="top" style="padding: '+padding+'"> ');

	}
}

if (navigator.userAgent.indexOf('Mac') != -1){

	if (navigator.appName.indexOf('Microsoft') != -1) {
	
	
	height=document.body.clientHeight-document_offset;
	height=top_padding+Math.round(height/14)*14;
	
	document.write(' <div id="content_test" style="Z-INDEX: 30; LEFT: '+xpos+'px; TOP: '+ypos+'px; VISIBILITY: visible; WIDTH: '+width+'px; HEIGHT: '+height+'px; POSITION: absolute; overflow: auto;"> ');
	
	document.write('<table width="92%" border="0" cellspacing="0" cellpadding="0"> ');
	document.write('<tr> ');
	document.write('	<td valign="top" style="padding: '+padding+'"> ');
	
	}
	
	else {
	
	document.write(' <div id="content_test" style="Z-INDEX: 30; LEFT: '+xpos+'px; TOP: '+ypos+'px; VISIBILITY: visible; WIDTH: '+width+'px; HEIGHT: '+(window.innerHeight-document_offset)+'px; POSITION: absolute; overflow: auto;"> ');

	document.write('<table border="0" cellspacing="0" cellpadding="0"> ');
	document.write('<tr> ');
	document.write('	<td valign="top" style="padding: '+padding+'"> ');
	
	}
}

}

function content_layer_end() {

	document.write('	</td> ');
	document.write('</tr> ');
	document.write('</table> ');
	document.write('</div>');
	
}

function set_content() {
	browser_version= parseInt(navigator.appVersion);
	browser_type = navigator.appName;

	if (browser_type == "Netscape") {
		height=window.innerHeight-document_offset;
		height=top_padding+Math.round(height/14)*14;
		document.getElementById('content_test').style.height=height;
	}
	else {
		height=document.body.clientHeight-document_offset;
		height=top_padding+Math.round(height/14)*14;
		document.getElementById('content_test').style.height=height;
	}
}


