

	function show(val){
		var lnk= MM_findObj('debugger');
		lnk.innerHTML = val;  
		
	}
	
	
	


function JSFX_FloatDiv(id, sx, sy)
{
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var volte=0;
	
	
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){
		this.style.left=x+px;this.style.top=y+px;
		
		
		
	};

	el.floatIt=function()
	{
		
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		if(volte==0){
			this.cx = pX + this.sx ;
			volte=1;
		};
		this.cx += (pX + this.sx - this.cx)/8;
		this.cy += (pY + this.sy - this.cy)/8;
		if(this.cx<=960) this.cx=960;
		if(this.cy<=490) this.cy=490;
	
		
		
		var maxBottom=ScrollWin.getElementYpos(findObj('footer'));
		maxBottom+=100;
		if(ScrollWin.getWindowHeight()>maxBottom){
			this.style.visibility="hidden";
		}else{
			this.style.visibility="visible";
		}
		
		this.sP(this.cx, this.cy);
		//show(this.cy+'  <br>'+pY+'  <br>'+maxBottom+'  <br>'+ScrollWin.getWindowHeight());
		
		
		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}





var ScrollWin = {
	w3c : document.getElementById,
	iex : document.all,
	scrollLoop : false, 
	scrollInterval : null, // setInterval id
	currentBlock : null,   // object reference
	getWindowHeight : function(){
		if(this.iex) return (document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;
		else return window.innerHeight;
	},
	getScrollLeft : function(){
		if(this.iex) return (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
		else return window.pageXOffset;
	},
	getScrollTop : function(){
		if(this.iex) return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
		else return window.pageYOffset;
	},
	getElementYpos : function(el){
		var y = 0;
		while(el.offsetParent){
			y += el.offsetTop
			el = el.offsetParent;
		}
		return y;
	},
	scroll : function(name){
		if(!this.w3c){
			location.href = "#"+name;
			return;
		}
		if(this.scrollLoop){
			clearInterval(this.scrollInterval);
			this.scrollLoop = false;
			this.scrollInterval = null;
		}
		if(this.currentBlock != null) this.currentBlock.className = this.offClassName;
		this.currentBlock = document.getElementById(name);
		this.currentBlock.className = this.onClassName;
		var doc = document.getElementById(this.containerName);
		var documentHeight = this.getElementYpos(doc) + doc.offsetHeight;
		var windowHeight = this.getWindowHeight();
		var ypos = this.getElementYpos(this.currentBlock);
		if(ypos > documentHeight - windowHeight) ypos = documentHeight - windowHeight;
		this.scrollTo(0,ypos);
	},
	scrollTo : function(x,y){
		if(this.scrollLoop){
			var left = this.getScrollLeft();
			var top = this.getScrollTop();
			if(Math.abs(left-x) <= 1 && Math.abs(top-y) <= 1){
				window.scrollTo(x,y);
				clearInterval(this.scrollInterval);
				this.scrollLoop = false;
				this.scrollInterval = null;
			}else{
				window.scrollTo(left+(x-left)/2, top+(y-top)/2);
			}
		}else{
			this.scrollInterval = setInterval("ScrollWin.scrollTo("+x+","+y+")",50);
			this.scrollLoop = true;
		}
	}
};

ScrollWin.containerName = "container"; 
ScrollWin.anchorName    = "anchor";    
ScrollWin.blockName     = "home";     
ScrollWin.onClassName   = "active";   
ScrollWin.offClassName  = "visited";  


