function popup(url,name,width,height,position,wplus,hplus,focus,left,top,menubar,status,toolbar,scrollbar,resizable,scrx,scry,directories,loc) {
	if ( !url ) return false;
	if ( !name ) name = 'popupWin';
	if ( !width ) width = '';
	if ( !height ) height = '';
	if ( !directories ) directories = 'no';
	if ( !loc ) loc = 'no';
	if ( !menubar ) menubar = 'no';
	if ( !status ) status = 'no';
	if ( !toolbar ) toolbar = 'no';
	if ( !scrollbar ) scrollbar = 'no';
	if ( !resizable ) resizable = 'no';
	if ( !scrx ) scrx = '100';
	if ( !scry ) scry = '100';
	if ( !left ) left = '100';
	if ( !top ) top = '100';
	if ( wplus ) width  += wplus;
	if ( hplus ) height += hplus;

	if ( position == '1' ) {
		var winleft = (screen.width - width) / 2;
		var wintop = (screen.height -  height) / 2;
	} else {
		var winleft = left;
		var wintop = top;
	}

    var popupWin = window.open(url,name,'width='+width+'px,height='+height+'px,left='+winleft+',top='+wintop+',menubar='+menubar+',status='+status+',toolbar='+toolbar+',scrollbars='+scrollbar+',resizable='+resizable+',screenX='+scrx+',screenY='+scry+'directories='+directories+',location='+loc);

	if ( focus ) popupWin.focus();
}

function changeImage(img, img_src) {
  img.src = img_src;
}

/*
* Confirm messages
*/

function confirmMsg(msg) {
	var con = confirm(msg);
	if (con) return true;
	else return false;
}

function downloadConfirmMsg(FirmName) {
	var downloadConfirm = confirm('A letöltött anyagokért (fájlokért) vagy a megjelenített információkért a(z) '+ FirmName +' nem vállal felelőséget!\nAz Adatvédelem menüpontban leírtakat tudomásul veszem!\nA folytatáshoz kattintson az OK gombra, megszakításhoz a Mégse gombra!');
	if (downloadConfirm) return true;
	else return false;
}

function showBig(width,height) {
  var img_src = document.getElementById('changepic').src;
  img_src=img_src.substring(img_src.lastIndexOf('/'));
  popup('?action=popup&i=images/gallery/popup' + img_src +'','',''+ width +'',''+ height +'','1');
}

function changeText(modify_text) {
	var obj = document.getElementById("image_text");
	var new_text = modify_text;
	obj.innerHTML = new_text;
}

function changeBigPic(img) {
  document.getElementById('changepic').src = "images/gallery/" + img;
}

var size_w = 0;
var size_h = 0;

var H2_sifrtitle = {
    src: 'gfx/sifr.swf'
        ,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
};
sIFR.activate(H2_sifrtitle);
sIFR.replace(H2_sifrtitle, {
    selector: 'h2.sifrtitle'
    ,wmode: 'transparent'
    ,css: {
        '.sIFR-root': { 'color': '#333367', 'text-align': 'left', 'cursor': 'pointer', 'background-color': 'transparent' },
        'a': { 'color': '#333367', 'text-decoration': 'none' },
        'a:hover': { 'color': '#333367', 'text-decoration': 'none' }
    }
});
