
function ResizeThem()
{
	var maxheight = 1800;
	var imgs = document.getElementsByTagName("img");
	for ( var p = 0; p < imgs.length; p++ )
	{
		if ( imgs[p].getAttribute("alt") == "user posted image" )
		{
			var maxwidth = 524; //areagamer: 451 ;;;; naturalselection: 524
			var w = parseInt( imgs[p].width );
			var h = parseInt( imgs[p].height );
			if ( w > maxwidth )
			{
				imgs[p].style.cursor = "pointer";
				imgs[p].onclick = function( )
				{
					var iw = window.open ( this.src, 'ImageViewer','resizable=1' );
					iw.focus();
				};
				h = ( maxwidth / w ) * h;
				w = maxwidth;
				imgs[p].height = h;
				imgs[p].width = w;
			}
			if ( h > maxheight )
			{
				imgs[p].style.cursor="pointer";
				imgs[p].onclick = function( )
				{
					var iw = window.open ( this.src, 'ImageViewer','resizable=1' );
					iw.focus( );
				};
				imgs[p].width = ( maxheight / h ) * w;
				imgs[p].height = maxheight;
			}
		}


		if ( imgs[p].getAttribute("alt") == "admin posted image" )
		{
			var maxwidth = 661; // areagamer: 619 ;;;; naturalselection: 661
			var w = parseInt( imgs[p].width );
			var h = parseInt( imgs[p].height );
			if ( w > maxwidth )
			{
				imgs[p].style.cursor = "pointer";
				imgs[p].onclick = function( )
				{
					var iw = window.open ( this.src, 'ImageViewer','resizable=1' );
					iw.focus();
				};
				h = ( maxwidth / w ) * h;
				w = maxwidth;
				imgs[p].height = h;
				imgs[p].width = w;
			}
			if ( h > maxheight )
			{
				imgs[p].style.cursor="pointer";
				imgs[p].onclick = function( )
				{
					var iw = window.open ( this.src, 'ImageViewer','resizable=1' );
					iw.focus( );
				};
				imgs[p].width = ( maxheight / h ) * w;
				imgs[p].height = maxheight;
			}
		}
	}
}
