
// quickmenu 및 login popup sliding 처리를 위한 초기화
self.onError = null;
// currentX     = currentY = 0; 
// whichIt      = null; 

// quickmenu
lastScrollX  = 0; 
lastScrollY  = 0;

// login popup
lastX        = 0;
lastY        = 0;

/** browser 유형 */
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

/**
 * 지정된 이름으로 저장된 cookie value 반환 
 */
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 "";
}

/**
 * name 및 value를 이용하여 cookie 생성
 * expiredays는 현재 시간 기준으로 며칠동안 유지될 것인지 지정함(1 or 2, ,,,n).
 * -값을 지정한 경우, 해당 cookie value는 expire된다.
 * 
 * @params name : cookie name
 * @params value: cookie value
 * @params days : 일단위로 지정되는 cookie 종료일자
 *
 */
function setCookie( name, value, days ) {
	
	if( days ) {
		var date = new Date();
		date.setTime(date.getTime() +(days*24*60*60*1000));
		var expires = "; expires=" + date.toGMTString();
	} else {
		var expires = "";
	}
	
	document.cookie = name + "=" + escape( value ) + expires + "; path=/";
}

function deleteCookie(name) {
	if(getCookie(name)) { 
		setCookie(name,"",-1);   
	}  
}

/**
 * login layer를 hide시킴 
 */
function __ebslang_hideLoginPopup() {
	document.all["LoginPopup"].style.visibility = "hidden";
	
	document.loginForm.ret_url.value = "";
	document.loginForm.userid.value  = "";
	document.loginForm.passwd.value  = "";
	deleteCookie("__loginNeed");
} 

/**
 * login layer를 popup시킴
 */
function __ebslang_showLoginPopup() {

	var loginPosY = Math.round(document.body.clientHeight/2) - 189;
	var loginPosX = Math.round(document.body.clientWidth/2) - 294;
	
	if( loginPosX < 0 ) loginPosX = 100;
	if( loginPosY < 0 ) loginPosY = 100;
	
	document.all["LoginPopup"].style.left = loginPosX;
	document.all["LoginPopup"].style.top  = loginPosY;

	document.all["LoginPopup"].style.visibility = "visible";
	
	
	deleteCookie("__loginNeed");
	
	if(document.loginForm.ret_url.value == null || document.loginForm.ret_url.value == "") {
		document.loginForm.ret_url.value = document.location;
	}
	// document.loginForm.userid.value = "";
	document.loginForm.passwd.value = "";
	document.loginForm.userid.focus();
	
	if ( NS || IE ) action = window.setInterval("slideLoginPopup()",50);

} 

/**
 * login popup을 출력시킬 지 여부를 확인함.
 * 모든 코드의 마지막 부분에 한번씩 실행시켜야 한다.
 * "__loginNeed" 변수는 ConstVarDefine.class에 정의된 상수이며,
 * 해당 java source에서도 사용하는 값이므로, 임의로 변경하지 않도록 한다.
 */
function checkLoginLayerPopup() {
	if( getCookie("__loginNeed") == "Y" ) {
		__ebslang_showLoginPopup();
   	} else {
   		__ebslang_hideLoginPopup();
   	}
}

/**
 * login layer를 화면 이동에 따라 이동시킴
 */
 
function slideLoginPopup() {
	var hOld = document.body.clientHeight;
	var hNew = document.body.clientLeft;
	
	if( hOld != hNew ) {
		height = hNew - hOld;
		hOld   = hNew;
	}  

	var xDiff = 0;
	var yDiff = 0;
	
	if ( IE )  { 
		yDiff = document.body.scrollTop; 
		xDiff = 0;
	}
	
	if ( NS ) { 
		yDiff = self.pageYOffset;
		xDiff = self.pageXOffset; 
	}

	if ( yDiff != lastY ) {
		percent = .1 * (yDiff - lastY);
		
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all["LoginPopup"].style.pixelTop += percent;
		if ( NS )   document.all["LoginPopup"].top += percent; 
		
		lastY = lastY + percent;
	}

	if ( xDiff != lastX ) {
		percent = .1 * (xDiff - lastX);
	
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all["LoginPopup"].style.pixelLeft += percent;
		if ( NS )   document.all["LoginPopup"].top += percent;

		lastY = lastY + percent;
	} 
}
 
/**
 * 지정된 URL로 이동하기 전에 로그인 여부를 확인 함.
 * 로그인되어 있지 않은 경우에는 login 창을 출력함.
 * parameter
 *    url       : 이동시킬 URL(ISO8859-1으로 인코딩하지 않도록 한다, 내부적으로 처리함)
 *    loginNeed : Y - 로그인이 필요한 페이지, N-로그인이 필요하지 않음
 */
function goURL(url, loginNeed) {  

	if( loginNeed == "Y" ) {
		// login이 필요한 페이지 이면서 로그인되어있지 않은 경우
		document.loginForm.ret_url.value = url;
		
		__ebslang_showLoginPopup();
	} else {
		// login이 필요하지 않거나, 로그인 되어있는 경우
		location.href=url;
	}
}
  
// frame이나 iframe 내에서 로그인해야 할 경우 호출함. 
function goURLInFrame(url, loginNeed) {
	parent.document.loginForm.ret_url.value = url;
	parent.__ebslang_showLoginPopup();
}
 
/**
 * login시 회원이 입력한 정보를 확인한 후, 서버로 전송함
 */
function validateLogin() {
 
	var f = document.loginForm;

	deleteCookie("__loginNeed");
	
	if (f.userid.value.search(/\S/) < 0 || f.userid.value == '아이디') {
		alert("아이디를 입력하세요");
		f.userid.focus();
		return false;
	}

	if (f.passwd.style.display == 'none') {
		//f.passwd_1.style.display = 'none';
		f.passwd.style.display = 'block';

		alert("비밀번호를 입력하세요");
		f.passwd.focus();
		return false;
	}

	if (f.passwd.value.search(/\S/) < 0) {
		alert("비밀번호를 입력하세요");
		f.passwd.focus();
		return false;
	}

	if( !f.ret_url.value ) {
		f.ret_url.value = getCookie("ret_url");
	}

	deleteCookie("ret_url");

	// escape로 감싸지 않으면 SSO모드에서 & 이후의 파라미터가 짤림(20081021 추가)
	// escape(unescape()): Local모드에서 로그인 실패시 unescape 하지 않은 상태에서 escape만 계속 진행될 경우 URL 깨짐
	if (f.ret_url.value){
	    f.ret_url.value = escape(unescape(f.ret_url.value));
	}
	
	/*
	if( f.ret_url && !f.ret_url.value ) {
		f.ret_url.value = escape(location.pathname + "?" +  location.search.substring(1));
	} */


	// f.action = "https://www.ebslang.co.kr/ebs/fhz.AilSSOLoginSubmit.laf";
	f.action = "/ebs/fhz.AilSSOLoginSubmit.laf";
	f.submit();
}


function attendHistView(value) {

	// stepAttendHistId | userId | tmplTypeCd | stepId | attendFlag 
	if (value != '') {

		var arr = value.split("|");
		
		if( "ST2008GRADE0101" == arr[3] ) {

			// 토목달의 경우 학사관리 페이지로 이동시킨다.
			location.href="/ebs/flz.AtcAttendHistView.laf?step_id=ST2008GRADE0101&attendant_id=" + arr[1];
			
		} else {
				
	        if(arr[4]=="O"){
	        	if(arr[2]!="L08L10"){
	        			
	        		cmiShow(arr[0], arr[1], arr[2]); //stepid(스텝수강이력ID)
	        	}else{
	        			
	        		openWriting2('/ebs/flz.AwsWritingIntro.laf?step_attend_hist_id='+arr[0]);
	        	}
	        } else {
	          courseShow(arr[3],arr[2]); //쿠폰 무료사용
	        } 
		}
	}
}

function openWriting2(url) {
	var width = 1024;
	var height = 680;
	var x = (screen.width - width) / 2 - 4;
	var y = (screen.height - height) / 2 - 16;

	var win = window.open(url, 'writing', 'left='+x+',top='+y+',width='+width+',height='+height+',scrollbars=no');
	if ( win ) win.focus();
}


function goFamilySite(o) {
	if (o.value != '') {
		//top.location.href = o.value;
    window.open(o.value, '_blank', 'fullscreen=no,resizable=yes,menubar=yes,status=yes,toolbar=yes,titlebar=yes,location=yes,scrollbar=yes');
	}
}

/**
 * 로그인을 위하여 입력한 ID/PW값을 삭제한다.
 * @deprecated
 */
function clear_logintext(type) {
	if (type == 'id') {
		if (document.all['userid'].value == '아이디')
			document.all['userid'].value = '';
	} else {
		document.all['passwd_1'].style.display = 'none';
		document.all['passwd'].style.display = 'block';
		document.all['passwd'].focus();
	}
}

/**
 * cookie에 저장된 회원 ID정보를 반환한다
 */
function getSavedId(){
	var cookieValue = document.cookie+';';
	index1 = cookieValue.indexOf('login_saved', 0);

	if(index1 != -1){
		cookieValue = cookieValue.substring(index1, cookieValue.length);
		var index2 = cookieValue.indexOf('=', 0) + 1;
		var index3 = cookieValue.indexOf(';', index2);
			
		var userId = unescape(cookieValue.substring(index2, index3));
			
		if(userId != ''){
			if (document.loginForm) {
				document.loginForm.userid.value = userId;
				document.loginForm.saveId.checked = true;
			}
		}
	}
}

var tmp1 = tmp2 = tmp3 = 0;

/**
 * quick menu 이동용 function
 */
function heartBeat() 
{
	tmp1 = document.body.clientHeight;

	tmp2 = document.body.clientHeight;
	
	if ( tmp1 != tmp2 ) {
		tmp3 =  tmp2 - tmp1; 
		tmp1 = tmp2;
		if ( tmp3 < 0 ) { }
	}

	if ( IE )  { 
		diffY = document.body.scrollTop; 
		diffX = 0;
	}
	
	if ( NS )  { 
		diffY = self.pageYOffset;
		diffX = self.pageXOffset; 
	}

	if ( diffY != lastScrollY ) {
		percent = .1 * (diffY - lastScrollY);
		
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all.Layer1.style.pixelTop += percent;
		if ( NS )   document.Layer1.top += percent; 
		
		lastScrollY = lastScrollY + percent;
	}

	if ( diffX != lastScrollX )  {
		percent = .1 * (diffX - lastScrollX);
	
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all.Layer1.style.pixelLeft += percent;
		if ( NS )   document.Layer1.top += percent;

		lastScrollY = lastScrollY + percent;
	} 
} 
//RD
/*
function showRDViewer()
{
	document.write('<object id=TeeChart ' +
	       'classid="clsid:FAB9B41C-87D6-474D-AB7E-F07D78F2422E" ' +
	       'codebase="http://eagle.ebslang.co.kr/ebs/RDServer/teechart7.cab#version=7,0,0,5" name=TeeChart width=0 height=0>');
	document.write('</object>');
	document.write('<object id=Rdviewer ' +
	       'classid="clsid:5A7B56B3-603D-4953-9909-1247D41967F8" ' +
	       'codebase="http://eagle.ebslang.co.kr/ebs/RDServer/rdviewer50u.cab#version=5,0,0,140" name=Rdviewer width=100% height=100%>');
	document.write('</object>');
}
*/

/**
 * 컨텐츠 영역 서브 타이틀 플래쉬를 출력한다
 */
function loadSubTitle(strSubTitle) {
	var NS4;
	var IE4;	
	var flashUrl;
	var fwidth;
	var fheight;
	var Wmode;
	
	
	if(navigator.appName.indexOf("Microsoft Internet Explorer") == 0) {
		IE4 = true;
		NS4 = false;
	} else {
		IE4 = false;
		NS4 = true;
	}

	flashUrl = "http://www.ebslang.co.kr/ebs/images/file/apy/renewal/flash/sub_title.swf?inTxt="+strSubTitle+"&txtColor=0xFFFFFF";
	fwidth = "450";
	fheight= "30";
	Wmode = "Y";
	
	var subTitleObject = "";
	if(IE4) {
		subTitleObject += "<div id='subTitlePos' style='position:absolute;' width='0' height='0'></div><div id='subTitleSwf' style='display:block;position:absolute;top:expression(eval(subTitlePos.offsetTop-14));left:expression(eval(subTitlePos.offsetLeft));width:100;height:30'>";
		subTitleObject += "<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='"+ fwidth +"' height='"+ fheight +"'>";
		subTitleObject += "<param name='movie' value='"+ flashUrl +"'>";
		subTitleObject += "<param name='quality' value='high'>";	
		if (Wmode == "Y")
		{
			subTitleObject += "<param name='wmode' value='transparent'>";
		}
	
		subTitleObject += "<embed src='"+ flashUrl +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ fwidth +"' height='"+ fheight +"'></embed>";
		subTitleObject += "</object></div>";
	} 
	
	document.write(subTitleObject);	
} 

/**
 * OBJECT EMBED TAG 출력한다
 */
function showFlash(url, width, height, wmode) {
	var flashObject = "";
	flashObject += "<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 +"'>";
	flashObject += "<param name='movie' value='"+ url +"'>";
	flashObject += "<param name='quality' value='high'>";
	if (wmode == "Y") {
		flashObject += "<param name='wmode' value='transparent'>";
	}
	flashObject += "<embed src='"+ url +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ width +"' height='"+ height +"'></embed>";
	flashObject += "</object>";

	document.write(flashObject);
}

/**
 * 슬라이드 형태의 TEXT를 출력한다
 */
function __textChange(displaymode) {
	this.name = "textChange";
	this.item = new Array();
	this.itemcount = 0;
	this.itemoffset = 0;
	this.item_i = new Array();
	this.item_icount = 0;
	this.item_ioffset = 0;
	this.currentspeed = 0;
	this.scrollspeed = 50;
	this.pausedelay = 1000;
	this.pausemouseover = false;
	this.stop = 0;
	this.height = 100;
	this.heightGap = 0;
	this.width = 100;
	this.height_i = 100;
	this.width_i = 100;
	this.stopHeight=0;
	this.count=0;
	this.flag=true;
	this.position="absolute";
	this.item_position="absolute";
	this.div_id = "";

	this.fontSize = "12px";
	this.letterSpacing="0px";
	this.wordSpacing="0px";
	
	this.add = function () {
		var text = arguments[0];
		this.item[this.itemcount] = text;
		this.itemcount = this.itemcount + 1;
	};

	this.addImage = function () {
		var text = arguments[0];
		this.item_i[this.item_icount] = text;
		this.item_icount = this.item_icount + 1;
	};

	this.start = function () {
		this.display();
		this.currentspeed = this.scrollspeed;
		obj = document.getElementById(this.name+'item0').style;
		obj.display='block';
		this.count++;
		setTimeout(this.name+'.scroll()',this.currentspeed);
	};

	this.ready = function () {
		now = new Date(); ran = now % this.item_icount;
		temp = this.item_i[ran]; 
		this.item_i[ran] = this.item_i[0]; 
		this.item_i[0] = temp;
		this.displayImage();
		obj_i = document.getElementById(this.name+'item_i0').style;
		obj_i.display='block';
	};

	this.display = function () {
		var divname;
		var html;
		// main page 출력 시, font size 조정을 위한 조정
		var subStyle = "";
		
		subStyle = ' style="font-size:' + this.fontSize + ';letter-spacing:'+this.letterSpacing + ';word-spacing:'  +this.wordSpacing + '"';
		
		divname = (this.div_id != '') ? this.div_id : this.name;
		html = '<div id="'+divname+'" style="height:'+this.height+';width:'+this.width+';position:'+this.position+';overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">';
		
		for(var i = 0; i < this.itemcount; i++) {
			html += '<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+';position:'+this.item_position+'; display:none; ">';
		
			if(displaymode=="table") 
				html += "<table width=200 cellpadding=0 cellspacing=0 border=0><tr><td "+subStyle+">"+this.item[i]+"</td></tr></table>";
			else 
				html += this.item[i];
			html += '</div>';
		}
		
		html += '</div>';
		if(this.div_id != ''){ document.getElementById(divname).innerHTML = html;}
		else{ document.write(html); }
	};

	this.displayImage = function () {
		document.write('<div id="'+this.name+'_i" style="left:0; height:'+this.height_i+';width:'+this.width_i+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
		for(var i = 0; i < this.item_icount; i++) {
		document.write('<div id="'+this.name+'item_i'+i+'"style="left:0px; width:'+this.width_i+'; display:none; ">');
		document.write(this.item_i[i]);
		document.write('</div>');
		}
		document.write('</div>');
	};

	this.scroll = function () {
		this.currentspeed = this.scrollspeed;
		if ( !this.stop ) {
			this.imageChange();
		}
		window.setTimeout(this.name+".scroll()",this.currentspeed);
	};

	this.imageChange = function () {
		for (k = 0; k < this.item_icount; k++) {
			obj_i = document.getElementById(this.name+'item_i'+k).style;
			if (this.count % this.item_icount == k) {
				obj_i.display = 'block';
			} else {
				obj_i.display = 'none';
			}
		}

		for (k = 0; k < this.itemcount; k++) {
			obj = document.getElementById(this.name+'item'+k).style;
			if (this.count % this.itemcount == k) {
				obj.display = 'block';
			} else {
				obj.display = 'none';
			}
		}
		
		this.count++;
	}
	
	this.onmouseover = function () {
		if ( this.pausemouseover ) {
			this.stop = 1;
		}
	};

	for (k = 0; k < this.item_icount; k++) {
		obj_i = document.getElementById(this.name+'item_i'+k).style;
		if (this.count % this.item_icount == k) {
			obj_i.display = 'block';
		} else {
			obj_i.display = 'none';
		}
	}

	this.onmouseout = function () {
		if ( this.pausemouseover ) {
			this.stop = 0;
		}
	};

	this.up = function () {
		var i;
		this.stop++;
		if ( this.itemcount <= this.itemoffset )
			this.itemoffset = this.itemoffset % this.itemcount;
		for (i = 0; i < this.item_icount; i++) {
			obj_i = document.getElementById(this.name+'item_i'+i).style;
			if ( obj_i.display == "block" ) {this.item_ioffset = i+1;obj_i.display="none";}
		}
		if (this.item_icount > 0) {
			if (this.item_ioffset < this.item_icount) {
				obj_i = document.getElementById(this.name+'item_i'+this.item_ioffset).style;
				obj_i.display = "block";
			} else {
				obj_i = document.getElementById(this.name+'item_i0').style;
				obj_i.display = "block";
			}
		}

		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( obj.display == "block" ) {this.itemoffset = i+1;obj.display="none";}
		}

		if (this.itemoffset < this.itemcount) {
			obj = document.getElementById(this.name+'item'+this.itemoffset).style;
			obj.display = "block";
		} else {
			obj = document.getElementById(this.name+'item0').style;
			obj.display = "block";
		}

		window.setTimeout(this.name + ".stop--;",this.pausedelay);
	}
}

function slidePreviewPopup() {
	var hOld = document.body.clientHeight;
	var hNew = document.body.clientLeft;
	
	if( hOld != hNew ) {
		height = hNew - hOld;
		hOld   = hNew;
	}  

	var xDiff = 0;
	var yDiff = 0;
	
	if ( IE )  { 
		yDiff = document.body.scrollTop; 
		xDiff = 0;
	}
	
	if ( NS ) { 
		yDiff = self.pageYOffset;
		xDiff = self.pageXOffset; 
	}

	if ( yDiff != lastY ) {
		percent = .1 * (yDiff - lastY);
		
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all["previewPopup"].style.pixelTop += percent;
		if ( NS )   document.all["previewPopup"].top += percent; 
		
		lastY = lastY + percent;
	}

	if ( xDiff != lastX ) {
		percent = .1 * (xDiff - lastX);
	
		if ( percent > 0 ) 
			percent = Math.ceil(percent);
		else 
			percent = Math.floor(percent);
		
		if ( IE )   document.all["previewPopup"].style.pixelLeft += percent;
		if ( NS )   document.all["previewPopup"].top += percent;

		lastY = lastY + percent;
	} 
}

function _closeLayer() {
	if(parent) {		
		parent.document.all["previewPopup"].style.visibility = "hidden";
	}
} 





/**
 * 컨텐츠 영역 서브 타이틀 플래쉬를 출력한다 - 플래시 크기 :570
 */
function loadSubTitleNew(strSubTitle) {
	var NS4;
	var IE4;	
	var flashUrl;
	var fwidth;
	var fheight;
	var Wmode;
	
	
	if(navigator.appName.indexOf("Microsoft Internet Explorer") == 0) {
		IE4 = true;
		NS4 = false;
	} else {
		IE4 = false;
		NS4 = true;
	}

	flashUrl = "http://www.ebslang.co.kr/ebs/images/file/apy/renewal/flash/sub_title_outlet.swf?inTxt="+strSubTitle+"&txtColor=0xFFFFFF";
	fwidth = "570";
	fheight= "30";
	Wmode = "Y";
	
	var subTitleObject = "";
	if(IE4) {
		subTitleObject += "<div id='subTitlePos' style='position:absolute;' width='0' height='0'></div><div id='subTitleSwf' style='display:block;position:absolute;top:expression(eval(subTitlePos.offsetTop-14));left:expression(eval(subTitlePos.offsetLeft));width:100;height:30'>";
		subTitleObject += "<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='"+ fwidth +"' height='"+ fheight +"'>";
		subTitleObject += "<param name='movie' value='"+ flashUrl +"'>";
		subTitleObject += "<param name='quality' value='high'>";	
		if (Wmode == "Y")
		{
			subTitleObject += "<param name='wmode' value='transparent'>";
		}
	
		subTitleObject += "<embed src='"+ flashUrl +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ fwidth +"' height='"+ fheight +"'></embed>";
		subTitleObject += "</object></div>";
	} 
	
	document.write(subTitleObject);	
} 




function attendHistReView(value) {
	
	// stepAttendHistId | userId | tmplTypeCd | stepId | attendFlag | courseTypeCd | onOffTypeCd | termDetTypeCd | compPdtId | buyId
	if (value != '') {

		var arr = value.split("|");
		
		if( "ST2008GRADE0201" == arr[3] ) {
			location.href="/ebs/flz.AtcAttendHistView.laf?step_id=ST2008GRADE0201&attendant_id=" + arr[1];
    	}else if("ST2008TOEIC0501" == arr[3] || "ST2009TOEIC0101" == arr[3] || "ST2009TOEIC0201" == arr[3] || "ST2009TOEIC0301" == arr[3]|| "ST2009TOEIC0901" == arr[3]|| "ST2009TOEIC1001" == arr[3] || "ST2009TOEIC0601" == arr[3] || "ST2009TOEIC0701" == arr[3] ){ 
			location.href="/ebs/flz.AtcAttendHistViewNew.laf?step_id="+arr[3]+"&step_attend_hist_id="+arr[0]+"&attendant_id="+arr[1];
		}else if("L05C02" == arr[5]){ //기과정인 경우
			if("PRD001" == arr[6] ){ //온라인인 경우
				location.href="/ebs/flz.AtcAttendHistTermMain.laf?step_attend_hist_id="+arr[0]+"&step_id="+arr[3];
			}else{
				location.href="/ebs/flz.AtcAttendHistView.laf?step_id="+arr[3]+"&attendant_id=" + arr[1] +"&step_attend_hist_id="+arr[0];
			}
		}else if("L05C08" == arr[5]){ //e-chinaro연계과정
			location.href="/ebs/fhz.AleIndex.laf?frame_url=http://e-chinaro.ebslang.co.kr/lms/linkage/ebs/attendAppMng.jsp?prize="+arr[8]+"|"+arr[1]+"|"+arr[9];
		}else if("GIS002" == arr[7]){ 
		    location.href="/ebs/flz.AlaAttendHistStalkingView.laf?step_attend_hist_id="+arr[0]+"&step_id="+arr[3];
		}else {
				
	        if(arr[4]=="O"){
	        	if(arr[2]!="L08L10"){
	        			
	        		goURL("/ebs/flz.AlaAttendHistReview.laf?step_attend_hist_id="+ arr[0],"N");
	        	}else{
	        			
	        		openWriting2('/ebs/flz.AwsWritingIntro.laf?step_attend_hist_id='+arr[0]);
	        	}
	        } else {
	          courseShow(arr[3],arr[2]); //쿠폰 무료사용
	        } 
		}
	}
}




/**
 * 컨텐츠 영역 서브 타이틀 플래쉬를 출력한다
 */
function loadSubTitle_pop(strSubTitle) {
	var NS4;
	var IE4;	
	var flashUrl;
	var fwidth;
	var fheight;
	var Wmode;
	
	
	if(navigator.appName.indexOf("Microsoft Internet Explorer") == 0) {
		IE4 = true;
		NS4 = false;
	} else {
		IE4 = false;
		NS4 = true;
	}

	flashUrl = "http://www.ebslang.co.kr/ebs/images/file/apy/renewal/flash/sub_title.swf?inTxt="+strSubTitle+"&txtColor=0x1262be";
	fwidth = "450";
	fheight= "30";
	Wmode = "Y";
	
	var subTitleObject = "";
	if(IE4) {
		subTitleObject += "<div id='subTitlePos' style='position:absolute;' width='0' height='0'></div><div id='subTitleSwf' style='display:block;position:absolute;top:expression(eval(subTitlePos.offsetTop-14));left:expression(eval(subTitlePos.offsetLeft));width:100;height:30'>";
		subTitleObject += "<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='"+ fwidth +"' height='"+ fheight +"'>";
		subTitleObject += "<param name='movie' value='"+ flashUrl +"'>";
		subTitleObject += "<param name='quality' value='high'>";	
		if (Wmode == "Y")
		{
			subTitleObject += "<param name='wmode' value='transparent'>";
		}
	
		subTitleObject += "<embed src='"+ flashUrl +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ fwidth +"' height='"+ fheight +"'></embed>";
		subTitleObject += "</object></div>";
	} 
	
	document.write(subTitleObject);	
} 




/**
 * 컨텐츠 영역 서브 타이틀 플래쉬를 출력한다 - 플래시 크기 :570
 */
function loadSubTitle_Study(strSubTitle) {
	var NS4;
	var IE4;	
	var flashUrl;
	var fwidth;
	var fheight;
	var Wmode;
	
	
	if(navigator.appName.indexOf("Microsoft Internet Explorer") == 0) {
		IE4 = true;
		NS4 = false;
	} else {
		IE4 = false;
		NS4 = true;
	}

	flashUrl = "http://www.ebslang.co.kr/ebs/images/file/apy/renewal/flash/sub_title_outlet.swf?inTxt="+strSubTitle+"&txtColor=0xFFFFFF";
	fwidth = "570";
	fheight= "30";
	Wmode = "Y";
	
	var subTitleObject = "";
	if(IE4) {
		subTitleObject += "<div id='subTitlePos' style='position:absolute;' width='0' height='0'></div><div id='subTitleSwf' style='display:block;position:absolute;top:expression(eval(subTitlePos.offsetTop-14));left:expression(eval(subTitlePos.offsetLeft));width:100;height:30'>";
		subTitleObject += "<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='"+ fwidth +"' height='"+ fheight +"'>";
		subTitleObject += "<param name='movie' value='"+ flashUrl +"'>";
		subTitleObject += "<param name='quality' value='high'>";	
		if (Wmode == "Y")
		{
			subTitleObject += "<param name='wmode' value='transparent'>";
		}
	
		subTitleObject += "<embed src='"+ flashUrl +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ fwidth +"' height='"+ fheight +"'></embed>";
		subTitleObject += "</object></div>";
	} 
	
	document.write(subTitleObject);	
} 
