function imgResize(src, width) 
{
	var Image1 = new Image;
	Image1.src = src;
	width -= 5;
	if ( (Image1.width!=0) && (Image1.height!=0) ) {
		if (width > Image1.width) width = Image1.width;
		document.images.title.width = width;
		document.images.title.src = src;
	}

}
// ÀÌ¹ÌÁö »çÀÌÁî¸¦ ±³Á¤ÇÑ´Ù.
function resizeImage(img_id, width, height) {

	var img1 = new Image();
	img1.src = document.images[img_id].src;

	var rateW = width / img1.width;
	var rateH = height / img1.height;
	if (rateW < rateH) {
		height = Math.round(rateW * img1.height);
	} else {
		width = Math.round(rateH * img1.width);
	}

	if (img1.width > width) {
		document.images[img_id].width   = width;
		document.images[img_id].height  = height;
	}

}
function LinkImage(img, p_width) {
	var thumb = new Image;
	thumb.src = img.src;
	var width = p_width - 5;

	if ((thumb.width!=0) && (thumb.height!=0))
	{
	if (width > thumb.width) {
	width = thumb.width;
	}
	img.width = width;
	}

	return;
}
function LinkImage1(img, p_height) {
	var thumb = new Image;
	thumb.src = img.src;
	var height = p_height - 5;

	if ((thumb.height!=0) && (thumb.height!=0))
	{
	if (height > thumb.height) {
	height = thumb.height;
	}
	img.height = height;
	}

	return;
}
function LinkImage2(img, p_width, p_height) {
	var thumb = new Image;
	thumb.src = img.src;
	var width = p_width - 5;
	var height = p_height - 5;

	if ((thumb.width!=0) && (thumb.height!=0))
	{
		if(thumb.width >= thumb.height){
			if (width > thumb.width) {
				width = thumb.width;
			}
			img.width = width;
		}else{
			if (height > thumb.height) {
				height = thumb.height;
			}
			img.height = height;		
		}		
	}

	return;
}