// JavaScript Document
<!--
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 backtion()
{
		
	history.back();
	
}

function CheckData()
{
		
	if (newuser.cid.value.length < 4) 
	{   	
		window.alert("請輸入4-12字元長度的帳號");
		newuser.cid.focus();
	}			
	else if(newuser.password.value == "")
	{   	
		window.alert("請輸入密碼");
		newuser.password.focus();
	}
	else if(newuser.password.value == newuser.cid.value)
	{   	
		window.alert("密碼不可以與帳號相同");
	}
	else if(newuser.password.value.length < 6 || newuser.password.value.length >10)
	{   	
		window.alert("請輸入6-10字元長度的帳號");
	}
	else if(newuser.confirm.value == "")
	{   	
		window.alert("請輸入確認密碼!");
	}
	else if(newuser.password.value != newuser.confirm.value)
	{   	
		window.alert("密碼與密碼確認不一樣，請再確認！");
	}
	else if(newuser.name.value == "")		
	{  
		window.alert("請輸入您的姓名");
	}
	else if(newuser.nick.value == "")
	{   	
		window.alert("請輸入您的暱稱");
	}
	else if(newuser.email.value == "")
	{   //檢查是否完成E-Mail帳號輸入	
		window.alert("請輸入E-Mail帳號");
	}
	else if(newuser.email.value.indexOf("@") == -1)		
	{  
		window.alert("E-Mail帳號中必須有'@'!");
	}
	else if(newuser.address.value == "")		
	{  
		window.alert("請輸入您的住址");
	}
	else if(newuser.tel.value == "")
	{   	
		window.alert("請輸入行動電話前四碼");
	}
	else if(newuser.tel.value.length < 4)
	{   	
		window.alert("請輸入行動電話前四碼");
	}
	else if(newuser.tel2.value == "")
	{   	
		window.alert("請輸入行動電話後八碼");
	}
	else if(newuser.tel2.value.length < 6)
	{   	
		window.alert("請輸入行動電話後八碼");
	}
	else //通過所有檢查		
		newuser.submit(); //送出表單中的資料
}
//-->