<!--
////////////////////////////////////////////////////////////////////
// copyright: IT assistance GmbH - info@itassistance.ch
// author: IT assistance GmbH - info@itassistance.ch
// date: 2001-12-20 22:01
// change: 01.03.2003 03:03
////////////////////////////////////////////////////////////////////

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion; this.agent=navigator.userAgent
	this.dom=document.getElementById ? true:false
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom) ? true:false
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom) ? true:false
	this.ie4=(document.all && !this.dom) ? true:false
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ? true:false
	this.ns4=(document.layers && !this.dom) ? true:false
	this.ns=this.ns4||this.ns6
	this.mz=this.agent.indexOf("Mozilla")>-1
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
	return this
}
var bw=new lib_bwcheck() //Making browsercheck object

//ns = document.layers ? true:false
//ie = document.all ? true:false
//dom = document.getElementById ? true:false

if (bw.ns4) {
	vishid = "hide"
	visvis = "show"
}
else {
	vishid = "hidden"
	visvis = "visible"
}

ie = bw.ie||bw.mz
ns = bw.ns
doc = document

//////////////////////////////////////////////////////
// routines for switching images 

var preloadFlag = false;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (preloadFlag && document.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (bw.ns4) {
				img = findElement(changeImages.arguments[i],0);
			}
			else {
				img = document.images[changeImages.arguments[i]];
			}
			if (img) {
				img.src = changeImages.arguments[i+1].src ? changeImages.arguments[i+1].src : changeImages.arguments[i+1];
			}
		}
	}
}

function findElement(n,ly) {
	if (bw.ver.substring(0,1) < 4) return document[n];
	var curDoc = ly ? ly.document : document;
	var elem = curDoc[n];
	if (!elem) {
		for (var i=0;i<curDoc.layers.length;i++) {
			elem = findElement(n,curDoc.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

//////////////////////////////////////////////////////
// routines for opening windows 
var display = new newWinTypes()

// fall back function, can be called seperatly as data.js
var display = new newWinTypes()
function newWinTypes() {
// 	this.print = "resizable=yes,scrollbars=yes,width=520,height=650,toolbar=no,status=no,directories=no,menubar=no,location=no"
}

function newWin(type,URL) {
	newwin = window.open(URL,type,display[type])
	newwin.focus()         
	if (newwin.opener == false) {
		newwin.opener = window
	}
	newwin.moveTo(screen.availWidth-650,50)
	//return newwin  // needs a noreturn after calling
}

//////////////////////////////////////////////////////
// focus the calling window

self.focus()

// -->
