document.write('')

agt=navigator.userAgent.toLowerCase()

ie=(document.all) ? 1:0
ie4=(agt.indexOf('msie 4')!=-1) ? 1:0
ie5=(agt.indexOf('msie 5')!=-1) ? 1:0
ie55=(agt.indexOf("msie 5.5")!=-1) ? 1:0
ie6=(agt.indexOf("msie 6")!=-1) ? 1:0
ie = ie4 || ie5 || ie55 || ie6
ns=(document.layers && parseInt(navigator.appVersion)>=4) ? 1:0
best=(document.getElementById) ? 1:0
opera=(agt.indexOf("opera")!=-1) ? 1:0
gecko=(agt.indexOf("gecko")!=-1) ? 1:0

win=( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) )
mac=(agt.indexOf("mac")!=-1);
imgs=(document.images) ? 1:0

//check form
function check_form(obj){
    for (i=0;i<obj.length;i++){
        if (obj[i].value == ''){alert('Все поля обязательны для заполнения!');return false}
    }
}

function auth_redirect(obj){
    eval('location.href = "http://'+obj[0].value+':'+obj[1].value+'@bs.ivox.ru:8080/main/"')
}

//menu
function preload(){
    icons_menu = new Array()
    for (i=1;i<8;i++){
        icons_menu[i] = new Image()
        icons_menu[i].src = 'images/menu_icons_'+i+'_on.gif'
    }

    services_menu = new Array()
    for (i=1;i<=8;i++){
        services_menu[i] = new Image()
        services_menu[i].src = 'images/menu_services_'+i+'_on.jpg'
    }
}

function img_change(id,where){
    eval(where+'_tmp = new Image()')
    eval(where+'_tmp.src = '+where+'_menu['+id+'].src')
    eval(where+'_menu['+id+'].src = document.images.menu_'+where+'_'+id+'.src')
    eval('document.images.menu_'+where+'_'+id+'.src = '+where+'_tmp.src')
}

function brw_size(what) {
if (ns || gecko) {
    width = innerWidth
    height = innerHeight
} else {
    width = document.body.clientWidth
    height = document.body.clientHeight
}
if (what == "w") return width
if (what == "h") return height
}
