//rechange_left();
//i3_daemon = setInterval("rechange_left()",2000);
//--------------------------------------------------------
//function rechange_left(){
//		
//	var left = (document.body.clientWidth - 940)/2;
//	if(left>10) document.getElementById('fly_div').style.left = left;
//}
//--------------------------------------------------------	
function windowHeight() {
	var de = document.documentElement;
	return self.innerHeight || ( de && de.clientHeight ) || document.body.clientHeight;
}
//--------------------------------------------------------
var top_limit=260; 	
timer = setTimeout("scroll_it()",1000);
//--------------------------------------------------------
function getBodyScrollTop()
	{
		return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
	};
//--------------------------------------------------------	
function funcScrollDiv()
	{
		var scroll_top=getBodyScrollTop();

		our_img_height=$("#img1").height();
		our_div_height=our_img_height+60;
		
		if(scroll_top <= top_limit)
			{
				our_top = top_limit;
			}
			else
			{
				our_top =(windowHeight() - our_div_height)/2 + scroll_top + 100;
			};
		
		$("#fly_div").animate({top: our_top}, 1000);
	};
//--------------------------------------------------------
function scroll_it()
	{
		clearTimeout(timer);
		timer = setTimeout("funcScrollDiv()",500);
	};
	
window.onscroll = scroll_it;

//--------------------------------------------------------
function setimage(imgsrc, bigsrc)
{
	
	document.getElementById('img1').src="/img/loader.gif";
	target = new Image();
	target.src = imgsrc;

	document.getElementById('img1').src=target.src;
	document.getElementById('button_zoom').href=bigsrc;
	document.getElementById('img_zoom').href=bigsrc;
	scroll_it(); 
}
//--------------------------------------------------------
function show(bigsrc) {

	alert(bigsrc);
 
}
