var ant;
av=navigator.appVersion;
hh=av.indexOf("2.0");   
function an(tpage,vals)
 { ant=window.open(tpage,"SMWIN",vals); ant.location=tpage; if (ant.opener==null) ant.opener=window; if (hh!=0) ant.focus(); }
 
 function parent_link(url){

	window.opener.location.href = url;
	window.close();
	
}

function open_window(title,ww,wh){
	var winl = (screen.width-ww)/2;
	var wint = (screen.height-wh)/2;

//       if (typeof usrwindow != 'undefined'){
//	if (!usrwindow.closed){usrwindow.close();}}

     usrwindow=window.open(title,'ablak', 'top=0,left=0,resizable=no,hotkeys=yes,width='+ww+',height='+wh+',top='+wint+',left='+winl);

//	if(!usrwindow){
//		alert("Az Ön internet böngészője nem engedi a galéria ablak megnyitását! A galéria megtekintéséhez engedélyezze a popup-ablakok megnyitását!");
//	}
}



function open_bigwindow(title,ww,wh){
	var winl = (screen.width-ww)/2;
	var wint = (screen.height-wh)/2;

       if (typeof usrwindow != 'undefined'){
	if (!usrwindow.closed){usrwindow.close();}}
     usrwindow=window.open(title,'bigImg', 'top=0,left=0,resizable=no,top=10,left=10,status=no,hotkeys=yes,width='+ww+',height='+wh+',top='+wint+',left='+winl);
}

function open_window_resize(title,ww,wh){
       if (typeof usrwindow != 'undefined'){
	if (!usrwindow.closed){usrwindow.close();}}
     usrwindow=window.open(title,'ablak', 'top=0,left=0,hotkeys=yes,width='+ww+',height='+wh);
}

