/**
 *
 * @author Paul Thomson <paul.thomson@pjthomson.co.uk>
 * @copyright Copyright © Paul Thomson 2008
 *
 * @version $Id: posters.js,v 1.5 2008/09/17 16:14:07 thomson Exp $
 *
 */ 

var Posters = 
{
    /**
     *
     * Check the upload poster form
     *
     * @return bool
     *
     */
     
    'CheckUploadForm': function( )
    {
        // Movie
        
        if ( ValidInlineSearchResults( ) == false )
        {
            alert( "Please select a movie." );
            return false;
        }
        
        // Photo
    
        var photo = $( 'photo' ).value;
        
        if ( IsEmpty( photo ) )
        {
            alert( "Please select a picture to upload." );
            return false;
        }
        
        return true;
    },
    
    /**
     *
     * Check the edit caption form
     *
     * @return bool
     *
     */
    
    'CheckCaptionForm': function( )
    {
        var caption = $( 'caption' ).value;
        if ( IsEmpty( caption ) )
        {
            alert( "Please enter a caption for the poster." );
            return false;
        }
        
        return true;
    }
}