// eigenschaften eines Objekts ermitteln
function obj(Objekt){
	var Ergebnis = "";
	for (var Eigenschaft in Objekt){
		var x = new String(Objekt[Eigenschaft])
		if (x.indexOf("function") == -1)
			Ergebnis += Eigenschaft + " = " + Objekt[Eigenschaft] + "     -     ";
		else
			Ergebnis += "function "+ Eigenschaft
	}
	return Ergebnis;
}
// eigenschaften eines Objekts ermitteln ende
//Default browsercheck, added to all scripts begin
function checkBrowser(){
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  this.isie=this.ie
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
window.browser=new checkBrowser();
//Default browsercheck, added to all scripts end/
/******************************************************
* MultiOnload - v1 (c) by Daniel Rabe - 040511 - 3raben.de 
*  use  addHook(myFunction);  to call myFunction() on onload-event
*******************************************************/
var onLoadHook=new Array(); function addHook(func){	onLoadHook[onLoadHook.length]=func; }
window.onload=multiOnload; function multiOnload(){ for(var i=0; i<onLoadHook.length; i++){ if (onLoadHook[i]) onLoadHook[i](); }}
/*****************************************************************************************
* HideLinkStatusMessage - v1  (c) by Daniel Rabe - 031010 - 
******************************************************************************************/
function setAllLinkText(){
	if ( !document || !document.getElementsByTagName ) return
	var tags = document.getElementsByTagName("a")
	for(var i=0; i<tags.length; i++ ){
		var e = tags[i];		
    if ( !e.status ) e.status = e.innerHTML.replace(/<[^>]*>/,"") // eingeschlossene tags entfernen
		if ( !e.onmouseover ) e.onmouseover = function(){ window.status=this.status; return true; }
		if ( !e.onmouseout ) e.onmouseout =   function(){ window.status = ''; return true; }
    if ( !e.onfocus )  e.onfocus = function(){ if(this.blur) this.blur(); } 
  }
}
addHook(setAllLinkText)
/*
*********************************************
* Highlightscript - v1.1
* (c) by Daniel Rabe - 040528 - 3raben.de
*  hightlights all images with hsrc-attribute
*********************************************
*/
function highlightImages() {
  if (!document.getElementById) return;
  var Kolibri_highlight_PreloadImages = new Array();
  var images = document.getElementsByTagName('img');
  for (var i = 0; i < images.length; i++) {
    if (!images[i].getAttribute('hsrc')) continue;

	Kolibri_highlight_PreloadImages[i] = new Image();
    Kolibri_highlight_PreloadImages[i].src = images[i].getAttribute('hsrc');
    images[i].setAttribute('orgsrc',images[i].getAttribute('src'));
    images[i].onmouseover = function() { this.setAttribute('src',this.getAttribute('hsrc'));    }
    images[i].onmouseout  = function() { this.setAttribute('src',this.getAttribute('orgsrc'));	}
} }
addHook(highlightImages);
/*statuszeilenticker*/
var speed = 40 
var pause = 3500 
var timerID = null
var bannerRunning = false
var ar = new Array()

ar[0] = "Welcome . . . . "
ar[1] = "to the lair of miniatures . . . ."
ar[2] = "Miniatures Lair"
ar[3] = "Miniatures, Diorama"

var currentMessage = 0
var offset = 0
function stopBanner() {
        if (bannerRunning)
                clearTimeout(timerID)
        bannerRunning = false
}
function startBanner() {
			  			     
        stopBanner()
        showBanner()
}
function showBanner() {
        var text = ar[currentMessage]
        if (offset < text.length) {
                if (text.charAt(offset) == " ")
                        offset++                        
                var partialMessage = text.substring(0, offset + 1) 
                window.status = partialMessage
                offset++ 
                timerID = setTimeout("showBanner()", speed)
                bannerRunning = true
        } else {
                offset = 0
                currentMessage++
                if (currentMessage == ar.length)
                        currentMessage = 0
                timerID = setTimeout("showBanner()", pause)
                bannerRunning = true
        }
}
window.onLoad=startBanner();
/******************************************************************************************
* OpenWindow - v1.2 (c) by Daniel Rabe - 010223 - 3raben.de
*	var schalter="toolbar, directories, status, scrollbars, resizable, menubar, location"
*	LIBopenWindow("http://www.google.de",null,null,null,null,null,schalter)
* Sample
	var schalter="toolbar, directories, status, scrollbars, resizable, menubar, location"
	LIBopenWindow("http://www.google.de",null,null,null,null,null,schalter)
*******************************************************************************************/
function LIBopenWindow( url, winname, width, height, left, top, switches){
	function LIBopenWindowUtility( attribute ){ return ","+attribute+"="+(switches.indexOf(attribute)>-1?"yes":"no") }
	var attributes = (width?",width="+width:"")+ (height?",height="+height:"")+ (left?",left="+left:"")+ (top?",top="+top:"")+		
		LIBopenWindowUtility("toolbar")+LIBopenWindowUtility("directories")+LIBopenWindowUtility("status")+LIBopenWindowUtility("scrollbars")+
		LIBopenWindowUtility("resizable")+LIBopenWindowUtility("menubar")+LIBopenWindowUtility("location")
	return window.open( url, (winname?winname:"_blank"), attributes);
}
