
    // if the iip form object container hasn't been created
    if(typeof window.iip.form != "object")
    {
        // create the general iip form object
        window.iip.form    =    function()
        {
            // return the iip object (opening curly brace needs to be on same line as return)
            return{
                // setup methods
                setup:        {
                                  // 
                                  inputs:       function(obj)
                                                {
                                                    // if no object is specified
                                                    if(typeof obj=='undefined')
                                                    {
                                                        // get all the input fields on the page
                                                        var fields    =    $$('input','textarea');
                                                    }
                                                    // otherwise if a form is specifier
                                                    else if(obj.getTag()=='form')
                                                    {
                                                        // get all the input fields in the form
                                                        var fields    =    $$('form#'+obj.id+' input','form#'+obj.id+' textarea');
                                                    }
                                                    // otherwise if an input field is specified
                                                    else if(obj.getTag()=='input' || obj.getTag()=='textarea')
                                                    {
                                                        // get the one input field
                                                        var fields    =    obj;
                                                    }
                                                    // add the keydown event handlers
                                                    fields.addEvent
                                                    (
                                                        // when a key is pressed
                                                        'keydown',
                                                        // anonymous function with event object
                                                        function(e)
                                                        {
                                                            // if it's not a textarea
                                                            if(this.getTag()!='textarea')
                                                            {
                                                                // a new event object
                                                                var lo_event    =    new Event(e);

                                                                // if the enter key was pressed
                                                                if(lo_event.key=='enter')
                                                                {
                                                                    // prevent the default action
                                                                    lo_event.preventDefault();
                                                                    // fire the form's submit action (through the forms submit button)
                                                                    $$('input.submit')[0].fireEvent('click');
                                                                }
                                                            }
                                                        }
                                                    );
                                                }
                              },
                // button object
                button:       {
                                  // disable button method
                                  disable:    function(button,options)
                                              {
                                                  // remove all click events
                                                  button.removeEvents('click');
                                              }
                              }
            };
        }();
    }
