<!--
//¿©·¯ÀåÀÎ°æ¿ì (¿¹ 5Àå)
function imgResize(iname,fname){
	var width, height;
	var newWidth,newHeight,maxWidth,maxHeight,defaultheight;

	maxWidth  = 550;
	maxHeight = 650;

	var img = new Image();
	img.src = iname;
	width = img.width;
	height = img.height;

	if(width > maxWidth || height > maxHeight) { //³ÐÀÌ ¶Ç´Â ³ôÀÌ°¡ ÃÖ´ë»çÀÌÁî¸¦ ÃÊ°úÇßÀ»¶§
		if(width > height) { //³ÐÀÌ°¡ ³ôÀÌº¸´Ù Å©´Ù¸é	 ³ÐÀÌ´Â ÀÌ¹Ì ÃÖ´ë³ÐÀÌ¸¦ ÃÊ°úÇÑ°ÍÀÌ´Ù
			newWidth = maxWidth; //»õ³ÐÀÌ´Â ÃÖ´ë³ÐÀÌÀÌ´Ù
			newHeight = Math.round((height*newWidth)/width);//»õ³ôÀÌ´Â ºñÀ²°è»êÇÑ´Ù.
		}
		else {  // ³ôÀÌ°¡ ³ÐÀÌº¸´Ù Å©°Å³ª °°´Ù´Â ¾ê±â´Ù.
			newHeight = maxHeight;	//»õ·Î¿î ³ôÀÌ´Â ÃÖ´ë³ôÀÌÀÌ´Ù.
			newWidth = Math.round((width*newHeight)/height); //³ÐÀÌ¸¦ ºñÀ²°Ô»êÇÑ´Ù.
		}
	}
	else { //À§ Á¶°Çµé¿¡ °É¸®Áö ¾ÊÀ¸¸é ¿ø·¡°ª ±×´ë·Î Ãâ·ÂÇØÁà¶ó
		newWidth = width;
		newHeight = height;
	}
	
	if (fname == 1) {
	      document.album_list1.width = newWidth;
		  document.album_list1.height = newHeight;
	} else if (fname == 2) {
	      document.album_list2.width = newWidth;
		  document.album_list2.height = newHeight;
	} else if (fname == 3) {
	      document.album_list3.width = newWidth;
		  document.album_list3.height = newHeight;
	} else if (fname == 4) {
	      document.album_list4.width = newWidth;
		  document.album_list4.height = newHeight;
	} else if (fname == 5) {
	      document.album_list5.width = newWidth;
		  document.album_list5.height = newHeight;
	}
}

// °ø¿¬»çÁø »çÀÌÁî Á¶Á¤(°ø¿¬»ó¼¼º¸±âÆäÀÌÁö)
function imgResize2(iname){
	var width, height;
	var newWidth,newHeight,maxWidth,maxHeight,defaultheight;

	maxWidth  = 120;
	maxHeight = 165;

	var img = new Image();
	img.src = iname;
	width = img.width;
	height = img.height;

	if(width > maxWidth || height > maxHeight) { //³ÐÀÌ ¶Ç´Â ³ôÀÌ°¡ ÃÖ´ë»çÀÌÁî¸¦ ÃÊ°úÇßÀ»¶§
		if(width > height) { //³ÐÀÌ°¡ ³ôÀÌº¸´Ù Å©´Ù¸é	 ³ÐÀÌ´Â ÀÌ¹Ì ÃÖ´ë³ÐÀÌ¸¦ ÃÊ°úÇÑ°ÍÀÌ´Ù
			newWidth = maxWidth; //»õ³ÐÀÌ´Â ÃÖ´ë³ÐÀÌÀÌ´Ù
			newHeight = Math.round((height*newWidth)/width);//»õ³ôÀÌ´Â ºñÀ²°è»êÇÑ´Ù.
		}
		else {  // ³ôÀÌ°¡ ³ÐÀÌº¸´Ù Å©°Å³ª °°´Ù´Â ¾ê±â´Ù.
			newHeight = maxHeight;	//»õ·Î¿î ³ôÀÌ´Â ÃÖ´ë³ôÀÌÀÌ´Ù.
			newWidth = Math.round((width*newHeight)/height); //³ÐÀÌ¸¦ ºñÀ²°Ô»êÇÑ´Ù.
		}
	}
	else { //À§ Á¶°Çµé¿¡ °É¸®Áö ¾ÊÀ¸¸é ¿ø·¡°ª ±×´ë·Î Ãâ·ÂÇØÁà¶ó
		newWidth = width;
		newHeight = height;
	}
	
	document.pla_photo.width = newWidth;
	document.pla_photo.height = newHeight;
}

// °ø¿¬»çÁø »çÀÌÁî Á¶Á¤ (°ø¿¬¸®½ºÆ®ÆäÀÌÁö)
function imgResize3(iname, position){
	var width, height;
	var newWidth,newHeight,maxWidth,maxHeight,defaultheight;

	maxWidth  = 120;
	maxHeight = 165;

	var img = new Image();
	img.src = iname;
	width = img.width;
	height = img.height;
	
	if(width > maxWidth || height > maxHeight) { //³ÐÀÌ ¶Ç´Â ³ôÀÌ°¡ ÃÖ´ë»çÀÌÁî¸¦ ÃÊ°úÇßÀ»¶§
		if(width > height) { //³ÐÀÌ°¡ ³ôÀÌº¸´Ù Å©´Ù¸é	 ³ÐÀÌ´Â ÀÌ¹Ì ÃÖ´ë³ÐÀÌ¸¦ ÃÊ°úÇÑ°ÍÀÌ´Ù
			newWidth = maxWidth; //»õ³ÐÀÌ´Â ÃÖ´ë³ÐÀÌÀÌ´Ù
			newHeight = Math.round((height*newWidth)/width);//»õ³ôÀÌ´Â ºñÀ²°è»êÇÑ´Ù.
		}
		else {  // ³ôÀÌ°¡ ³ÐÀÌº¸´Ù Å©°Å³ª °°´Ù´Â ¾ê±â´Ù.
			newHeight = maxHeight;	//»õ·Î¿î ³ôÀÌ´Â ÃÖ´ë³ôÀÌÀÌ´Ù.
			newWidth = Math.round((width*newHeight)/height); //³ÐÀÌ¸¦ ºñÀ²°Ô»êÇÑ´Ù.
		}
	}
	else { //À§ Á¶°Çµé¿¡ °É¸®Áö ¾ÊÀ¸¸é ¿ø·¡°ª ±×´ë·Î Ãâ·ÂÇØÁà¶ó
		newWidth = width;
		newHeight = height;
	}
	
	if (position == "x")
	{
		document.pla_photo.width = newWidth;
		document.pla_photo.height = newHeight;
	}
	else
	{
		document.pla_photo[position].width = newWidth;
		document.pla_photo[position].height = newHeight;
	}
}

//³¯Â¥ ¼±ÅÃ
function winOpen(url,w,h,wname,opt) {

	var newWin;

	LP=(screen.width)?(screen.width-w)/2:100;
    TP=(screen.height)?(screen.height-h)/3:100;

	if (opt=='') {
		setting = "height="+h+",width="+w+",top="+TP+",left="+LP;
	} else {
		setting = opt + ",height="+h+",width="+w+",top="+TP+",left="+LP;
	}

	newWin = window.open(url,wname,setting);
	newWin.focus();
}

//´Ù¿î·Îµå
function download(fileName, filepath) {
	str_url = "/shareEtc/download2.asp?fileName=" + fileName + "&filepath=" + filepath
	window.open(str_url,"´Ù¿î·Îµå","width=287, height=112, toolbar=no, status=no, scrollbars=0")
}

function download_admin(fileName, filepath) {
	str_url = "/shareEtc/download_admin.asp?fileName=" + fileName + "&filepath=" + filepath
	window.open(str_url,"´Ù¿î·Îµå","width=287, height=112, toolbar=no, status=no, scrollbars=0")
}	

//inframe resize
var iframeids=["myframe"] // iframe ¿¡ »ç¿ëÇÒ ID ¸¦ ÁöÁ¤ ÇØ ÁÖ¼¼¿ä

var iframehide="yes"

function resizeCaller() {
	var dyniframe=new Array()
	for (i=0; i<iframeids.length; i++){
		if (document.getElementById)
		resizeIframe(iframeids[i])
		if ((document.all || document.getElementById) && iframehide=="no"){
			var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
			tempobj.style.display="block"
		}
	}
}

function resizeIframe(frameid){
	var currentfr=document.getElementById(frameid)
	if (currentfr && !window.opera){
		currentfr.style.display="block"
		if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
			currentfr.height = currentfr.contentDocument.body.offsetHeight; 
		else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
			currentfr.height = currentfr.Document.body.scrollHeight;
		if (currentfr.addEventListener)
			currentfr.addEventListener("load", readjustIframe, false)
		else if (currentfr.attachEvent)
			currentfr.attachEvent("onload", readjustIframe)
	}
}

function readjustIframe(loadevt) {
	var crossevt=(window.event)? event : loadevt
	var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
	if (iframeroot)
		resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
	if (document.getElementById)
		document.getElementById(iframeid).src=url
}

if (window.addEventListener)
	window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
	window.attachEvent("onload", resizeCaller)
else
	window.onload=resizeCaller
	

//Æû ¸ÞÀÏ
function form_mail(to_mail){	
	str_url = "/shareEtc/form_mail.asp?to_mail=" + to_mail
	window.open(str_url,"¸ÞÀÏº¸³»±â","width=500, height=400, toolbar=no, status=no, scrollbars=0")
}

//¿ìÆí¹øÈ£ Ã£±â
function open_zip(){
	    var path = "/ShareEtc/zipcode/getAddress.asp";
	    window.open(path, '', 'left=100, top=100, width=520, height=300, resizable=no, toolbar=no, status=no, scrollbars=no');
}

//¿ìÆí¹øÈ£ text´­·¶À»¶§ ÀÚµ¿À¸·Î ¿ìÆí¹øÈ£ Ã£±â ¶ç°Ô
function KeyPress(){    
     if (window.event.keyCode == 13){
        postal_find();
     }
     return false;
  }

//textarea ÀÔ·Â °ª Ã¼Å©
function CheckChar(chkinput, chksize){ 
	var str,msg,temp; 
	var len = 0; 
	var count = 0; 
	
	msg = chkinput.value; 
	str = new String(msg); 
	len = str.length; 
	
	for (k=0 ; k<len ; k++){ 
		temp = str.charAt(k); 
		if (escape(temp).length > 4) { 
			count += 2; 
		} 
		else if (temp == 'r' && str.charAt(k+1) == 'n') { // rnÀÏ °æ¿ì 
			count += 2; 
		} 
		else if (temp != 'n') { 
			count++; 
		} 
	} 

	if(count > chksize) { 
		chkinput.blur(); 
		chkinput.focus(); 
		
		alert(chksize + "¹ÙÀÌÆ®±îÁö¸¸ °¡´ÉÇÕ´Ï´Ù."); 
		CutChar(chkinput, chksize); 
	} 
} 

function CutChar(chkinput, chksize) { 
	var str,msg,temp; 
	var len=0; 
	var count = 0; 
	
	msg = chkinput.value; 
	str = new String(msg); 
	len = str.length; 
	
	for(k=0 ; k<len ; k++) { 
		temp = str.charAt(k); 

		if(escape(temp).length > 4) { 
			count += 2; 
		} 
		else if (temp == 'r' && str.charAt(k+1) == 'n') { // rnÀÏ °æ¿ì 
			count += 2; 
		} 
		else if(temp != 'n') { 
			count++; 
		} 
	
		if(count > chksize) { 
			str = str.substring(0,k); 
			break; 
		} 
	} 
	chkinput.value = str; 
	CheckChar(str, chksize); 
} 


//ÀÔ·Â Ã¼Å©
function WrtChk(f) {
	for (var i = 0 ; i < f.length ; i++) {
		if (f[i].Writecheck == '' && !(f[i].disabled)) {
			var tempCheckValue = f[i].value.replace(/\s*/,"");

			if (tempCheckValue == "") {
				alert(f[i].title+" ÀÔ·ÂÇÏ¼¼¿ä.");
				f[i].focus();
				return false;
			}
		}
		
		if (f[i].NumberalCheck == '' && !(f[i].disabled)) {
			
			if (isFinite(f[i].value) == false) {
				alert(f[i].title+" ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
				f[i].focus();
				return false;
			}
		}
		
		if (f[i].ImgCheck == '' && !(f[i].disabled)) {
			if(f[i].value != ""){
				var str_Image, strExt;
				str_Image = f[i].value;
				strExt = str_Image.substring(str_Image.length - 3, str_Image.length);
				if (strExt != "gif" && strExt != "jpg" && strExt != "GIF" && strExt != "JPG"){
					alert(f[i].title+" ÀÌ¹ÌÁö ÆÄÀÏÀº gif, jpg ÆÄÀÏ¸¸ °¡´ÉÇÕ´Ï´Ù.");
					f[i].focus();
					return false;
				}
			}
		}
	}

	frm.frm_return.value = "Y"
}	

//¸®»çÀÌÁî2
function ReSizeIframe() 
{ 
	td_iframe.height = boardframe.document.body.scrollHeight; 
	td_iframe.width = boardframe.document.body.scrollWidth; 
} 


function go_map (dcd, bcd, lbl) {
  var url = "http://gis.incheon.go.kr/servlets/kr.go.gis.search.SearchServlet?act=go_map&subAct=icbp&dcd="+dcd+"&bcd="+bcd+"&lbl="+lbl;


  window.open(url, "_new" ,"width=1012,height=730,status=no,resizable=yes,top=0,left=0");
}



function MakeFlashString(source,id,width,height,wmode, otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high />"+otherParam+"<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}

// innerHTML Type
function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

// Direct Write Type
function DocumentWrite(src)
{
	document.write(src);
}
// -->
