//------------------------------------------------------------
function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) 
{ 
//Generic Animation Step Value Generator By www.hesido.com 
var delta = maxValue - minValue; 
var stepp = minValue+(Math.pow(((1 / totalSteps) * actualStep), powr) * delta); 
return Math.ceil(stepp) 
} 
//-----------------------------------------------
function BannerScroll(id,movepos,bannerto,auto)
{

if(!auto)
  {
  clearTimeout(timer1);
  counter=0;
  AutoLoop();
  }

if(bannerto>0)
  movepos=bannerto-actualbanner;

if(movepos==0) return;
var newbannerid;

     if(actualbanner+movepos<1) newbannerid=bannercnt;
else if(actualbanner+movepos>bannercnt) newbannerid=1;
else newbannerid=actualbanner+movepos;

var to=(newbannerid-actualbanner)*banner_rowheight;

actualbanner=newbannerid;
		
var trg=document.getElementById(id);
if (!trg.currentScroll) trg.currentScroll = 0;
doHeightChangeScrollBanner(trg,trg.currentScroll,trg.currentScroll+to,20,10,1.5); 
}
//------------------------------------------------------------
function doHeightChangeScrollBanner(elem,startScroll,endScroll,steps,intervals,powr) 
{ 
//Width changer with Memory by www.hesido.com
if (elem.scrollChangeMemInt)
  window.clearInterval(elem.scrollChangeMemInt);
var actStep = 0;
elem.scrollChangeMemInt = window.setInterval(
	function() 
    { 
  	elem.currentScroll = easeInOut(startScroll,endScroll,steps,actStep,powr);
  	elem.scrollTop = elem.currentScroll
  	actStep++;
  	if (actStep > steps)
      { 
      window.clearInterval(elem.scrollChangeMemInt);                  
      }
  	}
	,intervals)
}
//------------------------------------------------------------
function AutoLoop()
{
if(counter>0)	BannerScroll('bannerscroll',1,0,true);

counter++;
timer1=setTimeout("AutoLoop()",8000);
}
//------------------------------------------------------------
function KepzesTelepules(itemid)
{
var target1;

for(var i=1;i<=8;i++)
	{
	target1=document.getElementById('telepules'+i);
	if(!target1) return;
	
	if(i==itemid)
		{
		target1.style.display='block';
		}
	else
		{
		target1.style.display='none';
		}
	
	}
}
//--------------------------------------
function View(wth,hei,src) 
{
srcp="imgview.php?width="+wth+"&height="+hei+"&src="+src;

view=window.open(srcp,'user','width='+wth+',height='+hei+',status=0,resizable=0');
var xc =(screen.width - wth) / 2;
var yc =(screen.height - hei) / 2;

view.moveTo(xc, yc);
}
//--------------------------------------
function SelectValue(value) 
{
var target1=document.getElementById('ingelh');

for (var i = 0; i < target1.length; i++)
     if (target1[i].value==value)
	 	{
		target1.selectedIndex=i;
		return;
		}
}
//--------------------------------------
function DecWriteMail(decstring)
{
var buff='';

for(var i=0;i<decstring.length;i++)
	{
	if(i%2==0)
		buff+=decstring.charAt(i);	
	}
document.write('<a href="mailto:'+buff+'">'+buff+'</a>');
}