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();
}

/*
 * Form initializtaion
 */

function init(form) {

	var inputs = document.getElementById(form).elements;

	for (i=0;i < inputs.length ; i++) {
		set_input(inputs[i]);
	}

}

function set_input(input) {

	var oldClass = input.className;

	input.onfocus = function() {
		this.className = oldClass+'_in';
	}
	input.onblur = function() {
		this.className = oldClass;
	}
}

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;
}

var old_table_02 = '';
var is_opened  = 'none';

function toggle( table ) {

    table_obj = document.getElementById(table);
    is_opened = table_obj.style.display;

	if (table != 'a00')
	{
		document.getElementById('a00').style.display = 'none';
	}

    if (old_table_02 != '' && is_opened == 'none') {
        old_table_obj = document.getElementById(old_table_02);
        old_table_obj.style.display = 'none';
    }

    if (old_table_02 != table || is_opened == 'none') {

        table_obj.style.display = 'block';
    }

    old_table_02 = table;
}


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;
}
