1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    19
    Vote Rating
    0
    justCharlie is on a distinguished road

      0  

    Default IE6 Render Form Incorrectly

    IE6 Render Form Incorrectly


    Hello All,

    I have a registration page with ext form. The form will check if there are shopping cart items, if it does it will display them on the form. Here's the problem, after loading the items on the form in the middle of the form, it pushes other fields downward. In Ff, this works perfectly, however, on IE6, every fields stay at its position so form is now deformed.





    PHP Code:
    {if true && $event_root->zopen}
    <
    script type='text/javascript' language="javascript">
    {
    literal}
    function 
    isValidCreditCard(ccnum)
    {
        
    //Combined all the below credit card regex into one, since we do not know which credit card type
        
    var re = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}|5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}|6011-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}|3[0,6,8]\d{12}$/;

        
    /*if (type == "Visa")
        {
        // Visa: length 16, prefix 4, dashes optional.
        var re = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/;
        }
        else if (type == "MC")
        {
        // Mastercard: length 16, prefix 51-55, dashes optional.
        var re = /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/;
        }
        else if (type == "Disc")
        {
        // Discover: length 16, prefix 6011, dashes optional.
        var re = /^6011-?\d{4}-?\d{4}-?\d{4}$/;
        }
        else if (type == "AmEx")
        {
        // American Express: length 15, prefix 34 or 37.
        var re = /^3[4,7]\d{13}$/;
        }
        else if (type == "Diners")
        {
        // Diners: length 14, prefix 30, 36, or 38.
        var re = /^3[0,6,8]\d{12}$/;
        }*/

        
    if (!re.test(ccnum))
        {
            return 
    false;
        }

        
    // Remove all dashes for the checksum checks to eliminate negative numbers
        
    ccnum ccnum.split("-").join("");
        
    // Checksum ("Mod 10")
        // Add even digits in even length strings or odd digits in odd length strings.
        
    var checksum 0;
        for (var 
    i=(2-(ccnum.length 2)); i<=ccnum.lengthi+=2)
        {
            
    checksum += parseInt(ccnum.charAt(i-1));
        }
        
    // Analyze odd digits in even length strings or even digits in odd length strings.
        
    for (var i=(ccnum.length 2) + 1i<ccnum.lengthi+=2)
        {
            var 
    digit parseInt(ccnum.charAt(i-1)) * 2;
            if (
    digit 10)
            {
                
    checksum += digit;
            }
            else
            {
                
    checksum += (digit-9);
            }
        }
        if ((
    checksum 10) == 0)
        {
            return 
    true;
        }
        return 
    false;
    }

    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget 'side';
    var 
    d   = new Date();
    var 
    form = new Ext.form.Form({
        
    urlprefixURL '/events/ajax/event_reg.php',
        
    baseParams: {pk: {/literal}{$smarty.get.id}{literal},
        
    event_root_title'{/literal}{$event_root->title|addslashes}{literal}',
        
    show_confirmtrue}
        
    //                 reg_d: (d.getMonth() + 1) + '/' + d.getDate() + '/' + d.getFullYear()}
    });

    Ext.apply(Ext.form.VTypes, {
        
    'phone10' : function(v)
        {
            var 
    phoneRe = /^\(?\d{3}\)?-?\d{3}-?\d{4}$/;
            return 
    phoneRe.test(v);
        },
        
    'phone10Text' 'Please enter a valid 10-digit phone number.',
        
        
    'phone_extension' : function(v)
        {
            var 
    phoneRe = /^\d*$/;
            return 
    phoneRe.test(v);
        },
        
    'phone_extensionText' 'Please enter a valid numeric phone extension.',
        
        
    'cc_code' : function(v)
        {
            if (
    'cc' == form.findField('payment_type').getValue())
            {
                var 
    ccCodeRe = /^\d{3,4}$/;
                return 
    ccCodeRe.test(form.findField('cc_code').getValue());
            }
            return 
    true;
        },
        
    'cc_codeText' 'Please enter your credit card security code.',
        
        
    'cc_number' : function(v)
        {
            if (
    'cc' == form.findField('payment_type').getValue())
            {
                return 
    isValidCreditCard(form.findField('cc_number').getValue());
            }
            return 
    true;
        },
        
    'cc_numberText' 'Please enter a correct credit card number',
        
        
    'password_confirm' : function(v)
        {
            if (
    Ext.get('new_password_section').isVisible())
            {
                return 
    Ext.get('new_password1').getValue() === Ext.get('new_password2').getValue();
            }
            else
            {
                return 
    true;
            }
        },
        
    'password_confirmText' 'This must match your first password'
    });

    //Combo box variable namespaces declarations
    Ext.namespace('Ext.state_data');
    Ext.namespace('Ext.gov_branch');
    Ext.namespace('Ext.job_function');
    Ext.namespace('Ext.agency_function');
    Ext.namespace('Ext.audit_data');
    Ext.namespace('Ext.how_hear_data');
    Ext.namespace('Ext.payment_type_data');
    Ext.namespace('Ext.months_data');
    Ext.namespace('Ext.years_data');

    Ext.state_data.states = [
    {/
    literal}
    {foreach 
    from=$states item=st_name key=st_abbrev name=states}
    [
    '{$st_abbrev}''{$st_name}']{if !$smarty.foreach.states.last},{/if}
    {/foreach}
    {
    literal}
    ];

    Ext.audit_data.days = [
    [
    'R',  'Refuse to answer'],
    {/
    literal}
    {
    section loop=31 name=dobs}
    [{
    $smarty.section.dobs.iteration}, {$smarty.section.dobs.iteration}]{if !$smarty.section.dobs.last},{/if}
    {/
    section}
    {
    literal}
    ];

    Ext.months_data.months = [
    [
    1,  'January'],
    [
    2,  'February'],
    [
    3,  'March'],
    [
    4,  'April'],
    [
    5,  'May'],
    [
    6,  'June'],
    [
    7,  'July'],
    [
    8,  'August'],
    [
    9,  'September'],
    [
    10,  'October'],
    [
    11,  'November'],
    [
    12,  'December']
    ];

    var 
    currentTime = new Date();
    var 
    start_year currentTime.getFullYear();

    Ext.years_data.years = [
    [
    start_year,  start_year],
    [
    start_year 1,  start_year 1],
    [
    start_year 2,  start_year 2],
    [
    start_year 3,  start_year 3],
    [
    start_year 4,  start_year 4],
    [
    start_year 5,  start_year 5],
    [
    start_year 6,  start_year 6]
    ];

    Ext.how_hear_data.choices = [
    {/
    literal}
    {foreach 
    from=$how_hear item=hh key=hh_key name=how_hear}
    [
    '{$hh_key}''{$hh}']{if !$smarty.foreach.how_hear.last},{/if}
    {/foreach}
    {
    literal}
    ];

    Ext.payment_type_data.types = [
    [
    '',  'N/A'],
    [
    'billme',  'Bill Me'],
    [
    'cc',  'Credit Card'],
    [
    'po',  'Purchase Order']
    ];

    Ext.gov_branch.branches = [
    {/
    literal}
    {foreach 
    from=$gov_branch item=gbranch key=gbranch_key name=gov_branches}
    [
    '{$gbranch_key}''{$gbranch}']{if !$smarty.foreach.gov_branches.last},{/if}
    {/foreach}
    {
    literal}
    ];

    Ext.job_function.functions = [
    {/
    literal}
    {foreach 
    from=$job_function item=jfunc key=jfunc_key name=job_functions}
    [
    '{$jfunc_key}''{$jfunc}']{if !$smarty.foreach.job_functions.last},{/if}
    {/foreach}
    {
    literal}
    ];

    Ext.agency_function.functions = [
    {/
    literal}
    {foreach 
    from=$agency_function item=afunc key=afunc_key name=agency_functions}
    [
    '{$afunc_key}''{$afunc}']{if !$smarty.foreach.agency_functions.last},{/if}
    {/foreach}
    {
    literal}
    ];


    Ext.onReady(function()
    {
        
    Ext.QuickTips.init();
        
    Ext.QuickTips.trackMouse    true;
        
    Ext.QuickTips.animate       true;

        var 
    loaderMsg Ext.Msg.show({title'Building Registration Form',
        
    msg'We are building the form and populating it with ' +
        
    'your account information. Please wait.<br/>',
        
    width:240,
        
    closable:false});

        var 
    audit_combo = new Ext.form.ComboBox({
            
    fieldLabel'To start your Free Annual subscription, <i>Government Technology</i> would normally ask that ' +
            
    'you sign the request. For audit purposes and in lieu of a signature, would you note the day of ' +
            
    'your birth in the following field? This information is for verification purposes only. It will ' +
            
    'not be shared with any outside parties.',
            
    hiddenName:'audit',
            
    labelSeparator:'&nbsp;',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['audit_index''audit'],
                
    data Ext.audit_data.days
            
    }),
            
    displayField:'audit',
            
    valueField:'audit_index',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select One...',
            
    selectOnFocus:true
        
    });

        var 
    how_hear_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;How did you hear about {/literal}{$event_root->title|escape}{literal}?',
            
    labelSeparator:'&nbsp;',
            
    hiddenName:'how_hear',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['hh_index''how_hear'],
                
    data Ext.how_hear_data.choices
            
    }),
            
    displayField:'how_hear',
            
    width:280,
            
    valueField:'how_hear',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Choose One Here...',
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });

        var 
    states_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;State',
            
    hiddenName:'state',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['abbr''state'],
                
    data Ext.state_data.states
            
    }),
            
    width:40,
            
    displayField:'abbr',
            
    valueField:'abbr',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    /*emptyText:'Select a state...',*/
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });

        var 
    states_combo2 = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;State',
            
    hiddenName:'billme_state',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['abbr''state'],
                
    data Ext.state_data.states
            
    }),
            
    displayField:'abbr',
            
    valueField:'abbr',
            
    typeAheadtrue,
            
    width:85,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select a state...',
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });

        var 
    countries_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Country',
            
    hiddenName:'country',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['country'],
                
    data : [
                        [
    'USA'],
                        [
    'Canada']
                    ]
            }),
            
    displayField:'country',
            
    valueField:'country',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select a country...',
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });
        
        var 
    gov_branch_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red;">*</span> If you are government, please choose a branch of government',
            
    hiddenName:'gov_branch',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['index''branch'],
                
    data Ext.gov_branch.branches
            
    }),
            
    displayField:'branch',
            
    valueField:'branch',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select a branch of government...',
            
    selectOnFocus:true,
            
    width:350,
            
    allowBlank:false
        
    });

        var 
    job_function_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red;">*</span> Which category BEST describes your JOB FUNCTION/CLASSIFICATION?',
            
    hiddenName:'job_function',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['index''function'],
                
    data Ext.job_function.functions
            
    }),
            
    labelSeparator:'&nbsp;',
            
    displayField:'function',
            
    valueField:'function',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select a job function...',
            
    selectOnFocus:true,
            
    width:350,
            
    allowBlank:false
        
    });

        var 
    agency_function_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red;">*</span>What is the primary FUNCTION of your AGENCY/DEPARTMENT?',
            
    hiddenName:'agency_function',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['index''function'],
                
    data Ext.agency_function.functions
            
    }),
            
    labelSeparator:'&nbsp;',
            
    displayField:'function',
            
    valueField:'function',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select an agency/department...',
            
    selectOnFocus:true,
            
    width:375,
            
    allowBlank:false
        
    });

        var 
    payment_type_combo = new Ext.form.ComboBox({
            
    fieldLabel'Payment',
            
    id'payment_type_combo',
            
    hiddenName:'payment_type',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['p_index''payment_type'],
                
    data Ext.payment_type_data.types
            
    }),
            
    displayField:'payment_type',
            
    valueField:'p_index',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Select One...',
            
    selectOnFocus:true
        
    });

        var 
    exp_date_months_combo = new Ext.form.ComboBox({
            
    fieldLabel'<span style="color:red">*</span>Expiration Date',
            
    hiddenName:'cc_exp_date_month',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['num_month''txt_month'],
                
    data Ext.months_data.months
            
    }),
            
    displayField:'txt_month',
            
    valueField:'num_month',
            
    typeAheadtrue,
            
    width:120,
            
    forceSelectiontrue,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Month...',
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });

        var 
    exp_date_years_combo = new Ext.form.ComboBox({
            
    fieldLabel:'&nbsp;',
            
    labelSeparator:'&nbsp;',
            
    hiddenName:'cc_exp_date_year',
            
    store: new Ext.data.SimpleStore({
                
    fields: ['year''year'],
                
    data Ext.years_data.years
            
    }),
            
    displayField:'year',
            
    valueField:'year',
            
    typeAheadtrue,
            
    forceSelectiontrue,
            
    width:74,
            
    mode'local',
            
    triggerAction'all',
            
    emptyText:'Year...',
            
    selectOnFocus:true,
            
    allowBlank:false
        
    });

        
    payment_type_combo.on('select', function()
        {
            if (
    payment_type_combo.getValue() == 'billme')
            {
                
    Ext.get('cc_fs').dom.style.display 'none';
                
    Ext.get('billme_fs').dom.style.display 'block';
                
    Ext.get('po_fs').dom.style.display 'none';
            }
            else if (
    payment_type_combo.getValue() == 'cc')
            {
                
    Ext.get('cc_fs').dom.style.display 'block';
                
    Ext.get('billme_fs').dom.style.display 'none';
                
    Ext.get('po_fs').dom.style.display 'none';
            }
            else if (
    payment_type_combo.getValue() == 'po')
            {
                
    Ext.get('cc_fs').dom.style.display 'none';
                
    Ext.get('billme_fs').dom.style.display 'none';
                
    Ext.get('po_fs').dom.style.display 'block';
            }
            else
            {
                
    Ext.get('cc_fs').dom.style.display 'none';
                
    Ext.get('billme_fs').dom.style.display 'none';
                
    Ext.get('po_fs').dom.style.display 'none';
            }

            
    //resetBlank();
        
    });

        
    how_hear_combo.on('select', function()
        {
            var 
    how_hear_other form.findField('how_hear_other');

            if (
    'OTHER' == how_hear_combo.getValue())
            {
                
    how_hear_other.enable();
                
    how_hear_other.reset();
                
    how_hear_other.getEl().frame("FF6600"1, {duration1});
                
    setTimeout("form.findField('how_hear_other').focus();",500);
            }
            else
            {
                
    how_hear_other.disable();
                
    how_hear_other.reset();
            }
        });

        
    gov_branch_combo.on('select', function()
        {
            var 
    gov_branch_other form.findField('gov_branch_other');

            if (
    "X - Other, Please Specify" == gov_branch_combo.getValue() ||
                
    "X - Other" == gov_branch_combo.getValue() ||
                
    "W - Others allied to the Field" == gov_branch_combo.getValue()) // Gov branch is "Other"
            
    {
                
    gov_branch_other.enable();
                
    gov_branch_other.reset();
                
    gov_branch_other.getEl().frame("FF6600"1, {duration1});
                
    setTimeout("form.findField('gov_branch_other').focus();",500);
            }
            else
            {
                
    gov_branch_other.disable();
                
    gov_branch_other.reset();
            }
        });

        
    job_function_combo.on('select', function()
        {
            var 
    job_function_other form.findField('job_function_other');

            if (
    "Z - Other, Please Specify" == job_function_combo.getValue() ||
                
    "Z - Other" == job_function_combo.getValue() ||
                
    "W - Other" == job_function_combo.getValue()) // Job Function is "Other"
            
    {
                
    job_function_other.enable();
                
    job_function_other.reset();
                
    job_function_other.getEl().frame("FF6600"1, {duration1});
                
    setTimeout("form.findField('job_function_other').focus();",500);
            }
            else
            {
                
    job_function_other.disable();
                
    job_function_other.reset();
            }
        });

        
    agency_function_combo.on('select', function()
        {
            var 
    agency_function_other form.findField('agency_function_other');

            if (
    "99 - Other, Please Specify" == agency_function_combo.getValue() ||
                
    "99 - Other" == agency_function_combo.getValue()) // Agency Branch is Other
            
    {
                
    agency_function_other.enable();
                
    agency_function_other.reset();
                
    agency_function_other.getEl().frame("FF6600"1, {duration1});
                
    setTimeout("form.findField('agency_function_other').focus();",500);
            }
            else
            {
                
    agency_function_other.disable();;
                
    agency_function_other.reset();
            }
        });

        
    form.fieldset({legend:'Registration - Fields marked with an \'<span style="color:red">*</span>\' are required.',
        
    labelAlign:'right'});
        
    form.container({width:"auto"});
        
    form.column(
        {
    width:200labelWidth:75},

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;First Name',
            
    name'first_name',
            
    id'first_name',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Last Name',
            
    name'last_name',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Title',
            
    name'title',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'Division',
            
    name'division'
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Phone',
            
    name'phone',
            
    id'phone',
            
    vtype:'phone10',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'Extension',
            
    name'phone_extension',
            
    id'phone_extension',
            
    maskRe"/^\d(1,2,3,4,5,6)$/'",
            
    vtype:'phone_extension',
            
    invalidText"Please insert a valid numeric phone extension."
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Email',
            
    name'email1',
            
    id'email1',
            
    vtype:'email',
            
    allowBlank:false
        
    }));

        
    form.applyIfToFields({width:100});

        
    form.column(
        {
    width:"auto"labelWidth:110},

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Agency/Company',
            
    name'organization',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'Fax',
            
    name'fax'
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Address 1',
            
    name'address1',
            
    allowBlank:false
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'Address 2',
            
    name'address2'
        
    }),

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;City',
            
    name'city',
            
    allowBlank:false
        
    }),

        
    states_combo,
        
        
    countries_combo,

        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>&nbsp;Zip/Postal Code',
            
    name'zip',
            
    id'zip',
            
    allowBlank:false
        
    }));

        
    form.end();//end of registration container
        
    form.end();//end of the registration fieldset

        
    form.applyIfToFields({width:100});

        {/
    literal}{if !$logged_in}{literal}
            
    form.fieldset(
                {
    id:'new_password_section'legend:'Your Account Password - All fields required'labelWidth:125style:'height:120'});
                
                
    form.container({id:'new_password_message'width:"auto"});
                
    form.end();
                
                
    // The first password field cannot be named "password" or it will conflict with the login dialog
                
                
    form.add(
                    new 
    Ext.form.TextField({
                        
    fieldLabel'<font color=Red>*</font>&nbsp;Password',
                        
    autoCreate : {tag"input"type"password"},
                        
    name'new_password1',
                        
    id'new_password1',
                        
    vtype:'alphanum',
                        
    allowBlank:false
                    
    }),
                    
                    new 
    Ext.form.TextField({
                        
    fieldLabel'<font color=Red>*</font>&nbsp;Confirm Password',
                        
    autoCreate : {tag"input"type"password"},
                        
    name'new_password2',
                        
    id'new_password2',
                        
    vtype:'password_confirm',
                        
    allowBlank:false
                    
    })
                );
            
    form.end();
            
            
    form.fieldset(
                {
    id:'existing_password_section'legend:'Your Account Password - All fields required'labelWidth:100style:'height:120'});
                
                
    form.container({id:'existing_password_message'width:"auto"});
                
    form.end();
                
                
    // The first password field cannot be named "password" or it will conflict with the login dialog
                
                
    form.container({width:"auto"style:'height:30px'});    // height needed for IE
                    
                    
    form.column({width:'76%'});
                    
                        
    form.add(new Ext.form.TextField({
                            
    fieldLabel'<font color=Red>*</font>&nbsp;Password',
                            
    autoCreate : {tag"input"type"password"},
                            
    name'password1',
                            
    id'password1',
                            
    vtype:'alphanum',
                            
    allowBlank:false
                        
    }));
                        
                    
    form.end();
                    
                    
    form.column({id:'dummy_button'width:'14%'float:'left'});
                    
    form.end();
                    
                    
    form.column({id:'password_image_wrapper'width:'10%'float:'left'});
                    
    form.end();
                
    form.end();
                
                
    form.container({id:'existing_password_footnote'style:'padding-right: 12%;'});
                
    form.end();
            
    form.end();
        {/
    literal}{/if}{literal}
        
        
    form.fieldset({id'shopping_cart'legend:'Registration Plans - Shopping Cart'});

        
    form.container({id:'shopping_cart_header'width:"auto"});
        
    form.end();

        
    form.container({width:"auto"});
        
    form.column({width"100%"labelWidth:0style:'margin-bottom:8px;'});

        var 
    radio;
        {/
    literal}
        {foreach 
    from=$event_root->events('eq:subtype:MAIN''eq:default_event:1'item=event name=default_events}
        {if 
    false !== strstr($event->title'Industry')}
        {
    assign var=cc value=' - <span style="color:red">Credit Card Payment Only</span>'}
        {else}
        {
    assign var=cc value=''}
        {/if}

        {
    literal}
        
        
    radio = new Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'{/literal}<b>{$event->title|escape}{$cc}&nbsp;&nbsp;&nbsp; (Cost: ${$event->early_price}){literal}</b>',
            
    inputValue: {/literal}{$event->pk}{literal},
            
    price: {/literal}{$event->price}{literal},
            
    id'default_events' + {/literal}{$event->pk}{literal},
            
    name'default_events[]',
            
    msgTarget'under',
            
    checked: {/literal} {if strpos($event->title'Industry')} false {else} true {/if} {literal}
        });
        
    form.add(radio);
        
        {/
    literal}
        {if 
    $smarty.foreach.default_events.first}
        {
    assign var="gov_price" value=$event->price}
        {/if}
        
        

        {if 
    $cc != ''}
        
    radio.on('focus'force_credit_cardradio);
        {else}
        
    radio.on('focus'unforce_credit_cardradio);
        {/if}
        {/foreach}
        {
    literal}
        
        
    form.end();

        
    form.column({width"100%"labelWidth:"auto"labelAlign:'top'},
        new 
    Ext.form.TextField({
            
    fieldLabel'If you are registering with a promotional code or team code, please enter it here',
            
    name'promo_code'
        
    }));

        
    form.column({id:'classes_column'width"100%"labelWidth:"auto"labelAlign:'top'});
        
    form.end(); //end the classes_column

        
    form.end(); //end the  cart container
        
    form.end(); //end the  cart fieldset


        
    form.fieldset({id'attendee_profile'legend:'Attendee Profile - All fields required'});
        
    form.container({id:'sub_question'width:"auto"});
        
    form.end();

        
    form.container({width:"auto"}); //first container
        
    form.column(
        {
    width:"25%"labelWidth:0},

        new 
    Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'YES',
            
    inputValue"yes",
            
    id"sub1",
            
    name'gt_sub'
        
    }));

        
    form.column(
        {
    width:"25%"labelWidth:0},

        new 
    Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'NO',
            
    inputValue"no",
            
    id"sub2",
            
    name'gt_sub'
        
    }));

        
    form.column(
        {
    width:"50%"labelWidth:0},

        new 
    Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'Please renew my subscription',
            
    inputValue"renew",
            
    id"sub3",
            
    name'gt_sub'

        
    }));

        
    form.end();//endof the first container

        
    form.container({id:'sub_type_question'width:"auto"});
        
    form.end();

        
    form.container({width:"auto"});//2nd container of attendee profile

        
    form.column(
        {
    width:"50%"labelWidth:0},

        new 
    Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'Digital Version',
            
    inputValue'Digital',
            
    id"sub_type1",
            
    name'gt_sub_type'
        
    }));

        
    form.column(
        {
    width:"50%"labelWidth:0},

        new 
    Ext.form.Radio({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'Print Version',
            
    inputValue'Print',
            
    id"sub_type2",
            
    name'gt_sub_type'
        
    }));

        
    form.end();//end of 2nd container

        
    form.fieldset({legend:'Audit'labelWidth:300labelAlign:'top'style:'margin-top:10px; background-color:white'},

        
    audit_combo

        
    );

        
    form.container({width:"auto"style:'margin-bottom:10px;'});//3rd container of attendee profile

        
    form.column(
        {
    width:"100%"labelWidth:'auto'labelAlign:'top'},

        
    gov_branch_combo);

        
    form.column(
        {
    width:"100%"labelWidth:35labelAlign:'left'},

        new 
    Ext.form.TextField({
            
    fieldLabel'Other',
            
    width160,
            
    name'gov_branch_other',
            
    id'gov_branch_other',
            
    disabled:true,
            
    allowBlank:false
        
    }));


        
    form.column(
        {
    width:"100%"labelWidth:'auto'labelAlign:'top'},

        
    job_function_combo);


        
    form.column(
        {
    width:"100%"labelWidth:35labelAlign:'left'},

        new 
    Ext.form.TextField({
            
    fieldLabel'Other',
            
    width160,
            
    name'job_function_other',
            
    id'job_function_other',
            
    disabled:true,
            
    allowBlank:false
        
    }))


        
    form.column(
        {
    width:"100%"labelWidth:'auto'labelAlign:'top'},

        
    agency_function_combo);


        
    form.column(
        {
    width:"100%"labelWidth:35labelAlign:'left'},
        new 
    Ext.form.TextField({
            
    fieldLabel'Other',
            
    width160,
            
    name'agency_function_other',
            
    id'agency_function_other',
            
    disabled:true,
            
    allowBlank:false
        
    }));

        
    form.end();//end of the 3rd container

        
    form.fieldset({legend:'eNewsletters'style:'margin-top:10px; background-color:white'});

        
    form.container({id:'enewsletter_header'width:"auto"});
        
    form.end();

        
    form.container({width:"auto"}); //1st container of enewsletters (sub fieldset of Attendee profile)
        
    form.column(
        {
    width:"100%"labelWidth:0},

        {/
    literal}
        {foreach 
    from=$enewsletters item=enewsletter name=enl}
        {
    literal}new Ext.form.Checkbox({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    inputValue'{/literal}{$enewsletter[0]}{literal}',
            
    boxLabel'{/literal}{$enewsletter[1]|addslashes}{literal}',
            
    name'enewsletters[]'
            
    {/literal}{if in_array($enewsletter[0], $user_enewsletters)},checkedtrue{/if}{literal}
        }){/
    literal}{if !$smarty.foreach.enl.last}{literal},{/literal}{/if}
        {/foreach}
        {
    literal}
        );

        
    form.end(); //close eNewsletter container
        
    form.end(); //close eNewsletter fieldset

        
    form.container({width:"auto"});//4th container of attendee profile
        
    form.column(
        {
    width:"100%"labelWidth:'auto'labelAlign:'top'},

        
    how_hear_combo);

        
    form.column(
        {
    width:"100%"labelWidth:35labelAlign:'left'},

        new 
    Ext.form.TextField({
            
    fieldLabel'Other',
            
    width160,
            
    name'how_hear_other',
            
    id'how_hear_other',
            
    disabled:true,
            
    allowBlank:false
        
    }));

        
    form.end();//end of the 4th container
        
    form.end();//end of the attendee profile fieldset
        //form.end();//extra

        
    form.applyIfToFields({width:200});

        
    //Payment Information
        
    form.fieldset({id'payment_section'legend:'Payment Information'});
        
    form.container({width:"auto"});//1st container of payment
        
    form.column({width:"100%"}, payment_type_combo);

        
    //*** BILL ME FORM ***//
        
    form.column({width:"100%"}); //1st open column of payment
        
    form.fieldset({id'billme_fs'legend:'BILL ME'style:'display:none; margin-top:10px; background-color:white'});//sub fieldset of payment
        
    form.column({width:"100%"labelWidth:0},
        new 
    Ext.form.Checkbox({
            
    fieldLabel:'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'The information above is the same as my billing information.  ',
            
    name'same_info',
            
    id'same_info'
        
    }));

        
    form.column({width:"100%"labelWidth:90labelAlign:'right'});//1st column of billme
        
    form.container({width:"auto"});//1st container of billme
        
    form.column({width:"50%"},
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>First Name',
            
    name'billme_first_name',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Address 1',
            
    name'billme_address1',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>City',
            
    name'billme_city',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Zip',
            
    name'billme_zip',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Agency',
            
    name'billme_agency',
            
    allowBlankfalse
        
    }));
        
    form.column({width:"50%"},
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Last Name',
            
    name'billme_last_name',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'Address 2',
            
    name'billme_address2'
        
    }),
        
    states_combo2,
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Phone',
            
    id'billme_phone',
            
    name'billme_phone',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'Extension',
            
    id'billme_phone_extension',
            
    name'billme_phone_extension'
        
    }));
        
    form.end();//end of 1st container billme
        
    form.end();//1st open column billme
        
    form.end(); //End billme_fs
        
    form.end(); //End billme column
        
    form.applyIfToFields({width:100});
        
    //*** END BILL ME FORM ***//

        //*** CREDIT CARD FORM ***//
        
    form.column({width:"100%"});
        
    form.fieldset({id'cc_fs'legend:'CREDIT CARD'style:'display:none; margin-top:10px; background-color:white'});
        
    form.column({width:"100%"labelWidth:130labelAlign:'right'});
        
    form.add(
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Credit Card Number',
            
    name'cc_number',
            
    vtype'cc_number',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>First Name on Card',
            
    name'cc_first_name',
            
    id'cc_first_name',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Last Name on Card',
            
    name'cc_last_name',
            
    allowBlankfalse
        
    }),
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>Security Code',
            
    name'cc_code',
            
    width50,
            
    id'cc_code',
            
    vtype'cc_code',
            
    allowBlankfalse
        
    }));

        
    form.container({width:"auto"});
        
    form.column({width:"67%"}, exp_date_months_combo);

        
    form.column({width:"33%"labelWidth:0}, exp_date_years_combo);
        
    form.end(); //End the two-column expiration date container

        
    form.add(
        new 
    Ext.form.TextField({
            
    fieldLabel:'&dagger;Email Recipient',
            
    name:'cc_email_recip'
        
    }));
        
    form.end(); //End credit_card_col1

        
    form.column({id'cc_col2'width:"100%"});
        
    form.end();
        
    form.end(); //End cc_fs
        
    form.end(); //End credit card column
        
    form.applyIfToFields({width:235});
        
    //*** END CREDIT CARD FORM ***//

        //*** PO FORM ***//
        
    form.column({width:"100%"});
        
    form.fieldset({id'po_fs'legend:'PURCHASE ORDER'style:'display:none; margin-top:10px; background-color:white'});
        
    form.column({width:"100%"labelWidth:80labelAlign:'right'});
        
    form.add(
        new 
    Ext.form.TextField({
            
    fieldLabel'<span style="color:red">*</span>P.O. Number',
            
    name'po_number',
            
    allowBlankfalse
        
    }));
        
    form.end(); //End 1st open column PO FORM
        
    form.column({id:'po_col2'width:"100%"});
        
    form.end(); //End po_col2
        
    form.end(); //End po_fs
        
    form.end(); //End po column
        
    form.applyIfToFields({width:235});
        
    //*** END PO FORM ***//

        
    form.end();//end of PAYMENT INFORMATION 1st container
        
    form.end();//end of the PAYMENT INFORMATION fieldset

        
    form.container({id:'checks_payable'width:"auto"});
        
    form.end();

        
    form.fieldset({legend:'PLEASE NOTE'style:'clear:both; margin-top:10px; background-color:white'});
        
    form.container({width:"auto"});
        
    form.column({width:"100%"id:'please_note'});
        

        
    form.end();//end of column please_note
        
    form.column({width:"100%"labelWidth:0},

        new 
    Ext.form.Checkbox({
            
    fieldLabel'&nbsp;'labelSeparator:'&nbsp;',
            
    boxLabel'Government Technology Events may wish to share our mailing list and email list with our ' +
            
    'exhibitors and sponsors. If you do not wish your name included, please indicate here.',
            
    name'opt_out'
        
    }));
        
    form.end();//end of container
        
        
    form.fieldset({id'opt-in'legend'Briefcase Sponsor'style:'margin-top:10px; background-color:white'});

            
    form.container({width"auto"});
            
                
    form.column(
            
                    {
    width:"100%"labelWidth:0},
                
                    new 
    Ext.form.Checkbox({
                        
    fieldLabel:'&nbsp;',
                        
    labelSeparator:'&nbsp;',
                        
    inputValue'1',
                        
    boxLabel'Yes! I would like to receive email information and special offers from Symantec',
                        
    name'opt_in',
                        
    id'opt_in'
                    
    })
                );
        
            
    form.end();

        
    form.end();
        
        
    form.end();//endof fieldset
        //END OF THE FORM CREATION


        
    function force_credit_card()
        {
            
    payment_type_combo.store.removeAll();
            
    payment_type_combo.store.loadData([
            [
    'cc',  'Credit Card']
            ]);

            if (
    'cc' != payment_type_combo.getValue())
            {
                
    payment_type_combo.setValue('cc');

                
    Ext.get('cc_fs').dom.style.display 'block';
                
    Ext.get('billme_fs').dom.style.display 'none';
                
    Ext.get('po_fs').dom.style.display 'none';
            }
        }

        function 
    unforce_credit_card()
        {
            
    payment_type_combo.store.removeAll();
            
    payment_type_combo.store.loadData(Ext.payment_type_data.types);
        }


        var 
    resetBlank = function()
        {
            var 
    theForm form.el.dom;
            for (var 
    0theForm.lengthi++)
            {
                var 
    currField form.findField(theForm.elements[i].name);

                if (
    currField && ' ' == currField.getValue())
                {
                    var 
    currFieldName currField.getName();
                    if (
    'new_password1' != currFieldName && 'new_password2' != currFieldName && 'password1' != currFieldName)
                    {
                        
    currField.reset();
                    }
                }
            }
        }

        var 
    checkConfirmation = function(btntext)
        {
            if (
    'yes' == btn || btn)
            {
                var 
    pk form.baseParams.pk;
                var 
    event_root_title form.baseParams.event_root_title;
                
    form.baseParams = {pk:pkevent_root_title:event_root_title};

                
    onSubmit();
            }
            
    this.hide(); //the passed in dialog
        
    }
        var 
    dialog//variable for form.submit();
        
    var onSubmit = function()
        {
            var 
    invalidField null;
            var 
    counter 0;
            var 
    theForm form.el.dom;
            for (var 
    0theForm.lengthi++)
            {
                var 
    currField form.findField(theForm.elements[i].name);
                
                if (
    currField && currField.disabled)
                {
                    var 
    currFieldName currField.getName();
                    if (
    'new_password1' != currFieldName && 'new_password2' != currFieldName && 'password1' != currFieldName)
                    {
                        
    currField.setValue(' ');
                    }
                }

                if (
    currField 
                    
    && currField.getEl().dom.offsetHeight 
                    
    && currField.getEl().dom.offsetWidth 
                    
    && !currField.isValid())
                {
                    
    counter++;
                    if (
    == counter)
                    {
                        
    currField.getEl().dom.focus();
                    }
                    
    currField.getEl().frame("FF0000"1, {duration1});
                    
    invalidField currField.getEl();
                }
                else if (
    currField 
                    
    && == currField.getEl().dom.offsetHeight 
                    
    && == currField.getEl().dom.offsetWidth 
                    
    && !currField.isValid())
                {
                    var 
    currFieldName currField.getName();
                    if (
    'new_password1' != currFieldName && 'new_password2' != currFieldName && 'password1' != currFieldName)
                    {
                        
    currField.setValue(' ');
                    }
                }
            }

            
    //Check the default events for prices greater than zero
            
    var checkboxes      document.getElementsByName('default_events[]');
            var 
    default_total   0;
            if (
    checkboxes.length 0)
            {
                for (var 
    0checkboxes.lengthi++)
                {
                    if (
    checkboxes[i].checked)
                    {
                        
    default_total += parseInt(form.findField(checkboxes[i].id).price);
                    }
                }
            }

            if (
    '' == form.findField('payment_type').getValue())
            {
                var 
    shopping_cart_total Ext.get('shopping_cart_total');
                if (
    shopping_cart_total)
                {
                    if (
    shopping_cart_total.dom.value 0)
                    {
                        
    form.findField('payment_type').markInvalid();
                        
    form.findField('payment_type').getEl().frame("FF0000"1, {duration1});
                        
    invalidField form.findField('payment_type').getEl();
                    }
                }

                if (
    default_total 0)
                {
                    
    form.findField('payment_type').markInvalid();
                    
    form.findField('payment_type').getEl().frame("FF0000"1, {duration1});
                    
    invalidField form.findField('payment_type').getEl();
                }
            }

            if (!
    radioValidator('default_events[]''Please choose atleast one default event'counter))
            {
                
    invalidField form.findField('default_events[]').getEl();
            }

            if (!
    radioValidator('gt_sub''Please answer this question'counter))
            {
                
    invalidField form.findField('gt_sub').getEl();
            }

            if (
    Ext.get('sub1').dom.checked || Ext.get('sub3').dom.checked)
            {
                if (!
    radioValidator('gt_sub_type''Please choose Print or Digital'counter))
                {
                    
    invalidField form.findField('gt_sub_type').getEl();
                }
                if (
    '' == form.findField('audit').getValue())
                {
                    
    form.findField('audit').markInvalid();
                    
    form.findField('audit').getEl().frame("FF0000"1, {duration1});
                    
    invalidField form.findField('audit').getEl();
                }
            }
            else
            {
                
    form.findField('gt_sub_type').clearInvalid();
            }
            
            {/
    literal}{if ! $logged_in}{literal}
            if (
    Ext.get('existing_password_section').isVisible() && ! form.findField('password1').custom_validation_flag)
            {
                
    form.findField('password1').markInvalid('Password validation failed');
                
    form.findField('password1').getEl().frame("FF0000"1, {duration1});
                
    invalidField form.findField('password1').getEl();
            }
            {/
    literal}{/if}{literal}

            if (
    invalidField)
            {
                
    invalidField.focus();
                return;
            }

            var 
    dropDownFieldNames = new Array('gov_branch''job_function''agency_function''how_hear');

            for(
    i=0;i<dropDownFieldNames.length;i++) {

                var 
    fieldName dropDownFieldNames[i];

                if (
    form.findField(fieldName).disabled)
                {
                    
    form.findField(fieldName).setValue(' ');
                }
                else
                {
                    if(
    form.findField(fieldName).getValue() == '' || form.findField(fieldName).getValue() == ' ') {
                        
    form.findField(fieldName).getEl().frame("FF0000"1, {duration1});
                        
    invalidField form.findField(fieldName).getEl();
                    }
                }

            }

            
    Ext.MessageBox.show({title'Processing...',
            
    msg'Processing your submission. Please wait.<br/>',
            
    width:240,
            
    closable:false});

            
    form.submit({
                
    success:function(theFormtheData)
                {
                    
    Ext.MessageBox.hide();
                    var 
    result theData.result.data;
                    if (
    result.confirm_output)
                    {
                        
    //                    Ext.Msg.maxWidth = 800;
                        //                    Ext.Msg.show({
                        //                       title:'Is your information correct?',
                        //                       msg: result.confirm_output,
                        //                       buttons: Ext.Msg.YESNO,
                        //                       fn: checkConfirmation,
                        //                       width: 800
                        //                    });
                        
    if (!dialog){
                            
    dialog = new Ext.BasicDialog('confirm-dlg', {
                                
    autoCreatetrue,
                                
    title'Is your information correct?',
                                
    width:600,
                                
    height:600,
                                
    shadow:true,
                                
    minWidth:300,
                                
    minHeight:250,
                                
    draggabletrue,
                                
    modaltrue
                            
    });
                            
    dialog.addButton('Yes'checkConfirmationdialog);
                            
    dialog.addButton('No'dialog.hidedialog);
                        }
                        
    Ext.get(dialog.body).dom.innerHTML result.confirm_output;
                        
    dialog.show();
                    }
                    else if (
    result.error_message != '')
                    {
                        
    Ext.get('error_message').dom.innerHTML result.error_message;
                    }
                    else
                    {
                        
    Ext.get('salutation').dom.innerHTML 'Welcome, ' theForm.findField('first_name').getValue();
                        
                        
    Ext.get('login_box').dom.style.display  'none';
                        
    Ext.get('logout_box').dom.style.display '';
                        
    Ext.get('btn_briefcase').dom.href       '/briefcase';
            
                        
    Ext.get('error_message').dom.innerHTML  result.error_message;
                        
    Ext.get('form-ct3').dom.innerHTML       result.success_html;
                        
    Ext.get('reg_top').dom.focus();
                    }
                },
                
    failure: function(fe)
                {
                    if (
    e.failureType == 'server')
                    {
                        
    Ext.Msg.alert('Failure server''id:' e.result.errors.id ' - msg:' e.result.errors.msg);
                    }
                    else
                    {
                        
    Ext.Msg.alert('Failure client''Validation failed: ' e.failureType);
                    }

                }
            });
        }

        var 
    radioValidator = function(namemessagecounter)
        {

            var 
    radios  document.getElementsByName(name);

            if (
    radios.length 0)
            {
                var 
    found   false;

                for (var 
    0radios.lengthi++)
                {
                    if (
    radios[i].checked)
                    {
                        
    found true;
                        break;
                    }
                }

                if (!
    found)
                {
                    if (!
    counter)
                    {
                        
    counter 0;
                    }
                    
    counter++;

                    if (
    == counter)
                    {
                        
    form.findField(name).getEl().dom.focus();
                    }

                    
    form.findField(name).markInvalid(message);
                    
    form.findField(name).getEl().frame("FF0000"1, {duration1});
                    return 
    false;
                }
                else
                {
                    return 
    true;
                }
            }

            return 
    true;
        }

        var 
    onReset = function()
        {
            
    form.reset();
        }


        
    form.applyIfToFields({width:200});

        
    form.addButton('Continue >'onSubmitform);
        
    form.addButton('Reset'onResetform);

        
    form.render('form-ct3');

        {/
    literal}{if $logged_in}{literal}
        
    form.on('actioncomplete', function(theFormtheAction)
        {
            if (
    'load' == theAction.type)
            {
                var 
    data                  theAction.result.data;
                var 
    country               form.findField('country');
                var 
    gov_branch_other      form.findField('gov_branch_other');
                var 
    job_function_other    form.findField('job_function_other');
                var 
    agency_function_other form.findField('agency_function_other');
                
                if (
    null != data.country)
                {
                    if (!
    countries_combo.selectByValue(data.country))
                    {
                        
    countries_combo.select(data.country[0]);
                        
    countries_combo.setValue('USA');
                        
    //countries_other.enable();
                    
    }
                }

                if (
    null != data.gov_branch)
                {
                    if (!
    gov_branch_combo.selectByValue(data.gov_branch) || data.gov_branch == 'X - Other')
                    {
                        
    gov_branch_combo.select(data.gov_branch[0]);
                        
    gov_branch_combo.setValue('X - Other, Please Specify');
                        
    gov_branch_other.enable();
                    }
                }

                if (
    null != data.job_function)
                {
                    if (!
    job_function_combo.selectByValue(data.job_function) || data.job_function == 'Z - Other')
                    {
        
                        
    job_function_combo.select(data.job_function[0]);
                        
    job_function_combo.setValue('Z - Other, Please Specify');
                        
    job_function_other.enable();
                    }
                }
                
                if (
    null != data.agency_function)
                {
                    if (!
    agency_function_combo.selectByValue(data.agency_function) || data.agency_function == '99 - Other')
                    {
                        
    agency_function_combo.select(data.agency_function[0]);
                        
    agency_function_combo.setValue('99 - Other, Please Specify');
                        
    agency_function_other.enable();
                    }
                }
                
                
    loaderMsg.hide();
            }
        });
        
    form.load({
            
    urlprefixURL "/common/ajax/getprofile.php",
            
    scripts:true,
            
    params"func=get_attendee",
            
    text"Loading Briefcase..."
        
    });
        {/
    literal}{else}{literal}
        
    loaderMsg.hide();
        {/
    literal}{/if}{literal}

        
    //Get the email and zip form fields
        
    var emailField  form.findField('email1');

        
    //Define event handler email blur()
        
    var emailRequest = function()
        {
            var 
    emailValue Ext.util.Format.trim(emailField.getValue());

            if (
    '' != emailValue)
            {
                var 
    ajax   = new AjaxObject();
                var 
    params = new Object();

                
    params['email1'] = emailValue;
                
    params['func']  = 'get_enewsletters';

                
    ajax.processResult = function(o)
                {
                    var 
    enewsletters = eval('(' o.responseText ')').data.enewsletters;

                    
    //Found some enewseltters for this email address
                    
    if (enewsletters && enewsletters.length 0)
                    {
                        var 
    checkboxes document.getElementsByName('enewsletters[]');

                        for (var 
    0enewsletters.lengthi++)
                        {
                            for (var 
    0checkboxes.lengthj++)
                            {
                                if (
    enewsletters[i] == checkboxes[j].value)
                                {
                                    
    checkboxes[j].checked true;
                                }
                            }
                        }
                    }
                };

                
    ajax.startRequest(prefixURL '/common/ajax/getprofile.php'params);
            }
        }

        
    emailField.on('change'emailRequest);

        
    form.findField('same_info').on('check', function()
        {
            var 
    fieldNames = new Array("billme_first_name","billme_address1","billme_city","billme_zip","billme_agency","billme_last_name","billme_address2","billme_state","billme_phone","billme_phone_extension");

            if (
    this.checked)
            {
                for(
    i=0;i<fieldNames.length;i++) {
                    
    form.findField(fieldNames[i]).disable();
                    
    form.findField(fieldNames[i]).setValue(' ');
                }
            }
            else
            {
                for(
    i=0;i<fieldNames.length;i++) {
                    
    form.findField(fieldNames[i]).enable();
                    
    form.findField(fieldNames[i]).reset();
                }
            }
        });

        {/
    literal}{if !$logged_in}{literal}
            function 
    check_for_account()
            {
                var 
    caller = new AjaxCaller(prefixURL '/common/ajax/login.php');
                
                
    caller.callback = function(result)
                {
                    if (
    == result)
                    {
                        
    form.findField('password1').enable();
                        
    form.findField('password1').setRawValue('');
                        
                        
    Ext.get('existing_password_section').show();
                        
    Ext.get('new_password_section').hide();
                        
                        
    form.findField('new_password1').disable();
                        
    form.findField('new_password2').disable();
                        
    form.findField('new_password1').setRawValue('_');
                        
    form.findField('new_password2').setRawValue('_');
                    }
                    else
                    {
                        
    form.findField('new_password1').enable();
                        
    form.findField('new_password2').enable();
                        
    form.findField('new_password1').setRawValue('');
                        
    form.findField('new_password2').setRawValue('');
                        
                        
    Ext.get('new_password_section').show();
                        
    Ext.get('existing_password_section').hide();
                        
                        
    form.findField('password1').disable();
                        
    form.findField('password1').setRawValue('_');
                    }
                }
                
                
    caller.call('check_for_account'Ext.get('email1').getValue());
            }
            
            
    Ext.get('email1').on('blur'check_for_account);
            
            function 
    check_password()
            {
                var 
    caller = new AjaxCaller(prefixURL '/common/ajax/login.php');
                
                
    caller.callback = function(result)
                {
                    if (
    == result)
                    {
                        
    Ext.get('password_image').show().dom.src prefixURL THEMEDIR '/images/subscribe/icon_check_mark.gif';
                        
    form.findField('password1').custom_validation_flag true;
                    }
                    else
                    {
                        
    Ext.get('password_image').show().dom.src prefixURL THEMEDIR '/images/subscribe/icon_x_mark.gif';
                        
    form.findField('password1').markInvalid('Password validation failed');
                    }
                }
                
                
    form.findField('password1').custom_validation_flag false;
                
    caller.call('check_password'Ext.get('email1').getValue(), Ext.get('password1').getValue());
            }
            
            
    Ext.get('password1').on('blur'check_password);
        {/
    literal}{/if}{literal}
        
        var 
    sub_type_func = function() { return radioValidator('gt_sub_type''Please choose Print or Digital'); }
        
    Ext.get('sub_type1').on('click'sub_type_func);
        
    Ext.get('sub_type2').on('click'sub_type_func);

        var 
    sub_func = function() { return radioValidator('gt_sub''Please answer this question'); }
        
    Ext.get('sub1').on('click'sub_func);
        
    Ext.get('sub2').on('click', function() {form.findField('sub_type1').reset(); form.findField('sub_type2').reset();});
        
    Ext.get('sub3').on('click'sub_func);

        
    countries_combo.setValue('USA');
        
        var 
    Ext.get('po_col2').createChild({
            
    cn: {
                
    tag:'div',
                
    html'Please make your P.O. out to: {/literal}{$event_root->title|escape}{literal}',
                
    style'margin-top:8px;margin-bottom:8px;'
            
    }
        });

        var 
    Ext.get('cc_col2').createChild({
            
    cn: {
                
    tag:'div',
                
    html'&dagger;If you wish to send the Credit Card receipt to a different email address than your ' +
                
    'registration confirmation, please enter it here.<br/><br/>' +
                
    'Government Technology Conference is a subsidiary of e.Republic, Inc. Your credit card ' +
                
    'statement will reference e.Republic, Inc.',
                
    style'margin-top:8px;margin-bottom:8px;'
            
    }
        });

        var 
    Ext.get('please_note').createChild({
            
    cn: {
                
    tag:'div',
                
    html''
                
    {/literal}
                
                {if 
    'EE' == $event_root->subtype}
                
                    + 
    '<b>Cancellation Policy</b><br/><br />' 
                
                    
    {if $free_event}
                        
    /*
                        + '<p><b>Public Sector:</b> In efforts to keep an accurate attendance count, we ask that you please notify us ' 
                        + 'should your plans change and you are UNABLE to join us. Substitutions are always encouraged and welcome - please ' 
                        + 'contact us and we will be happy to take care of that for you.</p>'
                        */
                        
    '<p><b>Public Sector:</b> In efforts to keep an accurate attendance count, we ask that you please notify us should your plans'
                        
    'change and you are UNABLE to join us. Substitutions are always encouraged and welcome - please contact me'
                        
    'and I will be happy to take care of that for you.</p>' 
                    
                        
    {if $event_root->title != 'Continuity of Government 2007'
                            
    /*+ '<p><b>Private Sector:</b> Cancellations must be submitted in writing; phone cancellations will not be accepted. '
                            + 'No refunds or cancellations after {$event_root->cancel_time|date_format:"%m/%d/%y"}. Substitutions '
                            + 'will be accepted and are encouraged. Call with the name change.</p>'*/
                            
    '<p><b>Industry:</b> Phone cancellations WILL NOT BE ACCEPTED. Cancellations MUST BE SUBMITTED IN WRITING.'
                            
    'NO refunds or cancellations AFTER {$event_root->cancel_time|date_format:"%m/%d/%y"} - This policy will be enforced even in the event that you are'
                            
    'unable to attend. (SUBSTITUTIONS will be accepted and encouraged, please call with the name change.)</p>'
                        
    {/if}
                        
                    {else}
                        
                        + 
    '<p>Cancellations must be submitted in writing; phone cancellations will not be accepted. No refunds or cancellations '
                        
    'after {$event_root->cancel_time|date_format:"%m/%d/%y"}. Substitutions will be accepted and are '
                        
    'encouraged. Call with the name change.</p>'
                    
                    
    {/if}

                    + 
    '<p><b>Special Accommodations</b><br/> '
                    
    'It is important to us that you enjoy the conference. If due to a physical challenge you have ' 
                    
    'special requirements, please let us know and we will do our best to accommodate your needs. </p>'
                
                
    {elseif 'BESTOF' == $event_root->subtype}

                    + 
    '<b>Free for Government</b> <br />'
                    
    '<p><b>Public Sector:</b> In efforts to keep an accurate attendance count, we ask that you please notify '
                    
    'us should your plans change and you are UNABLE to join us. Substitutions are always encouraged and welcome - '
                    
    'please contact me and I will be happy to take care of that for you. </p> '
                    
                    
    '<p><b>Private Sector:</b> Cancellations must be submitted in writing; phone cancellations will not be accepted. '
                    
    'No refunds or cancellations after {$event_root->cancel_time|date_format:"%m/%d/%y"}. '
                    
    'Substitutions will be accepted and are encouraged. Call with the name change.</p>'

                    
    '<p><b>Special Accommodations</b><br/> '
                    
    'It is important to us that you enjoy the conference. If due to a physical challenge you have ' 
                    
    'special requirements, please let us know and we will do our best to accommodate your needs. </p>'
                
                
    {elseif 'GTC' == $event_root->subtype}
            
                    + 
    '<p><b>Cancellations</b><br />' 
                    
    'Cancellations must be submitted in writing; phone cancellations will not be accepted. No refunds or '
                    
    'cancellations after {$event_root->cancel_time|date_format:"%m/%d/%y"}. Substitutions will be accepted and are encouraged. Please send an email for '
                    
    'cancellation or substitution requests.</p>'
                    
                
    {else}
                    
                    + 
    '<p><b>Substitutions</b><br/>' 
                    
    'Substitutions are handled on-site. Bring the name badge of the person you are replacing '
                    
    'and a letter of substitution on organization letterhead. Substitutions must be for '
                    
    'identical combination of events.</p>'
                    
                    
    '<p><b>Cancellations</b><br />' 
                    
    'Cancellations must be submitted in writing; phone cancellations will not be accepted. No refunds or '
                    
    'cancellations after {$event_root->cancel_time|date_format:"%m/%d/%y"}. Substitutions will be accepted and are encouraged. Please send an email for '
                    
    'cancellation or substitution requests.</p>'
                    
                    
    '<p><b>Special Accommodations</b><br/> '
                    
    'It is important to us that you enjoy the conference. If due to a physical challenge you have ' 
                    
    'special requirements, please let us know and we will do our best to accommodate your needs. </p>'
                    
                
    {/if}
                
                {
    literal}
                ,

                
    style'margin-top:8px;margin-bottom:8px;'
            
    }
        });

        var 
    Ext.get('checks_payable').createChild({
            
    cn: {
                
    tag:'div',

                {/
    literal}
                {if 
    'EE' == $event_root->subtype}
                {
    literal}
                
    html'Make Checks payable to <b>Government Technology</b><br/>' +
                
    '100 Blue Ravine Rd., Folsom, CA 95630<br/><br /> ' +
                
    'Please reference <i>{/literal}{$event_root->title|escape}{literal}</i> on the check.<br /><br /> ' +
                
    '<div style="float:right; margin:4px;"><i>FEDERAL ID# 68-002-0714</i></div>',
                {/
    literal}
                {else}
                {
    literal}
                
    html'Make Checks payable to {/literal}{$event_root->title|escape}{literal}<br/>100 Blue Ravine Rd., Folsom, ' +
                
    'CA 95630<br/><br/><div style="float:right; margin:4px;"><i>FEDERAL ID# 68-002-0714</i></div>',
                {/
    literal}{/if}
                {
    literal}

                
    style'margin-top:8px;margin-bottom:8px;'
            
    }
        });
        {/
    literal}
        {if 
    $event_root->events('eq:subtype:CLASS')}
        {
    literal}
        var 
    Ext.get('classes_column').createChild({
            
    cn: {
                
    tag:'div',
                
    html'To add classes to your GTC shopping cart please ' +
                
    '<a href="classes.php?id={/literal}{$smarty.get.id}{literal}">click here</a>.'
            
    }
        });
        {/
    literal}
        {/if}
        {
    literal}

        var 
    Ext.get('enewsletter_header').createChild({
            
    cn: {
                
    tag:'div',
                
    html'Yes! I\'d like to receive copies of Government Technology\'s free eNewsletters written ' +
                
    'specifically for government for the latest IT news, best practices, and emerging trends in ' +
                
    'technology.',
                
    style'margin-bottom:8px;'
            
    }
        });

        var 
    Ext.get('sub_question').createChild({
            
    cn: {
                
    tag:'div',
                
    html'<span style="color:red;">*</span> Would you like a <b>FREE SUBSCRIPTION</b> to <b>Government Technology</b> the leading ' +
                
    'magazine providing solutions to government in the information age?',
                
    style'margin-bottom:8px;'
            
    }
        });

        var 
    Ext.get('sub_type_question').createChild({
            
    cn: {
                
    tag:'div',
                
    html'Which <i>Government Technology</i> Magazine delivery version would you like to receive?',
                
    style'margin-bottom:8px; margin-top:8px;'
            
    }
        });

        
    Ext.DomHelper.insertAfter('cc_code', {tag:'span',
        
    html:'<a href="javascript:show_dialog(\'security_code\');">What is this?</a>',
        
    style:'margin-left:8px;'});

        {/
    literal}{if $default_events}{literal}
        var 
    Ext.get('shopping_cart_header').createChild({
            
    cn: {
                
    tag:'div',
                
    html''//html: '<b>Please choose your default event for {/literal}{$event_root->title|escape}{literal}:</b>',
                
    style'margin-bottom:8px; margin-top:8px;'
            
    }
        });
        {/
    literal}{/if}{literal}

        {/
    literal}{if $show_cart}{literal}
        var 
    Ext.get('shopping_cart').createChild({
            
    cn: {
                
    tag:'div',
                
    html"<div id='cart-contents'></div>",
                
    style:'margin-top:8px;'
            
    }
        });
        {/
    literal}{/if}{literal}

        {/
    literal}{if !$logged_in}{literal}
            
    Ext.get('new_password_message').createChild({
                
    cn: {
                    
    tag:'div',
                    
    html'<b>NEW!</b> You must have a Govtech Briefcase account in order to complete this process. '
                        
    'Please create a password in order to create your account.',
                    
    style'margin-bottom:8px;'
                
    }
            });
            
            
    Ext.get('existing_password_message').createChild({
                
    cn: {
                    
    tag:'div',
                    
    html'<b>NEW!</b> You must have a govtech.com account in order to complete this process. '
                        
    '<span style="color:red">An account is already associated with the email address entered above. '
                        
    'Please log in below or enter a different email address.</span>',
                    
    style'margin-bottom:8px;'
                
    }
            });
            
            
    Ext.get('new_password_section').setVisibilityMode(Ext.Element.DISPLAY);
            
            new 
    Ext.Button('dummy_button', {text:'Check'});
            
    Ext.get('password_image_wrapper').createChild({
                
    cn: {
                    
    tag'img',
                    
    style'margin-bottom:8px;',
                    
    id'password_image'
                
    }
            });
            
    Ext.get('password_image').setVisibilityMode(Ext.Element.DISPLAY).hide();
            
    Ext.get('existing_password_footnote').createChild({
                
    cn: {
                    
    tag:'div',
                    
    html'<a href="#" onclick="confirm_password_reset(Ext.get(\'email1\').getValue())">Forgot your password?</a>',
                    
    style'text-align:right;'
                
    }
            });
            
            
    Ext.get('existing_password_section').setVisibilityMode(Ext.Element.DISPLAY).hide();
        {/
    literal}{/if}{literal}
        
        
    Ext.get('first_name').dom.focus();
    });

    {/
    literal}
    -->
    </script>
    {/if}

    <div class="block small-2 m-left m-right">
        {include file=$tpl_path|cat:"/navigation.tpl"}
    </div>

    <div class="block medium-0">

        <div style="width:100%">
            <a name="reg_top" id="reg_top" href="javascript:void();"></a>
            <h3>{$event_root->title} Registration</h3>

            {if true && $event_root->zopen}

                {if trim($event_root->group_reg_doc) != ''}

                    {assign var=registrar value=$event_root->registrars[0]}

                    <!-- <div style="font-size: larger; border:1px solid gray; padding:8px;">
                        If you need to register more than one person,
                        <a href="{$event_root->group_reg_doc}"><b>DOWNLOAD</b></a> and fill out the group registration document.
                        Then email it to <a href="mailto:{$registrar->email}"><b>{$registrar->first_name} {$registrar->last_name}</b></a>.
                    </div><br/>-->

                {/if}

                {if 'GTC' == $event_root->subtype}
                    If you are an exhibitor <a href="exhibitor_register.php?id={$smarty.get.id}">click here</a>.
                {/if}

                <div id="error_message" style="color:red; font-weight:bold;"></div>
                <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
                <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
                    <div id="form-ct3">

                    </div>
                </div></div></div>
                <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>

            {elseif false}

                <h4>New step to register - You must create a Govtech Briefcase in order to log in and register.</h4><br/>
                Click here to <a href="javascript:show_dialog('login');"><b>login</b></a> or click here to <a href="/ul/"><b>create an account</b></a>.<br/><br/>

                {if trim($event_root->group_reg_doc) != ''}

                    {assign var=registrar value=$event_root->registrars}

    <!--                 <div style="font-size: larger; border:1px solid gray; padding:8px;">
                        If you need to register more than one person,
                        <a href="{$event_root->group_reg_doc}"><b>DOWNLOAD</b></a> and fill out the group registration document.
                        Then email it to <a href="mailto:{$registrar->email}"><b>{$registrar->first_name} {$registrar->last_name}</b></a>.
                    </div><br/> -->

                {/if}

            {else}

                {if 'Ohio Digital Government Summit' == $event_root->title}
                    {assign var=attendee_contact value=$event_root->attendee_contacts}
                    <p>Registration is now closed for the {$event_root->title}. 
                    We apologize for the inconvenience, and 
                    due to the fact that we have reached maximum capacity we cannot accept further registrations. If 
                    you have any questions about this please don't hesitate to contact 
                    {$attendee_contact[0]->first_name|cat:' '|cat:$attendee_contact[0]->last_name} at 
                    {$event_root->toll_free_phone} x {$attendee_contact[0]->ext} or <a href="mailto:{$attendee_contact[0]->email}">{$attendee_contact[0]->email}</a></p>
                {else}
                    <h5>{$event_root->title} online registration is currently not open.
                    {if $event_root->end_time|strtotime > $smarty.now}
                       Please register on site. 
                    {/if}
                    </h5><br/>
                {/if}
            {/if}
        </div>
        <br />
        {include file="common/contact_block.tpl"}
    </div>

    <div class="block rcol float-right m-right">
        {include file="common/rcol_helpbox.tpl"}
        <br />
        <br />
        {include file="../common/ads_right.tpl}
    </div>

    <script type="text/javascript">
    {literal}
    Ext.onReady(function()
    {

        // Get the  cart element
        var el  = Ext.get('cart-contents');
        if (el)
        {
            var mgr = el.getUpdateManager();
            mgr.update(prefixURL + "/common/ajax/shopping_cart.php", "event_root_pk={/literal}{$event_root->pk}{literal}&func=get_cart");
        }

    });
    {/literal}
    </script> 
    Any help would greatly appreciated! Thank you.
    Last edited by justCharlie; 7 Dec 2007 at 11:55 AM. Reason: add more text?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
    JorisA is on a distinguished road

      0  

    Default


    Not sure if you still have this problem, but the solution probably is here:
    http://extjs.com/forum/showthread.php?t=20198

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi