// ÆË¾÷
function open_popup(url, wid, hei, scroll, winName)
{
	var url = url;
	var posi = "width="+ wid +",height="+hei+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	if (winName == "")
	{
		winName = popup
	}
	window.open(url,winName,posi);
}

// Ç®½ºÅ©¸°
function full_popup(url_txt)
{
	var  dimentions_and_such1 = 'fullscreen=1,scrollbars=0';
	Pop=window.open(url_txt,'',dimentions_and_such1);   
}

//mms ÆÄÀÏ ¿­±â
function openmovie(m_url)
{
	self.location = m_url;
	timeID = setTimeout('startShow()', 1);
}

function startShow(){
	self.location.reload(); 
}

//ÇªÅÍ ¸ñ·Ï»óÀÚ ¸µÅ©
function FamilyGo(dropdownName){
	var page = document.all[dropdownName].value;
	if(page !="") window.open(page);
}


//ÀÌ¹ÌÁö url ¾Ë¾Æ¿À±â 
function findImgUrl(str)
{
	var oldImgUrl = document.images[str].src;
	var findText = "/";
	var findTextNum = oldImgUrl.lastIndexOf(findText) + 1;
	return(oldImgUrl.substring(0,findTextNum));
}

//ÀÌ¹ÌÁö ¿À¹ö
function imgOver(imgName)
{
		newImgUrl = findImgUrl(imgName);
		document.images[imgName].src = imgName;
}

//ÀÌ¹ÌÁö ¾Æ¿ô
function imgOut(imgName)
{
		newImgUrl = findImgUrl(imgName);
		document.images[imgName].src = imgName;
}



//ºí·Î±×

//ÇöÀç ¼±ÅÃµÇ¾î ÀÖ´Â Áú¹®°ú ´äº¯;
var aQuestion = "";
var aAnswer = "";

function showAnswer(num) {
	//»õ·Î ¼±ÅÃµÈ Áú¹®°ú ´äº¯
	var cQuestion = document.all["question" + num];
	var cAnswer = document.all["answer" + num];
	
	//´Ù¸¥ Áú¹®À» ¼±ÅÃÇßÀ» °æ¿ì
	if(aQuestion != cQuestion) {
		//±âÁ¸¿¡ È°¼ºÈ­ µÇ¾ú´ø ³»¿ë º¯°æ
		if(aQuestion != "")	aQuestion.style.fontWeight = "";
		if(aAnswer != "")	aAnswer.style.display = "none";
		
		//»õ·Î ¼±ÅÃµÈ ³»¿ë º¯°æ
		cQuestion.style.fontWeight = "bold";
		cAnswer.style.display = "block";
	
		//È°¼ºÈ­µÈ °³Ã¼ º¯°æ
		aQuestion = cQuestion;
		aAnswer = cAnswer;
	}
	else {
		aQuestion.style.fontWeight = "";
		aAnswer.style.display = "none";

		aQuestion = "";
		aQuestionTR = "";
		aAnswer = "";
	}
}

// ¿ùµå »ó½Ä ÆË¾÷ ¿­±â
function openSense() {
	if(arguments.length)	window.open(nc_l2web + "/common/sense/senseView.asp?index=" + arguments[0], "sense", "width=580, height=650, scrollbars=no, status=no");
	else	window.open(nc_l2web +"/common/sense/sense.asp", "sense", "width=580, height=650, scrollbars=no, status=no");
}

//Ç®¹öÀü ´Ù¿î¹Þ±â
function wopen(){
	window.open('http://www.lineage2.co.kr/pds/ch2/NeffyClient.htm','Neffy','width=346,height=436,scrollbars=no,menubar=no,status=no')
}
  
// ¼­ºê
function goGuide()
{
	open_popup(nc_l2web+'/guide/index.asp','1004','610','0','guide');
}

// ½Ã½ºÅÛ»ç¾çº¸±â
function viewSystem(){	
	
	var fm = document.agreefm;	
		
	if(document.all['systmeView'].style.display != "block"){
		document.all['SicInstall'].style.display = "block";
		
		fm.target = "ifmSystemDown";
		fm.action = "/common/system/systemDown.asp";
		fm.submit();
	}		
	else{		
		document.all['systmeView'].style.display = "none";
		document.all['SicInstall'].style.display = "none";
	}		
}

function showPCSpec() {		
	try {
		parent.document.all['SicInstall'].style.display = "none";
		parent.document.all['systmeView'].style.display = "block";
		parent.agreefm.pcSpec.value = Sic.GetBriefInfo();		
	}
	catch (e) {
		top.location.href = "/pds/sp2system.asp";
	}
}

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_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_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 showMovieObject(objID, objSource, objWidth, objHeight, objWmode)
{
	//page url
	var pageUrl = self.window.location.href;
	if(pageUrl.substring(0,5) == 'https') {
		swfUrl = "https";
	} else {
		swfUrl = "http";
	}
	/* Default Value Setting */
	if (objID == "") objID = 'mv1';
	if (objWidth == "") objWidth = '0';
	if (objHeight == "") objHeight = '0';
	if (objWmode == "") {
		objWmode = 'false';
	}
	
	document.write('<OBJECT id="' + objID + '" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"');
	document.write('type="application/x-oleobject" ');
	document.write('codebase=' + swfUrl +'"://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ');
	document.write('standby="Loading Microsoft Windows Media Player components..." ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '">');	
	document.write('<PARAM NAME=ShowStatusBar value=true>');
	document.write('<PARAM NAME=transparent value=true>');
	document.write('<PARAM NAME=url value="'+ objSource +'">');
	document.write('<PARAM NAME=autostart VALUE="'+ objWmode +'">');
	document.write('<PARAM NAME=volume VALUE=50>');
	document.write('</OBJECT>');

}

function showFlashObject(objID, objSource, objWidth, objHeight, objWmode,objalign)
{
	//page url
	var pageUrl = self.window.location.href;
	if(pageUrl.substring(0,5) == 'https') {
		swfUrl = "https";
	} else {
		swfUrl = "http";
	}
	/* Default Value Setting */
	if (objID == "") objID = 'flash1';
	if (objWidth == "") objWidth = '0';
	if (objHeight == "") objHeight = '0';
	if (objWmode == "") {
		objWmode = 'false';
	}
	
	document.write('<OBJECT id="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('type="application/x-shockwave-flash" ');
	document.write('codebase=' + swfUrl +'"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" ');	
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" align="' + objalign + '">');	
	document.write('<PARAM NAME=movie value="' +objSource+'">');
	document.write('<PARAM NAME=quality value=high>');
	document.write('<PARAM NAME=wmode value='+ objWmode +'>');
	document.write('<EMBED src="' +objSource+'" quality=high wmode='+ objWmode +' width='+objWidth +' HEIGHT='+objHeight+' align='+objalign +' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED>');
	document.write('</OBJECT>');

}