<!-- //ALWAYS ON TOP FLOATING LAYER POP-UP -->

<!-- //Copyright 2003, Sandeep Gangadharan -->
<!-- //For more free scripts go to http://sivamdesign.com/scripts/ -->

<!-- //Additional Gliding effects, extra variables and code optimization added by Ingenii -->
<!-- //Contact: info@ingenii.nl -->
<!-- //Website: www.ingenii.nl -->
<!--
var corr      = -213;
var lasttop   =  0;
var newtop    =  0;
var currtop   =  0;
var maxmove   =  200;
var interval  =  25;
var layername = "checklayer";
var dom = (document.getElementById);

function hideIt() {
  if (dom) {document.getElementById(layername).style.visibility='hidden';}
  if (document.layers) {document.layers[layername].visibility='hide';} }

function showIt() {
  if (dom) {document.getElementById(layername).style.visibility='visible';}
  if (document.layers) {document.layers[layername].visibility='show';} }

function initIt() {
  if (dom && !document.all) { 
    document.getElementById(layername).style.top = newtop;
  } else if (document.layers) {
	document.layers[layername].top = newtop;
  } else if (document.all) {
	document.all[layername].style.top = newtop;
  }
  window.setTimeout("placeIt()", interval); 
}

function placeIt() {
  if (dom && !document.all) { 
    setNewTop(window.pageYOffset + (window.innerHeight - (window.innerHeight-corr)));
	setCurrTop(document.getElementById(layername).style.top);
  	document.getElementById(layername).style.top = getNewPosition();
  } else if (document.layers) {
	setNewTop(window.pageYOffset + (window.innerHeight - (window.innerHeight-corr)));
	setCurrTop(document.layers[layername].top);
	document.layers[layername].top = getNewPosition();
  } else if (document.all) {
	setNewTop(document.body.scrollTop + (document.body.clientHeight - (document.body.clientHeight-corr)));
	setCurrTop(document.all[layername].style.top);
	document.all[layername].style.top = getNewPosition();
  }
  window.setTimeout("placeIt()", interval); 
}

function setNewTop(val) {
	lasttop = newtop;
	newtop = (val>=0?val:0);
}

function setCurrTop(val) {
	currtop = (parseInt(val)>=0?parseInt(val):0);
}

function shouldMove() {
	return (lasttop==newtop && newtop!=currtop);
}

function getNewPosition() {
	if (shouldMove()) {
		if (Math.abs(newtop - currtop) > 2*maxmove) {
			return (currtop + (newtop>currtop?1:-1)*maxmove);
		} else {
			movement = parseInt((1/2)*Math.abs(newtop-currtop));
			return (movement==0?newtop:(currtop + (newtop>currtop?1:-1)*(movement)));
		}
	} else {
		return currtop;
	}
}
// -->