<!--
var externimg_width = new Array();
var externimg_height = new Array();

var ex_width_single;
var ex_height_single;

var o_i = 0;

function chImgSize3(i_size)
{
	if(image.length == null)
	{
		if(image.width != 0)
		{
			ex_width_single = image.width;
			ex_height_single = image.height;
			o_i++;
		}
		
		if(o_i == 1) { chImgSize(i_size); }
		else { setTimeout('chImgSize3('+i_size+')', 100); }
	}
	else
	{	
		if(image[o_i].width != 0)
		{
			externimg_width[o_i] = image[o_i].width;
			externimg_height[o_i] = image[o_i].height;
			o_i++;		
		}
		
		if(o_i == image.length) { chImgSize(i_size); }
		else { setTimeout('chImgSize3('+i_size+')', 100); }
	}
}

function chImgSize(i_size)
{
	//alert("resizing...");
	if(i_size == 0)			//0 : small
	{
		i_width = 173;
		i_height = 280;		
	}
	else if(i_size == 1)	//1 : large
	{		
		i_width = 370;
		i_height = 590;
	}
	else if(i_size == 2)
	{
		i_width = 357;
		i_height = 570;
	}

	if(image.length == null)
	{				
		image_sw = (image.width * i_width)/image.height;
		image_sh = (image.height * i_height)/image.width;		
		
		if(image.width > i_height || image.height > i_height)//roop <= 10)
		{			
			if(image_sw <= i_height && image_sh <= i_height)
			{
				if(image_sw < i_height)
				{						
					image.width = i_height
				}
				else
				{	
					 image.height = i_width
				}
			}
			else					
			{
				if(image_sw > i_height)
				{	
					image.width = i_height
				}
				else
				{	
					image.height = i_width
				}	
			}			
		}
		else
		{		
			//return false;
		}		
		
		if(image.width > i_height || image.height > i_height)
			setTimeout('chImgSize('+i_size+')', 500);
	}
	else	//image.length != null	
	{	
		for(var i = 0; i < image.length; i++)
		{
			image_sw = (image[i].width * i_width)/image[i].height;
			image_sh = (image[i].height * i_height)/image[i].width;
			
			if(image[i].width > i_height || image[i].height > i_height)
			{	
				if(image_sw <= i_height && image_sh <= i_height)
				{
					if(image_sw < i_height)
					{						
						image[i].width = i_height
					}
					else
					{	
						 image[i].height = i_width
					}
				}
				else					
				{
					if(image_sw > i_height)
					{	
						image[i].width = i_height
					}
					else
					{	
						image[i].height = i_width
					}	
				}			
			}
			else
			{		
				//if(image[i].width != 28);					
					//return false;
			}		
			
		}//for
		
		for(i = 0; i < image.length; i++)
		{
			if(image[i].width > i_height || image[i].height > i_height)
				setTimeout('chImgSize('+i_size+')', 500);
		}
	}
}

function viewfullsize2(url, i)
{
	if(image.length == null)
	{
		if(ex_width_single >= screen.availWidth && ex_height_single >= screen.availHeight)
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(screen.availWidth-10)+', height='+(screen.availHeight-30)+', scrollbars=yes,left=0,top=0')
		else if(ex_width_single >= screen.availWidth) 
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(screen.availWidth-10)+', height='+(ex_height_single+20)+', scrollbars=yes,left='+((screen.availWidth-ex_width_single)/2)+',top='+(screen.availHeight-ex_height_single-20)/2)
		else if(ex_height_single >= screen.availHeight) 
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(ex_width_single+20)+', height='+(screen.availHeight-30)+', scrollbars=yes,left='+((screen.availWidth-ex_width_single)/2)+',top=0')
		else
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(ex_width_single+0)+', height='+(ex_height_single+0)+', scrollbars=no,left='+((screen.availWidth-ex_width_single)/2)+',top='+(screen.availHeight-ex_height_single-20)/2)	
	}
	else
	{
		if(externimg_width[i] >= screen.availWidth && externimg_height[i] >= screen.availHeight)
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(screen.availWidth-10)+', height='+(screen.availHeight-30)+', scrollbars=yes,left=0,top=0')
		else if(externimg_width[i] >= screen.availWidth) 
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(screen.availWidth-10)+', height='+(externimg_height[i]+20)+', scrollbars=yes,left='+((screen.availWidth-externimg_width[i])/2)+',top='+(screen.availHeight-externimg_height[i]-20)/2)
		else if(externimg_height[i] >= screen.availHeight) 
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(externimg_width[i]+20)+', height='+(screen.availHeight-30)+', scrollbars=yes,left='+((screen.availWidth-externimg_width[i])/2)+',top=0')
		else
			open('../image_board/image_board_view.php?url='+url, 'VIEW', 'toolbar=no, menubar=no, resizable=yes, status=no, width='+(externimg_width[i]+0)+', height='+(externimg_height[i]+0)+', scrollbars=no,left='+((screen.availWidth-externimg_width[i])/2)+',top='+(screen.availHeight-externimg_height[i]-20)/2)	
	}
}
//-->