<!--
// ClientSnifferJr Object Constructor
// Mike Foster, 7/25/01
// cross-browser.com
var __browserVers = 9;

if(! document.getElementById) {
	document.getElementById = function (id) { 
		return document.all[id];
	}
}
function $(id) { 
	return document.getElementById(id); 
}

function ClientSnifferJr()
{
  	this.ua = navigator.userAgent.toLowerCase();
  	this.major = parseInt(navigator.appVersion);
  	this.minor = parseFloat(navigator.appVersion);

  	// Opera
  	this.opera = this.ua.indexOf('opera') != -1;
  	if (this.opera) {
    	this.opera5 = (this.ua.indexOf("opera 5") != -1 || this.ua.indexOf("opera/5") != -1);
    	this.opera6 = (this.ua.indexOf("opera 6") != -1 || this.ua.indexOf("opera/6") != -1);
    	this.opera7 = (this.ua.indexOf("opera 7") != -1 || this.ua.indexOf("opera/7") != -1);
    	this.opera8 = (this.ua.indexOf("opera 8") != -1 || this.ua.indexOf("opera/8") != -1);
    	
    	if(! this.opera7)
	    	return;
  	}  
  	// MSIE
  	this.ie = this.ua.indexOf('msie') != -1;
  	if (this.ie) {
    	this.ie3 = this.major < 4;
    	this.ie4 = (this.major == 4 && this.ua.indexOf('msie 5') == -1 && this.ua.indexOf('msie 6') == -1 && this.ua.indexOf('msie 7') == -1);
    	this.ie4up = this.major >= 4;
    	this.ie5 = (this.major == 4 && this.ua.indexOf('msie 5.0') != -1);
    	this.ie5up = !this.ie3 && !this.ie4;
    	this.ie6 = (this.major == 4 && this.ua.indexOf('msie 6.0') != -1);
    	this.ie6up = (!this.ie3 && !this.ie4 && !this.ie5 && this.ua.indexOf("msie 5.5") == -1);
    	this.ie7 = (this.major == 4 && this.ua.indexOf('msie 7.0') != -1);
    	this.ie7up = (!this.ie3 && !this.ie4 && !this.ie5 && !this.ie6 && this.ua.indexOf("msie 6.0") == -1);
    	this.ie8 = (this.major == 4 && this.ua.indexOf('msie 8.0') != -1);
    	this.ie8up = (!this.ie3 && !this.ie4 && !this.ie5 && !this.ie6 && !this.ie7 && this.ua.indexOf("msie 7.0") == -1);
    	return;
  	}
  	
  	// Misc.
  	this.hotjava = this.ua.indexOf('hotjava') != -1; 
  	this.webtv = this.ua.indexOf('webtv') != -1;
  	this.aol = this.ua.indexOf('aol') != -1; 
  	if (this.hotjava || this.webtv || this.aol) 
		return;
  	
  	// Gecko, NN4+, and NS6
  	this.gecko = this.ua.indexOf('gecko') != -1;
  	this.nav = (this.ua.indexOf('mozilla') != -1 && this.ua.indexOf('spoofer') == -1 && this.ua.indexOf('compatible') == -1);
  	if (this.nav) {
    	this.nav4  = this.major == 4;
    	this.nav4up= this.major >= 4;
    	this.nav5up= this.major >= 5;
    	this.nav6  = (this.major == 5);
    	this.nav6up= this.nav5up;
  	}
}

is = new ClientSnifferJr();

// ---
	function ToggleDisplay (obj) {
		if(obj) {
			if(obj.style.display == "block")
				obj.style.display = "none";
			else
				obj.style.display = "block";
		}
	}
	function GetEventObj (e) {
		if(window.event)
			return window.event.srcElement ;
		if(e)
			return e.target ;
		return null ;	
	}
	function GetKeyCode (e) {
		if(window.event)
			return window.event.keyCode ;
		if(e)
			return e.which ;
		return 0;	
	}
	function SetKeyCode (e, code) {
		if(window.event)
			window.event.keyCode = code;
		if(e)
			e.which = code;
	}
	function GetShift (e) {
		if(window.event)
			return window.event.shiftKey ;
		if(e){
			if(e.modifiers)
				return 	e.modifiers & Event.SHIFT_MASK;
			return e.shiftKey	
		}		
		return 0 ;			
	}
	function GetCtrl (e) {
		if(window.event)
			return window.event.ctrlKey ;
		if(e){
			if(e.modifiers)
				return 	e.modifiers & Event.CONTROL_MASK;
			return e.ctrlKey ;	
		}	
		return 0 ;			
	}
	function GetAlt (e) {
		if(window.event)
			return window.event.altKey ;
		if(e){ 
			if(e.modifiers)
				return 	e.modifiers & Event.ALT_MASK;
			return e.altKey ;	
		}		
		return 0 ;			
	}
	function CancelBubble (e) {
		if(is.ie) {
			window.event.keyCode = 0 ;
			window.event.cancelBubble = true ;
			return true ;
		} else if(e) {
			e.cancelBubble = true;
			if(e.preventDefault)
      			e.preventDefault();
    		else
				e.returnValue=false
			if(e.stopPropagation)	
				e.stopPropagation();
		}
	}
	function GetMouseX (e) {
		if(is.ie)
			return window.event.clientX	 ;
		if(e && e.pageX)
			return e.pageX 	;
	}		
	function GetMouseY (e) {
		if(is.ie)
			return window.event.clientY	 ;
		if(e && e.pageY)
			return e.pageY 	;
	}		
	function GetMouseScrX (e) {
		if(is.ie)
			return window.event.screenX	 ;
		if(e && e.screenX)
			return e.screenX 	;
	}		
	function GetMouseScrY (e) {
		if(is.ie)
			return window.event.screenY	 ;
		if(e && e.screenY)
			return e.screenY 	;
	}		
	function __getObject (obj) {
		if(typeof(obj) == "string") {
			if(document.getElementById)
				obj = document.getElementById (obj);
			else
				return false;
		}			
		return obj;
	}	
	
	function ReadInnerHTML (obj) {
		obj = __getObject(obj);
		if(! obj)
			return "";
		if(is.ie || is.nav5up || is.opera7){
			return obj.innerHTML ;
		} 
		if(is.opera) {
			return obj.firstChild.nodeValue ;
		}	
		return obj.firstChild.nodeValue ;
	}
	function innerHTML (obj, str) {
		obj = __getObject(obj);
		if(obj) {
			if(is.ie || is.nav5up){
				obj.innerHTML = str ; return 1;
			} 
			if(is.opera) {
				obj.innerHTML = str ; return 1;
			}	
		}	
		return 0 ;
	}
	function GetObjectByName (name) {
		var elm = 0 ;

		if(document.getElementByName) {
			return document.getElementByName (name);
		}	
		if(is.nav) {
			var elm = document.getElementById (name);
			return elm;
		}
		if(document.all) {
			return document.all[name] ;
		}		
		return null ;
	}
	function GetObjectById (id) {
		return GetObjectByID(id);
	}	
	function GetObjectByID (name) {
		if(document.getElementById) {
			return document.getElementById (name);
		}
		if(document.all) {
			return document.all[name] ;
		}		
		return null ;
	}
	function SetObjZIndex (obj, nIx) {
		obj.style.zIndex = nIx ;
		return true;
	}
	function SetObjClip (obj, strClip) {
		obj.style.clip = strClip ;
		return true;
	}
	function SetObjPos (obj, left, top) {
		if((is.ie) || (is.opera)) {
			obj.style.pixelLeft = left ;
			obj.style.pixelTop = top ;
		}			
		else if(is.nav5up || is.opera) {
			obj.style.left = left ;
			obj.style.top = top ;
		}
	}
	function SetObjYPos (obj, top) {
		if(is.ie) {
			obj.style.pixelTop = top ;
			return 1 ;			
		}
		else if(is.nav5up || is.opera) {
			obj.style.top = top ;
		}		
		return 0 ;
	}
	function SetObjXPos (obj, left) {
		if(is.ie) {
			obj.style.pixelLeft = left ;
			return 1 ;			
		}
		else if(is.nav5up || is.opera) {
			obj.style.left = left ;
		}		
		return 0 ;
	}
	function GetObjYPos (obj) {
		if(is.ie) {
			return obj.style.pixelTop ;
		}
		else if(is.nav5up || is.opera) {
			return obj.style.top ;
		}		
		return 0 ;
	}
	function GetObjXPos (obj) {
		if(is.ie) {
			return obj.style.pixelLeft ;
		}
		else if(is.nav5up || is.opera) {
			return obj.style.left ;
		}		
		return 0 ;
	}
	function SetObjVisibility (obj, vis) {
		if(vis == 1) {
			if(is.ie)
				obj.style.visibility = "visible" ;
			else if(is.gecko)
				obj.style.visibility = "visible" ;
			else
				obj.style.visibility = "show" ;
		}
		else {
			if(is.ie)
				obj.style.visibility	= "hidden" ;
			else if(is.gecko)
				obj.style.visibility	= "hidden" ;
			else				
				obj.style.visibility	= "hide" ;
		}	
	}
	function SetWindowHeight (height) {
		if(is.ie) {
			var y = GetWindowHeight ();
		
			window.resizeBy(0, height-y); 
		}	
		else {	
			var y = GetWindowHeight ();
		
			window.resizeBy(0, height-y); 
		}	
	}	
	function SetWindowWidth (width) {
		var y = GetWindowHeight ();
		
		if(is.ie) {
			var x = GetWindowWidth ();
			
			window.resizeBy(width-x, 0); 
		}	
		else	
			window.resizeTo(width, y); 
	}	
	function GetWindowHeight () {
		if(document.documentElement) {
			if(document.documentElement.clientHeight)
				return document.documentElement.clientHeight;
		}	
		if(is.ie) {
			return document.body.clientHeight;
		}	
		else if(is.nav) {
			return window.innerHeight ;	
		}
		return window.innerHeight ;	
	}		
	function GetWindowWidth () {
		if(document.documentElement) {
			if(document.documentElement.clientWidth)
				return document.documentElement.clientWidth;
		}		
		if(is.ie)
			return document.body.clientWidth;
		else if(is.nav)
			return window.innerWidth ;	
		return window.innerWidth ;	
	}		
	function _getCookieValue (pos) {
		var temp = document.cookie.indexOf (" &", pos)
		
		if(temp == -1)	{
			temp = document.cookie.indexOf (";", pos);
			if(temp == -1)
				temp = document.cookie.length ;
		}
		val = document.cookie.substring (pos, temp);
		if(val.replace)
			val = val.replace (/\+/g, " ");
		return unescape (val)
	}
	function readCookie (name)
	{
		var cName = name + "=" ;
		var len = cName.length ;
		var cookieLen = document.cookie.length ;
		var i = 0, j ;
	
		while (i < cookieLen) {
			j = i + len ;
			if(document.cookie.substring(i, j) == cName) {
				return _getCookieValue (j);
			}
			i++
			if(i == 0)
				break ;
		}
		return null ;
	}
	
	function MoveCaret (obj, pos) {
		obj.nCursorPos = pos ;
		
		if (obj.createTextRange) {
			obj.range = document.selection.createRange().duplicate();
			obj.range.expand ("sentence");	// alles markieren
			obj.range.moveStart ("character", pos);
			obj.range.moveEnd ("character", pos+1 - obj.value.length);
			obj.range.select ();
		}	
	}     	
//-->