        var imgs = new Array();
        imgs[0] = 'images/headimages/Agg.jpg';
        imgs[1] = 'images/headimages/Aggr6.jpg';
        imgs[2] = 'images/headimages/Aggre1.jpg';
        imgs[3] = 'images/headimages/Aggre2.jpg';
        imgs[4] = 'images/headimages/Aggre3.jpg';
        imgs[5] = 'images/headimages/Aggre4.jpg';
        imgs[6] = 'images/headimages/Aggre5.jpg';
        imgs[7] = 'images/headimages/Aggre6.jpg';
        imgs[8] = 'images/headimages/Asph1.jpg';
        imgs[9] = 'images/headimages/Asph2.jpg';
        imgs[10] = 'images/headimages/Asph3.jpg';
        imgs[11] = 'images/headimages/Joint1.jpg';
        imgs[12] = 'images/headimages/Joint2.jpg';
        imgs[13] = 'images/headimages/Lab.jpg';
        imgs[14] = 'images/headimages/Logis.jpg';
        imgs[15] = 'images/headimages/Logis2.jpg';
        imgs[16] = 'images/headimages/MillServ.jpg';
        imgs[17] = 'images/headimages/MillServ2.jpg';
        imgs[18] = 'images/headimages/MillServ3.jpg';
        imgs[19] = 'images/headimages/Peop1.jpg';
        imgs[20] = 'images/headimages/People.jpg';
        imgs[21] = 'images/headimages/People3.jpg';
        imgs[22] = 'images/headimages/People4.jpg';
        imgs[23] = 'images/headimages/People5.jpg';
        imgs[24] = 'images/headimages/People6.jpg';
        imgs[25] = 'images/headimages/People9.jpg';
        imgs[27] = 'images/headimages/People8.jpg';
        imgs[28] = 'images/headimages/agg7.jpg';
        imgs[29] = 'images/headimages/agg8.jpg';
        imgs[30] = 'images/headimages/agg9.jpg';
        imgs[31] = 'images/headimages/agg10.jpg';
        imgs[32] = 'images/headimages/agg11.jpg';
        imgs[33] = 'images/headimages/agg12.jpg';
        imgs[34] = 'images/headimages/agg13.jpg';
        imgs[35] = 'images/headimages/agsph4.jpg';
        imgs[36] = 'images/headimages/joint3.jpg';
        imgs[37] = 'images/headimages/millserv4.jpg';
        imgs[38] = 'images/headimages/People9.jpg';
        imgs[39] = 'images/headimages/Peoplethai.jpg';
        imgs[40] = 'images/headimages/GTMS1.jpg';
        imgs[41] = 'images/headimages/GTMS2.jpg';

        var img = 0;
        var nav = navigator.userAgent
        $(function() {

            $("body").css("backgroundColor", "#aaa");
            $(".container").css("border", "1px solid #eee");
            $(".container").corner("8px");
        });
        function loadMaterials(prd) {

            if (prd == 'slag') {
                if (nav.indexOf("MSIE") > -1) {
                    //alert("ie");
                    GB_showCenter('Slag Based Materials', '../ViewMaterials.aspx?prd=slag', '500', '650')
                }
                else {
                    GB_showCenter('Slag Based Materials', '../ViewMaterials.aspx?prd=slag', '500px', '650px')
                }
            }
            else {
                if (nav.indexOf("MSIE") > -1) {
                    //alert("ie");
                    GB_showCenter('Natural Materials', '../ViewMaterials.aspx?prd=natural', '500', '650')
                }
                else {
                    GB_showCenter('Natural Materials', '../ViewMaterials.aspx?prd=natural', '500px', '650px')
                }
            }
        }
        function loadLocations(typ) {
            if (typ == 'ag') {
                if (nav.indexOf("MSIE") > -1) {
                    //alert("ie");
                    GB_showCenter('View Locations', '../ViewLocations.aspx?mat=ag', '500', '650');
                }
                else {
                    GB_showCenter('View Locations', '../ViewLocations.aspx?mat=ag', '500px', '650px');
                }
            }
            else if (typ == 'asp') {

                if (nav.indexOf("MSIE") > -1) {
                    //alert("ie");
                    GB_showCenter('View Locations', '../ViewLocations.aspx?mat=asp', '500', '650');
                }
                else { GB_showCenter('View Locations', '../ViewLocations.aspx?mat=asp', '500px', '650px'); }
            }
            else if (typ == 'sms') {

                if (nav.indexOf("MSIE") > -1) {
                    //alert("ie");
                    GB_showCenter('View Locations', '../ViewLocations.aspx?mat=sms', '500', '650');
                }
                else { GB_showCenter('View Locations', '../ViewLocations.aspx?mat=sms', '500px', '650px'); }
            }
        }


        $(function() {
            $(".options").css("color", "#000");
            $(".search").hide()
                        .show();
            $(".logo").click(function() { window.location = "home.aspx" });
            $(".logo").hover(function() { $(this).css({ "cursor": "pointer" }).attr("title", "Return to Levy Home") }, function() { $(this).css("border", "") });
            $(".button").hover(function() { $(this).css("color", "yellow"); }, function() { $(this).css("color", "white") });
            $(".contactus").hover(function() { $(this).attr("src", "images/buttons/contactus_ro.png"); }, function() { $(this).attr("src", "images/buttons/contactus.png"); });
            $(".sub").css("visibility", "visible")
                     .hide();
            $(".bottomMenu").click(function() { window.location = ($(this).attr("href")) });
            setInterval("getNextImage()", 3200);
        });
        function getNextImage()
        {
                var ran_unrounded=Math.random()*42;
                var ran_number=Math.floor(ran_unrounded); 
                if (img==0)
                {  
                   $("#imgLower").fadeIn(2000);
                   $("#imgMid").fadeOut(2000);
                   img = 1;
                }
                else if(img==1)
                {
                   $("#imgMid").attr("src",imgs[ran_number]); 
                   img=2;
                }
                else if (img==2)
                {
                   $("#imgMid").fadeIn(2000);
                   $("#imgLower").fadeOut(2000);                                      
                    img=3;
                }
                else if(img==3)
                {
                    $("#imgLower").attr("src",imgs[ran_number]);
                    img=0;
                }
        }
        
    
    function openVideo(path)
    {
    alert("To view Video, please hold down the 'Ctrl' key then click \"Ok\".");
    window.open(path,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=0,resizable=0');
    }

    
