function popupIMG(imgURL, windowNAME) {   
var popupwin
window.onerror = null;
		popupwin = open('', '', 'top=20, left=100, toolbar=no,resizable=no,status=no,scrollbars=no,menubar=no,location=no, width=1, height=1'); 
		 popupwin.document.open("text/html", "replace");
		 popupwin.document.write("<html><head><title>"+windowNAME+"</title><script language='javascript1.2'>function s() {tWidth = document.images['kep'].width + 10; tHeight = document.images['kep'].height + 29; window.resizeTo(tWidth,tHeight); }</script><style type='text/css'>body {background-color: #211d1a; border: 0px solid; margin: 1px; overflow: hidden;}</style></head><body onBlur='self.close()'><a href=# onClick='self.close()'><img src='"+imgURL+"' border='0' name='kep' onload='javascript:s();' alt='Klikk a bezáráshoz'></a></body></html>");		 			 
         popupwin.document.close();
         popupwin.focus()	 
}

function addurl() {
var rvmsg;
var cmsg = document.newpost.post.value;
	var thisURL = prompt("URL:", "http://");
	if (thisURL.length>7)
	{
 	var thisTitle = prompt("A link neve:", "");
	}
	var urlcode = "[url="+thisURL+"]"+thisTitle+"[/url]";
	rvmsg = cmsg+urlcode;
	if (thisURL.length>8 && thisTitle.length>1)
	{
	document.newpost.post.value=rvmsg;
	}
	document.newpost.post.focus();
	return;
}

function addpic() {
var rvmsg;
var cmsg = document.newpost.post.value;
	var thisImage = prompt("URL: ", "http://");
	var imagecode = "[img]"+thisImage+"[/img]";
	rvmsg = cmsg+imagecode;
	if (thisImage.length>8)
	{
	document.newpost.post.value=rvmsg;
	}
	document.newpost.post.focus();
	return;
}

