<!--
var dys1;
var hrs1;
var mins1;
var secs1;

// INCLUDE A NEW MINUTES AND SECONDS VAIRABLE FOR EACH DISPLAY YOU ADD

function cd(da,ho,mi,se) // this function must be called from the <body onload=""> event
{
        tim1(da,ho,mi,se);
}

function tim1(da,ho,mi,se) // display 1 time setup
{
        dys1  = 1 * d(da); // change days here
        hrs1  = 1 * h(ho); // change Hours here
        mins1 = 1 * m(mi); // change minutes here
        secs1 = 0 + s(se); // change seconds here (always add an additional second to your total)

        if ((dys1 ==0)&&(hrs1 ==0)&&(mins1 ==0)&&(secs1 ==0))
                secs1 = 1 + s(se); // change seconds here (always add an additional second to your total)

        redo1();
}

//*******BEGIN NON EDITABLE*******
function d(obj)
{
        for(var i = 0; i < obj.length; i++)
        {
                if(obj.substring(i, i + 1) == " ")
                break;
        }
        return(obj.substring(0, i));
}

function h(obj)
{
        for(var i = 0; i < obj.length; i++)
        {
                if(obj.substring(i, i + 1) == " ")
                break;
        }
        return(obj.substring(0, i));
}

function m(obj)
{
        for(var i = 0; i < obj.length; i++)
        {
                if(obj.substring(i, i + 1) == " ")
                break;
        }

        return(obj.substring(0, i));
}

function s(obj)
{
        for(var i = 0; i < obj.length; i++)
        {
                if(obj.substring(i, i + 1) == " ")
                break;
        }

        return(obj.substring(i -2 , obj.length));
}

function dis(dys, hrs, mins, secs)
{
        var disp;

        if(dys <= 9)
        {
                disp = "0" + dys + "     ";
        }
        else
        {
                disp = dys + "     ";
        }
//        disp = dys + "     "; //Determin how minuts far from days*************

        if(hrs <= 9)
        {
                disp += "0" + hrs + "     "; //Determin how minuts far from hours   *******************
        }
        else
        {
                disp += hrs + "     "; //Determin how minuts far from hours ****************
        }

        if(mins <= 9)
        {
                disp += "0" + mins + "     "; //Determin how sec far from minutes.
        }
        else
        {
                disp += mins + "     "; //Determin how sec far from minutes.
        }

        if(secs <= 9)
        {
                disp += "0" + secs;
        }
        else
        {
                disp += secs;
        }

        return(disp);
}
//*******END NON EDITABLE*******

function redo1() // redo function for display 1
{
        secs1--;

        if(secs1 == -1)
        {
                secs1 = 59;
                mins1--;
        }

        if(mins1 == -1)
        {
                mins1 = 59;
                hrs1--;
        }

        if(hrs1 == -1)
        {
                hrs1 = 24;
                dys1--;
        }





        if (dys1<0)
        {
            dys1  =0;
            hrs  =0;
            mins1 =0;
            secs1 =0;
        }

        if (hrs1<0)
        {
            hrs1  =0;
            mins1 =0;
            secs1 =0;
        }

        if (mins1<0)
        {
            mins1 =0;
            secs1 =0;
        }

        if (secs1<0)
            secs1 =0;




        document.object_form.disp1.value = dis(dys1,hrs1,mins1,secs1); // output to display 1

        if((dys1 == 0) && (hrs1 == 0) && (mins1 == 0) && (secs1 == 0))
        {
                     window.alert("This Raffle has now ended. A new raffle will begin shortly. You may go to the - Future Auctions & Raffles - section below to view the upcoming raffles."); 
                     // change timeout message as required
                //window.location = "yourpage.htm" // redirects to specified page once timer ends and ok button is pressed

                // if your message / redirect is the same for all three timers you can enter a new function containing above code and invoke from here - do the same for the messages in redo2 and redo3        and if the timer runs out in any of the functions it will invoke the above code
        }
        else
        {
                redo = setTimeout("redo1()",1000); // 1 second loop to re-invoke function
        }
}//end function redo1()

//-->
