﻿
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_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_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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  //window.open(theURL,winName,'fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes');
}


function qbook(){
    void(window.open('/Guide/pop/quick_book_01_02.aspx','guidepop','width=1000,height=700'));
}

function PresizeIframe(name) {		
	if (name == null || name == "") {
		return;
	}
	try {
		var oIFrame = document.getElementById(name);
		if( 500 > oIFrame.contentWindow.document.body.scrollHeight){
			oIFrame.style.height = 250;
		} else {
			oIFrame.style.height = oIFrame.contentWindow.document.body.scrollHeight;						
		}					
	} 
	catch (e) {}	
	//document.all["subIMG"].style.display = '';
}

function goMenu(url) {
	document.all.blogmain.src = url;
}		

// check element all
function CheckAllCheckbox(o) {
  if (o.length != null) {
    var b = !o[0].checked;

	  for (i = 0; i < o.length; i++) {
		  o[i].checked = b;
	  }
  } else {
	  o.checked = !o.checked;
  }
}

function CheckLogin() {
	CheckLoginProcess(document.forms[0].UserID, document.forms[0].PassWord,"");
}
function checkCBT(id) {
	checkCBTUser(id,"");
}
function goMyInFo(){
	window.open("http://member.hanbiton.com/h_member/h_hms/ms_bypass.aspx?regsite=ge");
}
function goUserInfo(){
	window.location.href = "http://member.hanbiton.com/h_member/h_hms/ms_bypass.aspx?regsite=ge";	
}
function goPartiGuild(url)
{
	if(url.value) {
		if(url.index == 2) {
			location.href = url.value;
		}
		else {
			window.open(url.value, "HanbitOn_PartiGuild");		
		}
	}
}

function childLogOut()
{
	topNaviReLoad();
	try {
		if(self.parent.frames.length != 0)
		{
			//window.location.reload();
		}
	} catch (ex) {
		//ex 
	}	
}

// Submit form to another page without ViewState
function FormSubmit(f, action) {
	for (i = 0; (e = document.getElementsByTagName("input")[i]); i++) {
		if (e.getAttribute("type").indexOf("hidden") != -1) {
			if (e.getAttribute("name") == "__VIEWSTATE") {
				e.disabled = true;
				break;
			}
		}
	}

	f.action = action;
	f.submit();
}

function swf(src, w, h)
{
	html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" WIDTH="'+w+'" HEIGHT="'+h+'">';
	html += '<PARAM NAME=movie VALUE="'+src+'">';
	html += '<PARAM NAME=quality VALUE=high>';
	html += '<PARAM NAME="wmode" value="transparent" />';
	html += '<EMBED src="'+src+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"  WIDTH="'+w+'" HEIGHT="'+h+'"></EMBED>';
	html += '</OBJECT>';
	document.write(html);
}

function goVoteResult(){
	var LeftPosition = (screen.width) ? (screen.width-135)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-320)/2 : 0;
	
	popvote = window.open("/popup/MainVoteResult.aspx", "goVoteResult", "width=500,height=400,status=no,scrollbars=no,top=" + TopPosition + ",left=" + LeftPosition);
	popvote.focus();
}

// 이미지 사이즈 조정하기
function ResizeImage(id) {
	var img = document.getElementById("UserImage" + id);
	
	if (img.width > 550) {
		img.width = 550;
	} else if (img.width == 0) {
		setTimeout("ResizeImage('" + id + "')", 200);
	}
}

//검색관련
function onClickHanbitOnSearch() 
{
    var SearchWord = document.forms[0].hanbitonSearchWord.value;
    if(SearchWord == false) {
        alert("검색어를 입력하세요.");
    }
    else
    {
        document.charset="euc-kr";
        //window.open("http://search.hanbiton.com/index.asp?sp=ge&isnet=y&query=" + SearchWord)
        window.open("http://search.hanbiton.com/index.asp?deCol=ge&isnet=y&query=" + SearchWord);
    }
  
}

function SearchKeyDown(){
    if(event.keyCode == 13){
        onClickHanbitOnSearch();
        return true;
    }
}

function CheckSearchComment() {
	var r = document.forms[0].hanbitonSearchWord;
	
	if (r.value == "검색어") {
		r.value = "";
	}
}

// check element all
function CheckAllCheckbox(o) {
  if (o.length != null) {
    var b = !o[0].checked;

	  for (i = 0; i < o.length; i++) {
		  o[i].checked = b;
	  }
  } else {
	  o.checked = !o.checked;
  }
}

//플래시 링크
function menu1() {
    location.href = "/News/NoticeList.aspx";
}

function menu2() {
    location.href = "/Guide/Features_MultiCharacter.aspx";
}

function menu3() {
   
    // 신현철 location.href = "/Community/FreeBoardList.aspx";
   location.href = "/Community/Server.aspx"; 
}

function menu4() {
    location.href = "/ItemShop/ItemShop.aspx";
}

function menu5() {
    location.href = "/Dataroom/Clientdownload.aspx";
}

function menu6() {
    //location.href = "/Customer/mail_support.aspx";   
//   if (confirm('\t안녕하세요. 그라나도에스파다 회원님\n\n\n\t\t2009년 9월 29일(화) 부터\n\t1:1문의가 문의사서함 서비스로 새롭게 개편되었습니다.\n기존 1:1문의를 통해 접수하신 내용은 별도 페이지에서 확인 가능하며\n\t신규 문의접수는 앞으로 문의사서함 서비스를 이용하시게 됩니다.\n\n\t기존 1:1 문의에서의 답변/처리결과를 확인하시겠습니까?')) {
//        location.href='/Customer/mail_support_answer.aspx';
//   } else {
//        location.href = '/Customer/MailSupportList.aspx';
//   }
    location.href = '/Customer/FaqList.aspx';
}

function gameDown() {
    location.href = "/Dataroom/Clientdownload.aspx";
}

function mainGo() {
    location.href = "/Home/Home.aspx";
}

///////////////////////////////////////////////////////////////////
function menu11() {
    location.href = "/News/NoticeList.aspx";
}

function menu12() {
    location.href = "/News/UpdateList.aspx";
}

function menu13() {
    location.href = "/News/EventList.aspx";
}

function menu14() {
    location.href = "/News/GMList.aspx";
}

function menu15() {
    location.href = "/News/VoteList.aspx";
}
///////////////////////////////////////////////////////////////////
function menu21() {
    location.href = "/Guide/Features_MultiCharacter.aspx";
}

function menu22() {
    location.href = "/Guide/BeginnerPages.aspx";
}

function menu23() {
    location.href = "/Guide/Char_Basic.aspx";
}

function menu24() {
    location.href = "/Guide/Zone.aspx";
}

function menu25() {
    location.href = "/Guide/Monster.aspx?DS_boss=0";
}

function menu26() {
    location.href = "/Guide/Stans.aspx";
}

function menu27() {
    location.href = "/Guide/Item.aspx";
}

function menu28() {
    location.href = "/Guide/Quest.aspx";
    //alert("준비 중입니다.");
}

function menu29() {
    location.href = "/Guide/Chronicles.aspx";
}

function menu20() {
    location.href = "/Community/PlayTip.aspx";
}

function menu201()
{
    location.href="/Guide/Costume.aspx";
}

function menu221() {
    location.href = "/Guide/BeginnerPages.aspx?PageId=1";
}

function menu222() {
    location.href = "/Guide/BeginnerPages.aspx?PageId=4";
}

function menu223() {
    location.href = "/Guide/BeginnerPages.aspx?PageId=12";
}

function menu224() {
    location.href = "/Guide/BeginnerPages.aspx?PageId=19";
}

function menu331() {
    location.href = "/Guide/Char_Basic.aspx";
}

function menu332() {
    location.href = "/Guide/Char_NPC.aspx";
}

function menu551() {
    location.href = "/Guide/Monster.aspx?DS_boss=0";
}

function menu552() {
    location.href = "/Guide/Monster.aspx?DS_boss=1&nm_montype=&no_level=0";
}      
   
function menu661() {
    location.href = "/Guide/Stans.aspx";
}

function menu662() {
    location.href = "/Guide/Stans.aspx?s_title=사격공격계열&NM_stn_class=사격공격계열";
}

function menu663() {
    location.href = "/Guide/Stans.aspx?s_title=마법공격계열&NM_stn_class=마법공격계열";
}

function menu664() {
    location.href = "/Guide/Stans.aspx?s_title=혼합공격계열&NM_stn_class=혼합공격계열";
}

function menu665() {
    location.href = "/Guide/Stans.aspx?s_title=보조계열&NM_stn_class=보조계열";
}

function menu771() {
    location.href = "/Guide/Item.aspx?bigcate=1&middlecate=6";
}

function menu772() {
    location.href = "/Guide/Item.aspx?bigcate=2&middlecate=36";
}

function menu773() {
    location.href = "/Guide/Item.aspx?bigcate=3&middlecate=43";
}

function menu774() {
    location.href = "/Guide/Item.aspx?bigcate=4&middlecate=46";
}

function menu775() {
    location.href = "/Guide/Item.aspx?bigcate=5&middlecate=51";
}

function menu776() {
    location.href = "/Guide/Item.aspx?bigcate=91&middlecate=92";
}
////////////////////////////////////////////////////////////////////
function menu31() {
    //신현철location.href = "/Community/FreeBoardList.aspx";
   location.href = "/Community/Server.aspx"; 
}

function menu32() {
    //신현철location.href = "/Community/SlovenlyList.aspx";
   location.href = "/Community/ScrBoardList.aspx"; 
}

function menu33() {
    location.href = "/Community/RecommendList.aspx";
}

function menu34() {
    //신현철location.href = "/Community/ScrBoardList.aspx";
   location.href = "/Community/FreeBoardList.aspx"; 
}

function menu35() {
    //신현철location.href = "/Community/Server.aspx";
   location.href = "/Community/SlovenlyList.aspx"; 
   //location.href = "/Community/MarketBoardList.aspx"; 
}

function menu36() {
    //신현철location.href = "/Guild/GuildPhotoList.aspx";
   //location.href = "/Community/RadioBoardList.aspx"; 
   location.href='/Community/MarketBoardList.aspx';
}

function menu37() {
    //신현철location.href = "/Community/GEON.aspx";
   //location.href = "/Guild/GuildPhotoList.aspx"; 
   location.href = "/Community/RadioBoardList.aspx"; 
}

function menu38() {
    //신현철location.href = "/Community/Ranking.aspx";
   //location.href = "/Community/GEON.aspx"; 
   //location.href = "/Guild/GuildPhotoList.aspx"; 
   location.href = "/Community/EventBoardList.aspx?selectHead=feedback"; 
}

function menu39() {  
   //location.href = "/Community/Ranking.aspx";
   //location.href = "/Community/GEON.aspx"; 
   location.href = "/Community/PollList.aspx"; 
}

function menu30() {
    location.href = "/Community/Ranking.aspx";
}
////////////////////////////////////////////////////////////////////
function menu41() {
    location.href = "/ItemShop/ItemShop.aspx";
}

/*
function menu42() {
    void(window.open('http://member.hanbiton.com/h_realname/Default.aspx','','width=300,height=630'));
}
*/

function menu42()
{
    if (getCookie('UserID') != null)
    {
        openArticle(getCookie('UserID'));        
    }
    else
    {
        location.href='/Login/Login.aspx?ReturnUrl=/ItemShop/ItemShop.aspx';
    }
}

function menu43() {
    //window.open('http://hanbiton.com/h_shop/Cash/FillList.aspx?idx=2','','');   신현철
   window.open('https://members.hanbiton.com:8080/MyInfo/Default.aspx?menu=CashInfo','',''); 
}

function menu44() {
    location.href = "/ItemShop/ItemBasket.aspx";
}

function menu45() {
    //window.open('http://hanbiton.com/h_shop/Cash/UseList.aspx?idx=3','','')   신현철
   window.open('http://www.hanbiton.com/h_shop/Cash/AllList.aspx?idx=3 ','',''); 
}

function menu46() {
    location.href = "/ItemShop/MarketInfo.aspx";
}

function menu47() {
    location.href = "/ItemShop/Coupon.aspx";
}

function menu48() {
    var flagvalue = location.href;
    location.href = "/ItemShop/MemberShop.aspx?flagchk=" + flagvalue;    
}

function menu49() {
    //location.href = "/ItemShop/MemberShop.aspx";
    //window.open('http://gamege.hanbiton.com/ge_pcbang/pointshop.asp','','');
   location.href='/ItemShop/PointShop.aspx';   
}

function menu40 () {
    void(window.open('http://ge.hanbiton.com/MagicCircle/3th/MagicCircle.aspx','','fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes'));
   //alert('2차 매직스크롤이 종료 되었습니다.'); 
}   
////////////////////////////////////////////////////////////////////
function menu51() {
    location.href = "/Dataroom/Clientdownload.aspx";
}

function menu52() {
    location.href = "/Dataroom/Movie.aspx";
}

function menu53() {
    location.href = "/Dataroom/Wallpaper.aspx";
}

function menu54() {
    location.href = "/Dataroom/Artwork.aspx";
}

function menu55() {
    location.href = "/Dataroom/Cartoon.aspx";
}
////////////////////////////////////////////////////////////////////
function menu61() {
    //location.href = "/Customer/mail_support.aspx";
   //if (confirm('\t안녕하세요. 그라나도에스파다 회원님\n\n\n\t\t2009년 9월 29일(화) 부터\n\t1:1문의가 문의사서함 서비스로 새롭게 개편되었습니다.\n기존 1:1문의를 통해 접수하신 내용은 별도 페이지에서 확인 가능하며\n\t신규 문의접수는 앞으로 문의사서함 서비스를 이용하시게 됩니다.\n\n\t기존 1:1 문의에서의 답변/처리결과를 확인하시겠습니까?')) {
   //     location.href='/Customer/mail_support_answer.aspx';
   //} else {
   //     location.href = '/Customer/MailSupportList.aspx';
   //} 
  location.href='/Customer/FaqList.aspx';
}

function menu62() {
    //location.href = "/Customer/ReportCenter.aspx";
//   if (confirm('\t안녕하세요. 그라나도에스파다 회원님\n\n\n\t\t2009년 9월 29일(화) 부터\n\t1:1문의가 문의사서함 서비스로 새롭게 개편되었습니다.\n기존 1:1문의를 통해 접수하신 내용은 별도 페이지에서 확인 가능하며\n\t신규 문의접수는 앞으로 문의사서함 서비스를 이용하시게 됩니다.\n\n\t기존 1:1 문의에서의 답변/처리결과를 확인하시겠습니까?')) {
//        location.href='/Customer/mail_support_answer.aspx';
//   } else {
//        location.href = '/Customer/MailSupportList.aspx';
//   } 
    location.href='/Customer/FaqList.aspx';
}

function menu63() {
    //location.href = "/Customer/Policy.aspx";  신현철
   location.href='/Customer/Policy.aspx'; 
}

function menu64() {
    //location.href = "/Customer/Agreement.aspx";      신현철
   window.open('http://www.hanbiton.com/h_help/h_space/service_clause.aspx','',''); 
}

////////////////////////////////////////////////////////////////////
function downBt1() {
    location.href = "/Community/ServerBoardList.aspx?world=1010";
}

function downBt2() {
    location.href = "/Community/ServerBoardList.aspx?world=1008";
}

function downBt3() {
    location.href = "/Community/ServerBoardList.aspx?world=1007";
}

function downBt4() {
    location.href = "/Community/ServerBoardList.aspx?world=1009";
}

function downBt5() {
    location.href = "/Community/ServerBoardList.aspx?world=1013";
}

function downBt6() {
    location.href = "/Community/ServerBoardList.aspx?world=1017";
}

function downBt7() {
    location.href = "/Community/ServerBoardList.aspx?world=1016";
}

//function downBt8() {
//    location.href = "/Community/ServerBoardList.aspx?world=1011";
//}

//function downBt9() {
//    location.href = "/Community/ServerBoardList.aspx?world=1016";
//}
///////////////////////////////////////////////////////////////////////
function flag1() {
    location.href = "/Guide/Chronicles.aspx";
}

function flag21() {
    window.open('http://ge.hanbiton.com/swf/20060922/default.html','','width=900, height=550');
}

function flag22() {
    window.open('http://ge.hanbiton.com/swf/20061207/default.html','','width=900, height=550');
}

function flag23() {
    window.open('http://ge.hanbiton.com/swf/20070223/default.html','','width=900, height=550');
}

function flag24() {
    window.open('http://ge.hanbiton.com/swf/20070508/default.html','','width=900, height=550');
}

function flag25() {
    window.open('http://ge.hanbiton.com/swf/2_4_update/update.html','','width=900, height=550');
}

function flag26() {
    window.open('http://ge.hanbiton.com/swf/20080123/default.html','','width=900, height=550');
}

function flag27() {
    window.open('http://ge.hanbiton.com/swf/3_0_preview/base.html','','width=1024, height=768');
}

function flag28() {
    window.open('http://ge.hanbiton.com/swf/3_0_update/base.html','','fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes');
}

function flag29() {
    window.open('http://ge.hanbiton.com/swf/3_3_update/base.html','','fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes');
}

function flag30 () {
    window.open('/swf/4_0_preview/base.html','','fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes');
}

function flag31 () {
    window.open('/swf/4_0_update/base.html','','fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=yes');
}

//////////////////////////////////////////////////////////////////////////////
function menuSitemap() {
    location.href = "/Customer/Sitemap.aspx";
}
////////////////////////////////////////////////////////////////////////////
function menuLogin() {
    location.href = "/Login/Login.aspx";
}
////////////////////////////////////////////////////////////////////////////
function stn1() {
    location.href = "/Guide/Stans.aspx?c_id=1&c_town=0&NM_stn_class=";
}

function stn2() {
    location.href = "/Guide/Stans.aspx?c_id=2&c_town=0&NM_stn_class=";
}

function stn3() {
    location.href = "/Guide/Stans.aspx?c_id=3&c_town=0&NM_stn_class=";
}

function stn4() {
    location.href = "/Guide/Stans.aspx?c_id=4&c_town=0&NM_stn_class=";
}

function stn5() {
    location.href = "/Guide/Stans.aspx?c_id=5&c_town=0&NM_stn_class=";
}



//**************** 티져관련 펑션
//우측 하단 클로즈 버튼
//   
//function close(){
//	window.close();
//}

    
//하단네비바 홈 버튼

function home(){
	//location.href='http://ge.hanbiton.com/home/home.aspx';
	void(window.open('/Home/Home.aspx','home1',''));
	window.stop();
	self.close();   
	return;
}

//하단네비바 이벤트 버튼

function sub5(){
	//location.href='/Intro/IntroOne.aspx';
	alert('이벤트가 종료 되었습니다.');
	return;   
}     


function flashBool(num) {
	if (num == 0) {
	}
	else {
	}
}

var chk = 0;

function comp(){
	chk = 1;
}
