//JavaScript layer váltásra v2.2, made by: WhiteFül

ad=0;
ax=0; 
dx=0; 

function mutat(id,vis) {
thisDiv = document.getElementById(id); 
  if (thisDiv) { if (vis == "show") thisDiv.style.display = "block"; }
  if (thisDiv) { if (vis == "hide") thisDiv.style.display = "none"; }
}

function swenSpam(x) { 
x.href=x.href.replace('doublepont', 'double.reed');
x.href=x.href.replace('#kukac#', '@');
x.href=x.href.replace('#pont#', '.');
return true;
}

function backSpam(x) { 
x.href=x.href.replace('double.reed','doublepont');
x.href=x.href.replace('@','#kukac#');
x.href=x.href.replace('.','#pont#');
return true;
}

function brs(divID) {
	if( document.layers ) { return document.layers[divID+'C'].document.layers[divID]; }
	if( document.getElementById ) { return document.getElementById(divID); }
	if( document.all ) { return document.all[divID]; }
	if( document[divID+'C'] ) { return document[divID+'C'].document[divID]; }
	return false;
}

function mvDiv(kID,kp) { 
	var myReference = brs(kID), noPx = document.childNodes ? 'px' : 0;
	if( !myReference ) { window.alert('Nothing works in this browser'); return; }
	if( myReference.style ) { myReference = myReference.style; myReference.top = kp + noPx; }
}

function mhDiv(kID,kp) { 
	var myReference = brs(kID), noPx = document.childNodes ? 'px' : 0;
	if( !myReference ) { window.alert('Nothing works in this browser'); return; }
	if( myReference.style ) { myReference = myReference.style; myReference.left = kp + noPx; }
}

function hung() {
   parent.tp2.mutat('hungeng','hide');
   parent.tp2.mutat('hungger','hide');
   parent.tp2.mutat('english','show');
   parent.tp2.mutat('german','show');
}

function eng() {
   parent.tp2.mutat('english','hide');
   parent.tp2.mutat('hungeng','show');
   parent.tp2.mutat('hungger','hide');
   parent.tp2.mutat('german','show');
}

function ger() {
   parent.tp2.mutat('german','hide');
   parent.tp2.mutat('hungger','show');
   parent.tp2.mutat('hungeng','hide');
   parent.tp2.mutat('english','show');
}

function mOvr(src) {
  if (!src.contains(event.fromElement)) src.style.cursor = 'hand';
}

function Lng(lg) {
  if ( lg == 1 ) { parent.main.location.href=('main.htm'); parent.menu.location.href=('menu.htm'); hung(); }
  if ( lg == 2 ) { parent.main.location.href=('english/main.htm'); parent.menu.location.href=('english/menu.htm'); eng(); }
  if ( lg == 3 ) { parent.main.location.href=('german/main.htm'); parent.menu.location.href=('german/menu.htm'); ger(); }
}

function Mnu(lg) {
   parent.menu.mutat('menuB','hide');
   parent.menu.mutat('menuC','hide');
   parent.menu.mutat('menuD','hide');
   parent.menu.mutat('menuE','hide');
   parent.menu.mutat('menuA','show');
   if ( lg == 1 ) parent.main.location.href=('main.htm');
   if ( lg == 2 ) parent.main.location.href=('english/main.htm');
   if ( lg == 3 ) parent.main.location.href=('german/main.htm');
}

function back(v) {
  if ( v == 1 ) parent.tp1.mutat('vissza','show');
  if ( v == 2 ) parent.tp1.mutat('vissza','hide');
}

function Whor() {
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.clientWidth) return document.body.clientWidth;
 else return 0;
}

function Wver() {
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.clientHeight) return document.body.clientHeight;
 else return 0;
}

function page(url) {
szel = parseInt(screen.width/4)*3; 
mag = parseInt(screen.height/3)*2;
var parameters = "width="+szel+",height="+mag+",left=0,top=0,status=no,menubar=no,directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=yes";
ablak = open(url, "dimension", parameters);
}

function aud(ad,ax) {
if (ad == 10 ) { pr = 'aa'; m= 'H' }
if (ad == 11 ) { pr = 'as'; m= 'H' }
if (ad == 12 ) { pr = 'ad'; m= 'K' }
if (ad == 13 ) { pr = 'ht'; m= 'K' }
if (ad == 14 ) { pr = 'bg'; m= 'E' }
if (ad == 15 ) { pr = 'pl'; m= 'E' }
if (ad == 16 ) { pr = 'ea'; m= 'E' }
if (ad == 17 ) { pr = 'kr'; m= 'E' }
if (ad == 18 ) { pr = 'qs'; m= 'K' }
if (ad == 19 ) { pr = 'ah'; m= 'H' }
if (ad == 20 ) { pr = 'cr'; m= 'E' }
if (ad == 21 ) { pr = 'st'; m= 'H' }
if (ad == 22 ) { pr = 'vp'; m= 'H' }
if (ad == 23 ) { pr = 'mg'; m= 'H' }
if (ad == 24 ) { pr = 'eh'; m= 'A' }
if (ad == 25 ) { pr = 'ns'; m= 'K' }
if (ad == 26 ) { pr = 'rd'; m= 'A' }
if (ad == 27 ) { pr = 'pa'; m= 'K' }
if (ad == 28 ) { pr = 'va'; m= 'H' }
    if ( ax == 0 ) { parent.menu.mutat('menuE','hide'); parent.menu.mutat('menuB','show'); parent.main.location.href=('haudio'+m+'.htm');}
    if ( ax == 1 ) parent.main.location.href=(pr+'faq.htm');
    if ( ax == 2 ) parent.main.location.href=(pr+'preis.htm');
    if ( ax == 3 ) parent.main.location.href=(pr+'tech.htm');
    if ( ax == 4 ) parent.main.location.href=(pr+'gar.htm');
    if ( ax == 5 ) parent.main.location.href=(pr+'sec.htm');
}

var gb1off = new Image();
var gb1on = new Image();
var lng1off = new Image();
var lng1on = new Image();
var lng2off = new Image();
var lng2on = new Image();
var lng3off = new Image();
var lng3on = new Image();
var lng4off = new Image();
var lng4on = new Image();

gb1off.src = "menu/backoff.gif";
gb1on.src = "menu/backon.gif";
lng1off.src = "menu/hungoff.gif";
lng1on.src = "menu/hungon.gif";
lng2off.src = "menu/engoff.gif";
lng2on.src = "menu/engon.gif";
lng3off.src = "menu/germoff.gif";
lng3on.src = "menu/germon.gif";
lng4off.src = "menu/hungoff.gif";
lng4on.src = "menu/hungon.gif";

