function adjust() 
{

	if(!document.getElementById('LeftPane'))
		{return;}

	if (NS6) 
	{
		if(document.getElementById('LeftPane').clientHeight+ document.getElementById('Header').clientHeight >window.pageYOffset+window.innerHeight*0.55)
		{
			document.getElementById('flyderbanner').style.visibility = 'hidden';
		}
		else
		{
			document.getElementById('flyderbanner').style.visibility = 'visible';
		}

		if (lastX==-1 || delay==0)
		{
			lastX=window.pageXOffset + flyderX;
			lastY=window.pageYOffset + flyderY;
		}
		else
		{
			var dx=Math.abs(window.pageXOffset+flyderX-lastX);
			var dy=Math.abs(window.pageYOffset+flyderY-lastY);
			var d=Math.sqrt(dx*dx+dy*dy);
			var c=Math.round(d/10);
			if (window.pageXOffset+flyderX>lastX) {lastX=lastX+delay+c;}
			if (window.pageXOffset+flyderX<lastX) {lastX=lastX-delay-c;}
			if (window.pageYOffset+flyderY>lastY) {lastY=lastY+delay+c;}
			if (window.pageYOffset+flyderY<lastY) {lastY=lastY-delay-c;}
		}

		//document.getElementById('flyderbanner').style.left=lastX;
		firstPass=document.getElementById('ContentPane');
		if(firstPass && lastY>document.getElementById('Header').clientHeight+document.getElementById('ContentPane').clientHeight)
		{
			lastY= document.getElementById('Header').clientHeight+document.getElementById('ContentPane').clientHeight;
		}
		
		document.getElementById('flyderbanner').style.top=lastY;

	}
	else if (IE6)
	{
		
		if(document.getElementById('LeftPane').clientHeight+ document.getElementById('Header').clientHeight >document.body.scrollTop+document.body.offsetHeight*0.55)
		{
			document.getElementById('flyderbanner').style.visibility = 'hidden';
		}
		else
		{
			document.getElementById('flyderbanner').style.visibility = 'visible';
		}
		if (lastX==-1 || delay==0)
		{
			lastX=document.body.scrollLeft + flyderX;
			lastY=document.body.scrollTop + flyderY;
		}
		else
		{
			var dx=Math.abs(document.body.scrollLeft+flyderX-lastX);
			var dy=Math.abs(document.body.scrollTop+flyderY-lastY);
			var d=Math.sqrt(dx*dx+dy*dy);
			var c=Math.round(d/10);
			if (document.body.scrollLeft+flyderX>lastX) {lastX=lastX+delay+c;}
			if (document.body.scrollLeft+flyderX<lastX) {lastX=lastX-delay-c;}
			if (document.body.scrollTop+flyderY>lastY) {lastY=lastY+delay+c;}
			if (document.body.scrollTop+flyderY<lastY) {lastY=lastY-delay-c;}
			//if (document.body.scrollTop+flyderY>lastY){LastY=LastY+(document.body.scrollTop(0,5-LastY)+1)+'0'}
		}
		//document.all['flyderbanner'].style.posLeft = lastX;
		notFirstPass=document.getElementById('ContentPane');
		if(notFirstPass && lastY>document.getElementById('Header').clientHeight+document.getElementById('ContentPane').clientHeight)
		{
			lastY= document.getElementById('Header').clientHeight+document.getElementById('ContentPane').clientHeight;
		}

		document.all['flyderbanner'].style.posTop = lastY;
	} 
		
	setTimeout('adjust()',50);
}

function define()
{
	if (NS6) 
	{ 
		if (talign=="left") {flyderX=iflyderX};
		if (talign=="right") {flyderX=window.innerWidth-iflyderX-layerwidth-20};
		if (talign=="center") {flyderX=Math.round((window.innerWidth-20)/2)-Math.round(layerwidth/2)};
		if (valign=="top") {flyderY=iflyderY};
		if (valign=="bottom") {flyderY=window.innerHeight-iflyderY};
		if (valign=="center") {flyderY=Math.round((window.innerHeight-20)/2)-Math.round(layerheight/2)};
	}
	if (IE6) 
	{
		if (talign=="left") {flyderX=iflyderX};
		if (talign=="right") {flyderX=document.body.offsetWidth-iflyderX-layerwidth-20}
		if (talign=="center") {flyderX=Math.round((document.body.offsetWidth-20)/2)-Math.round(layerwidth/2)}
		if (valign=="top") {flyderY=iflyderY};
		if (valign=="bottom") {flyderY=document.body.offsetHeight-iflyderY}
		if (valign=="center") {flyderY=Math.round((document.body.offsetHeight-20)/2)-Math.round(layerheight/2)}
	}
	setMarqueeWidth(document.body.clientWidth-78);

}

function hideInformationBar()
{
	document.getElementById('fixedDiv').style.visibility = 'hidden';
	if(!document.getElementById('LeftPane') ||!document.getElementById('ContentPane'))
		{return;}

	iflyderY-=45;
	define();

}

function AdjustFloating()
{
	try{
		iflyderY-=45;
		define();
	}
	catch(ex)
	{}
}

function setMarqueeWidth(width)
{
	try
	{
		document.getElementById? document.getElementById("style1").style.width=width : document.all["style1"].style.width=width;
		document.getElementById? document.getElementById("style2").style.width=width : document.all["style2"].style.width=width;
		document.getElementById? document.getElementById("style3").style.width=width : document.all["style3"].style.width=width;
		document.getElementById? document.getElementById("style4").style.width=width : document.all["style4"].style.width=width;

	}
	catch(exx){}

}

function ChangeCursor(id)
{
	getElementById(id).style.cursor = "pointer";
}

