// reference from lineage2.kr
function showFlashObject(objID, objSource, objWidth, objHeight, objQuality, objWmode, objBgcolor)
{
	//page url
	var pageUrl = self.window.location.href;
	if(pageUrl.substring(0,5) == 'https') {
		swfUrl = "https";
	} else {
		swfUrl = "http";
	}
	/* Default Value Setting */
	if (objID == "") objID = 'ShockwaveFlash1';
	if (objWidth == "") objWidth = '0';
	if (objHeight == "") objHeight = '0';
	if (objQuality == "") objQuality = 'best';
	if (objWmode == "") {
		objWmode = 'transparent';
	} else {
		objWmode = '';
	}
	/* Flash 8.0 version */
	document.write('<OBJECT id="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('type="application/x-shockwave-flash" ');
	document.write('data="' + objSource + '" ');
	document.write('codebase="' + swfUrl +'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '">');
	document.write('<PARAM NAME=menu value=false>');
	document.write('<PARAM NAME=allowScriptAccess value=always>');
	document.write('<PARAM NAME=wmode value="'+ objWmode +'">');
	document.write('<PARAM NAME=movie VALUE="'+ objSource +'">');
	document.write('<PARAM NAME=quality VALUE="'+ objQuality +'">');
	document.write('<PARAM NAME=bgcolor VALUE="'+ objBgcolor +'">');
	document.write('<embed allowScriptAccess="always" swLiveConnect="true" src="' + objSource + '" menu="false" quality="' + objQuality + '" wmode="' + objWmode + '" bgcolor="' + objBgcolor + '" width="' + objWidth + '" height="' + objHeight + '" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer">');
	document.write('</OBJECT>');
}

//allblur
var myAnchors=document.all.tags("A"); 
function allblur() {
	for (i=0;i<myAnchors.length;i++) { 
		myAnchors[i].onfocus=new Function("myAnchors["+i+"].blur()");
	} 
}

//
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

//Top Menu
function openGuide()
{	
	var nWidth = 900;
	var nHeight = 670;
	var l = (screen.availWidth - 1024)/2;
	var t = (screen.availHeight - 768)/2;
	window.open('/gameGuide/gwGuide/gwGuide.asp','','left=' + l + ',top=' + t + ',width='+nWidth+',height='+nHeight+' ,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no');
}
function topMenu43(){
    location.href = "/gameGuide/knack/knackListA.asp";
}
function newEvent(){
    location.href = "/event/championshipII/event.asp";
}

//Knack Menu
function knackA(){
    location.href = "/gameGuide/knack/knackListA.asp";
}
function knackB(){
    location.href = "/gameGuide/knack/knackListB.asp";
}
function knackC(){
    location.href = "/gameGuide/knack/knackListC.asp";
}

//preview site
function openFactions()
{
	var nWidth = 1000;
	var nHeight = 680;
	var l = (screen.availWidth - 1024)/2;
	var t = (screen.availHeight - 768)/2;
	window.open('/preview/factions/main.asp','','left=' + l + ',top=' + t + ',width='+nWidth+',height='+nHeight+' ,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no');
}

//manual
function openManual()
{
	var nWidth = 1000;
	var nHeight = 680;
	var l = (screen.availWidth - 1024)/2;
	var t = (screen.availHeight - 768)/2;
	window.open('/gameGuide/manual/manual.asp','','left=' + l + ',top=' + t + ',width='+nWidth+',height='+nHeight+' ,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no');
}
function chkfrom(from){
if(from.bname.value==""){
	from.bname.focus() 
  	alert('請輸入店鋪名稱！');
	return false;
}	
if(from.wsdq.value==""){
	from.wsdq.focus() 
  	alert('請輸入外屬地區！');
	return false;
}	
if(from.cpname.value==""){
	from.cpname.focus() 
  	alert('請輸入持牌人名稱！');
	return false;
}	
if(from.name.value==""){
	from.name.focus() 
  	alert('請輸入姓名！');
	return false;
}	
if(from.zumc.value==""){
	from.zumc.focus() 
  	alert('請輸入職位！');
	return false;
}	
if(from.tel.value==""){
	from.tel.focus() 
  	alert('請輸入聯絡電話！');
	return false;
}	
if(from.email.value==""){
	from.email.focus() 
  	alert('請輸入電郵地址！');
	return false;
}	
if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(from.email.value)){
alert("请输入正确的电子邮箱地址！");
from.email.focus();
return false;
}
var checkNum=0; 
var obj=document.getElementsByName("chebox"); 
for(i=0;i<obj.length;i++) 
{ 
	if(obj[i].checked==false) 
	{ 
	alert('請勾選是否接受條款！');
	return false;
	} 
} 


}

function chkfroms(from){
if(from.name.value==""){
	from.name.focus() 
  	alert('請輸入姓名！');
	return false;
}	

if(from.tel.value==""){
	from.tel.focus() 
  	alert('請輸入電話號碼！');
	return false;
}	
if(from.email.value==""){
	from.email.focus() 
  	alert('請輸入電郵地址！');
	return false;
}	
if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(from.email.value)){
alert("請輸入正確的電子郵箱地址！");
from.email.focus();
return false;
}
if(from.kfname.value==""){
	from.kfname.focus() 
  	alert('請輸入開戶人名稱！');
	return false;
}	

if(from.zfhm.value==""){
	from.zfhm.focus() 
  	alert('請輸入帳戶號碼！');
	return false;
}	
if(from.brank.value==""){
	from.brank.focus() 
  	alert('請輸入銀行名稱！');
	return false;
}	
document.getElementById("yearsy").value =  document.getElementById("yearo1").value;
document.getElementById("monthsy").value =  document.getElementById("montho1").value;
document.getElementById("daysy").value =  document.getElementById("dayss1").value;

}


function chkfrom_en(from){
if(from.bname.value==""){
	from.bname.focus() 
  	alert('Shop Name！');
	return false;
}	
if(from.wsdq.value==""){
	from.wsdq.focus() 
  	alert('District！');
	return false;
}	
if(from.cpname.value==""){
	from.cpname.focus() 
  	alert('Licensee Name！');
	return false;
}	
if(from.name.value==""){
	from.name.focus() 
  	alert('Name(1)！');
	return false;
}	
if(from.zumc.value==""){
	from.zumc.focus() 
  	alert('Position(1)！');
	return false;
}	
if(from.tel.value==""){
	from.tel.focus() 
  	alert('Telephone Number(1)！');
	return false;
}	
if(from.email.value==""){
	from.email.focus() 
  	alert('E-mail Address(1)！');
	return false;
}	
if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(from.email.value)){
alert("Please enter correct E-mail Address！");
from.email.focus();
return false;
}
var checkNum=0; 
var obj=document.getElementsByName("chebox"); 
for(i=0;i<obj.length;i++) 
{ 
	if(obj[i].checked==false) 
	{ 
	alert('Please agree to accept the terms！');
	return false;
	} 
} 


}

function chkfroms_en(from){
document.getElementById("yearsy").value =  document.getElementById("yearo1").value;
document.getElementById("monthsy").value =  document.getElementById("montho1").value;
document.getElementById("daysy").value =  document.getElementById("dayss1").value;

if(from.name.value==""){
	from.name.focus() 
  	alert('Name！');
	return false;
}	

if(from.tel.value==""){
	from.tel.focus() 
  	alert('Telephone Number！');
	return false;
}	
if(from.email.value==""){
	from.email.focus() 
  	alert('E-mail Address！');
	return false;
}	
if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(from.email.value)){
alert("Please enter correct E-mail Address！");
from.email.focus();
return false;
}
if(from.kfname.value==""){
	from.kfname.focus() 
  	alert('Account Name！');
	return false;
}	

if(from.zfhm.value==""){
	from.zfhm.focus() 
  	alert('Account Number！');
	return false;
}	
if(from.brank.value==""){
	from.brank.focus() 
  	alert('Name of Bank！');
	return false;
}	

}

function dats(form){
		//alert("121");
	form.dayss2.value=document.getElementById('dayss1').value;
	form.montho2.value=document.getElementById('montho1').value;
}
