
function ClientSniffer(){
	this.ua=navigator.userAgent.toLowerCase();
	this.major=parseInt(navigator.appVersion);
	this.minor=parseFloat(navigator.appVersion);
	this.dom=(document.getElementById);
	this.win=((this.ua.indexOf('win')!=-1)||(this.ua.indexOf('16bit')!=-1));
	this.sco=(this.ua.indexOf('sco')!=-1)||(this.ua.indexOf('unix_sv')!=-1);
	this.mac=this.ua.indexOf('mac')!=-1;
	this.sun=this.ua.indexOf('sunos')!=-1;
	this.irix=this.ua.indexOf('irix')!=-1;
	this.hpux=this.ua.indexOf('hp-ux')!=-1;
	this.aix=this.ua.indexOf('aix')!=-1;
	this.linux=this.ua.indexOf('inux')!=-1;
	this.unixware=this.ua.indexOf('unix_system_v')!=-1;
	this.mpras=this.ua.indexOf('ncr')!=-1;
	this.reliant=this.ua.indexOf('reliantunix')!=-1;
	this.sinix=this.ua.indexOf('sinix')!=-1;
	this.freebsd=this.ua.indexOf('freebsd')!=-1;
	this.bsd=this.ua.indexOf('bsd')!=-1;
	this.dec=((this.ua.indexOf('dec')!=-1)||(this.ua.indexOf('osf1')!=-1)||(this.ua.indexOf('dec_alpha')!=-1)||(this.ua.indexOf('alphaserver')!=-1)||(this.ua.indexOf('ultrix')!=-1)||(this.ua.indexOf('alphastation')!=-1));
	this.unix=((this.ua.indexOf('x11')!=-1)||this.sun||this.irix||this.hpux||this.sco||this.unixware||this.mpras||this.reliant||this.dec||this.sinix||this.aix||this.linux||this.bsd||this.freebsd);
	if(document.addEventListener&&document.removeEventListener)this.d2events=true;
	if(document.getElementById)this.d1getbyid=true;
	this.opera=this.ua.indexOf('opera')!=-1;
	if(this.opera){
		this.opera5=(this.ua.indexOf("opera 5")!=-1||this.ua.indexOf("opera/5")!=-1);
		return;
	}
	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.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);
		return;
	}
	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;
	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;
	}
}

window.is=new ClientSniffer();

//--------------------------------------------------------------------------------------------

function init() {

	ie=(document.all)
	n=(document.layers)
	mac=(navigator.userAgent.indexOf("Mac")!=-1);
	iemac=(ie && mac);
        dom=(document.getElementById);


        if (is.gecko){
	   n = false;
	   ie=false;
	   mac=false;
	   iemac=false;
	   dom = true;
	}
  

  if(ie){
	genObj="document.all"
	genStyle=".style"
  }
  

  if(n) {
	genObj="document.layers"
	genStyle=""
  }
}
 
init();





var stop_scroll;
var x;
var maxScrollStrecke;
var ScrollBremse = 0;
var Pixelversatz = -6;	// soviele Pixel ist das Menü in seinem Container verschoben



function InitScrollMenue() {
	if (n) myScrollMenue = document.ScrollMenueFenster.document.ScrollMenue;
	if (dom) myScrollMenue = document.getElementById('ScrollMenue').style;
	if (ie) myScrollMenue = ScrollMenue.style;

	if (n) myScrollMenueFenster = document.ScrollMenueFenster;
	if (dom) myScrollMenueFenster = document.getElementById('ScrollMenueFenster').style;
	if (ie) myScrollMenueFenster = ScrollMenueFenster.style;
	myScrollMenue.top = 0;		
	myScrollMenue.left = 0 + Pixelversatz;	//Randverschiebung ausgleichen
	myScrollMenue.xpos = parseInt(myScrollMenue.left);   // Manche Browser liefern den Wert mit 'px'-Angabe 
	maxScrollStrecke = parseInt(myScrollMenue.width) - parseInt(myScrollMenueFenster.width);
  }


	
// Bewegung nach rechts
function MenueScrollRechts() {
	if (myScrollMenue.xpos < (0 + Pixelversatz) ) {
		myScrollMenue.xpos += 1;
		myScrollMenue.left = myScrollMenue.xpos;
        stop_scroll = setTimeout("MenueScrollRechts()",ScrollBremse) 
	}
    else if(myScrollMenue.xpos == 0)  { 
		MenueStop(); 
    }    
}

// Bewegung nach links
function MenueScrollLinks() {
	if (myScrollMenue.xpos > - maxScrollStrecke ) {
		myScrollMenue.xpos -= 1;
		myScrollMenue.left = myScrollMenue.xpos;
		stop_scroll = setTimeout("MenueScrollLinks()",ScrollBremse) 
	}
	else if(myScrollMenue.xpos == - maxScrollStrecke) {
			MenueStop(); 
    }
}

function MenueStop() {
	clearTimeout(stop_scroll);
}

