//reloads the window if Nav4 resized

function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// Image Fade effect

var slideShowSpeed = 2000;

var crossFadeDuration = 2;

var whichGroup1 = Math.round(Math.random()*3+1);
// document.write(whichGroup1);
var Pic1 = new Array();
Pic1[0] = 'imagegroup1_1/1.jpg'
Pic1[1] = 'imagegroup1_1/1.jpg'
Pic1[2] = 'imagegroup1_1/1.jpg'
Pic1[3] = 'imagegroup1_1/1.jpg'
Pic1[4] = 'imagegroup1_'+whichGroup1+'/3.jpg'
Pic1[5] = 'imagegroup1_1/1.jpg'
Pic1[6] = 'imagegroup1_'+whichGroup1+'/4.jpg'

var whichGroup2 = Math.round(Math.random()*3+1);
// document.write(whichGroup2);
var Pic2 = new Array();
Pic2[0] = 'imagegroup2_1/1.jpg'
Pic2[1] = 'imagegroup2_1/1.jpg'
Pic2[2] = 'imagegroup2_1/1.jpg'
Pic2[3] = 'imagegroup2_'+whichGroup2+'/3.jpg'
Pic2[4] = 'imagegroup2_1/1.jpg'
Pic2[5] = 'imagegroup2_'+whichGroup2+'/4.jpg'
Pic2[6] = 'imagegroup2_'+whichGroup2+'/5.jpg'

var whichGroup3 = Math.round(Math.random()*3+1);
// document.write(whichGroup3);
var Pic3 = new Array();
Pic3[0] = 'imagegroup3_1/1.jpg'
Pic3[1] = 'imagegroup3_1/1.jpg'
Pic3[2] = 'imagegroup3_1/1.jpg'
Pic3[3] = 'imagegroup3_1/1.jpg'
Pic3[4] = 'imagegroup3_'+whichGroup3+'/3.jpg'
Pic3[5] = 'imagegroup3_1/1.jpg'
Pic3[6] = 'imagegroup3_'+whichGroup3+'/4.jpg'

var whichGroup4 = Math.round(Math.random()*3+1);
// document.write(whichGroup4);
var Pic4 = new Array();
Pic4[0] = 'imagegroup4_1/1.jpg'
Pic4[1] = 'imagegroup4_1/2.jpg'
Pic4[2] = 'imagegroup4_'+whichGroup4+'/3.jpg'
Pic4[3] = 'imagegroup4_1/1.jpg'
Pic4[4] = 'imagegroup4_1/1.jpg'
Pic4[5] = 'imagegroup4_'+whichGroup4+'/4.jpg'
Pic4[6] = 'imagegroup4_'+whichGroup4+'/5.jpg'

var Pic5 = new Array();
Pic5[0] = 'szlogen/1.jpg'
Pic5[1] = 'szlogen/hu2.jpg'
Pic5[2] = 'szlogen/hu3.jpg'
Pic5[3] = 'szlogen/hu2.jpg'
Pic5[4] = 'szlogen/hu3.jpg'
Pic5[5] = 'szlogen/hu2.jpg'
Pic5[6] = 'szlogen/hu3.jpg'

var t1;
var t2;
var t3;
var t4;
var t5;

var j1 = 0;
var j2 = 0;
var j3 = 0;
var j4 = 0;
var j5 = 0;

var preLoad1 = new Array();
var preLoad2 = new Array();
var preLoad3 = new Array();
var preLoad4 = new Array();
var preLoad5 = new Array();

for (i = 0; i < 7; i++) {

preLoad1[i] = new Image();
preLoad1[i].src = Pic1[i];

preLoad2[i] = new Image();
preLoad2[i].src = Pic2[i];

preLoad3[i] = new Image();
preLoad3[i].src = Pic3[i];

preLoad4[i] = new Image();
preLoad4[i].src = Pic4[i];

}

for (j = 0; j < 7; j++) {

preLoad5[j] = new Image();
preLoad5[j].src = Pic5[j];
}

function runSlideShow1() {
if (document.all) {
document.images.SlideShow1.style.filter="blendTrans(duration=2)";
document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow1.filters.blendTrans.Apply();
}
document.images.SlideShow1.src = preLoad1[j1].src;
if (document.all) {
document.images.SlideShow1.filters.blendTrans.Play();
}
j1 = j1 + 1;
if (j1 > 6) j1 = 0;
t1 = setTimeout('runSlideShow1()', slideShowSpeed);
}

function runSlideShow2() {
if (document.all) {
document.images.SlideShow2.style.filter="blendTrans(duration=2)";
document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow2.filters.blendTrans.Apply();
}
document.images.SlideShow2.src = preLoad2[j2].src;
if (document.all) {
document.images.SlideShow2.filters.blendTrans.Play();
}
j2 = j2 + 1;
if (j2 > 6) j2 = 0;
t2 = setTimeout('runSlideShow2()', slideShowSpeed);
}

function runSlideShow3() {
if (document.all) {
document.images.SlideShow3.style.filter="blendTrans(duration=2)";
document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow3.filters.blendTrans.Apply();
}
document.images.SlideShow3.src = preLoad3[j3].src;
if (document.all) {
document.images.SlideShow3.filters.blendTrans.Play();
}
j3 = j3 + 1;
if (j3 > 6) j3 = 0;
t3 = setTimeout('runSlideShow3()', slideShowSpeed);
}

function runSlideShow4() {
if (document.all) {
document.images.SlideShow4.style.filter="blendTrans(duration=2)";
document.images.SlideShow4.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow4.filters.blendTrans.Apply();
}
document.images.SlideShow4.src = preLoad4[j4].src;
if (document.all) {
document.images.SlideShow4.filters.blendTrans.Play();
}
j4 = j4 + 1;
if (j4 > 6) j4 = 0;
t4 = setTimeout('runSlideShow4()', slideShowSpeed);
}

function runSlideShow5() {
if (document.all) {
document.images.SlideShow5.style.filter="blendTrans(duration=2)";
document.images.SlideShow5.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow5.filters.blendTrans.Apply();
}
document.images.SlideShow5.src = preLoad5[j5].src;
if (document.all) {
document.images.SlideShow5.filters.blendTrans.Play();
}
j5 = j5 + 1;
if (j5 > 6) j5 = 0;
t5 = setTimeout('runSlideShow5()', slideShowSpeed);
}

// Hirek hasabb 'hirek' nevu IFRAME atalakitasa netscape-ben 6 kell hozza - jelenleg nem is kell
// function resize_iframe()
// {
// var MZ=(document.getElementById?true:false); 
// var IE=(document.all?true:false);
// var winWidth=document.body.clientWidth;
// var winHeight=document.body.clientHeight; 
// if(IE){ 
// if(winWidth < 772) {
// document.all['hirek'].style.left=0;} else
// document.all['hirek'].style.left=Math.round((winWidth-770)*0.5-1); 
// } 
// else if(MZ){ 
// if(winWidth < 772) {
// document.getElementById('hirek').style.left=0;} else
// document.getElementById('hirek').style.left=Math.round((winWidth-770)*0.5-1); 
// } 
// }

// Kereso hatterszinvaltozas

exColor='';
function bgQSearchOn (elem,color) {
	if (document.getElementById || document.all) {
		exColor=elem.style.backgroundColor;
		elem.style.backgroundColor=color;
	}
}

function bgQSearchOut (elem) {
		if (document.getElementById || document.all) elem.style.backgroundColor=exColor;
}
