<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return {width:myWidth, height:myHeight}
}

getEvent = function(evt) {
	if(!evt)
	{
		var evt = window.event;
	}
	return evt;
}

getTarget = function(evt) {
	return t = (evt.target) ? evt.target : evt.srcElement;
}



function resizeTo(div,d_w,d_h) {
var dd_u="undefined"

  if(typeof div.style.pixelWidth != dd_u) {
    div.style.pixelWidth = d_w;
    div.style.pixelHeight = d_h;
  } else {
      div.style.width = d_w;// + dd.px;
      div.style.height = d_h;// + dd.px;
      var t= div.src;
      div.src = "";
      div.src = t;
    }
}


function sortByZ(a, b) {
  var x = a.z;
  var y = b.z;
  if (x < y) return -1;
  if (x > y) return +1;
  var x = b.zz;
  var y = a.zz;
  return ((x < y) ? -1 : ((x > y) ? 1 : 0));
//    return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}

function toInt ( x ) {
  return ( x > 0 ? Math.floor( x ) : Math.ceil ( x ) )
}

function jelszoemlekezteto() {
  var x;
  if ((x = $('#loginmail').val())=="") {
    alert("Írd be e-mail címedet!");
    $('#loginmail').focus()
  } else {
      gSendData('/ajax/jelszo.html?uemail=' + x, '');
    }
}

function jelszovaltoztatas() {
  $('#fbutton').attr('disabled',true);
  var pars = $('#jelszomod').serialize();
  gSendData('/ajax/jelszomod.html', pars);
}

function gRunError(a,b,c) {
  if ($('#fbutton').length>0) { $('#fbutton').attr('disabled',false); }
  alert('Valami hiba történt.');
}

function gRunSuccess(y) {
  if ($('#fbutton').length>0) $('#fbutton').attr('disabled',false);
  eval(y);
}

function gSendData(u, d) {

  if ($('#fbutton').length>0)
    $('#fbutton').attr('disabled',true);

// alert(u);
  new $.ajax(
    {
    url:u,
    type: 'POST', 
    dataType: 'text',
    data: d,
    error: gRunError,
    success: gRunSuccess,
    cache: false});

}

function kapcsolat() {
  $('#fbutton').attr('disabled',true);
  var pars='fnev='+encodeURIComponent($('#fnev').val());
  pars += '&femail='+encodeURIComponent($('#femail').val());
  pars += '&ftargy='+encodeURIComponent($('#ftargy').val());
  pars += '&fuzenet='+encodeURIComponent($('#fuzenet').val());

  gSendData('/ajax/level.html', pars);
}

function felhasznaloreg() {
  $('#fbutton').attr('disabled',true);
  var pars='fnev='+encodeURIComponent($('#fnev').val());
  pars += '&fnick='+encodeURIComponent($('#fnick').val());
  pars += '&femail='+encodeURIComponent($('#femail').val());
  gSendData('/ajax/regisztracio.html', pars);
}

function felhasznaloregfb1() {
  $('.fbutton').attr('disabled',true);
  var pars = $('#regfb1').serialize();
  gSendData('/ajax/regisztraciofacebook.html', pars);
}

function felhasznaloregfb2() {
  $('.fbutton').attr('disabled',true);
  var pars = $('#regfb2').serialize();
  gSendData('/ajax/regisztraciofacebook.html', pars);
}


function kerdoiv() {
  $('#fbutton').attr('disabled',true);
  var pars = $('#kerdoiv').serialize();
  gSendData('/ajax/kerdoiv.html', pars);
}


function testForEnter() {
  if (event.keyCode == 13) {
    event.cancelBubble = true;
    event.returnValue = false;
  }
}
$(document).ready(function(){
  // $("#ne").hide();
//  $("textarea").keydown( function(event) { if (event.keyCode == '13') { event.preventDefault(); }  } );
  $("#ane").click( function () { $("#ane").hide(); $("#ne").show(); return false; } );
});

function Set_Cookie( name, value, expires, path, domain, secure ) {
  // set time, it's in milliseconds
  var today = new Date();
  today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
  if ( expires ) {
    expires = expires * 1000 * 60 * 60 * 24;
  }
  var expires_date = new Date( today.getTime() + (expires) );

  document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

}

-->
