
defaultStatusText='GfM - Gesellschaft für Medienwissenschaft';




	function sig(n) {
		return (n>0) ? 1 : -1 ;
	}

	function getObj(objName) {

			if (document.all) {
				currObject=eval('document.all[\''+objName+'\']');

			}
			else if (document.layers) {
				currObject=eval('document.layers[\''+objName+'\']');
			}
			else {
				currObject=eval('document.getElementById("'+objName+'")');

			}
			return currObject;

	}
	var fadeObj=null;
	var fading=null;

	function fadeIn(name) {



		if (fadeObj) {
			if (fadeObj.name!=name) {
			fadeObj.style.color=startColor;
			fadeObj.style.display='none';
			fadeObj.style.visibility='hidden';
			fadeObj.coliter=0;
			clearInterval(fading);
			}
		}


		var cont=getObject(name);

		if (fadeObj) {
			if (fadeObj.name!=name) {
				fadeObj=cont;
				fadeObj.style.color=startColor;
				fadeObj.style.display='block';
				fadeObj.style.visibility='visible';
				cont.coliter=0;
				fade();

			}
		}
		else {

			fadeObj=cont;
			fadeObj.style.color=startColor;
			fadeObj.style.display='block';
			fadeObj.style.visibility='visible';
			cont.coliter=0;
			fading=setInterval('fade()',80);

		}


	}



	function startfadeIn() {
		fading=setInterval('fade()',80);
	}
	
	
	function stopFading() {
		if (fadeObj) {
			fadeObj.style.color='#FFFFFF';
			fadeObj.style.display='none';
			fadeObj.style.visibility='hidden';
			clearInterval(fading);
			fadeObj=null;
		}
	}

	function fade() {
		var cont=fadeObj;
		if (cont.style) {
				var coliter=parseInt(cont.coliter);
				c=parseInt(coliter);
				col=colorValue(cont.style.color,c);
				cont.style.color=col;
				cont.style.borderColor=col;
				c=c+1;

				if (c<17) {
					cont.coliter=c;

				}
				else {
					c=1;
					cont.coliter=c;
					clearInterval(fading);
					var swap=startColor;
					startColor=endColor;
					endColor=swap;
					//setTimeout(startfadeIn,2000);

				}

			}

	}





function dec2hex(n) {
	var hexi = '0123456789abcdef' ;
	var hex='';
	var base=16;
	var val='';
	n= (n<0) ? 0 : n;

	val=n%base;
	n=(n-val);
	hex=hexi.substr(val,1)+hex;
	val=(n/base);
	hex=hexi.substr(val,1)+hex;

	return hex;

}

function hex2dec(s) {

	var hexi = '0123456789abcdef' ;
	var val=0;
	var multi=1;
	var c='';
	var start=s.length;

	for (i=start;i>0;i--) {
		c=s.substr(i,1);
		val+=hexi.indexOf(c)*multi;
		multi+=16;
	}

	return val;


}


function getColorRGB(color) {

	var rhex=color.substr(1,2);
	var ghex=color.substr(3,2);
	var bhex=color.substr(5,2);

	var r=hex2dec(rhex);
	var g=hex2dec(ghex);
	var b=hex2dec(bhex);

	var RGB =new Array(r,g,b);
	return RGB;

}

function colorValue(color,step) {

	var rgbCurr=getColorRGB(color);
	var r=rgbCurr[0];
	var g=rgbCurr[1];
	var b=rgbCurr[2];

	var rgbStart=getColorRGB(startColor);
	var rgbEnd=getColorRGB(endColor);
	
	var rs=rgbStart[0];
	var gs=rgbStart[1];
	var bs=rgbStart[2];
	var re=rgbEnd[0];
	var ge=rgbEnd[1];
	var be=rgbEnd[2];

	var rscale=parseInt((re-rs)/16);
	var gscale=parseInt((ge-gs)/16);
	var bscale=parseInt((be-bs)/16);
	

	r=rs+(rscale*(step));
	g=gs+(gscale*(step));
	b=bs+(bscale*(step));


	var newColor='#'+dec2hex(r)+dec2hex(g)+dec2hex(b);


	return newColor;


}
