
// kep src csere

function img_over(img_name,img_src) {
	document[img_name].src=img_src;
}
function img_out(img_name,img_src) {
	document[img_name].src=img_src;
}

// kijeloles megforditasa

function invertSelections(form,elems)
{
  var len;

  if (!document.forms[form].elements[elems]) {
    return;
  }

  len = document.forms[form].elements[elems].length;

  if ( len ) {
    for ( i=0; i<document.forms[form].elements[elems].length; i++)
      document.forms[form].elements[elems][i].checked = !document.forms[form].elements[elems][i].checked;
  } else {
      document.forms[form].elements[elems].checked = !document.forms[form].elements[elems].checked;
  }

}

function popup(url,name,width,height,wplus,hplus,focus,left,top,menubar,status,toolbar,scrollbar,resizable,scrx,scry,directories,loc) {
	if ( !url ) return false;
	if ( !name ) name = '';
	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;

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

	//if ( focus ) popupWin.focus();
}

function flashControl(SRC,WIDTH,HEIGHT,FLASHVARS,WMODE,BGCOLOR,ALIGN,STYLE,CLASS,SPACE) {

	while ( FLASHVARS.search(' ') != -1 ) {
		FLASHVARS = FLASHVARS.replace(' ', '%20');
	}
	if ( ALIGN ) {
	    var algn = 'align="' + ALIGN + '"';
	}
	if ( STYLE ) {
	    var styl = 'style="' + STYLE + '"';
	}
	if ( CLASS ) {
	    var clss = 'class="' + CLASS + '"';
	}

	document.write('<object type="application/x-shockwave-flash" data=' + SRC + ' width=' + WIDTH + ' height=' + HEIGHT + ' ' + algn + ' ' + styl + ' ' + clss + '' + SPACE + '>');
	document.write('<!--[if IE]><param name="movie" value=' + SRC + '>< ![endif]-->');

	if ( FLASHVARS ) { document.write('<param name="flashvars" value=' + FLASHVARS + '>'); }
	if ( WMODE ) { document.write('<param name="wmode" value=' + WMODE + '>'); }
	if ( BGCOLOR ) { document.write('<param name="bgcolor" value=' + BGCOLOR + '>'); }

	document.write('<\/object>');
}


function changePlaceAddress( el ) {

    var obj = document.getElementById('place_address');
    tmp = el.options[el.selectedIndex].text.split(' - ');

    obj.innerHTML = '';
    for (i=0; i<tmp.length; i++) {
        obj.innerHTML += tmp[i];
        if (i != tmp.lenght-1) {
            obj.innerHTML += '<br>';
        }
    }

}

