	function openGallery(obj){
		blackScreen = document.createElement("DIV");
		blackScreen.style.position = "absolute";
		blackScreen.style.left = 0;
		blackScreen.style.top = 35;
		blackScreen.style.width = document.body.clientWidth;
		blackScreen.style.height = document.body.clientHeight;
		blackScreen.style.backgroundImage = "url('http://www.heeloo.ro/xg/imgs/shadows/25black.png')";
		blackScreen.style.zIndex = 2999;
		document.body.appendChild(blackScreen);
	
		var _html = "<table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>";
		_html +="<tr>";
			_html+="<td align='center' valign='middle' style='background-image:url(http://imgs.heeloo.net/spinner_small_black.gif);background-repeat:no-repeat;background-position:center center'>";
				_html +="<table border='0' style='background-color:white'>";
					_html+="<tr>";
					_html+="<td align='center' valign='middle'>";
						_html+="<img unselectable='on' onselectstart='return false' onmousedown='return false' src='"+obj.src+"' border='0' style='visibility:hidden' onload='_showImage(this)' onclick='window.open(\""+obj.src+"\",\"_blank\")' style='cursor:pointer'/>";
					_html+="</td></tr>";
					_html+="<tr><td align='center' valign='middle'>";
					_html+="EMBED: <input class='xg_eb_input' style='width:300px;' value='<img src=\""+obj.src+"\" width=\"300\" />' onclick='_clickIMGEmb(this)' readonly/>";
					_html+="</td></tr>";
					_html+="<tr><td align='center' valign='middle'>";
				_html +="<div style='color:white;width:90px;'><a href='javascript:closeGallery()' class='hbtn_gray' onclick='this.focus()'><span style='width:80px'>Închide</span></a></div>";
					_html+="</td></tr>";
					_html+="</table>";
			_html+="</td>";
		_html +="</tr>";
		_html+="</table>";
		blackScreen.innerHTML = _html;

}

function closeGallery(){
	document.body.removeChild(blackScreen);
}

function _showImage(obj){
	var _myw = document.body.clientWidth;
	var _myh = document.body.clientHeight;
	
	obj.style.visibility = "visible";
	obj.style.border = "solid white 5px";
	if (_myh < parseInt(obj.height)+100){
		obj.height = _myh-240;
	}
}

function _clickIMGEmb(obj){
	obj.focus();
	obj.select();
}

