/******************************************************************************************
 * ̾ ̿  ٲٱ
 */
function lat_over(idx){
    var link,i;
	var stx;
	
	link =new Array();
	
	link[1] =new Array();
	link[2] =new Array();
	link[3] =new Array();
	link[4] =new Array();

	link[1][0]="/home/image/main_center/news_bu.gif";
	link[1][1]="/home/image/main_center/news_bu1.gif";
	link[2][0]="/home/image/main_center/notice_bu.gif";
	link[2][1]="/home/image/main_center/notice_bu1.gif";
	link[3][0]="/home/image/main_center/event_bu.gif";
	link[3][1]="/home/image/main_center/event_bu1.gif";
	link[4][0]="/home/image/main_center/it_bu.gif";
	link[4][1]="/home/image/main_center/it_bu1.gif";

	for(i=1;i<5;i++){
	    stx = "Image"+i;
		if(idx == i) document.getElementById(stx).src = link[i][1];
		else document.getElementById(stx).src = link[i][0];
		
	}

}

function viewlayer(idx){
    var i=0;
	var stx;
	
	for(i=1;i<5;i++){
	    stx = "lat_" + i;
	    if(idx==i) document.getElementById(stx).style.display = 'block';
		else document.getElementById(stx).style.display = 'none';
	}

	lat_over(idx);
}



/*****************************************************************************************
 * ѿ ϱ
 */

function rollover( link,imgId ){
    document.getElementById(imgId).src = link;
}


/*****************************************************************************************
 * ޴
 */
function namosw_goto_byselect(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}


/*****************************************************************************************
 * â 
 */
function openNewWindow(window,wvalue,hvalue,scn) {
    open (window,"NewWindow","left=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scn+", resizable=yes, width="+wvalue+", height="+hvalue);
}
/*̵ ߺüũ*/
function id_check(){
	var f = document.memberInsert.user_id.value;
	if(!f) {
		alert("̵ ԷϿ ּ");
	}
	else{
        openNewWindow("id_check.php?id="+f,"300","230","no");
	}
}
/* ȣ ã*/
function zipcode(){
    openNewWindow("/home/member/zipcode.php","400","300","yes");
}
function open_window(name, url, left, top,width,height)
{
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no');
}

function lec_linux(name){
 var mywin = window.open(name, "win", "left=0,top=0,width=930,height=602,toolbar='no',menubar='no',status='no',scrollbars='no',resizable='no'");
 mywin.focus();
}

function lec_linux_big(name){
 var mywin = window.open(name, "win", "left=0,top=0,width=1006,height=636,toolbar='no',menubar='no',status='no',scrollbars='no',resizable='no'");
 mywin.focus();
}

function lec_linux_book(name){
 var mywin = window.open('/lecture/lec_linux_01/lec-data/main.html?code='+name, "win", "left=0,top=0,width=800,height=610,toolbar='no',menubar='no',status='no',scrollbars='no',resizable='no'");
 mywin.focus();
}
function lec_linux_new(name){
 var mywin = window.open('/lecture/lec_linux_01/main1.php?flag='+name, "win", "left=0,top=0,width=845,height=630,toolbar='no',menubar='no',status='no',scrollbars='no',resizable='no'");
 mywin.focus();
}

function lec_security_new(name){
 var mywin = window.open('/lecture/lec_security_01/main1.php?flag='+name, "win", 'fullscreen');
 mywin.focus();
}

// ġ  activex ȣ ĺ
function __ws__(id){
document.write(id.text);id.id='';
}

//----------------------
//   ̺Ʈ exitCo Լ ȣ
// onunload ̺Ʈ  ݱ, ΰħ, ٸ ̵  ߻)
//----------------------
/*
  var req;

  var which;

  function retrieveURL(url) {

    if (url != "") {

      if (window.XMLHttpRequest) { // Non-IE browsers

        req = new XMLHttpRequest();

        req.onreadystatechange = processStateChange;

        try {

          req.open("GET", url, true);

        } catch (e) {

          alert(e);

        }

        req.send(null);

      } else if (window.ActiveXObject) { // IE

        req = new ActiveXObject("Microsoft.XMLHTTP");

        if (req) {

          req.onreadystatechange = processStateChange;

          req.open("GET", url, true);

          req.send();

        }

      }

    }

  }

function processStateChange() {

    if (req.readyState == 4) { // Complete

      if (req.status == 200) { // OK response

	    //alert(req.responseText);

        //document.getElementById("spmember").innerHTML = req.responseText;

      } else {

        //alert("Problem: " + req.statusText);

      }

    }

  }

*/
//----------------------
//   ̺Ʈ exitCo Լ ȣ
// onunload ̺Ʈ  ݱ, ΰħ, ٸ ̵  ߻)
//----------------------
/**/
window.onunload = exitCo;

function exitCo(){
    //window.open('http://imsi.startstudy.co.kr/bbs/logout.php','win','left=2000,top=2000,width=1,height=1,statusbar=no,scrollbars=yes,toolbar=no,channelmode=no');
	//location.href='/member/login_check1.php';
	//retrieveURL('/member/login_check1.php');
    //alert(self.screenTop );
}
/**/
//----------------------
//   ̺Ʈ exitCo Լ ȣ
// onunload ̺Ʈ  ݱ, ΰħ, ٸ ̵  ߻)
//----------------------

//window.onbeforeunload = exitCo;
//window.onunload = exitCo;


