browser_name = navigator.appName; 
browser_version = parseFloat(navigator.appVersion); 

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; } 
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; } 
else { roll = 'false'; } 

function chan(img,ref) { if (roll == 'true') { document.images[img].src = ref; } } 

if (roll == 'true') 
{ 
a1=new Image;	a1.src="/menus/index.gif";
a2=new Image;	a2.src="/menus/index_c.gif";
a3=new Image;	a3.src="/menus/cur_town.gif";
a4=new Image;	a4.src="/menus/cur_town_c.gif";
a5=new Image;	a5.src="/menus/moscow.gif";
a6=new Image;	a6.src="/menus/moscow_c.gif";
a7=new Image;	a7.src="/menus/regions.gif";
a8=new Image;	a8.src="/menus/regions_c.gif";
a9=new Image;	a9.src="/menus/online.gif";
a10=new Image;	a10.src="/menus/online_c.gif";
a11=new Image;	a11.src="/menus/service.gif";
a12=new Image;	a12.src="/menus/service_c.gif";
a13=new Image;	a13.src="/menus/price.gif";
a14=new Image;	a14.src="/menus/price_c.gif";
a15=new Image;	a15.src="/menus/specials.gif";
a16=new Image;	a16.src="/menus/specials_c.gif";
a17=new Image;	a17.src="/menus/newgoods.gif";
a18=new Image;	a18.src="/menus/newgoods_c.gif";
a19=new Image;	a19.src="/menus/top.gif";
a20=new Image;	a20.src="/menus/top_c.gif";


a23=new Image;	a23.src="/menus/paper.gif";
a24=new Image;	a24.src="/menus/paper_c.gif";
a25=new Image;	a25.src="/menus/links.gif";
a26=new Image;	a26.src="/menus/links_c.gif";
}



var pics = new Array(
    "01.jpg", "Сеть магазинов Термоклуб",
    "02.jpg", "Сеть магазинов Термоклуб",
    "03.jpg", "Фасад магазина Термоклуб в Санкт-Петербурге",
    "04.jpg", "Сеть магазинов Термоклуб"
)

var i, j;
var flag; // Флажок, используемый для проверки совпадения
var pics_show = 1; // Число показываемых на страничке визуалов

var rand = new Array(pics_show);

for (i=0; i<pics_show; i++) {
    do {
        flag=0;
        n = Math.floor(Math.random()*(pics.length/2));
        for (j=0; j<i; j++) {
            if (n == rand[j]) {
                flag=1;
            }
        }
    } while (flag);
    rand[i] = n;
}

function show_visual(number) {
   n=rand[number-1];
   document.write('<img src="/images/vis/' + pics[n*2] + '" border=0 width=160 height=167 alt="' + pics[n*2+1] + '">');
}




function open_img(URL,w,h)
{
var smallWindow=window.open(URL,"_blank","width="+w+",height="+h+",menubar=no,toolbar=no,location=no,directoties=no,status=no,resizable=no,scrollbars=no");
if (smallWindow != null && smallWindow.opener == null) smallWindow.opener=window;
smallWindow.focus();
}


function Open_html(URL,w,h)
{
var smallWindow=window.open(URL,"_blank","width="+w+",height="+h+",menubar=no,toolbar=no,location=no,directoties=no,status=no,resizable=no,scrollbars=no");
if (smallWindow != null && smallWindow.opener == null) smallWindow.opener=window;
smallWindow.focus();
}
