<!--
/*
*********************************************
* 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](); }}


/*
******************************************************************************************
* 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)
******************************************************************************************
*/
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);
}


/*
******************************************************************************************
* HideLinkStatusMessage - v1
* (c) by Daniel Rabe - 031010 - 3raben.de
******************************************************************************************
*/
function setAllLinkText(){
	if ( !document || !document.getElementsByTagName ) return
	var tags = document.getElementsByTagName("a")
	for(var i=0; i<tags.length; i++ ){
		var e = tags[i];
		e.MouseOverText = e.innerHTML.replace(/<[^>]*>/,"") // eingeschlossene tags entfernen
		if ( !e.onmouseover ) e.onmouseover = function(){ window.status=this.MouseOverText; 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);
//-->
