/* Ļāļa */
function openGallery(gal_id, img_id, site_lang){
	window.open('/'+site_lang+'gallery.php?gal_id='+gal_id+'&img_id='+img_id,'gallery','width=1000,height=700,top=40,left=40,status=0,resizable=0');
	return false;
}

function openSendToFriend(article_id, site_lang){
	window.open('/'+site_lang+'/send_to_friend.php?article_id='+article_id, 'sendtofriend', 'width=400,height=300,top=40,left=40,status=0,resizable=0');
	return false;
}

function openImgPopUp(imgUrl, imgName){
	MyWindow = window.open(imgUrl,"Picture","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=400,height=400");
	MyWindow.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
	MyWindow.document.write('<html>');
	MyWindow.document.write('<head>');
	MyWindow.document.write('	<script type="text/javascript">');
	MyWindow.document.write('		function resizePopUp() {');
	MyWindow.document.write('			iWidth = document.documentElement.clientWidth;');
	MyWindow.document.write('			iHeight = window.innerHeight;');
	MyWindow.document.write('			if(iHeight == undefined) { iHeight = document.documentElement.clientHeight; }');
	MyWindow.document.write('			iWidth = document.images[0].width - iWidth;');
	MyWindow.document.write('			iHeight = document.images[0].height - iHeight;');
	MyWindow.document.write('			window.resizeBy(iWidth, iHeight);');
	MyWindow.document.write('		};');
	MyWindow.document.write('	</script>');
	MyWindow.document.write('	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
	MyWindow.document.write('	<title>'+imgName+'</title>');
	MyWindow.document.write('</head>');
	MyWindow.document.write('<body style="margin:0; padding:0;" onLoad="resizePopUp();">');
	MyWindow.document.write('	<img src="'+imgUrl+'" alt="'+imgName+'" />');
	MyWindow.document.write('</body>');
	MyWindow.document.write('</html>');
	MyWindow.document.close();
	return(false);
}


