var o=0.1;
var o2=0.1;
var v_incr=15;
var t=0;
var fader_files=5;
var loading_img=false;
var div_open=0;
var doc_load=0;
var h=0;

function hidejswarning(){
	document.getElementById('nojs').style.display="none";
	
}

function start_supscr(){
	getdowncont("lista");
}

function getdown(x){
	h=x.style.top.substr(0,x.style.top.length-2);
	h=h*1;
	if (h+document.getElementById('lastline').offsetTop>parent.document.getElementById('kont').offsetHeight){
		x.style.display="none"
		x.style.top=h-v_incr+'px';
		var timer1=setTimeout("getdown()", 50);
		x.style.display="block"
	} else {stopscroll();}
}

function getup(x){
	if (x.style.top<='0px'){
		h=x.style.top.substr(0,x.style.top.length-2);
		h=h*1;
		x.style.display="none"
		x.style.top=h+v_incr+'px';
		x.style.display="block"
		var timer1=setTimeout("getup()", 50);
	} else {stopscroll();}
}

function stopscroll(){
	var timer1=clearTimeout(timer1);
}

function getdowncont(mit){
	x=document.getElementById(mit);
	h=x.style.top.substr(0,x.style.top.length-2);
	h=h*1;
	if (h+document.getElementById('lastline').offsetTop>parent.document.getElementById('kont').offsetHeight){
		x.style.top=h-v_incr+'px';
		var timer1=setTimeout("getdowncont(\""+mit+"\")", 1000);
	} else {getupcont(mit)}
}

function getupcont(mit){
	x=document.getElementById(mit);
	if (x.style.top<='0px'){
		h=x.style.top.substr(0,x.style.top.length-2);
		h=h*1;
		x.style.top=h+v_incr+'px';
		var timer1=setTimeout("getupcont(\""+mit+"\")", 1000);
	} else {getdowncont(mit);}
}


function check_state(){
	var t=window.location.href.indexOf('target=');
	if (t>0){
		var s=window.location.href.substr(t+7);
		show_div(s);
	}
	else {
		show_div('kezdolap.html')
	}
}

function show_div(mit){
		document.getElementById('fodoboz').innerHTML="<img src=\"image/loading.gif\" style=\"position:relative; top:50px; left:50px\">"
		window['if1'].location.href=mit;
		document.getElementById('fodoboz').innerHTML=window['if1'].document.body.innerHTML;
}


function refresh_div(){
	parent.document.getElementById('fodoboz').innerHTML=parent.window['if1'].document.body.innerHTML;
}

function skip_to_article(){
	var t=window.location.href.indexOf('ta=');
	var s='hir_'+window.location.href.substr(t+3);
	if (t>0){
		var fd=parent.document.getElementById('fodoboz');
		var hir=document.getElementById(s);
		alert(hir.id+', '+hir.offsetTop);


	}
}


