var m_iNewsCurrentIndex=0;var m_$newsDiv;var m_$PreButton;var m_$PostButton;var m_iNewsLength;$(document).ready(function(){m_$newsDiv=$("#dynamic_news_list");m_$PreButton=$("#switchPre");m_$PostButton=$("#switchPost");m_iNewsLength=m_$newsDiv.find(">li").length;hideAllNews();showArrow(m_iNewsCurrentIndex);showNews(m_iNewsCurrentIndex)});function hideAllNews(){m_$newsDiv.find(">li").each(function(){$(this).hide()})}function showNews(a){if(a>=0&&a<m_iNewsLength){var b=m_$newsDiv.find(">li").eq(a);$(b).show()}}function showArrow(a){if(m_iNewsLength==0||m_iNewsLength==1){$(".pre_news_image").attr("src","groupspace/css/images/myteam/arrow_gray_pre.gif");$(".next_news_image").attr("src","groupspace/css/images/myteam/arrow_gray_next.gif")}else{if(a>=0&&a<m_iNewsLength){if(a==0){$(".pre_news_image").attr("src","groupspace/css/images/myteam/arrow_gray_pre.gif");$(".next_news_image").attr("src","groupspace/css/images/myteam/arrow_black_next.gif")}else{if(a==m_iNewsLength-1){$(".pre_news_image").attr("src","groupspace/css/images/myteam/arrow_black_pre.gif");$(".next_news_image").attr("src","groupspace/css/images/myteam/arrow_gray_next.gif")}else{$(".pre_news_image").attr("src","groupspace/css/images/myteam/arrow_black_pre.gif");$(".next_news_image").attr("src","groupspace/css/images/myteam/arrow_black_next.gif")}}}}}function gotoNext(){if(m_iNewsLength>0){if(m_iNewsCurrentIndex!==m_iNewsLength-1){hideAllNews();m_iNewsCurrentIndex++;showArrow(m_iNewsCurrentIndex);showNews(m_iNewsCurrentIndex)}}}function gotoPre(){if(m_iNewsLength>0){if(m_iNewsCurrentIndex!=0){hideAllNews();m_iNewsCurrentIndex--;showArrow(m_iNewsCurrentIndex);showNews(m_iNewsCurrentIndex)}}};