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.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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// IS
function chkIsKind(key, value) {
    showHide('selectOrder');
    xGetElementById('search_target'+key).checked = true;
    xInnerHtml('search_target_label', value);
}

// Hide And Show Toggle
var cc=0
function hideShow(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="none";
    } else {
        cc=0
        document.getElementById(id).style.display="block";
    }
}

// Show And Hide Toggle
var cc=0
function showHide(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="block";
    } else {
        cc=0
        document.getElementById(id).style.display="none";
    }
}


function _ieActivex(id)
{
	var _object=id.innerHTML;
	_object = _object.replace("<!--","");
	_object = _object.replace("-->","");
	document.write(_object); id.id="";
}

function viewFlash(vWidth, vHeight, vName, vWmode)
{
	if(vWmode == '') vWmode = 'window';
	
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
	
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', vWidth,
			'height', vHeight,
			'src', vName,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', vWmode,
			'devicefont', 'false',
			'id', vName,
			'bgcolor', '#ffffff',
			'name', 'Untitled-1',
			'menu', 'false',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', vName,
			'salign', ''
			); //end AC code
	}	
}

// 예결산공고 스크립트
var old='';
function slideMenu(name){
	submenu=eval("slide_menu"+name+".style");
	if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}


		submenu.display='block';
		old=submenu;
	}

}

function chman() 
{
	 // alert('총장과의 열린대화는 오픈예정입니다.');
  msgWindow=window.open("http://hawk.dsu.ac.kr/president/main.htm","chmanwin","statusbar=no,scrollbars=yes,status=no,resizable=yes,width=818,height=618");
}

function janghak() 
{

  msgWindow=window.open("http://www.dsu.ac.kr/ipage/TIS/janghak/janghakInfo.html?the_app=IPSIHOME","jang","statusbar=no,scrollbars=yes,status=no,resizable=yes,width=1024,height=768");
}

function setCookie( name, value, expiredays )
{
  var today = new Date();
  today.setDate( today.getDate() + expiredays );
  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
}

//
function getCookie(strName)
{
  var strArg = new String(strName + "=");
  var nArgLen, nCookieLen, nEnd;
  var i = 0, j;

  nArgLen    = strArg.length;
  nCookieLen = document.cookie.length;

  if(nCookieLen > 0) 
  {
    while(i < nCookieLen) 
    {
      j = i + nArgLen;

      if(document.cookie.substring(i, j) == strArg) 
      {
        nEnd = document.cookie.indexOf (";", j);
        if(nEnd == -1) nEnd = document.cookie.length;
        return unescape(document.cookie.substring(j, nEnd));
      }

      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
    }
  }
  return("");
}

function open_win(url, winname, width, height, cookiename, xpos, ypos, scroll_y)
{
  if(scroll_y == 'Y') scrolls = 'yes';
  else scrolls = 'no';
  
  if(cookiename == null)
  {
    contents_window=open("",winname,"toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars="+scrolls+",resizable=no,width="+width+",height="+height+",left="+xpos+",top="+ypos);
    contents_window.location.href=url;
    contents_window.focus();  
  }
  else
  {
    if ( getCookie(cookiename) != "1" )
    {
      contents_window=open("",winname,"toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars="+scrolls+",resizable=no,width="+width+",height="+height+",left="+xpos+",top="+ypos);
      contents_window.location.href=url;
      contents_window.focus();  
    }
  }
}

function open_staff()
{
  contents_window=open("","staff","status=no,width=975,height=700,left=10,top=5");
  contents_window.location.href="http://hawk.dsu.ac.kr/gyosu08/login_gyosu.html";
  contents_window.focus(); 
}
function open_student()
{
  contents_window=open("","student","status=no,width=975,height=700,left=10,top=5");
  contents_window.location.href="http://hawk.dsu.ac.kr/gyosu08/login_student.html";
  contents_window.focus(); 
}

function open_yo()
{
  contents_window=open("","yo","toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=810,height=610");
  contents_window.location.href="http://hawk.dsu.ac.kr/dsu/gy_smaint_login";
  contents_window.focus(); 
}

function showmovie(){
	dsuvideo.style.visibility='visible';
}

function hidemovie(){
	dsuvideo.style.visibility='hidden';
}

function showlink(viewarg){
	if(viewarg == 'san')
	{
		sanlink.style.visibility='visible';	
		daelink.style.visibility='hidden';
		bulink.style.visibility='hidden';
	}
	else if(viewarg == 'bu')
	{
		sanlink.style.visibility='hidden';	
		daelink.style.visibility='hidden';
		bulink.style.visibility='visible';
	}
	else if(viewarg == 'dae')
	{
		sanlink.style.visibility='hidden';	
		daelink.style.visibility='visible';
		bulink.style.visibility='hidden';
	}
	else
	{
		sanlink.style.visibility='hidden';	
		daelink.style.visibility='hidden';
		bulink.style.visibility='hidden';		
	}

}



function _ieActivex(id)
{
	var _object = id.innerHTML;
    _object = _object.replace("<!--","");
    _object = _object.replace("-->","");
	document.write(_object);id.id="";
}

function check_hsrh(form, type)
{
	if(type == "X")
	{
		alert("검색대상을 선택해 주세요.");
	}
	else if(type == "H")
	{
		document.isSearch.is_keyword.value = form.p.value;
		document.isSearch.submit();
	}
	else if(type == "S")
	{
		contents_window=open("","staff_search","toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=417,height=410");
		form.action = "http://hawk.dsu.ac.kr/dshome/member/staff_srh_utf.jsp";
		form.the_name.value = form.p.value;
		form.the_type.value = "name";
		form.target="staff_search";
		form.submit();
		contents_window.focus(); 				
	}	
}

function top()
{
  pos = (((document.documentElement.scrollTop+100)-quick.style.posTop)/3)*0.3;
  quick.style.posTop = quick.style.posTop+pos;

  setTimeout ("top()", 10);
}

function jiwon()
{
   alert("2.22(금)에 서비스 합니다.\n\n문의 : 입학관리팀 080-330-3033");
}

function junbi()
{
   alert("준비중입니다. \n\n문의 : 입학관리팀 080-330-3033");
}

function move_url()
{
	opener.location = "/dshome/apps/movepage.jsp?page=04030201";
	window.close();
}
function move_url2()
{
	opener.location = "/dshome/apps/movepage.jsp?page=03030000";
	window.close();
}
function move_url3()
{
	opener.location = "/dshome/apps/movepage.jsp?page=03010109";
	window.close();
}
function move_url4()
{
	opener.location = "/dshome/apps/movepage.jsp?page=03010412";
	window.close();
}
function move_url5()
{
	opener.location = "/dshome/apps/movepage.jsp?page=03010413";
	window.close();
}
function move_url6()
{
	opener.location = "/dshome/apps/movepage.jsp?page=03010515";
	window.close();
}
function open_student()
{
  contents_window=open("","student","toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=600");
  contents_window.location.href="/gyosu/student_first_login.html";
  contents_window.focus(); 
} 
function open_staff()
{
  contents_window=open("","staff","toolbar=no,location=no,diretories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=600");
  contents_window.location.href="/dsu/gy_login_jb";
  contents_window.focus(); 
}
function close_win(name) 
{
  if ( document.checkform.popup.checked ) 
  {
    setCookie( name, "1" ,1 );
  }
  window.close();
}

function setCookie( name, value, expiredays )
{
  var today = new Date();
  today.setDate( today.getDate() + expiredays );
  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
}

