// Please keep copyright lines in place without changes.
//   Copyright 2000 William and Mari Bontrager
//   Copyright 2003 Bontrager Connection, LLC
//
// For more information and instructions, please 
//    see the "Double Click Trapper" article at 
//    http://willmaster.com/possibilities/archives


TrapClicksForHowManySeconds = 6;

NameOfForm = "login";
NameOfSubmitButton = "submit1";


// ////////////////////////////////////////// //
// NO CUSTOMIZATION REQUIRED BELOW THIS POINT //
// ////////////////////////////////////////// //


TrapTime = 0;
DoubleClickTrapperCounter = 0;


function DoubleClickTrapperAction() {
DoubleClickTrapperCounter++;
var trapTheClick = false;
if(DoubleClickTrapperCounter > 1 ) { trapTheClick = true; }
if(trapTheClick == true) {
        if(TrapTime == 0) {
                var tDate = new Date;
                TrapTime = tDate.valueOf();
                }
        else {
                var tDate = new Date;
                var localTrapTime = tDate.valueOf();
                if((localTrapTime - TrapTime) > (TrapClicksForHowManySeconds * 1000)) {
                        TrapTime = 0;
                        trapTheClick = false;
                        DoubleClickTrapperCounter = 0;
                        }
                }
        }
var valueToReturn = true;
if(trapTheClick == true) {
        valueToReturn = false;
        }
return valueToReturn;
} // end of function DoubleClickTrapperAction()






