// JavaScript Document
function ltrim( source )
{
	var index = 0;
	while( source.charAt(index) == " " ) index++;
	return source.substr(index);
}

function rtrim( source )
{
	var index = source.length - 1;
	while( source.charAt(index) == " " ) index--;
	return source.substring(0, index + 1);
}

function trim( source )
{
	return ltrim(rtrim(source));
}
 
function ZoomImage( img_type, img_file, width, height, description )
{
	var img_src;
	img_src = cfgRootPath + 'includes/showimage.php?type=' + img_type + '&id=' + img_file; // + '&w=' + width + '&h=' + height;

	nw = window.open('', 'ZoomImage', 'toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=0,width=' + (width + 20) + ',height=' + (height + 50) + ',top='+eval(screen.height/2-(height+50)/2)+',left='+eval(screen.width/2-(width+20)/2));
	nw.focus();
	nw.document.write('<html>');
	nw.document.write('<head>');
	nw.document.write('<title>21plus.co.il</title>');
	nw.document.write('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">');
	nw.document.write('</head>');
	nw.document.write('<body style="margin:0px 0px 0px 0px; padding:0px 0px 0px 0px;">');
	nw.document.write('<style type="text/css"> ');
	nw.document.write('body { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; background-color: #ffffff; } ');
	nw.document.write('body, div, td { font-family: "Lucida Grande", "Trebuchet MS", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif; font-size: 15px; color: #000000; font-weight: bold; } ');
	nw.document.write('a { font-size: 13px; color: #0055CC; font-weight: normal; text-decoration:underline; } ');
	nw.document.write('a:hover { font-size: 13px; color: #CC0000; font-weight: normal; text-decoration:underline; } ');
	nw.document.write('</style>');
	nw.document.write('<br />');
	nw.document.write('<div align="center">');
	nw.document.write('<img src="' + img_src + '" border="0" onClick="window.close();" alt="Закрыть окно" title="Закрыть окно" style="cursor:pointer;" onload="window.stop();">');
	nw.document.write('<br />');
	nw.document.write('<a href="" onClick="window.close();">Закрыть окно</a>');
	nw.document.write('</div>');
	//nw.document.write('<div align="left">');
	//nw.document.write(description);
	//nw.document.write('</div>');
	nw.document.write('</body>');
	nw.document.write('</html>');
	if( navigator.appName.substring(0,8) == "Netscape" )
	{
		//nw.location = '#';
	}
	nw.focus();
	return false;
}