function chpic(o,i){
	o.src=i.src
}

var Agent	= navigator.userAgent.toLowerCase();

var sobj  = null;
var step  = 6;
var scroll_timerId = null;
function vscroll(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 hscroll(d,w)
{
	
	switch(d)
	{
		case 1:
			if (sobj.style.left=='') sobj.style.left = "0px";
			if (parseInt(sobj.style.left)<=w-parseInt(sobj.clientWidth)){
				scrollbox_stop();	
				return;
			}
			sobj.style.left = parseInt(sobj.style.left) - 2;
			break;
		case 2:
			
			if (parseInt(sobj.style.left)>=0){
				scrollbox_stop();	
				return;
			}
			sobj.style.left = parseInt(sobj.style.left) + 2;
			break;
	}
}


function scrollbox_start(d,o,s,t){ // d=irány o=elem, s=szélesség v. magasság t=vertikális v. horizontális
	if (sobj==null){
		sobj = document.getElementById(o);
		if ( Agent.indexOf('msie') != -1){
            sobj.style.height='0px';
            s=(parseInt(s)+62)
        } 
	}
	if (scroll_timerId==null){
		switch(t){
			case 'v':
				scroll_timerId = setInterval("vscroll("+d+','+s+")",10);
				break;
			case 'h':
				scroll_timerId = setInterval("hscroll("+d+','+s+")",10);
				break;
		}		
	}
}

function scrollbox_stop(){
	clearInterval(scroll_timerId)
	scroll_timerId=null
	sobj=null
}

function chmenu(href){
	document.location.href=href+'&l='+parseInt(document.getElementById('menu_div').style.left);
}

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

$(function(){
    $('#msgBox').jqm();
    $('#msgBox').jqmAddClose('#jqmClose'); 
    $('a#jqmClose').click(function(){
        $('#msgBox').hide();
    })
})

