function rndm(){return Math.round(Math.random()*20)+1;}
function check_rndm(){var n=rndm();if(n<bnrs_max){return n;}else{return check_rndm();}}
function randombanner(){t='<table class=top_banner><tr><td id=bnr1>';t+='</td><td id=bnr2>';t += '</td></tr></table>';document.write(t);var r=check_rndm();var r2=check_rndm();if(r2==r){r2=check_rndm();}$('#bnr1').empty().append(bnrs[r]);$('#bnr2').empty().append(bnrs[r2]);setTimeout(refreshbanner,60000);$('#bnr1').css("opacity",'0.5').show();$('#bnr2').css("opacity",'0.5').show();$('#bnr1').mouseover(function(){$(this).animate({opacity:1},500)});$('#bnr1').mouseout(function(){$(this).animate({opacity:0.5},500)});$('#bnr2').mouseover(function(){$(this).animate({opacity:1},500)});$('#bnr2').mouseout(function(){$(this).animate({opacity:0.5},500)});}
function refreshbanner(){var r=check_rndm();var r2=check_rndm();if(r2==r){r2=check_rndm();}$('#bnr1').animate({opacity:0},1000).empty().append(bnrs[r]).animate({opacity:0.5},1000);$('#bnr2').animate({opacity:0},1000).empty().append(bnrs[r2]).animate({opacity:0.5},1000);$('#bnr1').mouseover(function(){$(this).animate({opacity:1},500)});$('#bnr1').mouseout(function(){$(this).animate({opacity:0.5},500)});$('#bnr2').mouseover(function(){$(this).animate({opacity:1},500)});$('#bnr2').mouseout(function(){$(this).animate({opacity:0.5},500)});setTimeout(refreshbanner,60000);}
function gp(prm){location.href='http://www.containerbusiness.ru/page/'+prm+'/';}
function check_browser(){var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);if ($.browser.msie && (ie55 || ie6)) {$('#browser_info').append($.browser.msie);$('#browser_msg').show();}else {$('#browser_msg').hide();}}
function browser_msg_close() {$('#browser_msg').hide();}
/*onload*/
$(document).ready(function(){
check_browser();
if($.browser.msie)$('#p_login input').css("margin-top",'-1px').show();
if($.browser.msie)$('#p_pass input').css("margin-top",'-1px').show();
$('#s_inpt input').focus(function(){$(this).css("color",'#333').show();if($(this).attr("value")=="введите запрос на поиск..."){$(this).attr("value", "").show();}});
$('#s_inpt input').blur(function(){$(this).css("color",'#a09f9f').show();if($(this).attr("value")==0){$(this).attr("value", "введите запрос на поиск...").show();}});
$('#c_l ul li').mouseover(function(){$(this).css("background",'url("/templates/container/img/menu_bg_o.gif") no-repeat bottom left').show();$(this).css("padding-left",'10px').show();$(this).css("width",'198px').show();});
$('#c_l ul li').mouseout(function(){$(this).css("background",'url("/templates/container/img/menu_bg.gif") repeat-x bottom').show();$(this).css("padding-left",'0').show();$(this).css("width",'208px').show();});
$('#cal-ar').css("opacity",'0.5').show();
$('#cal-ar').mouseover(function(){$(this).animate({opacity:1},500)});
$('#cal-ar').mouseout(function(){$(this).animate({opacity:0.5},1000)});
});

