<!--
//ÀÌ¹ÌÁö ¿øº»º¸±â
function AutoResize(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}


//¿©·¯ÀåÀÎ°æ¿ì (¿¹ 5Àå)
function imgResize(iname,fname){
	var width, height;
	var newWidth,newHeight,maxWidth,maxHeight,defaultheight;

	maxWidth  = 515;
	maxHeight = 600;

	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 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 zipcode(){
	    var path = "/ShareEtc/zipcode/getAddress.asp";
	    window.open(path, '', 'left=100, top=100, width=521, height=225, resizable=no, toolbar=no, status=no, scrollbars=no');
	    return false;
}

//¿ìÆí¹øÈ£ Ã£±â
function zipcode2(what){
	    var path = "/ShareEtc/zipcode/getAddress2.asp";
	    window.open(path, '', 'left=100, top=100, width=520, height=286, resizable=no, toolbar=no, status=no, scrollbars=no');
	    return false;
}

//¿ìÆí¹øÈ£ Ã£±â
function zipcode3(){
	    var path = "/ShareEtc/zipcode/getAddress3.asp";
	    window.open(path, '', 'left=100, top=100, width=520, height=270, resizable=no, toolbar=no, status=no, scrollbars=no');
	    return false;
}

//¿ìÆí¹øÈ£ 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); 
	} 
} 

//ÀÎ¼âÇÏ±â
var strObj = "";
           
function funcPrint(obj){                                 
	if(obj != undefined){
		strObj = obj;
		strObj.style.display = "none";
	}
	window.open("/ShareEtc/Preview.asp","winPrint","width=655,height=660,top=10,left=10,scrollbars=yes");
}

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; 

	var IE = false ; 
	if (window.navigator.appName.indexOf("Explorer") !=-1) IE = true; 

	if(IE) {
		td_iframe.height = boardframe.document.body.scrollHeight; 
		td_iframe.width = boardframe.document.body.scrollWidth; 
	}
	else
	{
		var objFrame = document.getElementById("td_iframe");
		objFrame.height = boardframe.document.body.scrollHeight; 
		objFrame.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);
}

// °ø¿¬ ÀÔ·Â°ª Ã¼Å©
function go_performance(f) {
	if (f.per_title.value=="") {
		alert("°ø¿¬¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		f.per_title.focus();
		return false;
	}
	
	if (f.per_date.value=="") {
		alert("°ø¿¬ÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		f.per_date.focus();
		return false;
	}
	if (f.per_kind.selectedIndex == 0) {
		if (f.per_resFrom.value=="") {
			alert("°ø¿¬¿¹¾à°¡´ÉÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			f.per_resFrom.focus();
			return false;
		}
		
		if (f.per_resTo.value=="") {
			alert("°ø¿¬¿¹¾à°¡´ÉÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			f.per_resTo.focus();
			return false;
		}
		
		if (f.per_image != null && f.per_image.value == "") {
			alert("°ø¿¬ÀÌ¹ÌÁö¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			f.per_image.focus();
			return false;
		}
	}
}

function vodWrite(url,w,h){


		var flashStr=
		"<object classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' name=MSMPlayer id=MSMPlayer width='"+w+"' height='"+h+"' style='LEFT: 0px; TOP: 0px'>"+
		"<param name='Filename' value='"+url+"'>"+
		"<param name='enabletracker' value='1'>"+
		"<param name='ShowControls' value='1'>"+
		"<param name='ShowStatusBar' value='1'>"+
		"<param name='ShowDisplay' value='0'>"+
		"<param name='DefaultFrame' value='Slide'>"+
		"<param name='Autostart' value='1'>"+
		"<param name='EnableContextMenu' value='0'>"+
		"<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='MediaPlay' name='MSMPlayer' displaysize='5' autosize='1'  bgcolor='darkblue' showcontrols='1' showtracker='1' showdisplay='0' showstatusbar='1' videobordercolor='#8296b9' videoborderwidth='0' videoborder3d='0'   width='"+w+"' height='"+h+" src='"+url+"' autostart='1' autorewind='1' filename='"+url+"' enabletracker='1' defaultframe='Slide' enablecontextmenu='0'>"+
		"</embed>"+
		"</object>";

		document.write(flashStr);


}
// -->
