<!--
function Host() {
    var Dns;
    Dns = location.href;
    Dns = Dns.split("//");
    Dns = Dns[1].substr(0, Dns[1].indexOf("/"));
    return Dns;
}

var _domain;
var _Host;
_Host = Host();
if (_Host == "testweb.newrohan.com.tw" || _Host == "testsecure.newrohan.com.tw"  || _Host == "testexchange.newrohan.com.tw" ){
    //test server
	var UrlHttp			= "http://testweb.newrohan.com.tw"
	var UrlHttps		= "https://testsecure.newrohan.com.tw";
	var UrlHttpsTrade	= "https://testexchange.newrohan.com.tw"
	//test server
	
}else{
	//real server
	var UrlHttp			= "http://www.newrohan.com.tw"
	var UrlHttps		= "https://secure.newrohan.com.tw";
	var UrlHttpsTrade	= "https://exchange.newrohan.com.tw"
	//real server	       
}

var UrlHttpUpload	= "http://imgupload.newrohan.com.tw"
var UrlHttpsUpload	= "https://imgupload.newrohan.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(e){
	var keyCode = "";

	
	if(!e)
		e=window.event;
	keyCode = e.keyCode ? e.keyCode : e.which;
	
	if((keyCode<48)||((keyCode>57)&&(keyCode<97))||(keyCode>122))
	{
		// tab and backspace key pass
		if( (keyCode == 9) || (keyCode ==8) )
			return true;
		else
			return false;
		//event.returnValue=false;
		//alert("test");
	}
	else
		return true;

}

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 NewRohan";
	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, event)
	if (menuNo == "g100") {go.href = UrlHttp + "/Diary/Notice_List.html";}
	if (menuNo == "g110") {go.href = UrlHttp + "/Diary/Notice_List.html";}
	if (menuNo == "g120") {go.href = UrlHttp + "/Diary/Event_List.html";}
		
	//GameInfo (feature, character, area, item, monster)
	if (menuNo == "g200") {go.href = UrlHttp + "/GameInfo/Start_SystemSpec.html";}
	if (menuNo == "g210") {go.href = UrlHttp + "/GameInfo/Start_SystemSpec.html";}
	if (menuNo == "g211") {go.href = UrlHttp + "/GameInfo/Start_Down.html";}
	if (menuNo == "g212") {go.href = UrlHttp + "/GameInfo/Start_Join.html";}	
	if (menuNo == "g213") {go.href = UrlHttp + "/GameInfo/Start_Interface.html";}
	if (menuNo == "g214") {go.href = UrlHttp + "/GameInfo/Start_Skey.html";}
	if (menuNo == "g215") {go.href = UrlHttp + "/GameInfo/Start_War.html";}
				
	if (menuNo == "g220") {go.href = UrlHttp + "/GameInfo/craft_system_01.html";}	
	if (menuNo == "g221") {go.href = UrlHttp + "/GameInfo/craft_system_01.html";}
	if (menuNo == "g222") {go.href = UrlHttp + "/GameInfo/18rohan-system.html";}	
	if (menuNo == "g223") {go.href = UrlHttp + "/GameInfo/element_01.html";}
	if (menuNo == "g224") {go.href = UrlHttp + "/GameInfo/Guild_element_01.html";}
	if (menuNo == "g225") {go.href = UrlHttp + "/GameInfo/group-01.html";}
	if (menuNo == "g226") {go.href = UrlHttp + "/GameInfo/combain1.html";}
	if (menuNo == "g227") {go.href = UrlHttp + "/GameInfo/smelt1.html";}
	if (menuNo == "g228") {go.href = UrlHttp + "/GameInfo/individual_shop-01.html";}
	if (menuNo == "g229") {go.href = UrlHttp + "/GameInfo/entrust.html";}
	if (menuNo == "g2291") {go.href = UrlHttp + "/GameInfo/bank.html";}
	if (menuNo == "g2292") {go.href = UrlHttp + "/GameInfo/prise.html";}
						
	if (menuNo == "g230") {go.href = UrlHttp + "/GameInfo/Character_Human_Intro.html";}
	if (menuNo == "g231") {go.href = UrlHttp + "/GameInfo/Character_Human_Intro.html";}
	if (menuNo == "g2311") {go.href = UrlHttp + "/GameInfo/Character_Human_History.html";}
	if (menuNo == "g2312") {go.href = UrlHttp + "/GameInfo/Character_Human_skill.html";}
	if (menuNo == "g232") {go.href = UrlHttp + "/GameInfo/Character_Elf_Intro.html";}
	if (menuNo == "g2321") {go.href = UrlHttp + "/GameInfo/Character_Elf_History.html";}
	if (menuNo == "g2322") {go.href = UrlHttp + "/GameInfo/Character_Elf_skill.html";}
	if (menuNo == "g233") {go.href = UrlHttp + "/GameInfo/Character_HalfElf_Intro.html";}
	if (menuNo == "g2331") {go.href = UrlHttp + "/GameInfo/Character_HalfElf_History.html";}
	if (menuNo == "g2332") {go.href = UrlHttp + "/GameInfo/Character_HalfElf_skill.html";}
	if (menuNo == "g234") {go.href = UrlHttp + "/GameInfo/Character_Dhan_Intro.html";}
	if (menuNo == "g2341") {go.href = UrlHttp + "/GameInfo/Character_Dhan_History.html";}	
	if (menuNo == "g2342") {go.href = UrlHttp + "/GameInfo/Character_Dhan_skill.html";}	
	if (menuNo == "g235") {go.href = UrlHttp + "/GameInfo/Character_Dekan_Intro.html";}
	if (menuNo == "g2351") {go.href = UrlHttp + "/GameInfo/Character_Dekan_History.html";}
	if (menuNo == "g2352") {go.href = UrlHttp + "/GameInfo/Character_Dekan_skill.html";}
	if (menuNo == "g236") {go.href = UrlHttp + "/GameInfo/Character_Dark_Intro.html";}
	if (menuNo == "g2361") {go.href = UrlHttp + "/GameInfo/Character_Dark_History.html";}
	if (menuNo == "g2362") {go.href = UrlHttp + "/GameInfo/Character_Dark_skill.html";}
	if (menuNo == "g237") {go.href = UrlHttp + "/GameInfo/Character_Giant_Intro.html";}
	if (menuNo == "g2371") {go.href = UrlHttp + "/GameInfo/Character_Giant_History.html";}	
	if (menuNo == "g2372") {go.href = UrlHttp + "/GameInfo/Character_Giant_skill.html";}
		
	if (menuNo == "g240") {go.href = UrlHttp + "/GameInfo/Item_List_Weapon.html";}
	if (menuNo == "g241") {go.href = UrlHttp + "/GameInfo/Item_List_Defence.html";}
	if (menuNo == "g242") {go.href = UrlHttp + "/GameInfo/Item_List_Accessories.html";}
	if (menuNo == "g243") {go.href = UrlHttp + "/GameInfo/Item_List_Other.html";}	
	if (menuNo == "g250") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=20";}
	if (menuNo == "g251") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=20";}
	if (menuNo == "g252") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=40";}
	if (menuNo == "g253") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=60";}
	if (menuNo == "g254") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=80";}
	if (menuNo == "g255") {go.href = UrlHttp + "/GameInfo/Monster_List.html?RqLevel=100";}
	if (menuNo == "g260") {go.href = UrlHttp + "/GameInfo/cardgame1.html";}		
		
	//Member
	if (menuNo == "g300") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}
	if (menuNo == "g301") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}
	if (menuNo == "g302") {go.href = UrlHttps + "/Mypage/mem_MemberEdit_step01.html";}
	if (menuNo == "g3021") {go.href = UrlHttps + "/Mypage/mem_IDSearch_step01.html";}		
	if (menuNo == "g303") {go.href = UrlHttps + "/Mypage/mem_PWChange_step01.html";}
	if (menuNo == "g3031") {go.href = UrlHttps + "/Mypage/mem_PWSearch_step01.html";}
	if (menuNo == "g3032") {go.href = UrlHttps + "/MyPage/mem_HintAnswer_step01.html";}	
				
	if (menuNo == "g310") {go.href = UrlHttps + "/Mypage/mem_MemberInsert_step01.html";}	
	if (menuNo == "g320") {go.href = UrlHttps + "/Service/exchange_protectLogin01.html";}
	if (menuNo == "g321") {go.href = UrlHttps + "/Service/SCard_Insert_main.html";}
	if (menuNo == "g330") {go.href = UrlHttp + "/Service/CSGuide.html";}	
	if (menuNo == "g331") {go.href = UrlHttp + "/Service/CSGuide.html";}
	if (menuNo == "g332") {go.href = UrlHttp + "/Customer/SendQuestion.html";}
	if (menuNo == "g333") {go.href = UrlHttp + "/Customer/SendReport.html";}
	if (menuNo == "g334") {go.href = UrlHttp + "/Service/block_list.html";}
	if (menuNo == "g335") {go.href = UrlHttp + "/Customer/SendReport.html";}
	if (menuNo == "g336") {go.href = UrlHttp + "/Service/Faq.html";}
	if (menuNo == "g340") {go.href = UrlHttps + "/Service/Policy_Management.html";}	
	if (menuNo == "g341") {go.href = UrlHttps + "/Service/Policy_Agreement.html";}
	if (menuNo == "g342") {go.href = UrlHttps + "/Service/Policy_Cash.html";}
	if (menuNo == "g343") {go.href = UrlHttp + "/Service/item_refund/_property.html";}
	
	//Ranking
	if (menuNo == "g400") {go.href = UrlHttp + "/ranking/battle.html";}
	if (menuNo == "g410") {go.href = UrlHttp + "/ranking/battle.html";}
	if (menuNo == "g411") {go.href = UrlHttp + "/ranking/pvp.html";}
	if (menuNo == "g412") {go.href = UrlHttp + "/ranking/ele.html";}	
	if (menuNo == "g420") {go.href = UrlHttp + "/community/user_bord.html";}
	if (menuNo == "g421") {go.href = UrlHttp + "/community/user_screen_pic.html";}
    if (menuNo == "g422") {go.href = UrlHttp + "/community/facebook.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/Ost.html";}
	if (menuNo == "g550") {go.href = UrlHttp + "/DataBox/Wallpaper.html";}

	//Payment
	if (menuNo == "g600") {go.href = UrlHttps + "/Billing/Point/Account_List.html";}
	if (menuNo == "g610") {go.href = UrlHttps + "/Billing/Coupon/Coupon_Event_List.html";}
	if (menuNo == "g620") {go.href = UrlHttps + "/Billing/Point/Account_List.html";}
	if (menuNo == "g630") {go.href = UrlHttps + "/Billing/Point/Point_Charge_01.html";}
	if (menuNo == "g631") {go.href = UrlHttps + "/Billing/Point/Point_Charge_List.html";}
	if (menuNo == "g632") {go.href = UrlHttps + "/Billing/Point/Point_Spend_List.html";}
	if (menuNo == "g633") {go.href = UrlHttps + "/Billing/Point/Point_Account.html";}	
	if (menuNo == "g640") {go.href = UrlHttpsTrade + "/itemmall/main.html";}

	//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";}
}

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  NewRohan.")
}

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;
}
//-->
