/*function popup(url, width, height, name, plus_params) {
  x = (screen.availWidth-width)/2;
  y = (screen.availHeight-height)/2;
  params = 'width='+width+',height='+height+',Left='+x+',Top='+y+',screenX='+x+',screenY='+y;
	if(plus_params!='') params += ','+plus_params;
  w = window.open(url, name, params);
  w.focus();
  return w;
}*/

function popup(url_address,window_width,window_height,scroll,debug) {
	if (debug){
		x = (screen.availWidth-window_width)/2;
  	y = (screen.availHeight-window_height)/2;
	  params = 'width='+window_width+',height='+window_height+',Left='+x+',Top='+y+',screenX='+x+',screenY='+y+',status=no';
		if(scroll=="no") params += ',scrollbars=no';
		else params += ',scrollbars=yes';
  	FromWindow = window.open(url_address, 'NewWindow', params);
		FromWindow.focus();
	}else{
	  if(scroll=="no") FromWindow = window.showModalDialog(url_address, null, "help:no;scroll:no;status:no;center:yes;statusbar:no;minimize:no;maximize:no;border:thin;statusbar:no;dialogWidth:"+window_width+"px;dialogHeight:"+window_height+"px");
  	else FromWindow = window.showModalDialog(url_address, null, "help:no;status:no;center:yes;statusbar:no;minimize:no;maximize:no;border:thin;statusbar:no;dialogWidth:"+window_width+"px;dialogHeight:"+window_height+"px");
	}
  return FromWindow;
}

function imagepopup(img,width,height) {
	var strOptions = '';
	var win = null;
	var strDocHTML = '';
	
	x = (screen.availWidth-width)/2;
  y = (screen.availHeight-height)/2;
	
	strOptions = 'location=0,menubar=0,scrollbars=0,status=0,titlebar=1,toolbar=0,directories=0';
	strOptions += ',left='+x+',top='+y+','+'width='+width+',height='+height;

	win = window.open('','frmPhotos',strOptions);

	strDocHTML = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n'+
'\t"http://www.w3.org/TR/html4/loose.dtd">\n'+
'<html lang="fr">\n\t<head>\n\t\t<title>Photo<\/title>\n'+
'\t\t<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n'+
'\t\t<style type="text/css"><!--\n'+
'body,p { margin:0; background: white;}\nimg { border:0;}\n--><\/style>\n'+
'\t<\/head>\n';

	strDocHTML += '\n\t<body>\n\n'+
'\t\t<p><a href="javascript:;" onclick="window.close();return false;" title="Bezárás"><img src="'+img+'" width="'+width+'" height="'+height+'"></a><\/p>\n';
	strDocHTML += '\n\t<\/body>\n<\/html>';

	win.document.open();
	win.document.write(strDocHTML);
	win.document.close();
	win.focus();
}