function popimage_old(url, img_width, img_height, title) {
	var scr_width = screen.availWidth ? screen.availWidth : screen.width;
	var scr_height = screen.availHeight ? screen.availHeight : screen.height;
	var win_width = img_width;
	var win_height = img_height;
	var win_left = (scr_width - img_width) / 2;
	var win_top = (scr_height - img_height) / 2;
	var doc = open("", "_blank", "left="+win_left+",top="+win_top+",width="+win_width+",height="+win_height+",toolbar=0,resizable=0,scrollbars=0,menubar=0,status=0,directories=0,location=0");
	doc.document.write(
		'<html>'+
		'<head>'+
		'<title>'+title+'</title>'+
		'</head>'+
		'<body bgcolor="#ffffff" onclick="window.close()" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" style="cursor: pointer;">'+
		'<div id="preload" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background-image: url(../images/loading.gif); background-repeat: no-repeat; background-position: 50% 50%;"></div>'+
		'<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">'+
		'<tr><td align="center"><img src="'+url+'" alt="" style="visibility: hidden;" onload="this.style.visibility=\'visible\';document.getElementById(\'preload\').style.backgroundImage=\'none\';"></td></tr>'+
		'</table>'+
		'</body>'+
		'</html>');
}

function popimage(url, img_width, img_height, title) {
	var scr_width = screen.availWidth ? screen.availWidth : screen.width;
	var scr_height = screen.availHeight ? screen.availHeight : screen.height;
	var win_width = img_width;
	var win_height = img_height;
	var win_left = (scr_width - img_width) / 2;
	var win_top = (scr_height - img_height) / 2;
	var doc = open("../popimage.php?url="+url+"&title="+title
			, "_blank"
			, "left="+win_left+",top="+win_top+",width="+win_width+",height="+win_height+",toolbar=0,resizable=0,scrollbars=0,menubar=0,status=0,directories=0,location=0");//,titlebar=0,channelmode=0,fullscreen=0
}

/*don't works:
function fireOnclick(objID) {
	var target=document.getElementById(objID);
	if(document.dispatchEvent) { // W3C
		var oEvent = document.createEvent( "MouseEvents" );
		oEvent.initMouseEvent("click", true, true,window, 1, 1, 1, 1, 1, false, false, false, false, 0, target);
		target.dispatchEvent( oEvent );
		}
	else if(document.fireEvent) { // IE
		target.fireEvent("onclick");
		}
}
*/
/*
function mailto(url1, url2, url3, id) {
	//open("mailto:"+url1+"@"+url2+"."+url3);
	document.getElementById(id).href = "mailto:"+url1+"@"+url2+"."+url3;
	//document.getElementById(id).click();
	//document.getElementById(id).fireEvent("onclick");
	//var obj = document.getElementById(id);// obj.click();
	//if (obj.click){obj.click();}else alert('no click() function');//nincs  ilyen függvény!
	document.xxxx.action="mailto:"+url1+"@"+url2+"."+url3;
	document.xxxx.submit();
}
*/

function mailto(url1, url2, url3, frm_name) {
	var frm = document.getElementById(frm_name);
	frm.action="mailto:"+url1+"@"+url2+"."+url3;
	frm.submit();
}

function setParentTitle(title) {
	parent.document.title = title;
}
