
// GO TO THE SPECIFIED LINK
function getLink(actuallink) {
	document.getElementById('xx').src = actuallink;
}

function resize()
{
    document.getElementById('xx').height = document.getElementById('xx').contentWindow.document.getElementById('contentID').offsetTop;
} 


function keplista(loc){    
  F1 = open(loc,"keplista","width=500,height=450,screenX=100,screenY=100,locationbar=no,menubar=no,scrollbars=no");
  F1.focus();
}

function hirlista(loc){    
  F1 = open(loc,"hirmutat","width=700,height=700,screenX=100,screenY=100,locationbar=no,menubar=no,scrollbars=yes");
  F1.focus();
}

function nagykep(loc, w, h){    
  F1 = open("nagykep.php?kep="+loc,"nagykep","width="+w+",height="+h+",screenX=100,screenY=100,locationbar=no,menubar=no,scrollbars=auto");
  F1.focus();
}


// SCROLL

var clipTop = -10;
var time,amount,theTime,DHTML,thelayer;

function init(layername,amt,tim, left)
{
	DHTML = (document.getElementById || document.all || document.layers);

	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;

	if (document.layers)
	{
		thelayer.style.top = clipTop;
		thelayer.style.left = -left;
	}
	else if (document.getElementById || document.all)
	{
		thelayer.style.top = clipTop+'px';
		thelayer.style.left = -left+'px';
	}

	realscroll();
}

function realscroll()
{
	if (!DHTML) return;
	clipTop += amount;
	if (clipTop < document.getElementById('xx').contentWindow.document.getElementById('contentID').offsetTop) {
	    clipTop = -10;
	}
	if (document.getElementById || document.all)
	{
		thelayer.style.top = clipTop + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.top = clipTop;
	}
	time = setTimeout('realscroll()',theTime);
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
	this.obj = getObjNN4(document,name);
	this.style = this.obj;
  }
}

function getObjNN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++)
	{
		if (x[i].id == name)
		 	foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}




