<!--
var UrlHttp			= "http://www.rohan.com.tw"
var UrlHttps		= "https://secure.rohan.com.tw";
var UrlHttpUpload	= "http://imgupload.rohan.com.tw"
var UrlHttpsUpload	= "http://imgupload.rohan.com.tw"
var UrlHttpImage	= "http://image.rohan.com.tw"
var UrlHttpsImage	= "https://image.rohan.com.tw"
var UrlHttpsTrade	= "https://exchange.rohan.com.tw"
	
//Trade Write Min Cash
var ConWriteMinCash		= 200;
var ConWriteMinCron		= 100000;

var ConExchangeUnit = "E-Cash";
var ConBasicUnit = "y-point";

var thisapp=navigator.appName;
var thisversion=navigator.appVersion;
var thisappcodename=navigator.appCodeName;
if (thisapp=="Microsoft Internet Explorer"){
		var appBr = document.all;
}else if (thisapp=="Netscape"){
		var appBr = document.layers;
}
if (thisversion.indexOf("MSIE 7.0") > 0){
//	document.write('<link rel="stylesheet" href="/Common/Css/RohanWeb.html" type="text/css">');
}
else
{
//	document.write('<link rel="stylesheet" href="/Common/Css/RohanWeb7.html" type="text/css">');
}

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_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//CHECK - only number 
function only_number()
{
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
}


//CHECK - no specified key
function intcheck(){
if((event.keyCode==34)){event.returnValue=false;}
if((event.keyCode==37)){event.returnValue=false;}
if((event.keyCode==39)){event.returnValue=false;}
if((event.keyCode==59)){event.returnValue=false;}
if((event.keyCode==61)){event.returnValue=false;}
if((event.keyCode==45)){event.returnValue=false;}
}

function intchecktext(){
if((event.keyCode==34)){event.returnValue=false;}
if((event.keyCode==37)){event.returnValue=false;}
if((event.keyCode==39)){event.returnValue=false;}
if((event.keyCode==61)){event.returnValue=false;}
}

function intcheckTF(sval){
	var i = 0;
	for(m=0;m<sval.length;m++){
		if((sval.charCodeAt(m)==37)){i++;}
		if((sval.charCodeAt(m)==39)){i++;}
		if((sval.charCodeAt(m)==59)){i++;}
		if((sval.charCodeAt(m)==61)){i++;}
	}
	if ( i > 0 ){	return true	;}
	else{	return false	;}

}

//CHECK - use join page
function intcheckjoin(){
	if((event.keyCode<48)||((event.keyCode>57)&&(event.keyCode<97))||(event.keyCode>122)){event.returnValue=false;}
}

function intcheckJO(sval){
	var i = 0;
	for(m=0;m<sval.length;m++){
		if((sval.charCodeAt(m)<48)||((sval.charCodeAt(m)>57)&&(sval.charCodeAt(m)<65))||((sval.charCodeAt(m)>90)&&(sval.charCodeAt(m)<97))||(sval.charCodeAt(m)>122)){i++;}
	}
	if ( i > 0 ){	return true	;}
	else{	return false	;}

}

//Text Change Int
function Fun_CashChangeInt(a)
{
	if(isNaN(parseInt(a.value)))
	{
		a.value = "";
	}
	else
	{
		a.value = parseInt(a.value);
	}
}
//----------------------------------------------------- choi jung name add ----------------------------------------------
//CHECK - use join page
function onlyNumEng(){
	if((event.keyCode<48)||((event.keyCode>=58)&&(event.keyCode<=64))||((event.keyCode>=91)&&(event.keyCode<=96))||(event.keyCode>122)){event.returnValue=false;}
}

function fun_JuminChk(p_01)
{
	if(p_01.toUpperCase() == 'A123456789')
	{
		return false; //jumin no macth
	}
			
	var id_input=new Array(10)
	var a; 
			
	for(a=0;a<=9;a++)
	{
		id_input[a]=p_01.charAt(a);					
	}  
			               
	var engchar='ABCDEFGHIJKLMNOPQRSTUVWXYZ';
	id_input[0]=engchar.indexOf(id_input[0].toUpperCase(),0);
			
	if (id_input[0]==-1 || (id_input[1]!=1 && id_input[1]!=2))
	{
		return false; //jumin no macth
	}   			  
			
	var NumArray  = new Array(26);
		NumArray[0]  = 1 ; NumArray[1]  = 10; NumArray[2]  = 19;
		NumArray[3]  = 28; NumArray[4]  = 37; NumArray[5]  = 46;
		NumArray[6]  = 55; NumArray[7]  = 64; NumArray[8]  = 39;
		NumArray[9]  = 73; NumArray[10] = 82; NumArray[11] = 2 ;
		NumArray[12] = 11; NumArray[13] = 20; NumArray[14] = 48;
		NumArray[15] = 29; NumArray[16] = 38; NumArray[17] = 47;
		NumArray[18] = 56; NumArray[19] = 65; NumArray[20] = 74;
		NumArray[21] = 83; NumArray[22] = 21; NumArray[23] = 3 ;
		NumArray[24] = 12; NumArray[25] = 30;
	var result = NumArray[id_input[0]];
	var i;
		
	for (i=1;i<10;i++)
	{
		var NumString = '0123456789';
		id_input[i] = NumString.indexOf(id_input[i]);
		if (id_input[i] == -1)
		{
			return false; //jumin no macth
		}
		else
		{
			result += id_input[i] * (9-i);
		}
	}
	result += 1 * id_input[9];
			
	if (result % 10 != 0)
	{
		return false; //jumin no macth
	}
	
	return true; //jumin ok macth
}

function calculateBytes( szValue)
{
  var tcount = 0;

  var tmpStr = new String(szValue);
  var temp = tmpStr.length;

  var onechar;
  for ( k=0; k<temp; k++ )
  {
    onechar = tmpStr.charAt(k);
    if (escape(onechar).length > 4)
    {
      tcount += 2;
    }
    else
    {
      tcount += 1;
    }
  }

  return tcount;
}

function Only2ByteCheck( szValue)
{
  var tmpStr = new String(szValue);
  var temp = tmpStr.length;

  var onechar;
  for ( k=0; k<temp; k++ )
  {
    onechar = tmpStr.charAt(k);
    if ( !(escape(onechar).length > 4))
    {
    	//1 Byte
		return true;
    }
  }

	return false;
}

function Only2ByteInput(){
	if(event.keyCode>=33&&event.keyCode<=126){event.returnValue=false;}
 	//if((event.keyCode >= 12592) && (event.keyCode <= 12687))	{ event.returnValue = false;}

}

function Emailintcheck(){
if((event.keyCode==34)){event.returnValue=false;}
if((event.keyCode==37)){event.returnValue=false;}
if((event.keyCode==39)){event.returnValue=false;}
if((event.keyCode==59)){event.returnValue=false;}
if((event.keyCode==61)){event.returnValue=false;}
}

//Trim function
String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

function OnlyTaiwanCharCount(val) {
	var tmp_val = val;
	var charCnt = 0;
	
	for (i=0 ; i<tmp_val.length ; i++ ){
		//alert(tmp_val.charCodeAt(i));
		if (tmp_val.charCodeAt(i) != 32)
		{
			if (!( ( tmp_val.charCodeAt(i) >= 65 ) && ( tmp_val.charCodeAt(i) <= 122 ) )) {	// alphabet
				if (!( ( tmp_val.charCodeAt(i) >= 0x30 ) && ( tmp_val.charCodeAt(i) <= 0x39 ) )) { //number
					if (! ((tmp_val.charCodeAt(i) > 0x3130 && tmp_val.charCodeAt(i) < 0x318F) || (tmp_val.charCodeAt(i) >= 0xAC00 && tmp_val.charCodeAt(i) <= 0xD7A3)) )	// hangul
					{
						if(! (( tmp_val.charCodeAt(i) >= 65281 ) && ( tmp_val.charCodeAt(i) <= 65374 )) )
						{
							charCnt = charCnt + 1;
						}
					}
				}
			}
		}
	}
	return charCnt;
}

function OnlyTaiwanCharCount_Input() {
	var charCnt = 0;
	
	if (event.keyCode != 32)
	{
		if (!( ( event.keyCode >= 65 ) && ( event.keyCode <= 122 ) )) {	// alphabet
			if (!( ( event.keyCode >= 0x30 ) && ( event.keyCode <= 0x39 ) )) { //number
				if (! ((event.keyCode > 0x3130 && event.keyCode< 0x318F) || (event.keyCode >= 0xAC00 && event.keyCode <= 0xD7A3)) )	// hangul
				{
					if(! (( tmp_val.charCodeAt(i) >= 65281 ) && ( tmp_val.charCodeAt(i) <= 65374 )) )
					{
						charCnt = charCnt + 1;
					}
				}
			}
		}
	}
	
	if(charCnt == 0)
	{
		event.returnValue=false;
	}
}

function NoTaiwanCharCount(val) {
	var tmp_name = val;
	var charCnt = 0;
	//alert(tmp_name.length);
	for (i=0 ; i<tmp_name.length ; i++ ){
		//alert(i+"//"+tmp_name.charCodeAt(i));	
		if ( ( tmp_name.charCodeAt(i) >= 65 ) && ( tmp_name.charCodeAt(i) <= 122 ) ) 	// alphabet
		{	charCnt = charCnt + 1;}
		else if ( ( tmp_name.charCodeAt(i) >= 0x30 ) && ( tmp_name.charCodeAt(i) <= 0x39 ) )	//number
		{	charCnt = charCnt + 1;}
		else if( ((tmp_name.charCodeAt(i) > 0x3130 && tmp_name.charCodeAt(i) < 0x318F) || (tmp_name.charCodeAt(i) >= 0xAC00 && tmp_name.charCodeAt(i) <= 0xD7A3)) )	// hangul
		{	charCnt = charCnt + 1;}
		else if( ( tmp_name.charCodeAt(i) >= 65281 ) && ( tmp_name.charCodeAt(i) <= 65374 ) )	// full alphabet(korea key + 65248)
		{	charCnt = charCnt + 1;}
	}
	return charCnt;
}

function BodyKeyboardMouseContorl()
{
	document.onmousedown=BodyContorlCancel
	document.onkeydown=BodyContorlCancel
	document.oncontextmenu=Fun_FalseReturn
	document.ondragstart = Fun_FalseReturn
	document.onselectstart = Fun_FalseReturn 
}

function Fun_FalseReturn()
{
	return false;
}

function BodyContorlCancel()
{
    if ((event.button==2) || (event.button==3)) 
    {
    	return false;
    }
    else if((event.keyCode == 116) || (event.keyCode == 121) || event.ctrlKey || event.altKey)
    {
        return false;
    }
}

//File Ext Return
function Fun_FileExt(a)
{
	dot = a.lastIndexOf(".")+1;
    ext = a.substring(dot);
    
    return ext.toLowerCase()
}

//Email Check
function Fun_EmailChk(a)
{
	var isEmail = /[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*@[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*/;
	
	if(a.length <= 6 ||a.indexOf ('@', 0) == -1 ||a.indexOf ('.', 0) == -1){
		return false;
	}
	else if(!isEmail.test(a)) {
		return false;
	}
	else
	{
		//Email Ok
		return true;
	}
}
function Fun_LoginPlzMsg()
{
	alert("請先登入後，再來使用。");
}

function Fun_LoginNoPlzMsg()
{
	alert("無法在登入的狀態下使用。");
}
//----------------------------------------------------- choi jung name add ----------------------------------------------

function hidestatus() {
	window.status="Systemholic online Rohan";
	return true;
}

document.onmouseover = hidestatus;
document.onmouseclick = hidestatus;
document.onmousedown = hidestatus;
document.onmouseup = hidestatus;
document.onmouseout = hidestatus;

document.oncontextmenu = AllretFalse;

function retFalse()	{
	var objTag = event. srcElement.tagName;
	if ( objTag == "TEXTAREA" || objTag == "INPUT" ) 
		return true;
	else
		return false;
}

function AllretFalse()	{
	return false;
}
	
document.ondragstart = retFalse;
document.onselectstart = retFalse; 

//Flash Menu
function Fun_GoMenu(menuNo){
	//alert(menuNo);
	var go = window.top.document.location;
	if (menuNo == "home") {go.href = UrlHttp + "/main.html";}
	//Diary (notice, update, event, preview rohan - not yet)
	if (menuNo == "g100") {go.href = UrlHttp + "/Diary/Event_List.html";}
	if (menuNo == "g110") {go.href = UrlHttp + "/Diary/Notice_List.html";}
	if (menuNo == "g120") {go.href = UrlHttp + "/Diary/Update_List.html";}
	if (menuNo == "g130") {go.href = UrlHttp + "/Diary/Event_List.html";}
	//GameInfo (feature, character, area, item, monster)
	if (menuNo == "g200") {go.href = UrlHttp + "/GameInfo/Feature_Feaure.html";}
	if (menuNo == "g210") {go.href = UrlHttp + "/GameInfo/Feature_Feaure.html";}
	if (menuNo == "g220") {go.href = UrlHttp + "/GameInfo/Character_Human_Intro.html";}
	if (menuNo == "g230") {go.href = UrlHttp + "/GameInfo/Area_Rohan.html";}
	if (menuNo == "g240") {go.href = UrlHttp + "/GameInfo/Item_List_Weapon.html";}
	if (menuNo == "g250") {go.href = UrlHttp + "/GameInfo/Monster_List.html";}
	//GameGuide 
	if (menuNo == "g300") {go.href = UrlHttp + "/GameGuide/Start_SystemSpec.html";}
	if (menuNo == "g310") {go.href = UrlHttp + "/GameGuide/Start_SystemSpec.html";}
	if (menuNo == "g320") {go.href = UrlHttp + "/GameGuide/System_Pvp_01.html";}
	if (menuNo == "g330") {go.href = UrlHttp + "/GameGuide/Beginner_Guide.html";}
	
	if (menuNo == "g312") {go.href = UrlHttp + "/GameGuide/Start_Down.html";}
	if (menuNo == "g313") {go.href = UrlHttp + "/GameGuide/Start_Join.html";}
	if (menuNo == "g314") {go.href = UrlHttp + "/GameGuide/Start_Interface.html";}
	if (menuNo == "g315") {go.href = UrlHttp + "/GameGuide/Start_Skey.html";}
	if (menuNo == "g316") {go.href = UrlHttp + "/GameGuide/Start_War.html";}
	if (menuNo == "g328") {go.href = UrlHttp + "/GameGuide/System_town01.html";}
	
	//Community (server, info, join, guild)
	if (menuNo == "g400") {go.href = UrlHttp + "/Community/Server_NoticeList.html";}
	if (menuNo == "g410") {go.href = UrlHttp + "/Community/Server_NoticeList.html";}		//alert("即將開放。");
	if (menuNo == "g420") {go.href = UrlHttp + "/Community/Info_Debate_List.html";}
	if (menuNo == "g430") {go.href = UrlHttp + "/Community/Join_Shot_List.html";}
	if (menuNo == "g440") {go.href = UrlHttp + "/Community/Guild_PR_List.html";}
	if (menuNo == "g450") {go.href = UrlHttp + "/Community/User_Request_Event.html?RqPageNo=1";}
	
	if (menuNo == "g422") {go.href = UrlHttp + "/Community/Info_Qna_List.html";}
	if (menuNo == "g423") {go.href = UrlHttp + "/Community/Info_Tip_List.html";}
	if (menuNo == "g432") {go.href = UrlHttp + "/Community/Join_Art_List.html";}
	//if (menuNo == "g433") {go.href = UrlHttp + "/Community/Join_Free_List.html";}
	if (menuNo == "g433") {go.href = UrlHttp + "/Community/Join_Shot_List.html";}
	if (menuNo == "g442") {go.href = UrlHttp + "/Community/Guild_Rank_List.html";}
	//Databox
	if (menuNo == "g500") {go.href = UrlHttp + "/DataBox/Client.html";}
	if (menuNo == "g510") {go.href = UrlHttp + "/DataBox/Client.html";}
	if (menuNo == "g520") {go.href = UrlHttp + "/DataBox/Driver.html";}
	if (menuNo == "g530") {go.href = UrlHttp + "/DataBox/Movie.html";}
	if (menuNo == "g540") {go.href = UrlHttp + "/DataBox/Wallpaper.html";}
	if (menuNo == "g550") {go.href = UrlHttp + "/DataBox/Ost.html";}
	//Customer
	if (menuNo == "g600") {go.href = UrlHttp + "/Customer/CSGuide.html";}
	if (menuNo == "g610") {go.href = UrlHttp + "/Customer/CSGuide.html";}
	if (menuNo == "g620") {go.href = UrlHttp + "/Customer/Faq_List.html?RqType=A";}
	if (menuNo == "g630") {go.href = UrlHttp + "/Customer/Policy_Management.html";}
	if (menuNo == "g640") {go.href = UrlHttp + "/Customer/Gm_World.html";}
	if (menuNo == "g650") {go.href = UrlHttp + "/Customer/Block_List.html";}
	if (menuNo == "g660") {go.href = UrlHttp + "/Customer/SendQuestion.html";}
	if (menuNo == "g670") {go.href = UrlHttp + "/Customer/SendReport.html";}
	
	if (menuNo == "g690") {go.href = UrlHttp + "/Customer/Site_MapTemp.html";}
	if (menuNo == "g611") {go.href = UrlHttp + "/Customer/SendQuestion.html";}
	if (menuNo == "g612") {go.href = UrlHttp + "/Customer/SendReport.html";}
	if (menuNo == "g613") {go.href = UrlHttp + "/Customer/ReportList.html";}
	//settlement
	// new 2007.02.28
	if (menuNo == "g700") {go.href = UrlHttps + "/Billing/Point/Account_List.html";}
	if (menuNo == "g710") {go.href = UrlHttps + "/Billing/Point/Account_List.html";}
	if (menuNo == "g720") {go.href = UrlHttps + "/Billing/Point/Point_Charge_01.html";}
	if (menuNo == "g722") {go.href = UrlHttps + "/Billing/Point/Point_Charge_01.html";}
	if (menuNo == "g725") {go.href = UrlHttps + "/Billing/Point/Point_Charge_01.html?tmp_val=ycard";}
	//if (menuNo == "g730") {go.href = UrlHttps + "/Billing/Point/Goods_PayMent_01.html";}
	if (menuNo == "g730") {go.href = UrlHttps + "/Billing/Coupon/Coupon_Event_List.html";}
	if (menuNo == "g740") {go.href = UrlHttps + "/Itemmall/mall_front.asp";}
	if (menuNo == "g750") {go.href = UrlHttps + "/Itemmall/mall_front.asp";}
	
	if (menuNo == "g760") {go.href = UrlHttps + "/Itemmallvip/mall_front.asp";}
	
	//Member
	if (menuNo == "g800") {go.href = UrlHttps + "/Mypage/mem_MemberEdit_step01.html";}
	if (menuNo == "g810") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}
	if (menuNo == "g820") {go.href = UrlHttps + "/Mypage/mem_MemberEdit_step01.html";}
	if (menuNo == "g830") {go.href = UrlHttps + "/Mypage/mem_PWChange_step01.html";}
	if (menuNo == "g840") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}
	if (menuNo == "g850") {go.href = UrlHttps + "/Mypage/mem_IDSearch_step01.html";}
	if (menuNo == "g860") {go.href = UrlHttps + "/Mypage/mem_PWSearch_step01.html";}

	//WarShipZone(2007.7.25 Add)
	if (menuNo == "g900") {go.href = UrlHttp + "/WarShipZone/WarSynthetic/Main.html";}
	if (menuNo == "g910") {go.href = UrlHttp + "/WarShipZone/WarSynthetic/Main.html";}
	if (menuNo == "g920") {go.href = UrlHttp + "/WarShipZone/WarState/Main.html";}
	if (menuNo == "g930") {go.href = UrlHttp + "/WarShipZone/WarRank/Main.html";}
	if (menuNo == "g940") {go.href = UrlHttp + "/WarShipZone/WarHonor/Main.html";}
	if (menuNo == "g950") {go.href = UrlHttp + "/WarShipZone/GuildInfo/List.html";}
	if (menuNo == "g960") {go.href = UrlHttp + "/WarShipZone/GuildPromotion/List.html";}
	if (menuNo == "g970") {go.href = UrlHttp + "/WarShipZone/GuildInterview/List.html";}
	
	if (menuNo == "g000") {go.href = UrlHttp + "/main.html";}
	if (menuNo == "g001") {
		//go.href = UrlHttps + "/Mypage/Login.html";
		document.write("<form name='GoLogin' method='post' action='" + UrlHttps + "/MyPage/login.html' target='_top'>");
		document.write("<input type=hidden name=ru value='" + location.href + "'>");
		document.write("</form>");
		document.write("<script>document.GoLogin.submit();</script>");
	}
	if (menuNo == "g002") {go.href = UrlHttps + "/Mypage/logout.html";}
	
	//Trade
	if (menuNo == "t100") {go.href = UrlHttpsTrade + "/Notice/Notice_List.html";}
	if (menuNo == "t110") {go.href = UrlHttpsTrade + "/Notice/Notice_List.html";}
	if (menuNo == "t200") {go.href = UrlHttpsTrade + "/ItemInfo/LockIn_List.html";}
	if (menuNo == "t210") {go.href = UrlHttpsTrade + "/ItemInfo/LockIn_List.html";}
	if (menuNo == "t220") {go.href = UrlHttpsTrade + "/ItemInfo/MySaleList.html";}
	if (menuNo == "t230") {go.href = UrlHttpsTrade + "/ItemInfo/SaleComplete_List.html";}
	if (menuNo == "t240") {go.href = UrlHttpsTrade + "/ItemInfo/BuyComplete_List.html";}
	if (menuNo == "t250") {go.href = UrlHttpsTrade + "/ItemInfo/AdditionService_Guide.html";}
	//if (menuNo == "t100") {alert("暫停開放");}
	//if (menuNo == "t110") {alert("暫停開放");}
	//if (menuNo == "t200") {alert("暫停開放");}
	//if (menuNo == "t210") {alert("暫停開放");}
	//if (menuNo == "t220") {alert("暫停開放");}
	//if (menuNo == "t230") {alert("暫停開放");}
	//if (menuNo == "t240") {alert("暫停開放");}
	//if (menuNo == "t250") {alert("暫停開放");}
	
	if (menuNo == "t300") {go.href = UrlHttpsTrade + "/Buy/Character_Sale_List.html";}
	if (menuNo == "t310") {go.href = UrlHttpsTrade + "/Buy/Character_Sale_List.html";}
	if (menuNo == "t320") {go.href = UrlHttpsTrade + "/Buy/Cron_Sale_List.html";}
	//if (menuNo == "t300") {alert("暫停開放");}
	//if (menuNo == "t310") {alert("暫停開放");}
	//if (menuNo == "t320") {alert("暫停開放");}
	
	if (menuNo == "t400") {go.href = UrlHttpsTrade + "/MyTrade/MyTrade_Info.html";}
	if (menuNo == "t410") {go.href = UrlHttpsTrade + "/MyTrade/MyTrade_Info.html";}
	if (menuNo == "t420") {go.href = UrlHttpsTrade + "/MyTrade/Cash_Add.html";}
	if (menuNo == "t430") {go.href = UrlHttpsTrade + "/MyTrade/Cash_Out.html";}
	if (menuNo == "t440") {go.href = UrlHttpsTrade + "/MyTrade/Cash_ProcessLog.html";}
	if (menuNo == "t450") {go.href = UrlHttpsTrade + "/MyTrade/Cash_InOutLog.html";}
	if (menuNo == "t460") {go.href = UrlHttpsTrade + "/MyTrade/Cash_Send.html";}
	//if (menuNo == "t400") {alert("暫停開放");}
	//if (menuNo == "t410") {alert("暫停開放");}
	//if (menuNo == "t420") {alert("暫停開放");}
	//if (menuNo == "t430") {alert("暫停開放");}
	//if (menuNo == "t440") {alert("暫停開放");}
	//if (menuNo == "t450") {alert("暫停開放");}
	//if (menuNo == "t460") {alert("暫停開放");}
	
	if (menuNo == "t500") {go.href = UrlHttpsTrade + "/MyTrade/TradeAgree.html";}
	if (menuNo == "t510") {go.href = UrlHttpsTrade + "/MyTrade/TradeAgree.html";}
	if (menuNo == "t520") {go.href = UrlHttpsTrade + "/MyTrade/TradeAgree_Info_Edit.html";}
	//if (menuNo == "t500") {alert("暫停開放");}
	//if (menuNo == "t510") {alert("暫停開放");}
	//if (menuNo == "t520") {alert("暫停開放");}

	//Added Service	- update 2007.03.07
	if (menuNo == "t600") {go.href = UrlHttpsTrade + "/Service/exchange_name_01.html";}
	if (menuNo == "t610") {go.href = UrlHttpsTrade + "/Service/exchange_name_01.html";}
	if (menuNo == "t620") {go.href = UrlHttpsTrade + "/Service/exchange_gender_01.html";}
	if (menuNo == "t630") {go.href = UrlHttpsTrade + "/Service/exchange_protectLogin01.html";}
	//if (menuN0 == "t600") {alert("暫停開放");}
	//if (menuN0 == "t610") {alert("暫停開放");}
	//if (menuN0 == "t620") {alert("暫停開放");}
	//if (menuN0 == "t630") {alert("暫停開放");}
	
	//QuickLink	- update 2007.03.07
	if (menuNo == "q100") {go.href = UrlHttp + "/DataBox/Client.html";}
	if (menuNo == "q200") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}
	if (menuNo == "q300") {go.href = UrlHttp + "/GameGuide/Beginner_Guide.html";}
	if (menuNo == "q400") {go.href = UrlHttps + "/Billing/Point/Account_List.html";}
	if (menuNo == "q500") {go.href = UrlHttpsTrade + "/ItemInfo/LockIn_List.html";}
	if (menuNo == "q600") {go.href = UrlHttpsTrade + "/Buy/Character_Sale_List.html";}
	if (menuNo == "q700") {go.href = UrlHttpsTrade + "/Service/exchange_name_01.html";}
	//if (menuN0 == "q500") {alert("暫停開放");}
	//if (menuN0 == "q600") {alert("暫停開放");}
	//if (menuN0 == "q700") {alert("暫停開放");}

	//Hot Issue
	if (menuNo == "hg100") {go.href = UrlHttp + "/GameGuide/System_town01.html";}
	if (menuNo == "hg200") {go.href = UrlHttpsTrade + "/Service/exchange_protectLogin01.html";}
	//if (menuNo == "hg200") {alert("暫停開放");}
	if (menuNo == "hg300") {
		window.open("http://gmblog.rohan.com.tw/", 'GmBlog', 'menubar=yes,toolbar=yes,status=yes,location=yes,width=1000,height=701,scrollbars=no, resizable=yes');
	}

	if (menuNo == "z100") {
		window.open("http://image.rohan.com.tw/game_guide/guide.htm", 'GameGuide', 'menubar=yes,toolbar=yes,status=yes,location=yes,width=682,height=482,scrollbars=no, resizable=yes');
	}
	
	//main left banner 2007.04.24
	if (menuNo == "e001") {go.href = UrlHttp + "/Diary/Event_View.html?RqANo=13";}
	if (menuNo == "e002") {go.href = UrlHttp + "/Diary/Event_View.html?RqANo=37";}

	if (menuNo == "e100") {
		window.open(UrlHttp+"/etc/popup/2007083001.html", 'new0830', 'toolbar=yes,status=yes,location=yes,width=620,height=800,scrollbars=yes,resizable=yes');
	}	
	//footer
	if (menuNo == "seal") {
		window.open("http://www.newseal.com.tw/", 'SealOnline', 'menubar=yes,toolbar=yes,status=yes,location=yes,width=1000,height=701,scrollbars=no, resizable=yes');
	}
	
	//item mall
	if (menuNo == "i100") {go.href = UrlHttps + "/Itemmall/mall_front.asp";}
}

function Fun_GoUrl(url){
	var go = window.top.document.location;
	if ( url.indexOf("Mypage/") > 0 ) {
		go.href = UrlHttps + url
	}else {
		go.href = UrlHttp + url
	}
}

function GoViewPage_forMain(url){
	parent.document.location.href = UrlHttp + url;
}

function Fun_AddFavorites(){
	if (document.all)
	window.external.AddFavorite(UrlHttp,"Systemholic online Rohan.")
}

function Fun_GoPageText(str) {
	if ( str == "patch" )	{alert("即將開放。"); }
}
	
function DisplayFlashObj(flashURL,flashWIDTH,flashHEIGHT){	
	var win = "transparent";
	var id = "flashs";
	var so = new SWFObject(flashURL, id, flashWIDTH, flashHEIGHT);
	so.addParam("id", win);
	so.addParam("wmode", win);
	so.addParam("menu", "false");
	so.addParam("quality", "high");
	so.addParam("allowScriptAccess", "always");
	//so.addParam("flashVars", vars);
	document.write(so.getSWFHTML());
}

function Fun_CheckQuickSearchFrm(frm){
	if ( frm.RqSearchText.value == "" ) {
		alert("請輸入內容。");
		frm.RqSearchText.focus();
		return false;
	}else {	return true;	}
}

function Fun_CheckQuickSearchFrm_v2(frm, str){
	frm.RqSearchText.value = str;
	frm.submit();
}

function setWinSize(width_, height_) {
	WindowLeft = (screen.width - width_)/2;
	WindowTop = (screen.height - height_)/2;
}

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	//////////////////////////////
	// 2006.11.17 added by Ghi Nam
	// MS phishing filter ? ?? swfobject detectflash ??? ???? phishing object? ????
	// SWFObject ? ??? ??? ?? ???? ?? detecting ??? ????.
	this.skipDetect=true;
	//////////////////////////////
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	if (window.opera || !document.all) return;
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
	__flash_unloadHandler = function(){};
	__flash_savedUnloadHandler = function(){};
	if (typeof window.onunload == 'function') {
		var oldUnload = window.onunload;
		window.onunload = function() {
			deconcept.SWFObjectUtil.cleanupSWFs();
			oldUnload();
		}
	} else {
		window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
	}
}
if (typeof window.onbeforeunload == 'function') {
	var oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		deconcept.SWFObjectUtil.prepUnload();
		oldBeforeUnload();
	}
} else {
	window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;
// SWFObject end
////////////////////////////////////////////////////////////////////////////////



/**
* ?? ?? ???
*/
function bluring()
{
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")
	{
		document.body.focus();
	}
}
document.onfocusin=bluring;

function Fun_NumberChk(a)
{
	var strAll = "1234567890";
	    
	for (i=0; i < a.length; i++)
	{
		if(strAll.indexOf(a.substring(i,i+1))<0)
		{
			//No Number
			return false;
		}
	}
	return true;
}
//-->