	<!--
	window.name = "SiteWindow";
	self.focus()
	
	function galleryZoom(imgname) {
		
		document.all.galleryZoomTable.style.display = '';	
		
		document.all.galleryZoomImg.src = imgname;
		
		nImg = new Image();
		nImg.src = imgname;
		
		var wid = nImg.width; //Original Width
		var hit = nImg.height; //Original Height
		
		if(wid > hit) //너비가 높이보다 클경우
		{
			if(wid > 528 ) // 정해진 너비보다 클경우
			{ 
				x = (hit * 528) / wid
				document.all.galleryZoomImg.width=528;
				document.all.galleryZoomImg.height=x; //이미지에 적용
			}
			else
			{
				document.all.galleryZoomImg.width=wid;
				document.all.galleryZoomImg.height=hit; //이미지에 적용
			}
		}
		else
		{		
			if(hit > 528 ) //정해진 높이보다 클경우
			{ 
				x = (wid * 528) / hit
				document.all.galleryZoomImg.width=x;
				document.all.galleryZoomImg.height=528; //이미지에 적용
			}
			else
			{
				document.all.galleryZoomImg.width=wid;
				document.all.galleryZoomImg.height=hit; //이미지에 적용
			}
		}
	}
	
	function side_banner(){
	 var maxWidth = 180;
	 var imgNum = document.side_banner.length;
	 for(i=0;i<imgNum;i++){
		if(document.side_banner[i].width > maxWidth) {
		 document.side_banner[i].width = maxWidth;
		}
	 }
	}
	
	function top_banner(){
	 var maxWidth = 740;
	 var imgNum = document.top_banner.length;
	 for(i=0;i<imgNum;i++){
		if(document.top_banner[i].width > maxWidth) {
		 document.top_banner[i].width = maxWidth;
		}
	 }
	}
	
	function pgcontent(){
	 var maxWidth = 550;
	 var imgNum = document.pgcontent.length;
	 for(i=0;i<imgNum;i++){
		if(document.pgcontent[i].width > maxWidth) {
		 document.pgcontent[i].width = maxWidth;
		}
	 }
	}
	
	function gallery1(){
	 var maxWidth = 538;
	 var imgNum = document.gallery1.length;
	 for(i=0;i<imgNum;i++){
		if(document.gallery1[i].width > maxWidth) {
		 document.gallery1[i].width = maxWidth;
		}
	 }
	}
	
	
	function gallery2(){
	 var maxWidth = 140;
	 var maxHeight = 140;
	 var newWidth = 0;
	 var newHeight = 0;
	 var imgw, imgh;
	 var imgNum = document.gallery2.length;
	 for(i=0;i<imgNum;i++){
		imgw = document.gallery2[i].width;
	 	imgh = document.gallery2[i].height;
		
		if(imgw > maxWidth) {		 
		 newWidth = maxWidth;
		 newHeight = Math.round((imgh*newWidth)/imgw);
		 document.gallery2[i].width = newWidth;
		 document.gallery2[i].height = newHeight;
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}
		if (newHeight > maxHeight) {
			document.gallery2[i].height = maxHeight;
			document.gallery2[i].width = Math.round((imgw*maxHeight)/imgh);
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}	
	 }
	}
	
	function product_thumb(){
	 var maxWidth = 140;
	 var maxHeight = 140;
	 var newWidth = 0;
	 var newHeight = 0;
	 var imgw, imgh;
	 var imgNum = document.product_thumb.length;
	 for(i=0;i<imgNum;i++){
		imgw = document.product_thumb[i].width;
	 	imgh = document.product_thumb[i].height;
		
		if(imgw > maxWidth) {		 
		 newWidth = maxWidth;
		 newHeight = Math.round((imgh*newWidth)/imgw);
		 document.product_thumb[i].width = newWidth;
		 document.product_thumb[i].height = newHeight;
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}
		if (newHeight > maxHeight) {
			document.product_thumb[i].height = maxHeight;
			document.product_thumb[i].width = Math.round((imgw*maxHeight)/imgh);
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}	
	 }
	}
	
	function product_thumb2(){
	 var maxWidth = 130;
	 var maxHeight = 130;
	 var newWidth = 0;
	 var newHeight = 0;
	 var imgw, imgh;
	 var imgNum = document.product_thumb2.length;
	 for(i=0;i<imgNum;i++){
		imgw = document.product_thumb2[i].width;
	 	imgh = document.product_thumb2[i].height;
		
		if(imgw > maxWidth) {		 
		 newWidth = maxWidth;
		 newHeight = Math.round((imgh*newWidth)/imgw);
		 document.product_thumb2[i].width = newWidth;
		 document.product_thumb2[i].height = newHeight;
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}
		if (newHeight > maxHeight) {
			document.product_thumb2[i].height = maxHeight;
			document.product_thumb2[i].width = Math.round((imgw*maxHeight)/imgh);
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}	
	 }
	}
	
	function news_thumb(){
	 var maxWidth = 100;
	 var maxHeight = 100;
	 var newWidth = 0;
	 var newHeight = 0;
	 var imgw, imgh;
	 var imgNum = document.news_thumb.length;
	 for(i=0;i<imgNum;i++){
		imgw = document.news_thumb[i].width;
	 	imgh = document.news_thumb[i].height;		
		if(imgw > maxWidth) {		 
		 newWidth = maxWidth;
		 newHeight = Math.round((imgh*newWidth)/imgw);
		 document.news_thumb[i].width = newWidth;
		 document.news_thumb[i].height = newHeight;
		} else {
			newWidth = imgw;
			newHeight = imgh;
		}
		if (newHeight > maxHeight) {
			document.news_thumb[i].height = maxHeight;
			document.news_thumb[i].width = Math.round((imgw*maxHeight)/imgh);
		}	else {
			newWidth = imgw;
			newHeight = imgh;
		}
	 }
	}
	
	function resizebannerRight(){
	 var maxWidth = 200;
	 var imgNum = document.resizebannerRight.length;
	 for(i=0;i<imgNum;i++){
		if(document.resizebannerRight[i].width > maxWidth) {
		 document.resizebannerRight[i].width = maxWidth;
		}
	 }
	}
	
	function OnClickImage(target_img)
	{
		var newImg;
		var newOnclickImgSrc;
	
		newImg = target_img;
		imgw = target_img.width;
				
		newOnclickImgSrc = newImg.src;
		window.open(newOnclickImgSrc,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800');
		
	}
	
	function boardReplyCheck() 
	{																	
		
		if (document.boardReply.reAuthor.value == "") {
			alert("Enter Name");
			document.boardReply.reAuthor.focus();
			return;
		}
		
		if (document.boardReply.reEmail.value == "") {
			alert("Enter E-mail");
			document.boardReply.reEmail.focus();
			return;
		}
		
		if (document.boardReply.reContent.value == "") {
			alert("Enter Content");
			document.boardReply.reContent.focus();
			return;
		}
		document.boardReply.method = "post";
		document.boardReply.target = "_self";
		document.boardReply.action = "/theme5/pages_board_reply2_ok.asp";
		document.boardReply.submit(); 
	}
	
	function newWindow_uploadfile()
	{
		var imgname = document.boardNew.thumbimg.value;
		
		newwins = window.open('/theme5/upload_img.asp?nfield=boardNew&nname=thumbimg&imgname='+imgname,"uploadfile","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus()
	}
	
	function boardTopicDel(muidx, bdidx, bdnum, gPage, bdref)
	{
	var muidx = muidx;
	var bdidx = bdidx;
	var bdnum = bdnum;
	var gPgae = gPage;
	var bdref = bdref;
	
	if (confirm ("Are you sure to remove this Topic?"))
		 location.href = "/theme5/pages_board_remove_ok.asp?muidx=" + muidx + "&bdidx=" + bdidx + "&bdnum=" + bdnum + "&gPage=" + gPage + "&bdref=" + bdref;
	}		
	
	function newWindow_viewImage()
	{
		newwins = window.open("","viewImage","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus();
	}	
	
	function newWindow_invoice(oidx, midx)
	{
		newwins = window.open("/theme5/invoice.asp?ctidx=" + oidx + "&midx=" + midx,"invoice","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus();
	}
	
	function newWin_custm(lnk)
	{		
		newwins = window.open(lnk,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus();
	}
	
	function newWindow_login()
	{
		newwins = window.open("","login","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus();
	}
	
	function openAdminWindow()
	{
		newwins = window.open("/memadmin/admin.asp","AdminWindow");
		newwins.focus();
	}
	
	function selectImg(url)
	{
		newwins = window.open(url,"selectImage","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=50,height=50");
		newwins.focus();
	}
	
	function image_null(formname, fieldname){
		var null_check = eval("document." + formname + "." + fieldname + ".value = ''");
	}	
	
	//-->