﻿//visitor stats
//    if (window.XMLHttpRequest)
//        {
//        // code for IE7+, Firefox, Chrome, Opera, Safari
//        xmlhttp=new XMLHttpRequest();
//        }
//    else
//        {
//        // code for IE6, IE5
//        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//        }
//        xmlhttp.onreadystatechange=function()
//        {
//        if(xmlhttp.readyState==4)
//            {
//            alert(xmlhttp.responseText)
//            }
//        }
//    xmlhttp.open('GET','quoteprocessor.aspx?data',true);
//    xmlhttp.send(null);
// temporary fix
$(document).ready(function(){document.getElementById('lblLoader').style.visibility='hidden';document.getElementById('imgPageLoader').style.visibility='hidden';$('#divLoader').fadeOut(1600);})
//visibility fix
$('#divHome').fadeOut(100);
$('#divQuote').fadeOut(100);
$('#divServices').fadeOut(100);
$('#divContact').fadeOut(100);
$('#divProducts').fadeOut(100);
$('#divProduct').fadeOut(100);
$('#div1').fadeOut(100);
$('#div2').fadeOut(100);
$('#div3').fadeOut(100);
$('#div4').fadeOut(100);
$('#div5').fadeOut(100);
$('#divTopsellers').fadeOut(100);
$('#divPlastic').fadeOut(100);
$('#divMetal').fadeOut(100);
$('#divPens').fadeOut(100);
$('#divSwivel').fadeOut(100);      
$('#divLeather').fadeOut(100);
$('#divCompact').fadeOut(100);
$('#topPrev').fadeOut(100)
$('#btmPrev').fadeOut(100)
$('#topNext').fadeOut(100)
$('#btmNext').fadeOut(100)
//блок квоты
var temp1 = new Image(); temp1.src='http://alpha-usb.com/images/buttons/ibSubmit2.png'; 
var temp2 = new Image(); temp2.src = 'http://alpha-usb.com/images/loader.gif';
//верхние кнопки
var temp3 = new Image(); temp3.src = 'http://alpha-usb.com/images/buttons/btn_home.jpg'; 
var temp4 = new Image(); temp4.src = 'http://alpha-usb.com/images/buttons/btn_home2.jpg'; 
var temp5 = new Image(); temp5.src = 'http://alpha-usb.com/images/buttons/btn_Products.jpg'; 
var temp6 = new Image(); temp6.src = 'http://alpha-usb.com/images/buttons/btn_Products2.jpg'; 
var temp7 = new Image(); temp7.src = 'http://alpha-usb.com/images/buttons/btn_quote.jpg'; 
var temp8 = new Image(); temp8.src = 'http://alpha-usb.com/images/buttons/btn_quote2.jpg'; 
var temp9 = new Image(); temp9.src = 'http://alpha-usb.com/images/buttons/btn_services.jpg'; 
var temp10 = new Image(); temp10.src = 'http://alpha-usb.com/images/buttons/btn_services2.jpg'; 
var temp11 = new Image(); temp11.src = 'http://alpha-usb.com/images/buttons/btn_contact.jpg'; 
var temp12 = new Image(); temp12.src = 'http://alpha-usb.com/images/buttons/btn_contact2.jpg'; 
//боковые кнопки
var temp13 = new Image(); temp13.src='http://alpha-usb.com/images/buttons/btn_All_Products.jpg'; 
var temp14 = new Image(); temp14.src = 'http://alpha-usb.com/images/btn_All_Products2.jpg'; 
var temp15 = new Image(); temp15.src = 'http://alpha-usb.com/images/buttons/btn_Top_Sellers.jpg'; 
var temp16 = new Image(); temp16.src = 'http://alpha-usb.com/images/buttons/btn_Top_Sellers2.jpg'; 
var temp17 = new Image(); temp17.src = 'http://alpha-usb.com/images/buttons/btn_Plastic.jpg'; 
var temp18 = new Image(); temp18.src = 'http://alpha-usb.com/images/buttons/btn_Plastic2.jpg'; 
var temp19 = new Image(); temp19.src = 'http://alpha-usb.com/images/buttons/btn_Metal.jpg'; 
var temp20 = new Image(); temp20.src = 'http://alpha-usb.com/images/buttons/btn_Metal2.jpg'; 
var temp21 = new Image(); temp21.src = 'http://alpha-usb.com/images/buttons/btn_Pens.jpg'; 
var temp22 = new Image(); temp22.src = 'http://alpha-usb.com/images/buttons/btn_Pens2.jpg'; 
var temp23 = new Image(); temp23.src = 'http://alpha-usb.com/images/buttons/btn_Swivel.jpg'; 
var temp24 = new Image(); temp24.src = 'http://alpha-usb.com/images/buttons/btn_Swivel2.jpg'; 
var temp25 = new Image(); temp25.src = 'http://alpha-usb.com/images/buttons/btn_Leather.jpg'; 
var temp26 = new Image(); temp26.src = 'http://alpha-usb.com/images/buttons/btn_Leather2.jpg'; 
var temp27 = new Image(); temp27.src = 'http://alpha-usb.com/images/buttons/btn_Compact.jpg'; 
var temp28 = new Image(); temp28.src = 'http://alpha-usb.com/images/buttons/btn_Compact2.jpg';
// блок квоты-II
var temp29 = new Image(); temp29.src = 'http://alpha-usb.com/images/Quote.png';
var temp30 = new Image(); temp30.src = 'http://alpha-usb.com/images/buttons/ibSubmit.png';
// browser detection ==================
if (navigator.appName == 'Microsoft Internet Explorer' && navigator.appVersion.indexOf('MSIE 6.0') != -1)
    {
    document.getElementById('klyak').style.visibility = 'hidden';
    alert('You are using obsolete internet browser version (March 2001). We recommend to upgrade it for full website functionality and proper look. It\'s free, fast and easy')
    }
// browser detection end ==============
if (window.location.hash == ""){window.location.hash = "#Home";}
if (window.location.hash == "#Home"){home()}else{document.getElementById('ibHome').src = 'http://alpha-usb.com/images/buttons/btn_Home.jpg'}
if (window.location.hash=="#products.page1" || window.location.hash=="#products.page2" || window.location.hash=="#products.page3" || window.location.hash=="#products.page4" || window.location.hash=="#products.page5"){allProducts();}
if (window.location.hash.substring(0,6) == "#Quote")
    {
    if (window.location.hash.indexOf('.') != -1)
        {
        document.getElementById('txtStyle').value = window.location.hash.substring(document.location.hash.indexOf('.') + 1)
        }
    quote();
    }
if (window.location.hash == "#Product"){allProducts();}
if (window.location.hash == "#Services"){services();}
if (window.location.hash == "#Contact"){contact();}
// From Product page
if (window.location.hash == '#Product'){product('PL-01');}
if (window.location.hash == '#Topsellers'){topSellers();}
if (window.location.hash == '#Plastic'){plastic();}
if (window.location.hash == '#Metal'){metal();}
if (window.location.hash == '#Pens'){pens();}
if (window.location.hash == '#Swivel'){swivel();}
if (window.location.hash == '#Leather'){leather();}
if (window.location.hash == '#Compact'){compact();}
