﻿        var message = "Easy to use cadd program for roof framing"
        var character = 0;
        var to_print = "";
        var ypos = 19;
        var next = 0;
        var fade = 100;
        var next_message = new Array();
        //next_message[0] = "Version 3.1"
        //next_message[1] = "Gables, Sheds, Saltboxes, Valleys, Blind Valleys";
        //next_message[2] = "Hips, Bastard Hips, Hip Layouts, Dutch Hips";
        //next_message[3] = "Bay Roofs and Octagons too!";
        //next_message[4] = "Plumb cut or square cut fascias";
        //next_message[5] = "Includes Ft Inch Calculator";
        //next_message[6] = "An indispensable tool for only $99.00!";
        //next_message[7] = "Download it and try it free for 30 days!";

        next_message[0] = "Download it and try it free for 30 days!"
        next_message[1] = "Gables, Sheds, Saltboxes, Valleys, Blind Valleys";
        next_message[2] = "Hips, Bastard Hips, Hip Layouts, Dutch Hips";
        next_message[3] = "Bay Roofs and Octagons too!";
        next_message[4] = "Works in feet & inches or metric units";
        next_message[5] = "An indispensable tool for only $99.00!";
        next_message[6] = "";
        next_message[7] = "";
              

        function doText(text) {
            if (document.all) {
                if (character <= text.length - 1) {
                    to_print += text.charAt(character);
                    teletext.innerHTML = to_print;
                    character++;
                } else {
                    scrollIt();
                }
            }
            setTimeout("doText(message)", 50);
        }

        function scrollIt() {
            if (ypos >= 3) {
                ypos -= 1;
                fade -= 4;
                    if (ypos < 3) {
                    teletext.innerHTML = "" ;
                    }
            }else{
                ypos = 21;
                character = 0;
                to_print = "";
                nextMessage();
                fade = 100;
            }
            
            teletext.style.top = ypos;

            try {
                teletext.filters.alpha.opacity = fade;
            }catch(e){
                /*document.writeln ("catch " + e);*/
            }finally{
                /*document.writeln ("finally");*/
            }
        }

        function nextMessage() {
            message = next_message[next]
            if (next == 5){ //7) {
                next = 0;
            }else{
                next++;
            }
        }
    
        //check browser type & version
        IE4 = (document.all) ? 1 : 0;
        NS4 = (document.layers) ? 1 : 0;
        ver4 = (IE4 || NS4) ? 1 : 0;

        //secondIm = "<img src='menubar.gif' width=620 height=23 border=0 usemap=#nav>";
        arPopups = new Array();

        function setBeginEnd(which, from, to) {
            arPopups[which] = new Array();
            arPopups[which][0] = from;
            arPopups[which][1] = to;
        }

        if (ver4) {
            setBeginEnd(1, 2, 46);
            setBeginEnd(2, 49, 123);
            setBeginEnd(3, 126, 170);
            setBeginEnd(4, 174, 252);
            setBeginEnd(5, 257, 333);
        }

        clTop = 2;
        clBot = 20;

        function mapOver(which, on) {
            if (IE4) {
                whichnav = document.all.navHot.style;
            } else {
                whichnav = document.navMenu.document.navHot; 
            }

            if (!on) { whichnav.visibility = "hidden"; return }

            clLeft = arPopups[which][0];
            clRight = arPopups[which][1];

            if (NS4){
                whichnav.clip.left = clLeft;
                whichnav.clip.right = clRight;
            }else{
                whichnav.clip = "rect(" + clTop + " " + clRight + " " + clBot + " " + clLeft + ")";
            }
            whichnav.visibility = "visible";
        }
