/* -------------------------------------------------
LAN&VLAN portx ���ܧ��P LAN & VLAN / Port-based VLAN Configuration��Port Members
�U���{���X�q 537_Bas_LanVlan_VLAN\trunk_003 svn 158 ��vid,js �^��
------------------------------------------------- */
/* LAN<=>WAN,ADSL INDEX RULE SETTING
#C_LOCAL_HAVE_ADSL,C_VLAN_WAN_FIX=>�ھڸӾ��ػݨD�g�breset.txt��
#C_LOCAL_WAN_ENABLE:User�i���ʤ���(WAN TYPE SETTING PAGE)
# index�ҥN�����ƭȬ�:C_VLAN_PORT1_LAN_PVID[0~x]
#1.3��1.4�OFOR SDG87B_LT2�P�_��
1. C_LOCAL_HAVE_ADSL=0
1.1 C_VLAN_WAN_FIX =0   C_LOCAL_WAN_ENABLE=0
index: 0 1 2 3
port:  1 2 3 4
1.2 C_VLAN_WAN_FIX =0   C_LOCAL_WAN_ENABLE=1
index: 1 2 3
port:  2 3 4
1.3 C_VLAN_WAN_FIX =1   C_LOCAL_MULTIWAN_ENABLE =0
index: 1 2 3 4
port:  1 2 3 4
1.4 C_VLAN_WAN_FIX =1   C_LOCAL_MULTIWAN_ENABLE =1
index: 2 3 4
port:  2 3 4
2. C_LOCAL_HAVE_ADSL=1
2.1 C_VLAN_WAN_FIX =0   C_LOCAL_WAN_ENABLE=0
index: 0 2 3 4
port:  1 2 3 4
2.2 C_VLAN_WAN_FIX =0   C_LOCAL_WAN_ENABLE=1
index: 2 3 4
port:  2 3 4
2.3 C_VLAN_WAN_FIX =1
index: 2 3 4 5
port:  1 2 3 4
*/
port_count=parseInt("4");
var port_counts=port_count;
vap_count=parseInt("8");
var  vlan_num=3;//����csid�ΨӧP�_�i�H�s�W�X��vlan
wanfix=0;
wanable=0;
wanable_muti=0;
have_adsl=0
port_start=1;
port_start=0;
port_count=port_count-1;
function get_portnumber(idx)
{
var show_port=0;
if(have_adsl==0)
{
if (wanfix==0)
{
if(wanable == 1 || wanable==0) show_port = idx+1;
else show_port = idx;
}
else show_port = idx;
}
else if (have_adsl==1)
{
if (wanfix==0)
{
if(wanable==0 && idx==0) show_port = idx+1;
else show_port = idx;
}
else show_port = idx-1;
}
return show_port
}