// **************************************
// js_lib.js
// library of js functions
// **************************************

function flashTest() {
	flash = false;
	if ((navigator.plugins) && (navigator.plugins.length > 0)){
		   for (a = 0; a < navigator.plugins.length; a++) 
		      if ((navigator.plugins[a].name.indexOf('Flash') != -1) && (parseInt(navigator.plugins[a].name) >= 6)){
		         return true;
		      }
		}
		
		// alternativ, testet nur auf beliebige Version (>2?):
		if ((navigator.mimeTypes) && (navigator.mimeTypes.length > 0)) 
			for (a = 0; a < navigator.mimeTypes.length; a++) 
				if (navigator.mimeTypes[a].type.indexOf("application/x-shockwave-flash")>= 0) 
					return true;
		
		return false;
}

function scrollStart(direction, divID){
	// REPEATED CALL EITHER scrollUp OR scrollDown
	ourInterval = setInterval("scroll"+direction+"('"+divID+"')", scrollSpeed);
}
function scrollEnd(){
	// STOP CALLING THE SCROLL FUNCTION
	clearInterval(ourInterval);
}

function scrollUp(which){
	// SET THE SCROLL TOP
	$(which).scrollTop = $(which).scrollTop - scrollHeight;
}
function scrollDown(which){
	// SET THE SCROLL TOP
	$(which).scrollTop = $(which).scrollTop + scrollHeight;
}