
//browser

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
}

function is_ns() {
	return (navigator.appName.indexOf("Netscape") != -1) || window.opera;
}


//positioning
function getPageSizeWithScroll(direction)
{     
	if (window.innerHeight && window.scrollMaxY) 
	{
		// Firefox         
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;     
	} else if (document.body.scrollHeight > document.body.offsetHeight)
	{ // all but Explorer Mac         
		yWithScroll = document.body.scrollHeight;         
		xWithScroll = document.body.scrollWidth;     
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
		yWithScroll = document.body.offsetHeight;         
		xWithScroll = document.body.offsetWidth;
	}     
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );     
	if (direction=='w')
		return xWithScroll;
	if (direction=='h')
		return yWithScroll;
}

function getPageSizeWithoutScroll(direction)
{
	if (window.innerHeight) 
	{
		// Firefox         
		yWithScroll = window.innerHeight;
		xWithScroll = window.innerWidth;     
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
		yWithScroll = document.body.offsetHeight;         
		xWithScroll = document.body.offsetWidth;
	} 	
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );     
	if (direction=='w')
		return xWithScroll;
	if (direction=='h')
		return yWithScroll;	
}

//float bar
function float_bar_position() {	
	var float_obj=document.getElementById('float_bar');
	var pY = is_ns() ? pageYOffset : iecompattest().scrollTop;
	
	var oh=float_obj.offsetHeight;
	var y=parseInt(pY);
	document.getElementById('float_bar').style.top=y;	
	if (document.getElementById('float_bar').style.display!='block')
		document.getElementById('float_bar').style.display='block';
	setTimeout("float_bar_position()", 10);		
}