//div ±âº»ÀÚ¹Ù½ºÅ©¸³Æ®½ÃÀÛ
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_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 clearText(thefield){
if (thefield.defaultValue==thefield.value)
        thefield.value = ""
} 


function MM_jumpMenu(selObj,restore){ //v3.0
 if (selObj.options[selObj.selectedIndex].value != '') {
  url=(selObj.options[selObj.selectedIndex].value);
  //window.open(url, 'win1');
  document.location.href=url;
  if (restore) selObj.selectedIndex=0;
 }
 }

function Number_Format(fn){
       var str = fn.value;
       var Re = /[^0-9]/g;
       var ReN = /(-?[0-9]+)([0-9]{3})/;
       str = str.replace(Re,'');              
       while (ReN.test(str)) { 
              str = str.replace(ReN, "$1,$2"); 
              }
       fn.value = str;
}

// div±âº»ÀÚ¹Ù½ºÅ©¸³Æ®³¡

function formatComma(argStr){
    /*
    *********************************************************************************************************
    *   ÇÔ¼ö¼³¸í  : ¼ýÀÚ¸¦ ¼¼ÀÚ¸®¸¶´Ù ÄÄ¸¶¸¦ ÂïÀº Çü½ÄÀ¸·Î ¹Ù²Ù¾î ÁØ´Ù.
    * argStr    : argument
    ***********************************************************************************************************
    */
 if (argStr == null)  return;
 var argStr = argStr + ""; //¼ýÀÚÀÎ °æ¿ì ¹®ÀÚ¿­·Î º¯È¯
 var rule = /[^0-9-.]/g;  // ¼ýÀÚ, ºÎÈ£ ¹× ¼Ò¼öÁ¡ ÀÌ¿ÜÀÇ µ¥ÀÌÅÍ Á¦°Å

 argStr = getFilledCommaStr(argStr.replace(rule, ""));
 return argStr;
}

//ÇÃ·¡½¬ °ü·Ã

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 DocumentWrite(src)
{
	document.write(src);
}



//¸ÞÀÎ °øÁö¹× °í½Ã°ø°í...
function List( Menu_Code, Mx, Url, Mode, Num )
{
document.location.href=""+Url+"?Num="+Num+"&Menu_Code="+ Menu_Code +"&Mode="+ Mode+"&Url="+ Url +"&Mx="+Mx;
}

// ¸ÞÀÎ ÅëÇÕ°Ë»ö °ü·Ã
function GoQuery(form) {

	if (document.frmSearch.QUERY.value == "") {
		alert("°Ë»ö¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		document.frmSearch.QUERY.focus();
		return false;
	}
	var meta;
	var selectedQl;
	var where = form.WHERE.value;
	var query = form.QUERY.value;
	form.submit();
}


function getCookie(name) {
var nameOfCookie = name + "=";
var x = 0

while ( x <= document.cookie.length ) {
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";",y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring(y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}

//*  ÆË¾÷ÀÔ´Ï´Ù  index¿¡ ³Ö¾îÁÖ±â ÄíÅ°.*/
function openCookieWin1() {
if (getCookie("Notice1") != "done") {
noticeWindow = window.open("/popup2/pop071231.html","window3","scrollbars=no,width=345, height=465, top=10,left=10");
noticeWindow.opener = self;
}
}

function MakeFlashMovString(width,height,wmode,paths)
{	
var objs = wmode

if (objs=="swf")
{
	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=\"Player\"><param name=wmode value=\"transparent\" /><param name=movie value='"+paths+"' /><param name=quality value=high /><param name=\"menu\" value=\"false\"><embed src='"+paths+"' quality=high wmode='transparent' type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";

}else{


	return "<object id=\"Player\" name=\"Player\" width='"+width+"' height='"+height+"' style=\"z-index:1\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"><param name=\"filename\" value='"+paths+"' /><param name=\"animationatstart\" value='1' /><param name=\"autostart\" value='1' /><param name=\"balance\" value='0' /><param name=\"currentmarker\" value='0' /><param name=\"currentPosition\" value='0' /><param name=\"displaymode\" value='4' /><param name=\"enablecontextmenu\" value='0' /><param name=\"enabled\" value='1' /><param name=\"fullscreen\" value='0' /><param name=\"invokeurls\" value='1' /><param name=\"PlayCount\" value='1' /><param name=\"rate\" value='1' /><param name=\"showcontrols\" value='1' /><param name=\"showstatusbar\" value='1' /><param name=\"stretchtofit\" value='1' /><param name=\"transparentatstart\" value='1' /><param name=\"uimode\" value='FULL' /><param name=\"displaybackcolor\" value='0' /><!--[if !IE]> <--><embed id=\"Player\" name=\"Player\" animationatstart='1' autostart='1' displaybackcolor='black' showcontrols='1' showstatusbar='1' showtracker='1' showpositioncontrols='1' pluginspage='http://www.microsoft.com/korea/windows/windowsmedia/' src='"+paths+"' type='video/x-ms-asf-plugin' height='"+height+"' width='"+width+"'></embed><!--> <![endif]--></object>";

}

}


function strop(){

document.Player222.Stop();
}


function MakeFlashMovString2(width,height,wmode,paths,auto)
{
return "<object id=\"Player222\" name=\"Player222\" width='"+width+"' height='"+height+"' style=\"z-index:1\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"><param name=\"filename\" value='"+paths+"' /><param name=\"animationatstart\" value='1' /><param name=\"autostart\" value='"+auto+"' /><param name=\"balance\" value='0' /><param name=\"currentmarker\" value='0' /><param name=\"currentPosition\" value='0' /><param name=\"displaymode\" value='4' /><param name=\"enablecontextmenu\" value='0' /><param name=\"enabled\" value='1' /><param name=\"fullscreen\" value='0' /><param name=\"invokeurls\" value='1' /><param name=\"PlayCount\" value='1' /><param name=\"rate\" value='1' /><param name=\"showcontrols\" value='false' /><param name=\"showstatusbar\" value='false' /><param name=\"stretchtofit\" value='1' /><param name=\"transparentatstart\" value='1' /><param name=\"uimode\" value='FULL' /><param name=\"displaybackcolor\" value='0' /><!--[if !IE]> <--><embed id=\"Player222\" name=\"Player222\" animationatstart='1' autostart='1' displaybackcolor='black' showcontrols='false' showstatusbar='false' showtracker='1' showpositioncontrols='1' pluginspage='http://www.microsoft.com/korea/windows/windowsmedia/' src='"+paths+"' type='video/x-ms-asf-plugin' height='"+height+"' width='"+width+"'></embed><!--> <![endif]--></object>";
}



function DocumentMovie(src)
{
	
	document.write(src);
}



 function view_mov(id) {
	 

	if (document.all[id].style.display == "") {
		document.all[id].style.display = "none";
		strop()

	}
 }		


function open_mov()
{
window.open("/include/mov2.asp","fish","top=0,left=0,scrollbars=no,width=553,height=383");
}




function fishgo()
{
	window.open("/event/fish/fish.asp?Mode=Check","fish","top=0,left=0,scrollbars=yes,width=540,height=400");
}
function fivepassgo()
{
	window.open("/event/five/five.asp?Mode=Check","fish","top=0,left=0,scrollbars=yes,width=540,height=400");
}
function event_photogo()
{
	window.open("/event/photo/pt.asp?Mode=Check","fish","top=0,left=0,scrollbars=yes,width=540,height=400");
}
function songgo()
{
	window.open("/event/song/song.asp?Mode=Check","fish","top=0,left=0,scrollbars=yes,width=643,height=500");
}

function ideago()
{
	window.open("/event/idea/idea.asp?Mode=Check","idea","top=0,left=0,scrollbars=yes,width=650,height=500");
}

function postergo()
{
	window.open("/event/poster/pt.asp?Mode=Check","poster","top=0,left=0,scrollbars=yes,width=650,height=500");
}

function wish()
{
	window.open("/event/wish/wish.asp?Mode=Check","wish","top=0,left=0,scrollbars=yes,width=650,height=500");
}
function let()
{
	window.open("/event/let/let.asp?Mode=Check","wish","top=0,left=0,scrollbars=yes,width=650,height=500");
}
function pic()
{
	window.open("/event/pic/pic.asp?Mode=Check","wish","top=0,left=0,scrollbars=yes,width=650,height=500");
}
function entry_go()
{
	opener.document.location="/entry/entry1_1.asp?Mode=Check&amp;Key=&amp;KeyWord=&amp;Page=1";
}
function photo_go55()
{
	opener.document.location="/cyber/cyber1_5.asp?Mode=View&Key=&KeyWord=&Page=1&Num=240";
}
function photo_go66()
{
	window.open("/popup/popup0331.asp","photo_go66","top=0,left=0,scrollbars=no,width=700,height=620");
}
function pagegu1ide01()
{
	opener.document.location="/guide/guide1_1.asp#0001";
}
function pagegu1ide02()
{
	opener.document.location="/guide/guide1_1.asp#0003";
}
function pagegu1ide03()
{
	opener.document.location="/guide/guide1_1.asp#0023";
}
function pagegu1ide04()
{
	opener.document.location="/guide/guide1_1.asp#0024";
}
