
function SwitchTable(obj)
{
    var saleTable = document.getElementById('SaleTable');
    var groupTable = document.getElementById('GroupTable');
    var btnTable = document.getElementById('btnTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'images/m_meun_bg01.jpg';
		btnTable.rows(0).cells(1).background = 'images/m_meun_bg01_over.jpg';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = 'images/m_meun_bg01.jpg';
		btnTable.rows(0).cells(0).background = 'images/m_meun_bg01_over.jpg';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}


function SwitchNewsTable(obj)
{
    var saleTable = document.getElementById('TradeTable');
    var groupTable = document.getElementById('FocusTable');
    var btnTable = document.getElementById('btnNewsTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'images/m_meun_bg01.jpg';
		btnTable.rows(0).cells(1).background = 'images/m_meun_bg01_over.jpg';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = 'images/m_meun_bg01.jpg';
		btnTable.rows(0).cells(0).background = 'images/m_meun_bg01_over.jpg';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}


function SwitchLoginTable(obj)
{
    var saleTable = document.getElementById('UserLoginTable');
    var groupTable = document.getElementById('ManuLoginTable');
    var btnTable = document.getElementById('btnLoginTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = '#';
		btnTable.rows(0).cells(1).background = '#';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = '#';
		btnTable.rows(0).cells(0).background = '#';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}

function SwitchLoginTable2(obj)
{
    var saleTable = document.getElementById('UserLoginTable');
    var groupTable = document.getElementById('ManuLoginTable');
    var btnTable = document.getElementById('btnLoginTable2');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'images/dx.png';
		btnTable.rows(0).cells(1).background = '#';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = 'images/dx.png';
		btnTable.rows(0).cells(0).background = '#';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}



function SwitchLMTable(obj)
{
    var saleTable = document.getElementById('LandTable');
    var groupTable = document.getElementById('MarkTable');
    var btnTable = document.getElementById('btnLMTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = '#';
		btnTable.rows(0).cells(1).background = '#';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = '#';
		btnTable.rows(0).cells(0).background = '#';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}

function SwitchForumTable2(obj)
{
    var saleTable = document.getElementById('LTable');
    var groupTable = document.getElementById('RTable');
    var btnTable = document.getElementById('btnForumTable2');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = '#';
		btnTable.rows(0).cells(1).background = '#';
        saleTable.style.display = 'block';
        groupTable.style.display = 'none';
   }
    else
    {
 		btnTable.rows(0).cells(1).background = '#';
		btnTable.rows(0).cells(0).background = '#';
       saleTable.style.display = 'none';
        groupTable.style.display = 'block';
    }
}

function SwitchActivePad(ButtonID,btnTable,LTable, RTable,ActivePic, NormalPic)
{
    var LeftPad = document.getElementById(LTable);
    var RightPad = document.getElementById(RTable);
    var ButtonTable = document.getElementById(btnTable);
   
    if (ButtonID == '0')
    {
		ButtonTable.rows(0).cells(0).background = ActivePic;
		ButtonTable.rows(0).cells(1).background = NormalPic;
        LeftPad.style.display = 'block';
        RightPad.style.display = 'none';
   }
    else if(ButtonID == '1')
    {
		ButtonTable.rows(0).cells(1).background = ActivePic;
		ButtonTable.rows(0).cells(0).background = NormalPic;
        LeftPad.style.display = 'none';
        RightPad.style.display = 'block';
    }
}

function SwitchForumTable(obj)
{
    var divDatum = document.getElementById('div1');
    var divStuff = document.getElementById('div2');
   // var divAdorn = document.getElementById('div3');
    var btnTable = document.getElementById('btnForumTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'imagess/bg_wlrt.gif';
		btnTable.rows(0).cells(1).background = 'imagess/bg_wlrtA.gif';
		//btnTable.rows(0).cells(2).background = '#';
        divDatum.style.display = 'block';
        divStuff.style.display = 'none';
        //divAdorn.style.display = 'none';
        divOther.style.display = 'none';
    }
    else if (obj == 2)
    {
		btnTable.rows(0).cells(1).background = 'imagess/bg_wlrt.gif';
		btnTable.rows(0).cells(0).background = 'imagess/bg_wlrtA.gif';
		//btnTable.rows(0).cells(2).background = '#';
        divDatum.style.display = 'none';
        divStuff.style.display = 'block';
        //divAdorn.style.display = 'none';
    }
    //else if (obj == 3)
    //{
	//	btnTable.rows(0).cells(2).background = '#';
	//	btnTable.rows(0).cells(1).background = '#';
	//	btnTable.rows(0).cells(0).background = '#';
   //     divDatum.style.display = 'none';
     //   divStuff.style.display = 'none';
     //   divAdorn.style.display = 'block';
   // }
}

function SwitchFangTable(obj)
{
    var divl = document.getElementById('div1');
    var divf = document.getElementById('div2');
    var divN = document.getElementById('div3');
    var divY = document.getElementById('div4');
    var divB = document.getElementById('div5');
    var divL = document.getElementById('div6');
    var btnTable = document.getElementById('btnForumTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_6.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_5.jpg';
        divl.style.display = 'block';
        divf.style.display = 'none';
        divN.style.display = 'none';
        divY.style.display = 'none';
        divB.style.display = 'none';
        divL.style.display = 'none';

        
    }
    else if (obj == 2)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_6.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_5.jpg';
        divl.style.display = 'none';
        divf.style.display = 'block';
        divN.style.display = 'none';
        divY.style.display = 'none';
        divB.style.display = 'none';
        divL.style.display = 'none';

    }
    else if (obj == 3)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_6.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_5.jpg';
        divl.style.display = 'none';
        divf.style.display = 'none';
        divN.style.display = 'block';
        divY.style.display = 'none';
        divB.style.display = 'none';
        divL.style.display = 'none';

    }
    else if (obj == 4)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_6.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_5.jpg';
        divl.style.display = 'none';
        divf.style.display = 'none';
        divN.style.display = 'none';
        divY.style.display = 'block';
        divB.style.display = 'none';
        divL.style.display = 'none';

    }
    else if (obj == 5)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_6.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_5.jpg';
        divl.style.display = 'none';
        divf.style.display = 'none';
        divN.style.display = 'none';
        divY.style.display = 'none';
        divB.style.display = 'block';
        divL.style.display = 'none';

    }
    else if (obj == 6)
    {
		btnTable.rows(0).cells(0).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(1).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(2).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(3).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(4).background = 'images/bg_5.jpg';
		btnTable.rows(0).cells(5).background = 'images/bg_6.jpg';
        divl.style.display = 'none';
        divf.style.display = 'none';
        divN.style.display = 'none';
        divY.style.display = 'none';
        divB.style.display = 'none';
        divL.style.display = 'block';

    }
    
}

function SwitchCategoryTable(obj)
{
    var divDatum = document.getElementById('divDatum');
    var divStuff = document.getElementById('divStuff');
    var divAdorn = document.getElementById('divAdorn');
    var divOther = document.getElementById('divOther');
    var btnTable = document.getElementById('btnCategoryTable');
   
    if (obj == 1)
    {
		btnTable.rows(0).cells(0).background = 'images/k_ban_menu_over.jpg';
		btnTable.rows(0).cells(1).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(2).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(3).background = 'images/k_ban_menu.jpg';
        divDatum.style.display = 'block';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'none';
        divOther.style.display = 'none';
    }
    else if (obj == 2)
    {
		btnTable.rows(0).cells(1).background = 'images/k_ban_menu_over.jpg';
		btnTable.rows(0).cells(0).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(2).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(3).background = 'images/k_ban_menu.jpg';
        divDatum.style.display = 'none';
        divStuff.style.display = 'block';
        divAdorn.style.display = 'none';
        divOther.style.display = 'none';
    }
    else if (obj == 3)
    {
		btnTable.rows(0).cells(2).background = 'images/k_ban_menu_over.jpg';
		btnTable.rows(0).cells(1).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(0).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(3).background = 'images/k_ban_menu.jpg';
        divDatum.style.display = 'none';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'block';
        divOther.style.display = 'none';
    }
    else if (obj == 4)
    {
		btnTable.rows(0).cells(3).background = 'images/k_ban_menu_over.jpg';
		btnTable.rows(0).cells(1).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(2).background = 'images/k_ban_menu.jpg';
		btnTable.rows(0).cells(0).background = 'images/k_ban_menu.jpg';
        divDatum.style.display = 'none';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'none';
        divOther.style.display = 'block';
    }
}

function SwitchTiaoZaoTable(obj)
{
    var divDatum = document.getElementById('div1');
    var divStuff = document.getElementById('div2');
    var divAdorn = document.getElementById('div3');
    var divOther = document.getElementById('div4');
    var tdLab = document.getElementById('tdLab');
   
    if (obj == 1)
    {
				tdLab.style.background = 'url(img/images/bn_01.jpg) no-repeat top';

        divDatum.style.display = 'block';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'none';
        divOther.style.display = 'none';
    }
    else if (obj == 2)
    {
		tdLab.style.background = 'url(img/images/bn_02.jpg) no-repeat top';
        divDatum.style.display = 'none';
        divStuff.style.display = 'block';
        divAdorn.style.display = 'none';
        divOther.style.display = 'none';
    }
    else if (obj == 3)
    {
		tdLab.style.background = 'url(img/images/bn_03.jpg) no-repeat top';
        divDatum.style.display = 'none';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'block';
        divOther.style.display = 'none';
    }
    else if (obj == 4)
    {
		tdLab.style.background = 'url(img/images/bn_04.jpg) no-repeat top';
        divDatum.style.display = 'none';
        divStuff.style.display = 'none';
        divAdorn.style.display = 'none';
        divOther.style.display = 'block';
    }
}

function switchLevel1(obj)
{
	var table = obj.parentNode.parentNode.parentNode;
	var activerow = obj.parentNode;
	
	for(var i=0;i<table.rows.length;i++)
	{
		table.rows(i).style.display = 'none';
	}
	
	for(var i=0;i<table.rows.length;i=i+2)
	{
		table.rows(i).style.display = 'block';
		table.rows(i).children(0).style.backgroundImage='url(images/bg_banpros02.gif)';
		table.rows(i).children(0).children(0).className = '';
	}
	
	activerow.style.display = 'block';
	activerow.children(0).children(0).className = 'z_white';
	activerow.children(0).style.backgroundImage='url(images/bg_banpros01.gif)';
	activerow.nextSibling.style.display = 'block';
}

function activebtn(obj)
{
	if (obj == 'catTable')
	{		
		resetTopLevelBtn(obj);

		var table = document.getElementById(obj);
		
		table.rows(0).style.display = 'block';
		table.rows(0).children(0).children(0).className = 'z_white';
		table.rows(0).children(0).style.backgroundImage='url(images/bg_banpros01.gif)';
		table.rows(0).nextSibling.style.display = 'block';

	}
	else
	{
		var link = document.getElementById(obj);
		var table = link.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
		resetTopLevelBtn(table.id);
		
		var activerow = link.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
		
		activerow.style.display = 'block';
		activerow.previousSibling.children(0).children(0).className = 'z_white';
		activerow.previousSibling.children(0).style.backgroundImage='url(images/bg_banpros01.gif)';
		activerow.previousSibling.nextSibling.style.display = 'block';
	}
}

function resetTopLevelBtn(obj)
{
		var table = document.getElementById(obj);
		
		for(var i=0;i<table.rows.length;i++)
		{
			table.rows(i).style.display = 'none';
		}
	
		for(var i=0;i<table.rows.length;i=i+2)
		{
			table.rows(i).style.display = 'block';
			table.rows(i).children(0).style.backgroundImage='url(images/bg_banpros02.gif)';
			table.rows(i).children(0).children(0).className = '';
		}
		
}
























