﻿<!--
  // 로그인
	function goLogin(){
		document.logforz.action="http://www.joinsland.com/Fn_Common/login/login_Form.asp";
		document.logforz.submit();
	}
  // 로그아웃
	function goLogout(){
		document.logforz.action="http://www.joinsland.com/Fn_Common/login/login_off.asp";
		document.logforz.submit();
	}
	// 비밀번호 변경
	function gopasschg(){
		alert("비밀번호를 변경하여 주세요!!\n보안을 위해 조인스랜드 임직원 비밀번호를\n한 달 간격으로 변경합니다. (문의:인터넷팀 한경담)");
		document.logforz.action="http://www.joinsland.com/Member/My/memberInfo/MY_ModifyPwd.asp";
		document.logforz.submit();
	}	
	// 엔터키 체크
	function top_ent_chk(){
		var keyCode = event.keyCode

		if(keyCode == 13){
			goResearch('k');
		}
	}
  // 통합검색
	function goResearch(val) {
		var fo = document.seek;
		tarUrl = "http://search.joinsland.com/";

		if (fo.query.value == "" ) {
			alert('검색어를 입력하세요');
			fo.query.focus();
			return false;
		}

		document.seek.method="get"
		document.seek.action=tarUrl;
		return true;
	}

	var is_first = 0
	function del_keyword(){
		if (is_first == 0 ){
			document.seek.query.value = ""
			is_first = 1
		}

	}
	// 더보기(메뉴보기)
	function OnDisplayTopMore(){
	  var obj = document.getElementById("div_topmore");
	  if (obj.style.display == "none"){
	  	obj.style.display = "block";
	  }else{
	  	obj.style.display = "none";
	  }
  }
  
  function OnCommunity(){
  	var obj = document.getElementById("div_topcommunity");
  	if (obj.style.display == "none"){
  		obj.style.display = "block";
  	}else{
  		obj.style.display = "none";
  	}
  }

  //====popup
	function openEduWin(theURL,winName,features) { //v2.0
		var eduWin = window.open(theURL,winName,features);
		eduWin.focus();
	}
	//기존 팝업
	function MM_openBrWindow(theURL,winName,features) { //v2.0
		var popWin = window.open(theURL,winName,features);
		popWin.focus();
	}
	
	function	loadFlash(url, width, height) {
	  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"' +
	  	'	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' +
	  	'	width="' + width + '" height="' + height + '">');
	  document.write('<param	name = "wmode"	value = "transparent"	/>');
	  document.write('<param	name = "movie"	value = "' + url + '"	/>');
	  document.write('<param name="quality"	value = "best"	/>');
	  document.write('<param name="allowScriptAccess" value="always" />');
	  document.write('<embed src = "' + url + '"' +
	  	'	quality = "best"' +
	  	'	pluginspage = "http://www.macromedia.com/go/getflashplayer"' +
	  	'	type = "application/x-shockwave-flash"' +
	  	'	width = "' + width + '" height="' + height +'"></embed>');
	  document.write('</object>');
  }
  
  RR=function(className) {
    document.write("<div id='RRPLayer_"+ className +"'><div id='RRLayer_"+ className +"' style='padding-left:0px;'></div></div>");
    this.item = [];
    this.width = this.height = this.speed = this.pixel = this.interval = this.size = this.moveCount = this.X = this.Y = 0;
    this.pLayer = document.getElementById("RRPLayer_"+ className);
    this.layer = document.getElementById("RRLayer_"+ className);
    this.align = "left";
    this.intervalId = null;
    this.className = className;
    this.isPause = false;
    this.isMove = false;
    this.movPixel = 0;
    this.direction = "Y"            //롤링방향(기본 Y축)
  }
  RR.prototype.init = function() {
    with (this.pLayer.style) {
        width = this.width+"px";
        height = this.height+"px";
        overflow = "hidden";
        position = "relative";
    }
    with (this.layer.style) {
        if(this.direction=="Y"){
            width = this.width+"px";
            height = this.size*(this.item.length+1)+"px";
           }else{
            height = this.height+"px";
            width = this.size*(this.item.length+1)+"px";            
        }
        top = 0;
        left = 0;
        position = "relative";
    }
    if(this.direction=="Y"){
        for (var i=0; i<parseInt(this.height / this.size, 10)+1; i++){
            this.item[this.item.length] = this.item[i];
        }
    }else{
        for (var i=0; i<parseInt(this.width / this.size, 10)+1; i++){
            this.item[this.item.length] = this.item[i];
        }
    }        
        this.X = this.Y = 0;

    var html = "<div onmouseover='"+this.className+".pause()' onmouseout='"+this.className+".unpause()'>";

        html += "<table width='"+ this.layer.style.width +"' cellspacing='0' cellpadding='0' border='0'>";
        if(this.direction=="Y"){
            for (var i in this.item){
                html += "<tr><td height='"+this.size+"' style='overflow:hidden' align='"+this.align+"' valign='top'>"+this.item[i]+"</td></tr>";
            }
        }else{
            html += "<tr>";
            for (var i in this.item){
                html += "<td height='"+this.size+"' style='overflow:hidden' align='"+this.align+"' valign='top'>"+this.item[i]+"</td>";
           }
            html +="</tr>";
        }            
        html += "</table>";

    html += "</div>";
    this.layer.innerHTML = html;
    setTimeout(this.className+".start()",this.interval);
  }
  RR.prototype.start = function() {
  	if(this.isMove==false) {
  	  this.isMove = true;
  	  clearInterval(this.intervalId);
      this.intervalId = setInterval(this.className+".move()", this.speed);
    }
  }
  
  RR.prototype.nextstart = function() {
  	if(this.isMove==false) {
  		this.isMove = true;
  		clearInterval(this.intervalId);
      this.intervalId = setInterval(this.className+".move()", this.speed);
    }
  }
  
  RR.prototype.prevstart = function() {
  	if(this.isMove==false) {
  		this.isMove = true;
  		clearInterval(this.intervalId);
      this.intervalId = setInterval(this.className+".revmove()", this.speed);
    }
  }
  
  RR.prototype.move = function() {
    if (this.isPause) return;
    
    this.movPixel -= this.pixel;
    if (this.direction=="Y"){
        this.Y -= this.pixel;
        if (Math.abs(this.Y)%this.size==0) { 
        	this.stop();
        	this.isMove = false;
        }
        this.layer.style.top = this.Y;
    }else{
        this.X -= this.pixel;
        if (Math.abs(this.X)%this.size==0) {
        	this.stop();
        	this.isMove = false;
        }
        this.layer.style.left = this.X;
    }
  }
  RR.prototype.revmove = function() {
    if (this.isPause) return;
    
    this.movPixel += this.pixel;
    if (this.direction=="Y"){
        this.Y += this.pixel;
        if (Math.abs(this.Y)%this.size==0) { 
        	this.revstop();
        	this.isMove = false;
        }
        this.layer.style.top = this.Y;
    }else{
        this.X += this.pixel;
        if (Math.abs(this.X)%this.size==0) { 
        	this.revstop();
        	this.isMove = false;
        }
        this.layer.style.left = this.X;
    }
  }
  RR.prototype.stop = function() {
    clearInterval(this.intervalId);
    if(this.direction=="Y"){
        if (Math.abs(this.Y) >= parseInt(this.layer.style.height,10)-this.size) this.Y = this.layer.style.top = 0;
    }else{
        if (Math.abs(this.X) >= parseInt(this.layer.style.width,10)-this.size) this.X = this.layer.style.left = 0;
    }        
    setTimeout(this.className+".start()", this.interval);
  }
  
  RR.prototype.revstop = function() {
    clearInterval(this.intervalId);
    if (this.Y > 0 &&  this.X > 0 && Math.abs(this.movPixel) > 0) {
    if(this.direction=="Y"){
        if (Math.abs(this.Y) <= parseInt(this.layer.style.height,10)+this.size) this.Y = this.layer.style.top = 0;
    }else{
        if (Math.abs(this.X) <= parseInt(this.layer.style.width,10)+this.size) this.X = this.layer.style.left = 0;
    }
    setTimeout(this.className+".revstart()", this.interval); }
  }

  RR.prototype.pause = function() {this.isPause = true;}
  RR.prototype.unpause = function() {this.isPause = false;}
  
  theObjects = document.getElementsByTagName("object"); 
  for (var i = 0; i < theObjects.length; i++) { 
    theObjects[i].outerHTML = theObjects[i].outerHTML; 
  }
//-->