function MM_preloadImages() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) {
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() {
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function Kek (nev) {
document.images[nev].src="gfx/kocka-k.gif"
}
function Szurke (nev) {
document.images[nev].src="gfx/kocka.gif"
}
function Meretek() {
if ( typeof( window.innerWidth ) == 'number' ) {
szel = window.innerWidth;
mag = window.innerHeight;
}
else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
szel = document.documentElement.clientWidth;
mag = document.documentElement.clientHeight;
}
else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
szel = document.body.clientWidth;
mag = document.body.clientHeight;
}
}
function Nagytablazat() {
Meretek();
if (szel < 996)
scrollbar = 30;
else
scrollbar = 0;
csokk_mag = mag - scrollbar - 2;
if (csokk_mag < 800) csokk_mag = 800;
document.write (
'<table width="996" border="0" cellspacing="0" cellpadding="0" height="' + csokk_mag + '" align="center">');
}
function Belsoablak(tartalom) {
belso_ablak_mag = csokk_mag - 150;
document.write (
'<iframe id="main" width="844" height="' + belso_ablak_mag + '"src="' + tartalom + '" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto" name="main">');
}
function Ep_Betolt() {
document.write (
'<body background="gfx/bg_ep.jpg" style="background-repeat: no-repeat;" "bgcolor="#FEFAE3" bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0" onLoad="MM_preloadImages(\'gfx/fm_kep2.jpg\',\'gfx/fm_kep3.jpg\',\'gfx/fm_txt2o.jpg\',\'gfx/fm_txt3o.jpg\')"' +
'onbeforecopy="return false" oncontextmenu="return false" oncopy="return false" ondragstart="return false" onselect="return false" onselectstart="return false">' +
'<div style="position:absolute;width:1px;height:1px;top:0px;left:-5px;">');
for(x = 0; x < 10; x++) {
document.write (
'<img src="gfx/bg_ep-' + x + '.jpg" name="pre-' + x + '" border="0" height="1" width="1"> ');
}
document.write (
'</div>');
}
function Veletlen() {
most = new Date();
n = "" + most.getTime();
n = n.substr(11, 1);
nszam = parseInt(n);
}
function Fejkepcsere(elso) {
if (elso == 1) {
fejkep_szam = new Array(10);
csere = 0;
}
do {
Veletlen();
} while (fejkep_szam[nszam] == 'volt');
nev = 'pre-' + n
obj_ut = window.frames.fej.document;
if (obj_ut.images[nev].complete) {
objektum = obj_ut.getElementById('fejkepid').style;
ido = 0;
ertek = 1;
for(x = 0; x < 10; x++) {
ertek -= 0.1;
setTimeout("Attunes("+ertek+")", ido);
ido += 25;
}
if (n < 6) {
setTimeout("Ujkep('fel');", ido);
for (x = 0; x <= 84; x+=2) {
setTimeout("objektum.top = 131-"+x, ido);
setTimeout("objektum.height = "+x, ido);
ido += 10;
}
}
else {
setTimeout("Ujkep('Bal');", ido);
for (x = 0; x <= 852; x+=12) {
setTimeout("objektum.left = 992-"+x, ido);
setTimeout("objektum.width = "+x, ido);
ido += 10;
}
}
ertek = 0.5;
for(x = 0; x < 25; x++) {
ertek += 0.01999;
setTimeout("Attunes("+ertek+")", ido);
ido += 10;
}
fejkep_szam[nszam] = 'volt';
csere++;
}
else {
setTimeout("Fejkepcsere("+elso+")", 100);
}
if (csere == 10) {
for(x = 0; x < 10; x++) {
fejkep_szam[x] = ' '
}
fejkep_szam[nszam] = 'volt'
csere = 1;
}
}
function Attunes(ertek) {
objektum.opacity = ertek;
objektum.MozOpacity = ertek;
objektum.KhtmlOpacity = ertek;
objektum.filter = "alpha(opacity=" + ertek*100 + ")";
}
function Ujkep(irany) {
if (irany == "fel") objektum.top = 131;
else if (irany == "fel") objektum.left = 992;
obj_ut.images['fejkep'].src = 'gfx/bg_ep-' + n + '.jpg';
Attunes(0.5);
}

