<!--
 var host = location.host.toLowerCase(); 
 var currentAddress = location.href; 
 if (host.indexOf("www") == -1) 
 { 
  currentAddress = currentAddress.replace("//","//www."); 
  location.href = currentAddress; 
 } 

var dg				= document.getElementById;
var da				= document.all;

var old_menu2 = '';

function menuclick2( submenu ) {
	if( old_menu2 != submenu ) {
		if( old_menu2 !='' ) {
			dg(old_menu2).style.display = 'none';
		}
		dg(submenu).style.display = 'block';
		old_menu2 = submenu;
	} else {
		dg(submenu).style.display = 'none';
		old_menu2 = '';
	}
}

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 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_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.0
  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 && document.getElementById) x=document.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 flash(s,w,h,type,wm,id,autostart) 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspage = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 


src = s; 
width = w; 
height = h; 

var typ = type ? type : "f"; 

if(typ=="f")//÷ 
{ 
clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
embedType = "application/x-shockwave-flash"; 
} else if(typ=="m") {//̵ 
clsid="22D6F312-B0F6-11D0-94AB-0080C74C7E95"; 
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"; 
embedType="application/x-oleobject"; 
parameter += "<param name='FileName' value='"+ src + "'>\n"; 
var auto = autostart ? "1" : "0"; 
parameter += "<param name='AutoStart' value='"+auto+"'>\n";  
} 
parameter += "<param name='movie' value='"+ src + "'>\n";  
parameter += "<param name='quality' value='high'>\n"; 
if(wm) 
{ 
parameter += "<param name='wmode' value='transparent'>\n"; 
} 
if ( clsid ) 
{ 
obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
} 
embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n"; 
if ( obj ) 
{ 
embed += "</object>\n"; 
} 
html = obj + parameter + embed; 
document.write( html ); 
} 


var basic_img = ""; 
function lock_menu(Menu) { 
if (Menu) { 
var target_menu = eval("document.all."+Menu); 
target_menu.src = "image/on"+Menu+".gif"; 
basic_img = Menu; 
} 
}

function lock_menu1(url,Menu) { 
if (Menu) { 
var target_menu = eval("document.all."+Menu); 
target_menu.src = url+"image/on"+Menu+".gif"; 
basic_img = Menu; 
} 
}


function inact(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + '.src') 
     } 

function act(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + 'a.src') 
     } 
 

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; }
}
var save_layer = null;
function layer_view(link_id, menu_id, opt, x, y)
{
    var link = document.getElementById(link_id);
    var menu = document.getElementById(menu_id);

    //for (i in link) { document.write(i + '<br/>'); } return;

    if (save_layer != null)
    {
        save_layer.style.display = "none";
        selectBoxVisible();
    }

    if (link_id == '')
        return;

    if (opt == 'hide')
    {
        menu.style.display = 'none';
        selectBoxVisible();
    }
    else
    {
        x = parseInt(x);
        y = parseInt(y);
        //menu.style.left = get_left_pos(link) + x;
        menu.style.top  = get_top_pos(link) + link.offsetHeight + y;
        menu.style.display = 'block';
    }

    save_layer = menu;
}

 // 브라우저에서 오브젝트의 왼쪽 좌표
    function get_left_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var left = obj.offsetLeft + document.body.clientLeft;
        var left = obj.offsetLeft;

        while((parentObj=clientObj.offsetParent) != null)
        {
            left = left + parentObj.offsetLeft;
            clientObj = parentObj;
        }

        return left;
    }

    // 브라우저에서 오브젝트의 상단 좌표
    function get_top_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var top = obj.offsetTop + document.body.clientTop;
        var top = obj.offsetTop;

        while((parentObj=clientObj.offsetParent) != null)
        {
            top = top + parentObj.offsetTop;
            clientObj = parentObj;
        }

        return (top-10);
    }

	function selectBoxHidden(layer_id) 
    {
        //var ly = eval(layer_id);
        var ly = document.getElementById(layer_id);

        // 레이어 좌표
        var ly_left   = ly.offsetLeft;
        var ly_top    = ly.offsetTop;
        var ly_right  = ly.offsetLeft + ly.offsetWidth;
        var ly_bottom = ly.offsetTop + ly.offsetHeight;

        // 셀렉트박스의 좌표
        var el;

        for (i=0; i<document.forms.length; i++) {
            for (k=0; k<document.forms[i].length; k++) {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one") {
                    var el_left = el_top = 0;
                    var obj = el;
                    if (obj.offsetParent) {
                        while (obj.offsetParent) {
                            el_left += obj.offsetLeft;
                            el_top  += obj.offsetTop;
                            obj = obj.offsetParent;
                        }
                    }
                    el_left   += el.clientLeft;
                    el_top    += el.clientTop;
                    el_right  = el_left + el.clientWidth;
                    el_bottom = el_top + el.clientHeight;

                    // 좌표를 따져 레이어가 셀렉트 박스를 침범했으면 셀렉트 박스를 hidden 시킴
                    if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) || 
                         (el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
                         (el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
                         (el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) ||
                         (el_top <= ly_bottom && el_left <= ly_left && el_right >= ly_right)
                        )
                        el.style.visibility = 'hidden';
                }
            }
        }
    }

    // 감추어진 셀렉트 박스를 모두 보이게 함
    function selectBoxVisible() 
    {
        for (i=0; i<document.forms.length; i++) 
        {
            for (k=0; k<document.forms[i].length; k++) 
            {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one" && el.style.visibility == 'hidden')
                    el.style.visibility = 'visible';
            }
        }
    }


/*
' ------------------------------------------------------------------
' Function    : fc_chk_byte(aro_name)
' Description : 입력한 글자수를 체크
' Argument    : Object Name(글자수를 제한할 컨트롤)
' Return      : 
' ------------------------------------------------------------------
*/
function fc_chk_byte(aro_name,ari_max)
{

   var ls_str     = aro_name.value; // 이벤트가 일어난 컨트롤의 value 값
   var li_str_len = ls_str.length;  // 전체길이

   // 변수초기화
   var li_max      = ari_max; // 제한할 글자수 크기
   var i           = 0;  // for문에 사용
   var li_byte     = 0;  // 한글일경우는 2 그밗에는 1을 더함
   var li_len      = 0;  // substring하기 위해서 사용
   var ls_one_char = ""; // 한글자씩 검사한다
   var ls_str2     = ""; // 글자수를 초과하면 제한할수 글자전까지만 보여준다.

   for(i=0; i< li_str_len; i++)
   {
      // 한글자추출
      ls_one_char = ls_str.charAt(i);

      // 한글이면 2를 더한다.
      if (escape(ls_one_char).length > 4)
      {
         li_byte += 2;
      }
      // 그밗의 경우는 1을 더한다.
      else
      {
         li_byte++;
      }

      // 전체 크기가 li_max를 넘지않으면
      if(li_byte <= li_max)
      {
         li_len = i + 1;
      }
   }
   
   // 전체길이를 초과하면
   if(li_byte > li_max)
   {
      alert( li_max + " words limit ");
      ls_str2 = ls_str.substr(0, li_len);
      aro_name.value = ls_str2;
      
   }
   aro_name.focus();   
}


//인풋박스 탭이동
	function focus_next(first,len,end){
		if (event.keyCode !=8){
		  var str = first.value.length;
		  if(str == len)
			  end.focus();
		}
	}

//셀렉트박스 탭이동
	function focus_next1(end){
			  end.focus();
	}
	
//텍스트박스 숫자키만 입력
function NumObj(sip)
{
 if (event.keyCode >= 48 && event.keyCode <= 57) { //숫자키만 입력
  return true;
 } else {
	//alert("");
  event.returnValue = false;
 }
 }

<!--

function pro_01(){   //

	window.open('/postercontest/image/Korean_guideline.pdf');

}

function pro_02(){   //

	window.open('/postercontest/image/thai_guideline.pdf');

}

function pro_03(){   //

	window.open('/postercontest/image/English_guideline.pdf');

}

function pro_04(){   //

	window.open('/postercontest/image/vietnames_guideline.pdf');

}

function pro_05(){   //

	window.open('/postercontest/image/Spanish_guideline.pdf');

}

function pro_06(){   //

	window.open('/postercontest/image/chinese_guideline.pdf');

}

function pro_07(){   //

	window.open('/postercontest/image/Indo_guideline.pdf');

}

-->


