﻿//首页商家加盟的调用
function SetBgcolor(key)
{
get_object('list_1').style.display='none';
get_object('list_2').style.display='none';
get_object('list_4').style.display='none';
get_object('LeftAd_1').className='';
get_object('LeftAd_2').className='';
get_object('LeftAd_3').className='';
get_object('LeftAd_4').className='';
get_object('Show_ShopList').style.display='';
get_object('LeftAd_'+key).className='on';
getShopList(key);
return false;
} 

function getShopList(Type)
{
    var url  = "/ajaxcheck/Ajax_Index_LeftAd.aspx?Type="+Type;
    var y    = new XHR("re_getShopList");
    y.get(url);
    return false;
}
function re_getShopList(ret)
{
get_object('Show_ShopList').innerHTML=ret;
}
function SetBgcolor_list(key)
{
    get_object('LeftAd_1').className='';
    get_object('LeftAd_2').className='';
    get_object('LeftAd_3').className='';
    get_object('LeftAd_4').className='';
    get_object('LeftAd_'+key).className='on';
    get_object('list_1').style.display='none';
    get_object('list_2').style.display='none';
    get_object('list_4').style.display='none';
    get_object('list_'+key).style.display='block';
    get_object('Show_ShopList').style.display='none';
    return false;
}


//首页生活信息的调用
function SetBgcolor_Index(key)
{
get_object('Index_shenghuo1').className='';
get_object('Index_shenghuo2').className='';
get_object('Index_shenghuo3').className='';
get_object('Index_shenghuo4').className='';
get_object('Index_shenghuo5').className = '';
get_object('Index_shenghuo6').className = '';
get_object('Index_shenghuo'+key).className='on';
getClassList(key)
return false;
}
function getClassList(Type)
{
    var url  = "/ajaxcheck/Ajax_Index_Left_shenghuoxinxi.aspx?Type="+Type;
    var y    = new XHR("re_getClassList");
    y.get(url);
    return false;
}
function re_getClassList(ret)
{
get_object('ShowList_shenghuo').innerHTML=ret;
}

//培训首页的调用
function SetBgcolor_peixun(key)
{
get_object('Index_peixun1').className='';
get_object('Index_peixun2').className='';
get_object('Index_peixun3').className='';
get_object('Index_peixun4').className='';
get_object('Index_peixun5').className='';
get_object('Index_peixun'+key).className='on';
if(key==1)
{
get_object('ShowList_peixun').style.display='none';
get_object('ShowList_peixun_tueijian').style.display='';
}
else
{
get_object('ShowList_peixun').style.display='';
get_object('ShowList_peixun_tueijian').style.display='none';
getPeixunList(key)
}
return false;
}
function getPeixunList(Type)
{
    var url  = "/ajaxcheck/Ajax_Eudcation_Bottom.aspx?Type="+Type;
    var y    = new XHR("re_getPeixunList");
    y.get(url);
    return false;
}
function re_getPeixunList(ret)
{
get_object('ShowList_peixun').innerHTML=ret;
}



//商家首页的推荐商家调用
function SetBgcolor_ShopIndex(key)
{
get_object('list_tueijianshangjia1').style.display='none';
get_object('list_tueijianshangjia2').style.display='none';
get_object('ShopIndex1').className='';
get_object('ShopIndex2').className='';
get_object('ShopIndex3').className='';
get_object('ShowList_tueijianshangjia').style.display='';
get_object('ShopIndex'+key).className='on';
getShopIndexList(key)
return false;
}
function getShopIndexList(Type)
{
    var url  = "/ajaxcheck/Ajax_ShopIndex_ShopList.aspx?Type="+Type;
    var y    = new XHR("re_getShopIndexList");
    y.get(url);
    return false;
}
function re_getShopIndexList(ret)
{
get_object('ShowList_tueijianshangjia').innerHTML=ret;
}

function SetBgcolor_ShopIndex_list(key)
{
    get_object('list_tueijianshangjia1').style.display='none';
    get_object('list_tueijianshangjia2').style.display='none';
    get_object('ShowList_tueijianshangjia').style.display='none';
    get_object('ShopIndex1').className='';
    get_object('ShopIndex2').className='';
    get_object('ShopIndex3').className='';
    get_object('ShopIndex'+key).className='on';
    get_object('list_tueijianshangjia'+key).style.display='block';
    return false;
}

//以下为吃首页AJAX调用

//餐饮加盟商
function MemberChangeBgcolor(key)
{
get_object('LeftMember_1').className='';
get_object('LeftMember_3').className='';
get_object('LeftMember_4').className='';
 get_object('LeftMember_'+key).className='on';;
if ( key == 4)
{
    get_object('EatIndex_MemberList').style.display='none';
     get_object('first_news_benzhou').style.display='none';
    get_object('first_news_4').style.display='';
}
else if ( key == 1 ) 
{
    get_object('EatIndex_MemberList').style.display='none';
     get_object('first_news_benzhou').style.display='';
    get_object('first_news_4').style.display='none';
}
else
{
   get_object('first_news_4').style.display='none';
   get_object('EatIndex_MemberList').style.display='';
   get_object('first_news_benzhou').style.display='none';
   getMemberList(key);
}


return false;
} 

function getMemberList(Type)
{
    var url  = "/ajaxcheck/Ajax_EatNewIndexPage_Member.aspx?Type="+Type;
    var y    = new XHR("re_getMemberList");
    y.get(url);
    return false;
}
function re_getMemberList(ret)
{
get_object('EatIndex_MemberList').innerHTML=ret;
}


//特色美食
function SpcialChangeBgcolor(key)
{
get_object('Left_Sp_1').className='';
get_object('Left_Sp_2').className='';
get_object('Left_Sp_3').className='';
get_object('Left_Sp_4').className='';
get_object('Left_Sp_5').className='';
get_object('Left_Sp_'+key).className='on';
get_object('EatIndex_SpcialList').style.display='none';
get_object('EatIndex_SpcialList1').style.display='none';
get_object('EatIndex_SpcialList2').style.display='none';
get_object('EatIndex_SpcialList3').style.display='none';
get_object('EatIndex_SpcialList4').style.display='none';
get_object('EatIndex_SpcialList5').style.display='none';
get_object('EatIndex_SpcialList'+key).style.display='';

///getSpecialList(key);
return false;
} 

function getSpecialList(Type)
{
    var url  = "/ajaxcheck/Ajax_EatNewIndexPage_Special.aspx?Type="+Type;
    var y    = new XHR("re_getSpecialList");
    y.get(url);
    return false;
}
function re_getSpecialList(ret)
{
get_object('EatIndex_SpcialList').innerHTML=ret;
}


//吃首页 精彩评论 抢占沙发 
function SetLeftShafBgcolor(key)
{
get_object('LeftShafa_1').className='';
//get_object('LeftShafa_2').className='';
get_object('LeftShafa_'+key).className='on';
getLeftShafaList(key);
return false;
} 

function getLeftShafaList(Type)
{
    var url  = "/ajaxcheck/Ajax_Index_LeftShafa.aspx?Type="+Type;
    var y    = new XHR("re_getLeftShafaList");
    y.get(url);
    return false;
}
function re_getLeftShafaList(ret)
{
get_object('Show_ShaFaList').innerHTML=ret;
}