function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function ShowSub(id_num,num){ //
	for(var i = 0;i <= 9;i++){
		if(GetObj("Menu_" + id_num + i)){GetObj("Menu_" + id_num + i).className = '';}
		if(GetObj("Cont_" + id_num + i)){GetObj("Cont_" + id_num + i).style.display = 'none';}
	}
	if(GetObj("Menu_" + id_num + num)){GetObj("Menu_" + id_num + num).className = 'selectd';}
	if(GetObj("Cont_" + id_num + num)){GetObj("Cont_" + id_num + num).style.display = 'block';}
}


function check()
{ 
if ((document.form3.eba_num.value)=='') 
{ 
window.alert ('请输入卡号'); 
document.form3.eba_num.select(); 
document.form3.eba_num.focus(); 
return false; 
} 


else if ((document.form3.eba_pwd.value)=='') 
{ 
window.alert ('请输入密码'); 
document.form3.eba_pwd.select(); 
document.form3.eba_pwd.focus(); 
return false; 
} 

else 
return true; 
} 

function faience($faienceid,$faiencePrice){
 
 if(!confirm('请确认？我们将直接扣除您账户里相应的金额！')){      
       return;      
   }      

	$.ajax({
		url:"do_faience.asp?action=1&faienceid="+$faienceid+"&time"+new Date().toString(),
		type:'GET',
		success:function(){
		    if (arguments[0]=="对不起，您的账户余额不足,请充值后再操作！")
                   {location.href="updateclub.asp";}
			alert(arguments[0]);
		}
	});
}

function setTab(m,n){
    var menu=document.getElementById("tab"+m).getElementsByTagName("li"); 
    var div=document.getElementById("tablist"+m).getElementsByTagName("div");
   
    var showdiv=[];
    for (i=0; j=div[i]; i++){
      if ((" "+div[i].className+" ").indexOf(" tablist ")!=-1){
       showdiv.push(div[i]);
      }
    }
    for(i=0;i<menu.length;i++)
    {
        menu[i].className=i==n?"now":"";
        showdiv[i].style.display=i==n?"block":"none"; 
    }
}


function updatevip(){
		var $vip_num		=$('#vip_num').val();
		if ($.trim($vip_num)=='')
		{
			alert('请充值输入卡号！');
			$('#vip_num').focus();
			return false;
		}
		
		var $vip_pwd		=$('#vip_pwd').val();
		if ($.trim($vip_pwd)=='')
		{
			alert('请输入充值密码！');
			$('#vip_pwd').focus();
			return false;
		}
				
	$.ajax({
		url:"updateclubpro.asp?action=9&vip_num="+$vip_num+"&vip_pwd="+$vip_pwd+"&time="+new Date().toString(),
		type:'GET',
		success:function(){
			alert(arguments[0]);
		}
	});
}

function showpay($action,$infotype){
	$.ajax({
		url:"updateclubpro.asp?action="+$action+"&time="+new Date().toString(),
		type:'GET',
		success:function(){
			$('#pay').html(arguments[0]);
			payinfo(17,$infotype)
		}
	});
}

function payinfo($action,$infotype){
	$.ajax({
		url:"updateclubpro.asp?action="+$action+"&infotype="+$infotype+"&time="+new Date().toString(),
		type:'GET',
		success:function(){
			$('#pay_text').html(arguments[0]);
		}
	});
}
