var Agent	= navigator.userAgent.toLowerCase();

var sobj  = null;
var step  = 6;
var scroll_timerId = null;
function scroll(d,h)
{
	switch(d)
	{
		case 1:
			if (sobj.style.top=='') sobj.style.top = 0;
			if (parseInt(sobj.style.top)<=h-sobj.clientHeight){
				scrollbox_stop();	
				return;
			}
			sobj.style.top = parseInt(sobj.style.top) - 2;
			break;
		case 2:
			if (parseInt(sobj.style.top)>=0){
				scrollbox_stop();	
				return;
			}
			sobj.style.top = parseInt(sobj.style.top) + 2;
			break;
	}
}
			
function scrollbox_start(d,o,h){
	if (sobj==null){
		sobj = document.getElementById(o);
		if ( Agent.indexOf('msie') != -1) sobj.style.height='0';
	}
	scroll_timerId = setInterval("scroll("+d+','+h+")",10);
}

function scrollbox_stop(){
	clearInterval(scroll_timerId)
}

function sv(){
	var o1 = document.getElementById('scle')
	var	o2 = document.getElementById('scfel')
	var	o3 = document.getElementById('datadiv');
	
	if (o3.offsetHeight<=177){
		o1.style.visibility='hidden';
		o2.style.visibility='hidden';
	}else{
		o1.style.visibility='visible';
		o2.style.visibility='visible';
	}
}


function ddl(file,cont){
	window.open('files/download.php?cont='+cont+'&file='+file,'_blank','width=100,height=100');
}
