//ÅÇ¸Þ´º
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//ÅÇ¸Þ´º

//¼­ºñ½º¹Ù·Îº¸±â
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//¼­ºñ½º¹Ù·Îº¸±â

//³ëÀÎº¸°Ç¼¾ÅÍ ÀüÃ¼º¸±â
//³ëÀÎº¸°Ç¼¾ÅÍ ÀüÃ¼º¸±â


//±Û·Î¹ú ¸Þ´º

var old_menu = '';

function menuclick(submenu)
{
  if( old_menu != submenu ) {
    if( old_menu !='' ) {
      old_menu.style.display = 'none';	
    }
    submenu.style.display = 'block';
    old_menu = submenu;

  } else {
    submenu.style.display = 'none';
    old_menu = '';
  }
}


function expandFrame(frm) {
	var time = 0 ;
	if (myframe.document.body.scrollHeight == 0) {
		time = setTimeout("expandFrame()", 100) ;
	} else {
		frm.style.height = myframe.document.body.scrollHeight ;
		document.body.scrollTop = frm.style.height;
	}
	
}


function expandFrame2(frm) {
	var time = 0 ;
	if (myframe.document.body.scrollHeight == 0) {
		time = setTimeout("expandFrame()", 100) ;
	} else {
		frm.style.height = myframe.document.body.scrollHeight ;
	}
	document.body.scrollTop = 340;	
}

function showSubmenu(str) {
	for(i = 1 ; i < 8; i++){
		menuNum = "menu_sub0" + i;
		menu_sub = document.getElementById(menuNum);
		menu_sub.style.visibility = "hidden";
		menuImg = "img" + i;
		menu_img = document.getElementById(menuImg);
		menu_img.src="/images/common/menu0"+i+".gif";
		if(str == i){			
			menu_sub.style.visibility = "visible";
			menu_img.src="/images/common/menu0"+i+"_over.gif";
		}
	}
}

function showSubmenu2(str) {
		menuNum = "menu_sub0" + str;
		menu_sub = document.getElementById(menuNum);
		menu_sub.style.visibility = "visible";
}

function outSubmenu(str) {
		menuNum = "menu_sub0" + str;
		menu_sub = document.getElementById(menuNum);
		menu_sub.style.visibility = "hidden";
}		
//±Û·Î¹ú ¸Þ´º

//ÆË¾÷¿­±â
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//ÆË¿±¿­±â

//Áö¸®Á¤º¸(»ýÈ°Áöµµ¾È³»)ÆäÀÌÁö ¿­±â
//function GisMapOpen(){ //»ýÈ°Áöµµ Æã¼Ç
//	 NewWindow("http://map.cans21.net/stat/Count_Check.asp","SNGIS","1014","711","NO","YES","NO");
//}	
//function NewWindow(pageName, winName, w, h, scroll, resize, status) {
//	 if(resize == "yes"){
//		size = "resizable";
//	 }else{
//		size = "noresize";
//	 }
//	 var winl = 0;//(screen.width - w) / 2;
//	 var wint = 0;//(screen.height - h) / 2;
//	 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+','+size+',status='+status;
//	 win = window.open(pageName, winName, winprops);
//	 if (parseInt(navigator.appVersion) >= 4){
//		win.window.focus();
//	 }
//}
//Áö¸®Á¤º¸(»ýÈ°Áöµµ¾È³»)ÆäÀÌÁö ¿­±â



//Áö¸®Á¤º¸
function GisMapOpen1(){ //»ýÈ°Áöµµ Æã¼Ç
	var mw = screen.availWidth - 10;
	var mh = screen.availHeight - 50;
	
	if(mw>1280){
		mw = 1270;
		mh = 940;
	}
	
    NewWindow("http://map.cans21.net/","SNGIS",mw,mh,"NO","NO","NO");			 	
//             NewWindow("http://map.cans21.net/stat/Count_Check.asp","SNGIS","1014","711","NO","YES","NO");
}	
 
function NewWindow(pageName, winName, w, h, scroll, resize, status) {
 
             if(resize == "yes"){
 
                           size = "resizable";
 
             }else{
 
                           size = "noresize";
 
             }
 
             var winl = 0;//(screen.width - w) / 2;
 
             var wint = 0;//(screen.height - h) / 2;
 
             winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+','+size+',status='+status;
 
             win = window.open(pageName, winName, winprops);
 
 
 
             if (parseInt(navigator.appVersion) >= 4){
 
                           win.window.focus();
 
             }
 
}

//Áö¸®Á¤º¸


// È¸¿ø - ¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã£±â

function chk_form(){
	var f = document.searchForm
	
	if (f.auth_name.value=='') {
		alert("ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		f.auth_name.focus();
		return false;
	}
	
	if (f.auth_sn1.value=='') {
		alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		f.auth_sn1.focus();
		return false;
	}
	
	if (f.auth_sn2.value=='') {
		alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		f.auth_sn2.focus();
		return false; 
	}

}

function chk_passfrm(){
	var f = document.frmPass

	if (f.mb_id.value=='') {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		f.mb_id.focus();
		return false;
	}
	
	if (f.mb_email.value=='') {
		alert("°¡ÀÔ½Ã ±âÀÔÇÏ¼Ì´ø ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		f.mb_email.focus();
		return false;
	}
}
// È¸¿ø - ¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã£±â

// ¹è³Ê ¹Ù²Ù±â
function rolling(str) {//·Ñ¸µ º£³Ê ...
	for(i = 1 ; i < roll_cnt + 1; i++){
		tabNum = "roll0" + i;
		tab_sub = document.getElementById(tabNum);
		tab_sub.style.display = "none";
		tabImg = "roll_button0" + i;
		tab_img = document.getElementById(tabImg);
		tab_img.src="/images/main/n0"+i+".gif";
		if(str == i){			
			tab_sub.style.display = "block";
			tab_img.src="/images/main/n0"+i+"_on.gif";
			counter = i - 1;
		}
	}
}
var counter = 0;
var change_flag = "T";

function changeBanner(){
	if (change_flag =="T")
	{
	if(counter > roll_cnt - 1)
	counter = 0;
	
	rolling(counter + 1);
	
	counter++;
	}
}
// ¹è³Ê ¹Ù²Ù±â

//µ¿¿µ»ó
function PrintMovie(src,w,h,wmode){
	document.write('<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" width="' + w + '" height="' + h + '">');	// v6.4
	//document.write('<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="' + w + '" height="' + h + '">');	// v7.0
	document.write('<param name="URL" value="' + src + '">');
	document.write('<param name="AutoStart" value="0">');
	document.write('<param name="TransparentatStart" value="true">');	
	document.write('<param name="ShowStatusBar" value="none">');
	document.write('<param name="ShowControls" value="true">');
	document.write('<param name="FileName" value="' + src + '">');
	document.write('<embed TYPE="application/x-mplayer2" width="'+ w +'" src="'+ src +'" height="'+ h +'" AutoStart="0" NAME="MediaPlayer" showstatusbar="0" showcontrols="true" AnimationAtStart="true"></embed>')
	document.write('</object>');
	}
//µ¿¿µ»ó

//Á¡ÇÁ¸Þ´º
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//Á¡ÇÁ¸Þ´º

//±¸Ã»¹×µ¿ÁÖ¹Î¼¾ÅÍ Á¡ÇÁ¸Þ´º

function site_link(objSel){
	if(event.keyCode !=9&objSel.options[objSel.selectedIndex].value!=''){
		var link = objSel.options[objSel.selectedIndex].value;
		if(link.substr(0,7) == "http://"){
			window.open(link,'_blank');
		}else{
			if(link.substr(0,7) == ""){
			}else{
				parent.location.href = link;
			}
		}
	}
}

function ret_form(){
	return false;
}
//±¸Ã»¹×µ¿ÁÖ¹Î¼¾ÅÍ Á¡ÇÁ¸Þ´º

//ºÎ¼­º° °ø°³ÀÚ·á½Ç
	function site_location(link){
		if(link.substr(0,7) == "http://"){
			window.open(link,'_blank');
		}else{
			if(link.substr(0,7) == ""){
				//window.open(link,'_blank');
			}else{
				parent.location.href = link;
			}
		}
	}
//ºÎ¼­º° °ø°³ÀÚ·á½Ç

/* È­¸é È®´ë Ãà¼Ò ½ÃÀÛ */
 var nowZoom = 100; // ÇöÀçºñÀ²
 var maxZoom = 120; // ÃÖ´ëºñÀ²(500À¸·ÎÇÏ¸é 5¹è Ä¿Áø´Ù)
 var minZoom = 80; // ÃÖ¼ÒºñÀ²

 //È­¸é Å°¿î´Ù.
 function zoomIn() {
  if (nowZoom < maxZoom) {
   nowZoom += 10; //25%¾¿ Ä¿Áø´Ù.
  } else {
   return;
  }
  document.body.style.zoom = nowZoom + "%";
 }

 //È­¸é ÁÙÀÎ´Ù.
 function zoomOut() {
  if (nowZoom > minZoom) {
   nowZoom -= 10; //25%¾¿ ÀÛ¾ÆÁø´Ù.
  } else {
   return;
  }
  document.body.style.zoom = nowZoom + "%";
 }
/* È­¸é È®´ë Ãà¼Ò ³¡ */


// ÃÑ°ý Á¶Á÷µµ ¸ÞÀÏ ÆË¾÷
function send(a,b){
	window.open("/City_info/City_organ/mailchk.asp?code=sub&num="+a+"&name='"+b+"'","","width=300,height=220,toolbar=no,location=no,statusbar=no,menubar=no,resizable=no");
}
//¸ÞÀÏ ÆË¾÷

//* ¿¹Àü ÆË¾÷
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// ¿¹Àü ÆË¾÷ *//