var pixelFromRight = 30;
var pixelFromBottom = 50;
var NSpixelFromRightOffset = 15;

var lblUp;
var NS6 = (navigator.appName == "Netscape");

function UpLabel() {
	lblUp = document.getElementById('topLbl');
	if (ShowUpLbl()) {
		action = window.setInterval("Glide()",20);
	}
}

function Glide() {
	if (NS6) {
		lblUp.style.top = (window.pageYOffset + window.innerHeight - pixelFromBottom);
	}
	else {
		if ( lblUp.style.pixelTop != (document.body.scrollTop + document.body.clientHeight - pixelFromBottom) ) {
			x = (document.body.scrollTop + document.body.clientHeight - lblUp.style.pixelTop - pixelFromBottom);
			lblUp.style.pixelTop += x;
		}
	}
}

function ShowUpLbl() {
	if (NS6) {
		if (document.height > window.innerHeight) {
			lblUp.style.visibility='visible';
			lblUp.style.left=window.innerWidth-pixelFromRight-NSpixelFromRightOffset;
			lblUp.style.top = (window.pageYOffset + window.innerHeight - pixelFromBottom);
			return true;
		}
		else {
			lblUp.style.visibility='hidden';
			return false;
		}
	}
	else {
		if (document.body.scrollHeight > document.body.clientHeight) {
			lblUp.style.visibility='visible';
			lblUp.style.pixelLeft=document.body.clientWidth-pixelFromRight;
			return true;
		}
		else {
			lblUp.style.visibility='hidden';
			return false;
		}
	}
}

/*Function being called when session is over on client side */
function SessionOut()
{
				document.getElementById('SessionFlag').value=0;
}