function doTopLogin() { location="/login/login.jsp?ref=" + encodeURIComponent(location.href); }

function ShowFlash(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=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name=wmode value="transparent">');
	document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
	document.write('</object>');
}

function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(½ºÅ©·Ñ¹ÙÀÖÀ½)
function imgOn(imgEl){imgEl.src = imgEl.src.replace("_off.gif","_on.gif");}
function imgOff(imgEl){imgEl.src = imgEl.src.replace("_on.gif","_off.gif");}

//FCK EDITOR ---
var __editors = new Array();
function prepareSubmit() {
	for (var i = 0; i < __editors.length; i++) {
		var name = __editors[i];
		var oEditor = FCKeditorAPI.GetInstance(name);
		$FS(name,  oEditor.GetXHTML());
	}
}

function showEditor(name, css) {
	__editors.push(name);
	document.write('<input type="hidden" id="' + name + '" name="' + name + '" value=" ">');
	document.write('<input type="hidden" id="' + name + '___Config" value="">');
	document.write('<iframe id="' + name + '___Frame" style="' + css + '"');
	document.write('	src="/FCKeditor/editor/fckeditor.html?InstanceName=' + name + '&Toolbar=Default"');
	document.write('	width="700px" height="300px" frameborder="no" scrolling="no"></iframe>');
}

// °¡¿îµ¥Ã¢ ¿ÀÇÂ
function openWindow(mypage, myname, w, h, tool, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var settings = '';
	settings += 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top='+ wint +',';
	settings += 'left=' + winl + ',';
	settings += 'toolbar=' + tool + ',';
	settings += 'scrollbars=' + scroll + ',';
	settings += 'resizable=no';
	try {
		win = window.open(mypage,myname,settings);
		if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
	} catch (e) {}
}


function pop_contact() {
	openWindow("/app/popup_contact.jsp", "contact", 500, 430, 'no', 'no');
}









/* ÅØ½ºÆ® ÀÌ¹ÌÁö Á¡¼±Å×µÎ¸® ¾ø¾Ö±â */
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


// Flash Contents
function flashInsert(id,url,width,height,flashVars,bgColor,winMode){

	var flashStr= "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+width+"' height='"+height+"' id='"+id+"' align='middle'>" +
	"<param name='allowScriptAccess' value='always' />" +
	"<param name='movie' value='"+url+"' />" +
	"<param name='FlashVars' value='"+flashVars+"' />" +
	"<param name='wmode' value='"+winMode+"' />" +
	"<param name='menu' value='false' />" +
	"<param name='quality' value='high' />" +
	"<param name='bgcolor' value='"+bgColor+"' />" +
	"<embed src='"+url+"' flashVars='"+flashVars+"' wmode='"+winMode+"' menu='false' quality='high' bgcolor='"+bgColor+"' width='"+width+"' height='"+height+"' name='"+id+"' align='middle' allowScriptAccess='"+winMode+"' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' /></object>";
	document.write(flashStr);
}

function frameDiv(shDiv){
	fDiv = document.getElementById("faqContainer");
	var getTag = fDiv.getElementsByTagName("dl");
	for (i=0; i<getTag.length; i++){
		var ele = document.getElementById(shDiv);
		if (ele == getTag[i])
		{
			getTag[i].style.display = "block";
		} else {
			getTag[i].style.display = "none";
		}
	}
}

function tabSelect(flag, ele){

	yearReplace = document.getElementById("faqTab");
	var findImg = yearReplace.getElementsByTagName("img");
	for ( var i=0 ; i<findImg.length ; i++ ){
		findImg[i].src = findImg[i].src.replace("on.gif", "off.gif");
	}

	if (flag ==  "tabOne"){
		frameDiv("tabOne");
	}
	else if (flag ==  "tabTwo"){
		frameDiv("tabTwo");
	}
	else if (flag ==  "tabThree"){
		frameDiv("tabThree");
	}
	else if (flag ==  "tabFour"){
		frameDiv("tabFour");
	}
	//alert(typeof this);
	var imgSrc = ele.getElementsByTagName("img")[0].src;
	ele.getElementsByTagName("img")[0].src = imgSrc.replace("off.gif", "on.gif");
}

function allClose(){
	fDiv = document.getElementById("faqContainer");

	if(fDiv == null)
		return;

	var getTag = fDiv.getElementsByTagName("dl");
	for (i=0; i<getTag.length; i++){
		getTag[i].style.display = "none";
	}
	document.getElementById("tabFour").style.display = "block";
}

window.onload = function(){
	allClose();
}



function show(flag){
	if (flag ==  "1"){
		document.getElementById('showA1').style.display = 'block';
		document.getElementById('showA2').style.display = 'block';
		document.getElementById('showB1').style.display = 'none';
		document.getElementById('showB2').style.display = 'none';
	}
	else if (flag ==  "2"){
		document.getElementById('showA1').style.display = 'none';
		document.getElementById('showA2').style.display = 'none';
		document.getElementById('showB1').style.display = 'block';
		document.getElementById('showB2').style.display = 'block';
	}
}


function popupJob(){
	window.open ('/job/edu_content.jsp', 'eduJob', 'width=708, height=500, toolbar=no, scrollbars=yes');
}

function popupStart(){
	window.open ('/start/edu_content.jsp', 'eduStart', 'width=708, height=500, toolbar=no, scrollbars=yes');
}

function popupExpert(){
	window.open ('/expert/edu_content.jsp', 'eduExpert', 'width=708, height=500, toolbar=no, scrollbars=yes');
}
