// JavaScript Document
function art01(){
if(document.body.clientWidth>730){
	document.getElementById('div01').style.paddingLeft=parseInt((document.body.clientWidth-650)/2)+'px'; 
	document.getElementById('div04').style.paddingLeft=parseInt((document.body.clientWidth-650)/2)+'px'; 
	document.getElementById('div02').style.paddingLeft=parseInt((document.body.clientWidth-730)/2)+'px'; 
	document.getElementById('div03').style.left=parseInt(((document.body.clientWidth-730)/2)+150)+'px'; 
}else{
	document.getElementById('div01').style.paddingLeft=0; 
	document.getElementById('div04').style.paddingLeft=0; 
	document.getElementById('div02').style.paddingLeft=0; 
	document.getElementById('div03').style.left='150px'; 
	}
document.getElementById('div01').style.display='block';
}

function art02(h){
//'imgs/login01.png'圖載進來再動作
document.getElementById('div04').style.display='block';
document.getElementById('yb01').style.height = (10*h)+'px'; 
if(h>10){document.getElementById('div02').style.display='block';
document.getElementById('bb01').style.width = parseInt(730/19*(h-10))+'px'; }
 if (h<19) {setTimeout(function(){art02(h+1)},30);}else art03(10);
}

function art03(i){
document.getElementById('bb01').style.width = parseInt(730/19*i)+'px'; 
document.getElementById('div03').style.width = parseInt(234/9*(i-10))+'px'; 
 if (i<19) {setTimeout(function(){art03(i+1)},30);} else art04();
}

function art04(){
for(n=1;n<25;n++){
	if(document.body.clientWidth>730){
	document.getElementById('div1'+n).style.left=parseInt(((document.body.clientWidth-730)/2)+20+26*n)+'px';
}else{document.getElementById('div1'+n).style.left=(20+26*n)+'px';}}
art11(1);
}

function art11(m){
if (m<25)document.getElementById('div1'+m).style.display='block';
for (var p=0;p<24;p++){if ((m>p)&&(m<(p+11))){document.getElementById('div1'+(p+1)).style.bottom=((m-p-1)*8)+'px'; }}
for (var q=10;q<34;q++){if ((m>q)&&(m<(q+10))){document.getElementById('div1'+(q-9)).style.bottom=((q+8-m)*8)+'px'; }}
for (var r=20;r<44;r++){
	if (m==r){document.getElementById('img1'+(r-19)).style.width='22px';
if (r%2==1){document.getElementById('img1'+(r-19)).src="imgs/index_v0111.gif";}else{
	document.getElementById('img1'+(r-19)).src="imgs/index_v0110.gif";}}
}
if (m<44) {setTimeout(function(){art11(m+1)},30); }
}

function ck01(){
var err='';	
  if (document.getElementById('un').value == ''){err+="* 請輸入帳號\n";}
  if (document.getElementById('pwd').value == ''){err+="* 請輸入密碼\n";}
if (err==''){ document.login.submit(); }else{alert(err) }
}
