
function ablakUrlNyito( URL, width, height){
    map = window.open(URL, 'galeria','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,top=10,left=10,width='+width+',height='+height+'');
    map.document.write('<html><META CHARSET=iso-8859-2><head><title></title></head>');
    map.document.write('<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" OnClick="self.close()">');
    map.document.write('<IMG SRC='+URL+'>');
    map.document.write('</BODY></HTML>');
	map.document.close();
    map.focus();
}




function balUtValasztas(urlSeged, installUrl){
    url = document.location.href;
    urlFooldal = "";
    poz1 = url.indexOf("&rendezes=");
    poz2 = url.indexOf("/?rendezes=");
    poz3 = url.indexOf("#");
    if( url == installUrl){
        urlFooldal = document.location.href + '?rendezes=' + urlSeged;
    }
    if( poz1 > -1){
        url1 = url.substring(0, poz1);
        url = url1;
        url += '&rendezes=' + urlSeged;
    }
    if( poz2 > -1){
        url1 = url.substring(0, poz2);
        url = url1;
        url += '/?rendezes=' + urlSeged;
    }
    if( poz3 > -1){
        url1 = url.substring(0, poz3);
        url = url1;
        url += '&rendezes=' + urlSeged;
    }
    if( poz1 == -1 && poz2 == -1 && poz3 == -1 && urlFooldal == ""){
        url += '&rendezes=' + urlSeged;
    }
    if(urlFooldal != ""){
        url = urlFooldal;
    }
    document.location.href = url;
}

function SimplePage(kategoria_id){

	if(kategoria_id == 31) {
		SimplePage(1);
	}else{
		SimplePage(0);
	}
}

function SimplePage(kell){

	fooldal = document.getElementById('SimplePage');
	if ( kell == 1 ){
		link.style.display = 'inline';
	}
	if ( kell == 0 ){
		link.style.display = 'none';
	}
}

function FooldalEllenoriz(kategoria_id){

	if(kategoria_id == 31) {
		fooldalKell(0);
	}else{
		fooldalKell(1);
	}
}

function fooldalKell(kell){

	fooldal = document.getElementById('fooldalKell');
	if ( kell == 1 ){
		fooldal.style.display = 'inline';
		fooldal1.style.display = 'inline';
	}
	if ( kell == 0 ){
		fooldal.style.display = 'none';
		fooldal1.style.display = 'none';
	}
}

function checkAll(formName, inputName, allapot, sajat){
    _allapot = false;
    if(allapot == 1){
        _allapot = true;
    }
    if (sajat.checked == true){
        form = eval("document." + formName);
        for (var i = 0; i < form.length; i++) {
            if(form[i].name.indexOf(inputName) > -1) {
                form[i].checked=_allapot;
            }
        }
        sajat.checked=true;
    }
}

function fooldalPopup( url){
    myopen = window.open(url,'galeria','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,top=10,left=10,width='+600+',height='+385+'');
    myopen.document.close();
    myopen.focus();
}

function ablakUrl( url, width, height){
    map = window.open(url,'galeria','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,top=10,left=10,width='+width+',height='+height+'');
    map.focus();
}

function ablakUrlTerkep( URL, width, height){
    map = window.open(URL, 'terkep','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,top=10,left=10,width='+width+',height='+height+'');
    map.document.write('<html><META CHARSET=iso-8859-2><head><title></title></head>');
    map.document.write('<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" OnClick=self.close()>');
    map.document.write('<CENTER><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width='+width+' height='+height+'><TR VALIGN=MIDDLE ALIGN=CENTER><TD><IMG SRC='+URL+'>');
    map.document.write('</TD></TR></TABLE></BODY></HTML>');
    map.focus();
}

function ablakUrlScroll( url, width, height, scroll){
    myopen = window.open(url,'galeria','toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=no,status=no,top=10,left=10,width='+width+',height='+height+'');
    
    myopen.focus();
}

function debug2(obj){
    var ablak = window.open("","","");
    Kijelzo = obj;
    for (i in Kijelzo) { 
        if ( ( i!="innerHTML" )&&( i!="outerHTML" ) ) { 
            ablak.document.writeln(i,":"); 
            eval( 'ablak.document.writeln( Kijelzo.' + i + ',"<br>");' ); 
        }
    }
}

function ablakNyito(name,kep){
    myopen = window.open('','','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,width=600,height=500');
    myopen.document.write('<html><META CHARSET=iso-8859-2><head><title>'+name+'</title></head>');
    myopen.document.write('<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" OnClick=self.close()>');
    myopen.document.write('<CENTER><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=560 HEIGHT=440><TR VALIGN=MIDDLE ALIGN=CENTER><TD><IMG SRC='+kep+'>');
    myopen.document.write('</TD></TR></TABLE></BODY></HTML>');
    myopen.document.close();
}

function ablakNyito2(name,kep){
    myopen = window.open('','prosi','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,width=400,height=514');
    myopen.document.write('<html><META CHARSET=iso-8859-2><head><title>'+name+'</title></head>');
    myopen.document.write('<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" OnClick=self.close()>');
    myopen.document.write('<CENTER><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=400 HEIGHT=514><TR VALIGN=MIDDLE ALIGN=CENTER><TD><IMG SRC='+kep+'>');
    myopen.document.write('</TD></TR></TABLE></BODY></HTML>');
    myopen.document.close();
}

function ablakUrl2( url, width, height){
    map = window.open(url,'galeria2','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,top=10,left=10,width='+width+',height='+height+'');
    map.focus();
}

function ablakPrint( url){
    printAblak = window.open(url,'galeria','toolbar=no,scrollbars=yes,resizable=no,top=10,left=10,width=600,height=600');
    printAblak.focus();
}

function myConfirm(obj){
    if(confirm('Biztosan törli?')){
        obj.submit();
    }
}

function nyitZar(obj, url, width, height){
    ablakUrl2( url, width, height);
    obj.top.close();
}

function nyitZar2(obj, url, width, height){
    ablakUrl( url, width, height);
    obj.top.close();
}

function szuloUrl(url){
    window.parent.opener.location=url;
    top.close();
}

function imageChange (name, url){
    var myImage=eval("document."+name);
    myImage.src=url;
}

function printArticle() {
    if (window.print) {
        setTimeout('window.print();',200);
    } else if (agt.indexOf("mac") != -1) {
        alert("Nyomja meg a 'Cmd+p' gombokat a cikk nyomtatásához!");
    } else {
        alert("Nyomja meg a 'Ctrl+p' gombokat a cikk nyomtatásához!")
    }
}

function ekezetetAtkodol(kodolando, eredmeny){
	adat = kodolando;
	if(adat != null){
	    eredmeny.value = adat.replace(/ö/g, "o").replace(/ü/g, "u").replace(/ó/g, "o").replace(/ő/g, "o")
		    .replace(/ú/g, "u").replace(/é/g, "e").replace(/á/g, "a").replace(/ű/g, "u").replace(/í/g, "i")
		    .replace(/Ö/g, "o").replace(/Ü/g, "u").replace(/Ó/g, "o").replace(/Ő/g, "o").replace(/Ú/g, "u")
		    .replace(/É/g, "e").replace(/Á/g, "a").replace(/Ű/g, "u").replace(/Í/g, "i").replace(/ /g, "_")
		    .replace(/[^a-zA-Z0-9]/g, "_");
	    eredmeny.value = eredmeny.value.replace(/_+/g, "_");
	}
}
 

