
// BrowserCheck-Objekt
function UserAgent() {
	var b=navigator.appName;
	if (b=="Netscape") this.b="ns";
	else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera";
	else if (b=="Microsoft Internet Explorer") this.b="ie";
	if (!b) alert('Unidentified browser./nThis browser is not supported,');
	this.version=navigator.appVersion;
	this.v=parseInt(this.version);
	this.ns=(this.b=="ns" && this.v>=4);
	this.ns4=(this.b=="ns" && this.v==4);
	this.ns6=(this.b=="ns" && this.v==5);
	this.ie=(this.b=="ie" && this.v>=4);
	this.ie4=(this.version.indexOf('MSIE 4')>0);
	this.ie5=(this.version.indexOf('MSIE 5')>0);
	this.ie55=(this.version.indexOf('MSIE 5.5')>0);
	this.ie6=(this.version.indexOf('MSIE 6')>0);
	this.opera=(this.b=="opera");
	this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false;
	this.def=(this.ie||this.dom); // most used browsers, for faster if loops
	var ua=navigator.userAgent.toLowerCase();
	
	if ((this.win32=(ua.indexOf("win")>-1))) this.platform="win32";
	else if ((this.mac=(ua.indexOf("mac")>-1))) this.platform="mac";
	else {this.other=true;this.platform="other";};
	this.lang=((this.ie)?navigator.browserLanguage:navigator.language).substring(0,2)
}
var ua = new UserAgent();

	var gintDelay = 200;
	function handleStrip(strStripId, intDelay) {
		var strRGB;
		var strBGColor = "#";
		var strCharSet = "0123456789abcdef";
		var intLowerbound = 1;
		var intUpperbound = strCharSet.length;
		for (var i = 0; i < 3; i++) {
			strRGB = strCharSet.charAt((intUpperbound - intLowerbound + 1) * Math.random() + intLowerbound);
			// Nulls müssen speziell abgefangen werden
			if (strRGB == 0) {
				strBGColor += "00";
			} else {
				strBGColor += strRGB + strRGB;
			}
		}
		if(strRGB != "ffffff") {
			setBGColor(strStripId, strBGColor, strCharSet, 1, 150);
		} else { 
			handleStrip(strStripId, intDelay);
		};
	}
	function setBGColor(strElementId, strBGColor, strCharSet, intStep, intDelay) {
		var oElement = document.getElementById(strElementId);
		oElement.bgColor = fadeColor(strCharSet, oElement.bgColor, strBGColor, intStep);
		if ( (strBGColor == oElement.bgColor) || (oElement.bgColor == "") ) {
			var intTimerID = setTimeout("handleStrip('" + strElementId + "', " + intDelay + ")", 2500);
		} else {
			var intTimerID = setTimeout("setBGColor('" + strElementId + "', '" + strBGColor + "', '" + strCharSet + "', " + intStep + ", " + intDelay + ")", intDelay);
		}
	}
	function fadeColor(strCharSet, strCurrentBGColor, strFinalBGColor, intStep) {
		if (strCurrentBGColor.length == strFinalBGColor.length) {
			var strNewBGColor = "";
			for (var i = 0; i < strCurrentBGColor.length; i++) {
				var intCharOfCurrent = strCurrentBGColor.charAt(i);
				var intCharOfFinal = strFinalBGColor.charAt(i);
				var intIndexOfCurrent = strCharSet.indexOf( intCharOfCurrent );
				var intIndexOfFinal = strCharSet.indexOf( intCharOfFinal );
				if ( intIndexOfCurrent > intIndexOfFinal ) {
					// Grösser als 1 und differenz grösser als step
					if ( (intIndexOfCurrent - intStep > 1) && ( (intIndexOfCurrent - intIndexOfFinal) > intStep ) ) {
						strNewBGColor += strCharSet.charAt( intIndexOfCurrent - intStep );
					} else {
						strNewBGColor += strFinalBGColor.charAt(i);
					}
				} else if ( intIndexOfCurrent < intIndexOfFinal ) {
					// Kleiner als CharSet und differenz grösser als intStep
					if ( (intIndexOfCurrent + intStep < (strCharSet.length - intStep)) && ( (intIndexOfFinal - intIndexOfCurrent) > intStep ) ) {
						strNewBGColor += strCharSet.charAt( intIndexOfCurrent + intStep );
					} else {
						strNewBGColor += strFinalBGColor.charAt(i);
					}
				} else {
					strNewBGColor += strFinalBGColor.charAt(i);
				}
			}
			return strNewBGColor;
		} else {
			return strFinalBGColor
		}
	}
	// init...
	var intTimerID = setTimeout("handleStrip('strip1', " + gintDelay + ")", gintDelay);
	var intTimerID = setTimeout("handleStrip('strip2', " + gintDelay + ")", gintDelay);





