<!--
//The above syntax prevents old browsers from displaying the javascript as page content
//Code developed and designed by w3presence, for more information goto www.w3presence.co.uk
//No authorisation is given to copy, edit or delete these functions or comments contained herein.
//W3Presence (SDS Ltd) Copyright 2006
//The syntax to include the services supplied in this module is;
//<script language="javascript" src="/skelapp/_include/_javascript/JSInclude_FloatingLayer.js"></script>
var cFloatDivLayer="floatingLayer";
var cTimerMSec=15;
var cDivStartYOffset=5;
function jsf_PositionEvent_browserWidth() {
//extract the three posible values for the browser width - depending on what type of browser may be in use or the doc type
	return jsf_PostionEvent_filterResult (
		//call each possible method to determine the browser width
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function jsf_PositionEvent_browserHeight() {
//extract the three posible values for the browser height - depending on what type of browser may be in use or the doc type
	return jsf_PostionEvent_filterResult (
		//call each possible method to determine the browser width
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function jsf_PositionEvent_windowsscrollLeft() {
//extract the three posible values for the browser scroll left - depending on what type of browser may be in use or the doc type
	return jsf_PostionEvent_filterResult (
		//call each possible method to determine the browser width
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function jsf_PositionEvent_windowscrollTop() {
//extract the three posible values for the browser sroll top - depending on what type of browser may be in use or the doc type
		return jsf_PostionEvent_filterResult(
			//call each possible method to determine the browser width
			window.pageYOffset ? window.pageYOffset : 0,
			document.documentElement ? document.documentElement.scrollTop : 0,
			document.body ? document.body.scrollTop : 0
		);
}
function jsf_PostionEvent_filterResult(lwinValue, ldocelValue, lbodyValue) {
//This function filter the position information based on the three possible values return the highest value
var lresult=0;	//initialise result with 0
	if(lwinValue>lresult) {lresult=lwinValue;}
	if(ldocelValue>lresult) {lresult=ldocelValue;}
	if(lbodyValue>lresult) {lresult=lbodyValue;}	
	
	return lresult; 
}
function jsf_LayerScrollFunction(mSecDelay) {
var element=document.getElementById?document.getElementById(cFloatDivLayer):document.all?document.all[cFloatDivLayer]:document.layers[cFloatDivLayer];
var posY=parseInt(jsf_PositionEvent_windowscrollTop());
var objy=parseInt(element.style.top);
	if(posY>=(cDivStartYOffset)) {
		objy += (posY - objy + 12)/12;		//push the div down
	} else {
		objy += (posY - objy)/12;	//pull the div up
		if(objy<=cDivStartYOffset) {
			objy=cDivStartYOffset;
		}
	}
	element.style.top=objy + 'px';
	jsf_InitialiseLayerScrollLoop(mSecDelay);
}
function jsf_InitialiseLayerScrollLoop(mSecDelay) { eval ("setTimeout('jsf_LayerScrollFunction(" + mSecDelay + ")', " + mSecDelay +");") }
jsf_InitialiseLayerScrollLoop(cTimerMSec);
//-->
