<!-- Script openwin.js
// **********************************************************
//  JavaScript für das öffnen von neuen Windows
//  mit verschiedenen Positionen und Darstellungen. 
//  Version: 1.0 / Datum: 9. September 1999 
//  Autor: Arnold Meier (webmaster@compina.li)
//  Copywrite(c) by Compina Systems Engineering AG
// **********************************************************
// *** Parameter ***
// htmName: "[<path>/]<datei>[.htm]"
// winName: "<name>"
// winAlign: Sx=status Bx=scrollbars Tx=toolbar (Standard) Mx=menubar (Menüs)
//          Rx=resizeable Lx=location (Adresse) Dx=directories (Links) 
//    ..1=top-left    	..2=top-center    	..3=top-right
//    ..4=middle-left 	..5=middle-center 	..6=middle-right 
//    ..7=bottom-left 	..8=bottom-center 	..9=bottom-right
// Open_parameter (toolbar,location,directories,status,menubar,
//    scrollbars,resizeable,copyhistory,width,height,top,left)
// window.open (<HREF>,<NAME>,status=yes,width=100,height=100);
// **********************************************************

// *** Globale Variablen ***
	var winmax=3
	var winnum=0
	var wid_add=10
	var hig_add=34
	var wid_max=screen.availWidth
	var hig_max=screen.availHeight
	var wid_mov=0.75
	var hig_mov=0.5
	var wid_off=20
	var hig_off=30


// *** Funktionen ***
function openwin(htmName,winName,winAlign,width,height,count_flg) {
	var ind1=htmName.lastIndexOf("/")
	var ind2=htmName.indexOf(".htm")
	if (ind2<0) { htmName=htmName+".htm" }
	if (winName.length==0 && ind2>0) { winName=htmName.substring(ind1+1,ind2) }
	if (count_flg) winName+=winnum++
	if (winnum>=winmax) winnum=0

	winart=''+winAlign
	var winpos=winart.charAt(0)
	var winart=winart.substring(1)
	if (wid_max<=0) wid_max=1024
	if (hig_max<=0) hig_max=768
	width+=wid_add; if (width > wid_max) width=wid_max
	var left=Math.floor((wid_max-width)/2)+wid_off*winnum
	if (winpos==1 || winpos==4 || winpos==7) left=left-Math.floor(left*wid_mov) 
	if (winpos==3 || winpos==6 || winpos==9) left=left+Math.floor(left*wid_mov) 
	height+=hig_add; if (height > hig_max) height=hig_max
	var top=Math.floor((hig_max-height)/2)+hig_off*winnum
	if (winpos>=1 && winpos<=3) top=top-Math.floor(top*hig_mov) 
	if (winpos>=7 && winpos<=9) top=top+Math.floor(top*hig_mov) 
	var text=''
	if (winart.indexOf("T")>=0) { text+="toolbar," }
	if (winart.indexOf("L")>=0) { text+="location," }
	if (winart.indexOf("D")>=0) { text+="directories," }
	if (winart.indexOf("S")>=0) { text+="status," }
	if (winart.indexOf("M")>=0) { text+="menubar," }
	if (winart.indexOf("B")>=0) { text+="scrollbars," }
	if (winart.indexOf("R")>=0) { text+="resizeable," }
	if (winart.indexOf("H")>=0) { text+="copyhistory," }
	text+=("width="+width+",height="+height+",top="+top+",left="+left)
	text+=",marginheight=0"
	window.open(htmName,winName,text)
	self.status="Open Window: "+htmName+" - "+winName+" - Art: "+winart
}
function refresh() {
	var here=window.location
	window.location=here
}
// -- End of JavaScript code -->
