
/*
 * iameUpload.js
 * upload handler for upload.php & uploadExtras.php form processing
 * 
 * version 1.0
 * 
 */






function handleUploadDefaults() {
    
    // some configuration
    var clearDefaults = {
        firstName:      'First',
        lastName:       'Last',
        emailAddress:   'someone@website.com',
        city:           'New York',
        state:          'NY'
    };

    
    
    
    /*
     * attach form processing handlers
     *
     */
    
    // first name
    $('#iameUpload_FirstName').focus( function() {
        if ( this.value == 'First' ) this.value = '';
    });
    $('#iameUpload_FirstName').blur( function() {
        if ( this.value == '' ) this.value = 'First';
    });
    
    // last name
    $('#iameUpload_LastName').focus( function() {
        if ( this.value == clearDefaults.lastName ) this.value = '';
    });
    $('#iameUpload_LastName').blur( function() {
        if ( this.value == '' ) this.value = clearDefaults.lastName;
    });
    
    // email address
    $('#iameUpload_Email').focus( function() {
        if ( this.value == clearDefaults.emailAddress ) this.value = '';
    });
    $('#iameUpload_Email').blur( function() {
        if ( this.value == '' ) this.value = clearDefaults.emailAddress;
    });
    
    // city
    $('#iameUpload_City').focus( function() {
        if ( this.value == clearDefaults.city ) this.value = '';
    });
    $('#iameUpload_City').blur( function() {
        if ( this.value == '' ) this.value = clearDefaults.city;
    });
    
    // state
    $('#iameUpload_State').focus( function() {
        if ( this.value == clearDefaults.state ) this.value = '';
    });
    $('#iameUpload_State').blur( function() {
        if ( this.value == '' ) this.value = clearDefaults.state;
    });
    
    
}





