//////////////////////////////////////////////
//Javascript Function ¸ðÀ½.
//////////////////////////////////////////////

//ÆäÀÌÁö »ó´Ü¿¡ Ç×»ó Æ÷ÇÔµÇ¾îÀÖ´Â Åø¹Ù¸¦ ·ÎµåÇÑ´Ù.
//Microsoft.com ÆäÀÌÁöÀÇ Åø¹Ù¸¦ »ç¿ëÇÏ¿´´Ù.
//var ToolBar_Supported = ToolBar_Supported ;
//if (ToolBar_Supported != null && ToolBar_Supported == true)
//{
	//To Turn on/off Instrumentation set DoInstrumentation = true/false.
//	DoInstrumentation= false;

	// Customize default menu color - bgColor, fontColor, mouseoverColor
//	setDefaultMSMenuColor("#ffffff", "#336699", "red");

	// Customize toolbar background color
//	setToolbarBGColor("#DFFEDF");

	//***** Add Standard Microsoft.com menus *****
//}
//¿©±â±îÁö »õ·Î°³ÆíµÇ´Â Çì´õ¿¡´Â Åø¹Ù°¡ ¾øÀ¸¹Ç·Î ·ÎµåÇÏÁö ¾Ê½À´Ï´Ù.//////

//ID¿Í PasswordÀÔ·Â ¿©ºÎ Ã¼Å©
function val_check() {
	if (document.login.id.value == "") {
		alert("È¸¿ø ID¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		document.login.id.focus();
		return;
	}
	if (document.login.pwd.value == "") {
		alert("PassWord¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		document.login.pwd.focus();
		return;
	}
	
	document.login.submit();
}

//ÅõÇ¥°á°ú¸¦ º¸¿©ÁÖ´Â Ã¢
function pollbox1(a){
window.open("poll/pollresult.asp?no="+a,'_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=300,height=460');
return;
}

//ÅõÇ¥°á°ú¸¦ º¸¿©ÁÖ´Â Ã¢
function pollbox(){
window.open('','pollbox','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=300,height=460');
return;
}

//È°µ¿¿Õ Á¡¼ö¿Í ¼øÀ§¸¦ º¸¿©ÁÖ´Â Ã¢
function openrank(){
window.open("event/act_ranking.asp",'_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=753,height=583,top=0,left=0');
return;
}

// ¼¼¹Ì³ª¸¦ µî·ÏÇÏ±âÀ§ÇÑ ÆË¾÷Ã¢À» ¶ç¿öÁØ´Ù.
// ÆË¾÷Ã¢¿¡¼­ ¼¼¹Ì³ª sessionÀ» ºÒ·¯¿Íµµ µÇÁö¸¸, ¼¼¹Ì³ª µð·ºÅä¸®°¡ °¡»óµð·ºÅä¸®·Î ÀâÇô ÀÖÀ¸¸é
// ¼¼¼ÇÀÌ Çü¼º µÇÁö ¾Ê´Â Çö»óÀÌ ÀÖ¾ú´Ù. ±×·¡¼­ ¸¸ÀÏÀÇ °æ¿ì¿¡ ´ëºñÇØ¼­ get¹æ½ÄÀ¸·Î ³Ñ°Ü ÁØ °ÍÀÌ´Ù.
function regi_semi(no){
window.open('/seminar/regist/view.asp?s_SemiNo='+no+'&m_id=<%=Session("devid")%>','regi_semi','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=670,height=400');
return;
}

// È¸¿øÀÇ Á¡¼öÅë°è¸¦ º¸±â À§ÇÑ ÆË¾÷Ã¢À» ¶ç¿öÁØ´Ù.
function open_mInfo(){
window.open('/m_Info.asp','memberInfo','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
return;
}

// FORUMÀÇ ±Û¾²±â¿¡¼­ Ä«Å×°í¸®º° ÀÔ·Â³»¿ë Ã¼Å©1
function cate_check1() {
	if (document.write.type.value == "0") {
		alert("Category¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä");
		document.write.type.focus();
		return;
	}
	if (document.write.subject.value=="") {
		alert("±ÛÁ¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.subject.focus();
		return;
	}
	if (document.write.content.value=="") {
		alert("±Û³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.content.focus();
		return;
	}
	ShowProgress(); //ÇÁ·Î±×·¹½º¹Ù¸¦ º¸¿©ÁØ´Ù.
	document.write.submit();			
}

// FORUMÀÇ ±Û¾²±â¿¡¼­ Ä«Å×°í¸®º° ÀÔ·Â³»¿ë Ã¼Å©2
function cate_check2() {
	if (document.write.Bigtype.value=="0") {
		alert("Category¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä");
		document.write.Bigtype.focus();
		return;
	}
	if (document.write.subject.value=="") {
		alert("±ÛÁ¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.subject.focus();
		return;
	}
	if (document.write.content.value=="") {
		alert("±Û³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.content.focus();
		return;
	}
	ShowProgress();//ÇÁ·Î±×·¹½º¹Ù¸¦ º¸¿©ÁØ´Ù.
	document.write.submit();			
}

// FORUMÀÇ ±Û¾²±â¿¡¼­ Ä«Å×°í¸®º° ÀÔ·Â³»¿ë Ã¼Å©3
function cate_check3() {
	if (document.write.subject.value=="") {
		alert("±ÛÁ¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.subject.focus();
		return;
	}
	if (document.write.content.value=="") {
		alert("±Û³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.write.content.focus();
		return;
	}
	ShowProgress();//ÇÁ·Î±×·¹½º¹Ù¸¦ º¸¿©ÁØ´Ù.
	document.write.submit();			
}

//Dext Upload¸¦ ÀÌ¿ëÇÑ ±Û¾²±â¸¦ ÇßÀ» ¶§ ÇÁ·Î±×·¹½º¹Ù¸¦ º¸¿©ÁØ´Ù.
function ShowProgress()
{
	/*Dext ¾÷·Îµå »óÅÂ Ã¢À» ³ªÅ¸³»´Â ÇÔ¼ö*/
	strAppVersion = navigator.appVersion
	
	if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) {
		winstyle = "dialogWidth=385px; dialogHeight:200px; center:yes";
		window.showModelessDialog("progress/show_progress.asp", null, winstyle);
	}
	else {
		winpos = "left=" + ((window.screen.width-385)/2) + ",top=" + ((window.screen.height-200)/2-200);
		winstyle="height=180,width=380,status=no,toolbar=no,menubar=no,location=no,resizable=no,"
					&& "scrollbars=no,copyhistory=no," + winpos;
		window.open("progress/show_progress.asp",null,winstyle);
	}
	
	return true;
}


//guest·Î ·Î±×ÀÎ ÇÑ »ç¿ëÀÚ¿¡°Ô °æ°í ¸Þ½ÃÁö¸¦ ¶ç¿öÁØ´Ù.
function onclick_guest()
{
	var check = confirm("¼Õ´ÔÀº ÀÌ ±ÇÇÑÀ» ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.\nÈ¸¿øÀ¸·Î µî·Ï ÇÏ½Ã°Ú½À´Ï±î?");
	if (check)
		location.href = "/mytest/profile/index.asp";
	else
		return false;
}


//ÆË¾÷Ã¢ ¶ç¿ì±â(ÆÄÀÏ¸í,width,height,scrollbar)
function onload_popup(a,b,c,d) 
{
	var cookies = document.cookie.split("; ");
	var openwindow = "yes";
	for (var i=0 ; i < cookies.length ; i++)
	{
		var cont = cookies[i].split("=");
				
		//ÄíÅ°¿¡ popup=checked;°¡ µé¾î ÀÖÀ¸¸é Ã¢À» ¶ç¿ìÁö ¾Ê´Â´Ù.
		if (cont[0] == "popup" && cont[1]=="checked")
			openwindow = "no";
	}
	if (openwindow=="yes")
	{
		window.open(a,'popup','width='+parseInt(b)+',height='+parseInt(c)+',scrollbars='+parseInt(d)+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,top=100,left=100');
		return;
	}
}

//ÄÚ³Ê(¿À¸¥ÂÊ ÇÏ´Ü) ±¤°í¿ë Æã¼ÇÀ» À§ÇÑ º¯¼ö¼±¾ð
var     nAdCornerMarginX		= 0;
var     nAdCornerMarginY		= 4;
var     nScrollBarWidth         = 16;
var     nScrollBarHeight        = 16;
var     isMSIE                  = 0;
var     nVersion                = 3;
var     nInterval               = 100;
var     isLoaded                = 0;

// À¥ºê¶ó¿ìÀúÀÇ Æ¯¼º¿¡ µû¸¥ ÄÚ³Ê±¤°í ¼³Á¤
function setup () {
  nVersion        = parseInt (navigator.appVersion);
  if (navigator.appName == "Microsoft Internet Explorer")
  {
    isMSIE  = 1;
    if (navigator.userAgent.indexOf ("MSIE 5") != -1)
    {
      nVersion = 5;
    }
  }
  else
  {
    isMSIE  = 0;
    if (nVersion >= 4)
    {
      window.captureEvents (Event.MOUSEMOVE);
      wCur= document.layers["idAdCorner"];   
    }
  }

  if (nVersion >= 4)
  {
    window.setInterval ("AdCornerMove();", nInterval);
  }
}

//ÄÚ³Ê±¤°íÀÇ ÀÌµ¿ Æã¼Ç(À¥ºê¶ó¿ìÀúÀÇ »çÀÌÁî¿¡ µû¶ó ÄÚ³Ê±¤°íÀÇ À§Ä¡ º¯°æ)
function AdCornerMove()
{
				
  if (isLoaded == 0)  //·Î±äÀ» ÇÏÁö ¾Ê¾Ò´Ù¸é º¸ÀÌÁö ¾Ê´Â´Ù.
  {
		return;
  }
  if (isMSIE)
  {
		nAdCornerOriginX        = document.body.clientWidth - idAdCorner.width - nAdCornerMarginX;
		nAdCornerOriginY        = document.body.clientHeight - idAdCorner.height - nAdCornerMarginY;

		nAdCornerOriginX        += document.body.scrollLeft;
		nAdCornerOriginY        += document.body.scrollTop;

		if (nAdCornerOriginX > 800) {
			idAdCorner.style.pixelLeft      = 800;
		}
		else {
			//idAdCorner.style.pixelLeft      = nAdCornerOriginX;
			idAdCorner.style.pixelLeft      = 800;
		}
		idAdCorner.style.pixelTop       = nAdCornerOriginY;
  }
  else
  {
		nAdCornerOriginX        = window.innerWidth + window.pageXOffset - wCur.clip.width - nAdCornerMarginX;
		nAdCornerOriginY        = window.innerHeight + window.pageYOffset - wCur.clip.height - nAdCornerMarginY;

		if (window.scrollbars.visible == true)
		{
		  nAdCornerOriginX        -= nScrollBarWidth;
		  nAdCornerOriginY        -= nScrollBarHeight;
		}

		wCur.left     = nAdCornerOriginX;
		wCur.top     = nAdCornerOriginY;
  }
}

//°Ô½Ã¹° »èÁ¦ È®ÀÎ Æã¼Ç
function del(a,b,c,d,e,f,g,h) {
	var del_ok = confirm("ÀÌ °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?");
	
	if (del_ok) {
		document.location.href="/";
		document.location.href="del.asp?stype="+h+"&flag="+a+"&no="+b+"&ref="+c+"&page="+d+"&depth="+e+"&step="+f+"&forumname="+g ;	
	}
	else{
	
	}
}

// ¼îÇÎ¸ô ¿­±â URL ¿¡ ¿øÇÏ´Â ÁÖ¼Ò¸¦ ÀÔ·ÂÇÑ´Ù.
// DNS¼³Á¤ÀÌ ºÒ°¡´ÉÇÑ °æ¿ì Æ÷Æ®¸¦ º¯°æÇÏ¸é ÀÌ»ó¾øÀÌ µ¿ÀÛÇÑ´Ù.
function open_mall(){
window.open('http://www.800test.com/mall/','_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
return;
}

function open_ncollege(){
window.open('http://www.n-college.com/','_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
return;
}

function open_okvisa(){
window.open('http://www.okvisa.co.kr/','_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
return;
}

// ¹è³Ê¶õ¿¡ ÄÁ¹öÅÍ¸¦ Å¬¸¯ÇÒ½Ã¿¡ ÆË¾÷Ã¢À¸·Î ÄÁ¹öÅÍ¸¦ Ãâ·ÂÇÑ´Ù.
function open_convert(){
  window.open('/convert/converter.html','convert','height=209, width=560,scrollbars=0');
}

//¿ìÃø ÇÏ´Ü¿¡ ¼¼°èÀü±â¸¦ Å¬¸¯ÇÒ½Ã¿¡ ÆË¾÷Ã¢À¸·Î Àü±â¸ñ·ÏÀ» Ãâ·ÂÇÑ´Ù.
function open_electron(){
  window.open('/convert/plug.html','plug','height=400, width=570, scrollbars=1');
}

//¿ìÃø ÇÏ´Ü¿¡ ¹Ì±¹ÀÇ±âÈÄ¸¦ Å¬¸¯ÇÒ½Ã¿¡ ÆË¾÷Ã¢À¸·Î ±âÈÄ¸ñ·ÏÀ» Ãâ·ÂÇÑ´Ù.
function open_weather(){
  window.open('/convert/weather.html','weather','height=400, width=620, scrollbars=1');
}

//
function onload_pop(){
  window.open('/popup/pop_event.html','pop','height=380, width=315, scrollbars=1');
}

