
function switch_tabs(new_tab)
{if($x('#promo_'+new_tab).is(':visible'))
{return;}
$x('#promo_box div.promo_box').hide();$x('#promo_'+new_tab).fadeIn();$x('#promo_tabs .promo_tab_selected').removeClass('promo_tab_selected');$x('#tab_'+new_tab).addClass('promo_tab_selected');}
function autoSwitchTabs()
{var selected_tab=$x('#promo_tabs .promo_tab_selected');if(!selected_tab)
{switch_tabs(1);}
else
{if($x(selected_tab).next().length!=0)
{switch_tabs(parseInt(selected_tab.attr('id').substr(4))+1);}
else
{switch_tabs(1)}}}
var portalTabSwitchInterval;var portalTabSwitchTime=9*700;function loadTabs()
{$x('#promo_tabs a').mouseover(function(){clearInterval(portalTabSwitchInterval);switch_tabs(parseInt($x(this).attr('id').substr(4)));}).mouseout(function(){portalTabSwitchInterval=setInterval(autoSwitchTabs,portalTabSwitchTime);});$x('#promo_box .promo_box').mouseover(function(){clearInterval(portalTabSwitchInterval);}).mouseout(function(){portalTabSwitchInterval=setInterval(autoSwitchTabs,portalTabSwitchTime);});portalTabSwitchInterval=setInterval(autoSwitchTabs,portalTabSwitchTime);}
$x(document).ready(function(){loadTabs()});
