function popUpPic(imgPath)
{
	var win = window.open('','popImage',"resizable=1,scrollbars=0,HEIGHT=300,WIDTH=300");
	win.document.writeln('<HTML><head><TITLE>II. FHM Egyéni Pókerbajnokság</TITLE></head>');
	win.document.writeln('<BODY onLoad="fitPic(\'testpic\')" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">');
	win.document.writeln('<img name="testpic" src="'+imgPath+'" BORDER=0 onClick="self.close()">');
	win.document.writeln('<script>');
	win.document.writeln('function fitPic(objName) {');
	win.document.writeln('var img = document.images[objName]; var left = parseInt((screen.width-img.width)/2);');
	win.document.writeln('var top = parseInt((screen.height-img.height)/2); var W, H; var NS = (navigator.appName=="Netscape")?true:false;');
	win.document.writeln('if (left<0 || top<0) {left = 0;top = 0; W = screen.width;H = screen.height;} else');
	win.document.writeln('{ W = img.width - ((NS) ? window.innerWidth : document.body.clientWidth);  H = img.height - ((NS) ? window.innerHeight : document.body.clientWidth); }');
	win.document.writeln('self.resizeBy(W, H-1); self.moveTo(left, top); self.focus();}');
	win.document.writeln('</script>');
	win.document.writeln('</BODY></HTML>');
	win.document.close();
}

function popUpGaleria(imgPath)
{
	var GALERIA_PATH = 'images/galeria/';
	popUpPic(GALERIA_PATH+imgPath);
}

function popUpHelyszin(imgPath)
{
	var GALERIA_PATH = 'images/helyszin/';
	popUpPic(GALERIA_PATH+imgPath);
}

function popUpPokerFelszereles(imgPath)
{
	var GALERIA_PATH = 'images/poker_felszereles/';
	popUpPic(GALERIA_PATH+imgPath);
}

function popUpDijak(imgPath)
{
	var GALERIA_PATH = 'images/dijak/';
	popUpPic(GALERIA_PATH+imgPath);
}

function dimension (w, h)
{
	this.width = w;
	this.height = h;
}

function getBodySize() 
{
  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;
  }
  //window.alert( 'Width = ' + myWidth + 'Height = ' + myHeight );
  
  return new dimension(myWidth, myHeight);
}

function setContentSize()
{
	var	FIXED_HEIGHT = 375;	// enny pixelt foglalnak vertikalisan a kepek, keretek, stb...
	var dimension = getBodySize();
	
	//alert(dimension.width+", "+dimension.height);
	
	var contentObj = MM_findObj("content");
	var height = dimension.height - FIXED_HEIGHT+"px";
	contentObj.style.height = dimension.height - FIXED_HEIGHT+"px";

	//var obj = MM_findObj("mainTable");
	//obj.style.height = (dimension.height-16)+"px";
	//obj.style.height = (FIXED_HEIGHT+contentObj.style.height+30)+"px";
}