function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function hide(UID){
if (UID.style.display=='none'){
UID.style.display='' } else { UID.style.display='none' }; }
function h(){
return(false)
}

function show_photo( pFileName, pTitle, pCaption, pNP) {
  var scr_w=0, scr_h=0, pic_w=80,pic_h=80;
// pNP='1': szélességre igazítunk (szkennelt ujság)

//ablakméret beállítása
    scr_w=screen.width-50;    //10 volt!
    scr_h=screen.height-90;

    image=new Image();
    image.src='';
	image.src=pFileName;
  
// specify window parameters
  photoWin = window.open( "", "photo", "width="+scr_w+",height="+scr_h+",status,scrollbars,resizable,screenX=0,screenY=0,left=0,top=0");

// wrote content to window
  photoWin.document.write('<html><head><title>' + pTitle + '</title></head>');	
  photoWin.document.write('<BODY BGCOLOR=#000000 TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>');
  photoWin.document.write('<center>');
  if (pCaption!='')
  photoWin.document.write('<font size=+2 face="arial,helvetica"><b>' + pCaption + '</b></font><br>');
    photoWin.document.write( '<a href="#" onclick="parent.close()">');
	if (pNP=='1')
	{	photoWin.document.write('<img title="Klikk a bezáráshoz!" border="0" src="'+pFileName+'" width="'+pic_w+'"><p>');}
	else
	{	photoWin.document.write('<img title="Klikk a bezáráshoz!" border="0" src="'+pFileName+'" height="'+pic_h+'"><p>');}
    photoWin.document.write( '</a>');
  photoWin.document.write('<font face="arial,helvetica">');	
  if (pTitle!='')
  photoWin.document.write( '"' + pTitle + '" <br>');
  photoWin.document.write( '<center><a href="#" onclick="parent.close()">Bezárás</a></center>');	
  photoWin.document.write('<p></font></body></html>');
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();

//végül átméretezzük az ablakban levő képet, ha nagyobb a kelleténél
  pic_w=image.width;
  pic_h=image.height;
	if (pNP=='1')
	{	
	  if (pic_w==0) pic_w=scr_w;
	  if ((pic_w+20)>scr_w) pic_w=scr_w-20; else pic_w=scr_w-40;
		photoWin.document.images[0].width=pic_w;
    }
	else
	{
	  if (pic_h==0) pic_h=scr_h;
	  if ((pic_h+150)>scr_h) pic_h=scr_h-150;
		photoWin.document.images[0].height=pic_h;
	}
	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

