<?php $__env->startSection('page_title'); ?>
    OSAA - Forms
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
	<?php echo $information['form_name']; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent

    <script src="<?php echo asset('/scripts/jquery.maskedinput.min.js'); ?>" type="text/javascript"></script>

    <style type="text/css">
    	h2 {
            color: #1C43A6 !important;
        }

        h2.line {
            border-bottom: 1px solid #1C43A6;
            padding-bottom: 0.25em;
            margin-bottom: 0.25em;
        }

        h3 {
            color: #990000 !important;
        }        

        .no-close .ui-dialog-titlebar-close {
            display: none;
        }

        .reload_input {        	
			background-image: url('<?php echo asset('/images/icons/reload_indicator.png'); ?>');
			background-repeat: no-repeat;
			padding-left : 4px;						
        }

        input, select, textarea {
        	border-width: 1px;
			border-style: solid;
			border-color: #7d7b7d;
			padding: 1px;
        }

    	.success_bar {
    		position: fixed;
    		top: 600px;
    		left: 0;
    		width: 100%;
    		padding: 0.25em 0;
    		line-height: 1.5em;
    		background-color: rgba(176, 255, 190, 0.0);
    		border-bottom: 2px solid rgba(13, 88, 27, 0.50);
    		border-top: 2px solid rgba(13, 88, 27, 0.50);
    		z-index: 500;
    	}

    	.success_bar .message {
    		width: 1200px;
    		margin: 0 auto;
    		font-size: 14pt;
    		color: #151515;
    	}    	

    	.page_functions {
    		width: auto !important;
    	}  

        .odd {
            background-color: #dedede;
        }

        .hightlight {
            background-color: #fbec88;
            outline: 1px solid #fad42e;            
        }        

        .required {
            color: #990000;
            font-weight: bold;
            font-size: 14pt;
            position: relative;
            top: 4px;
            margin-left: 5px;
        }

        .required_special {
            color: #000099;
            font-weight: bold;
            font-size: 14pt;
            position: relative;
            top: 4px;
            margin-left: 5px;
        }

        table {
            border-collapse: collapse;
            font-size: 10pt;
            width: 100%;
        }

        table thead {
            background-color: #005fa9;
            color: #ffffff;
        }

        table thead th {
            padding: 4px 0;
            text-align: left;
        }       

        table tbody tr{
            height: 1.75em;
        }

        /* Help Dialog */
        .help_dialog {
            font-size: 10pt;
        }

        .help_dialog h1 {
            font-size: 14pt;
            color: #005fa9 !important;
            margin: 1em 0 1em 0;
        }

        .help_dialog h2 {
            font-size: 12pt;
            color: #1C43A6 !important;
            margin: 1em 0 0.5em 0;
        }

        .help_dialog h3 {
            font-size: 10pt;
            color: #000000 !important;
            margin: 0.75em 0 0em 0;
        }

        .help_dialog ul, ol {
            margin-left: 28px;
        }

        .help_dialog dl dt {
            float: left;
            width: 200px;
            text-align: right;
            margin-right: 20px;
            font-weight: bold;
            clear: both;
        }

        .ui-autocomplete {
            font-size: 9pt !important;
            max-height: 200px;
            overflow-y: auto;
        }        

        label, .label {            
            font-weight: bold;            
            float: left;
            width: 115px;            
        }     

        label.auto_width, .label.auto_width {
        	width: auto;        	
        }       

        
        /* Form Action Area */
        .action_area {
            padding: 1.5em 1em 0.5em 1em;
            background-color: #f2f2f2;
            border: 1px solid black;
            margin: -9px -10px 1em 0;
            position: relative;
            height: 2em;

            /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#f2f2f2+4,f0f0f9+20,e5e6e8+59,fdfdfd+100 */
            background: #f2f2f2; /* Old browsers */
            background: -moz-linear-gradient(left,  #f2f2f2 4%, #f0f0f9 20%, #e5e6e8 59%, #fdfdfd 100%); /* FF3.6-15 */
            background: -webkit-linear-gradient(left,  #f2f2f2 4%,#f0f0f9 20%,#e5e6e8 59%,#fdfdfd 100%); /* Chrome10-25,Safari5.1-6 */
            background: linear-gradient(to right,  #f2f2f2 4%,#f0f0f9 20%,#e5e6e8 59%,#fdfdfd 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f2f2', endColorstr='#fdfdfd',GradientType=1 ); /* IE6-9 */
        }

        .action_area.sticky {
            position: fixed;
            top: 40px;  
            width: 1000px;
            z-index: 50 !important;
        }

        .action_area .title {
            position: absolute;
            font-size: 8pt;
            top: 0;
            left: 4px;
            color: #005fa9;
            width: 100%;
        }

        .action_area .title .title_right {
            position: absolute;
            top: 0;
            right: 10px;
        }

        .action_area .status {
            float: right;
            width: 350px;
            text-align: right;
            color: #7d7b7d;
            font-size: 9pt;
            line-height: 1.15em;
            position: relative;
        }

        .action_area .status .state {
        	font-weight: bold;
        	float: left;
        	font-size: 10pt;
        }

        .action_area .status .state img {
        	width: 16px;
        	margin-left: 10px;
        	position: relative;
        	top: 2px;
        	margin-right: 4px;
        }
        

        /* Progress alert */
        .progress_alert {
            padding: 0.25em 0.5em;
            margin-bottom: 1em; 
            line-height: 32px; 
            font-size: 12pt; 
            font-weight: bold;
        }

        .qualifier {        	
        	border-bottom: 1px solid #cccccc;
        	padding: 0.25em 0 0em 0;
        	height: 3.5em;
        	position: relative;
        }

        .qualifier .qualifier_number {
        	float: left;
        	font-size: 18pt;        	
        	width: 40px;
        	padding-top: 0.125em;
        	font-weight: bold;
        }

        .qualifier .qualifier_information {
        	float: left;
        	margin-right: 25px;
        }

        .print_only {
            display: none;
        }       

        /* Print styles */
        @media print {
            #full_page_content {
    			float: none !important;    			
    		}

            input {
                outline: none;
                border: none;
                border-bottom: 1px solid #666666;
                padding-bottom: 1px;
                color: #000000 !important;
            }

            select {
                outline: none;
                border: none;
                border-bottom: 1px solid #666666;
                padding-bottom: 1px;
                color: #000000 !important;
            }                              

            textarea {
                outline: none;
                border: none;
                /*border-top: 1px solid #666666;*/
            }

            .action_area {
                display: none;               
            }            

            .qualifier {
            	page-break-inside: avoid;
            }

            .event_group {
            	page-break-inside: avoid;
            }

            .qualifier img {
            	display: none;
            }

            .new_page {            	
            	page-break-before: always;            	
            }

            .print_only {
                display: block;
            }

            .reload_input {         
                background-image: none;                
                padding-left : 0;                     
            }
        }   

    </style>
	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>
	
	if(!window.console)
    {
        window.console = { log: $.noop, group: $.noop, groupEnd: $.noop };            
    }

	// Success bar
	$('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function ()
	{		
		$(this).delay(6000).fadeOut(4000);	

		$(this).hover(function ()
		{
			$(this).stop(true).css('opacity', '1.0');
		},
		function ()
		{
			$(this).fadeOut(4000);
		})
	});


    // Reload indicator
    $('input[type="text"][data-reload], select[data-reload]').addClass('reload_input');

    <?php /*  $('input[type="text"][data-reload], select[data-reload]')
        .css({'border-width' : '1px',
        	  'border-left-color' : '#005fa9',
              'border-left-width' : '2px'});  */ ?>


    /* 
     * Custom tooltip items
     */
    $('[data-tooltip]').each(function ()
    {
        var item = $(this);

        var help = item.attr('data-tooltip');
        
        item.tooltip({'content' : help, 'items' : item});
    });


	/* Positioned elements
     *
     * Elements that contain the attribute data-position="true" will be positioned
     * using JQuery's UI positioning utility.  Other expected attributes define the
     * element's position:
     *    data-position-my
     *    data-position-at
     *    data-position-of
     */
    $('[data-position="true"]').each(function()
    {
        var element = $(this);
        var my = element.attr('data-position-my');
        var at = element.attr('data-position-at');
        var of = element.attr('data-position-of');

        var options = $.parseJSON('{ "my" : "' + my + '", "at": "' + at + '", "of": "' + of + '"}');

        element.position(options);
    });

    // Required field marker
    <?php /*  $('[data-required]:not([data-required-indicator])').after('<span class="required">*</span>');   */ ?>
    $('[data-required]:not([data-required-indicator]):not([data-required="special"]').after('<span class="required">*</span>'); 
    $('[data-required="special"]:not([data-required-indicator])').after('<span class="required_special">*</span>'); 
    
    // Date picker
    $('[data-format="date-picker"]').datepicker({'dateFormat':'mm/dd/yy',
                                        'maxDate':'+0d'});   

    // Format: phone number
    $('[data-format="phone"]').mask("(999) 999-9999");    

    // Format: numbers only
	$('[data-format="numbers"]').bind('input', function()
	{
  	    $(this).val($(this).val().replace(/[^0-9]/gi, ''));
	});

	// Format: letters only
	$('[data-format="letters"]').bind('input', function()
	{
  	    $(this).val($(this).val().replace(/[^A-Za-z]/gi, ''));
	});
    
    // Table row highlighter
    function colorRows ()
    {       
        $('table').each(function ()
        {
            var i = 0;

            $('tbody tr:visible', $(this)).each(function ()
            {
                if (i % 2 == 1)
                {
                    $(this).addClass('odd');
                }
                else
                {
                    $(this).removeClass('odd');
                }
                i = i + 1;
            });     
        });
    }   
    colorRows(); 


    /*
     * Auto-complete text fields
     */
    $('input[type="text"][data-autocomplete]')
        .each(function()
        {            
            $(this).autocomplete({'source' : $(this).attr('data-source'),
                                  'minLength' : 3});
        });


    <?php if (Session::has('new_form') or Input::has('new-form') or (!is_null($information['submission']) and Helpers::strIsEmpty($information['submission']->data->director->name))): ?>
        showHelp('new-form', true);
    <?php endif; ?>


    /* ShowHelp
     *
     * Shows a help topic.
     */
    function showHelp(help_topic, no_button)
    {
        if (no_button !== true)
        {
        	var dialog_options = {
        		class : "registration_form_help",
        		draggable : true,
        		resizable : true,
        		height : 725,
        		min_height : 400,
        		width : 615,
        		min_width : 330,
        		modal : false,
        		title : 'Registration Form Help'
        	};
       	}
       	else
       	{
       		var dialog_options = {
        		class : "registration_form_help no-close",
        		draggable : false,
        		resizable : false,
        		height : 650,
        		min_height : 650,
        		width : 615,
        		min_width : 615,
        		modal : true,
        		title : 'New Registration Form Created'
        	};       		
       	}
        
        $('<div></div>')
            .appendTo('body')
            .css({'z-index':'2000 !important'})
            .dialog({                       
                draggable   : dialog_options.draggable,
                resizable   : dialog_options.resizable,
                height      : dialog_options.height,
                minHeight   : dialog_options.min_height,
                width       : dialog_options.width,
                minWidth    : dialog_options.min_width,
                modal       : dialog_options.modal,                    
                title       : dialog_options.title,
                dialogClass : dialog_options.class,
                open        : function ()
	                {  
	                    var dialog_object = $(this);

	                    dialog_object.html("<div class='ajax_loader' style='width:16px; height:11px; margin:4em auto; background-image: url(http://www.osaa.org/images/icons/ajax_loader2.gif); background-repeat:no-repeat;'></div>");

	                    var jqxhr = $.ajax(
	                    {
	                        type : 'GET',
	                        url : '<?php echo url('/forms/registration/spe/help'); ?>?topic=' + help_topic,
	                        dataType : 'html'
	                    })
	                    .done(function (returned_data)
	                    {                               
	                        dialog_object.html(returned_data);
	                    })
	                    .fail(function (jqXHR, status, error)
	                    {                                                   
	                        var response = jqXHR.responseText;
	                        var errorData = $.parseJSON(response);
	                        //console.log(errorData);
	                        alert ("There was an error looking up help information.\n\nThis page will be reloaded.");
	                        location.reload();
	                    })
	                    .complete(function ()
	                    {
	                        if (no_button == true)
	                        {
	                            $('.close_first_view_button', dialog_object)
		                            .button()
		                            .click(function ()
		                            {
		                                dialog_object.dialog("close");
		                            });
	  
	                            // Shake action items
	                            function shakeTheseActionImages (object)
	                            {
	                                var direction;
	                                if ($(object).has('[data-direction]'))
	                                {
	                                    var direction = $(object).attr('data-direction');
	                                }                                              
	                                if (typeof direction == 'undefined')        
	                                {
	                                    var direction = 'left';
	                                }          
	                                $(object).effect("shake", {direction : direction, distance : 5, times : 1}, 600, function ()
	                                {
	                                    $(this).delay(Math.floor(Math.random() * 4000) + 2000);
	                                    shakeTheseActionImages($(this));
	                                });        
	                            }  
	                            
	                            var img = $('img.action_item', dialog_object);
	                            img.position({my:"center center", at : "right+30 center", of : ".close_first_view_button"});
	  
	                            shakeTheseActionImages(img);
	                  	    }
	                    })                    
	                },
                close : function ()
	                {
	                    var dialog_object = $(this);
	                    $(dialog_object).remove();
	                }
            });   
    }

    /* 
     * Help button    
     */
    $('.page_functions .help_button')
        .button({'icons':{'primary':'ui-icon-help'}})
        .css({'font-size':'9pt'})
        .click(function(event)
        {
            var object = $(this);

            event.preventDefault();

            var topic = object.attr('data-topic');            

            showHelp(topic);

            object.blur();

        });


	/*
     * Close button
     */
	$('.close_button')
		.button({'icons':{'primary':'ui-icon-circle-close'}})
		.css({'font-size':'9pt', 'margin-left':'10px'});     

	/*
     * Back button
     */
	$('.back_button')
		.button({'icons':{'primary':'ui-icon-circle-arrow-w'}})
		.css({'font-size':'9pt', 'margin-left':'10px'});     
    
	/*
     * Form Behavior
     */
    <?php /*  Include script for the league landing form  */ ?>
    <?php if (is_null($information['league'])): ?>	    


        <?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>

            $('.entries_button')
                .css({'font-size' : '9pt',
                      'margin-right' : '10px'})
                .button({'icons' : {'primary' : 'ui-icon-folder-collapsed'}});

        <?php endif; ?>


        /* Disable the next button and hide the loading icon */
	    $('#select_league_form input[type="submit"]')
	    	.button()	    	
	    	.button('disable')
	    	.addClass('ui-state-error')
	    	<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
	    		.button('enable')
	    		.removeClass('ui-state-error')
	    	<?php endif; ?>;
	    	
	    $('#select_league_form img').hide();

	    /* When a code is input, check it's value */
	    $('#select_league_form [name="code"]')
		    .bind('input', function ()
		    {
		    	$('#select_league_form img').show();
		    	var code = $(this).val();

		    	// Skip for now, to make it process faster
		    	if (false && code.length != 17)
		    	{    		
				    $('#select_league_form input[type="submit"]').button('disable')
				    											 .addClass('ui-state-error');
				    $('#select_league_form img').hide();
		    	}
		    	else
		    	{
			    	var jqxhr = $.ajax(
			                    {
			                        type : 'POST',
			                        url : '/forms/check-code',
			                        data : { 'activity' : 'SPE', 'code' : code },
			                        dataType : 'html'
			                    })	                   
			                   .fail(function ()
			                    {
			                      	$('#select_league_form input[type="submit"]').button('disable')
				    											 .addClass('ui-state-error');
				    				$('#select_league_form img').hide();
			                    })
			                   .success(function ()
			                    {
			                    	$('#select_league_form input[type="submit"]').button('enable')
				    											 .removeClass('ui-state-error');
				    				$('#select_league_form img').hide();
			                	});
			    }
			});

		// Only submit the form if the submit button is enabled
		$('#select_league_form')
			.submit(function ()
			{
				if ($('#select_league_form input[type="submit"]').is(':enabled'))
				{			
					$('#select_league_form [name="code"]').remove();
					return true;
				}
				else
				{
					return false;
				}
			});
	
	<?php else: ?>

    	/* 
         * Make the action area sticky
         */
        var window_object = $(window);
        var action_area = $('.action_area');
        var top = (action_area.offset().top) - 40;
        window_object.scroll(function()
        {
            action_area.toggleClass('sticky', window_object.scrollTop() > top);
        });


        /* Gray out disabled qualifier spots */
    	$('.qualifier_number').each(function(index, item)
    	{
    		var parent = $(item).parent('.qualifier');

    		if ($(parent).is('[data-qualifier-disabled]'))
    		{
    			$(item).css({'color' : '#cccccc'});
    		}
    		else
    		{
    			$(item).css({'color' : '#00ad20'});
    		}
    	});
    	$('.qualifier[data-qualifier-disabled]').css({'background-color' : '#efefef', 'border-right' : '2px solid #dddddd'});
    	$('.qualifier[data-qualifier-disabled] input, .qualifier[data-qualifier-disabled] select').css({'background-color' : '#efefef'});
    	$('.qualifier[data-qualifier-disabled] input').attr('readonly', 'readonly');
    	$('.qualifier[data-qualifier-disabled] select').attr('disabled', 'disbled');

	    /*
	     * Action Area Buttons
	     */
	    $('.action_area a')
	        .css({'font-size' : '9pt',
	              'margin-right' : '1em'})
	        .button()
	        .each(function ()
	        {
	            var link = $(this);

	            if (link.has('[data-icon]'))
	            {
	                var icon = link.attr('data-icon');
	                link.button({'icons' : {'primary' : icon }});
	            }

	            if (link.has('[data-help]'))
	            {
	                var help = link.attr('data-help');
	                link.tooltip({'content' : help, 'items' : 'a'});
	            }
	        });
	        

	    /*
	     * Print Button
	     */
	    $('[data-action="print"]')
	        .click(function(event)
	        {
	            event.preventDefault();

	            var button = $(this);            
	            button.blur();
	            
	            $('.ui-tooltip').remove();

	            $('textarea').each(function(index, item)
	            {
	                var area = $(item);                   
                    
                    var content = area.val().replace(/\r\n|\r|\n/g, '<br style="line-height: 1.5em;"/>') + '<br /><br />';

	                var temp = $('<div></div>')
	                              .html(content)
	                              .css({'visibility':'hidden',
	                                    'display':'block',
	                                    'height':'auto',
	                                    'overflow':'visible',
	                                    'width':area.width(),
	                                    'font-size':area.css('font-size'),
	                                    'line-height':area.css('line-height')})
                                  .appendTo('body');

	                area.css({'min-height':area.css('height'),
	                          'height':(temp.height() * 1.25) + 'px'});

                    if (area.is('.judge_notes'))
                    {
                        area.css({'height' : '3.5em'});
                    }

	                temp.remove();                    
	            });

                <?php if (!is_null($information['league'])): ?>
                    $('.event_name').each(function(index, item)
                    {
                        var add = $('<div></div>')
                                      .addClass('print_only')
                                      .css({'float' : 'right'})
                                      .html('Speech District <?php echo $information['league']->name; ?>');
                        
                        $(item).before(add);                        

                    });
                <?php endif; ?>

	            window.print();
	        });    
	    

	    /* showCheckResults
	     *
	     * Shows the results of the form check operation.
	     */
	    function showCheckResults(check)
	    {
	        var pass = check[0];

	        if (pass)
	        {
	            $('<div></div>')
	                .appendTo('body')
	                .dialog(
	                {                       
	                    draggable : true,
	                    resizable : false,
	                    height : 280,                    
	                    width : 400,                    
	                    modal : true,
	                    title : 'Form Check: Pass',
	                    open : function ()
	                        {  
	                            var dialog_object = $(this);

	                            var html = '<div style="font-size: 10pt;">';
	                            html += '<div style="font-size: 14pt; line-height: 32px; font-weight: bold; color: #0d581b; margin: 0.5em 0 1em 0;">';
	                            html += '<img src="<?php echo asset('images/icons/accept_32px.png'); ?>" alt="" title="" style="float: left; vertical-align: middle; margin-right: 10px;" />';
	                            html += 'Your Form Passed Inspection';
	                            html += '</div>';
	                            html += 'All required information has been provided.  This form is ready to be submitted.<br /><br />When you are ready, click the "Submit" button to submit your form.<br /><br /><div style="text-align: center;"><a href="#" class="close_button">OK</a></div>';
	                            html += '</div>';

	                            dialog_object.html(html);                            

	                            $('.close_button', dialog_object)
	                                .button({'icons' : {'secondary' : 'ui-icon-check'}})
	                                .css({'font-size' : '9pt'})
	                                .focus()
	                                .click(function(event)
	                                {
	                                    event.preventDefault();

	                                    dialog_object.dialog('close');
	                                });

	                        },
	                    close : function ()
	                        {
	                            var dialog_object = $(this);
	                            $(dialog_object).remove();
	                        }                
	                });
	        }
	        else
	        {
	            $('<div></div>')
	                .appendTo('body')
	                .dialog(
	                {                       
	                    draggable : true,
	                    resizable : false,
	                    height : 400,
	                    width : 500,                    
	                    modal : true,
	                    title : 'Form Check: Fail',
	                    open : function ()
	                        {  
	                            var dialog_object = $(this);

	                            var html = '<div style="font-size: 10pt;">';
	                            html += '<div style="font-size: 14pt; line-height: 32px; font-weight: bold; color: #990000; margin: 0.5em 0 1em 0;">';
	                            html += '<img src="<?php echo asset('images/icons/decline_32px.png'); ?>" alt="" title="" style="float: left; vertical-align: middle; margin-right: 10px;" />';
	                            html += 'Your Form Failed Inspection';
	                            html += '</div>';
	                            html += 'You are missing some required information or some other item.  Your form cannot be submitted successfully.<br /><br /><b>Error Details</b><br />';
	                            html += '<div style="width: 100%; max-height: 12em; height: 12em; overflow-x: hidden; overflow-y: auto; border-top: 1px solid gray; padding-top: 0.25em;"><ul style="margin-left: 20px;">';

	                            $.each(check, function (i, item)
	                            {
	                                if (i > 0)
	                                {
	                                    html += '<li>' + item + '</li>';
	                                }
	                            });

	                            html += '</ul></div><br />';
	                            html += '<div style="text-align: center;"><a href="#" class="close_button">OK</a></div>';
	                            html += '</div>';

	                            dialog_object.html(html);                            

	                            $('.close_button', dialog_object)
	                                .button({'icons' : {'secondary' : 'ui-icon-check'}})
	                                .css({'font-size' : '9pt'})
	                                .focus()
	                                .click(function(event)
	                                {
	                                    event.preventDefault();

	                                    dialog_object.dialog('close');
	                                });

	                        },
	                    close : function ()
	                        {
	                            var dialog_object = $(this);
	                            $(dialog_object).remove();
	                        }                
	                });
	        }
	    }


	    /*
	     * Run check button
	     */
	    $('[data-action="check"]')
	        .click(function(event)
	        {
	            event.preventDefault();

	            var button = $(this);
	            button.blur();

	            $('<div><div>')
	                .attr('data-check', 1)
	                .addClass('ui-widget-overlay ui-front')
	                .appendTo('body');
	              
	            $('<div><div>').appendTo('body')
	                .attr('data-check', 1)
	                .css('width', '225px')
	                .css('height', '170px')
	                .css('text-align', 'center')
	                .css('padding', '0.5em')
	                .position({my : "center center", at : "center center", of : window})
	                .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front')
	                .html('<br />Checking Form...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait while your form is checked, this may take a while to process...</div>');

	            // Get a form check
	            var jqxhr = $.ajax(
	                {
	                    type : 'GET',
	                    url : '<?php echo url('/forms/registration/spe/' . $information['submission']->id . '/check'); ?>',
	                    dataType : 'html'
	                })
	                .done(function (data)
	                {                                                
	                    $('[data-check]').remove();

	                    var check = $.parseJSON(data);
	                    //console.log(check);

	                    showCheckResults(check);
	                })
	                .fail(function (jqXHR, status, error)
	                {                                                   
	                    var response = jqXHR.responseText;
	                    var errorData = $.parseJSON(response);
	                    //console.log(errorData);
	                    alert("There was an error checking form's data.\n\n" + errorData.error.message + "\n\nThis page will be reloaded.");
	                    location.reload();
	                });
	        });


	    /* 
	     * Submit button
	     */    
	    $('[data-action="submit"]')
	        .click(function(event)
	        {
	            event.preventDefault();

	            var button = $(this);
	            button.blur();

	            $('<div><div>')
	                .attr('data-check', 1)
	                .addClass('ui-widget-overlay ui-front')
	                .appendTo('body');
	              
	            $('<div><div>').appendTo('body')
	                .attr('data-check', 1)
	                .css('width', '225px')
	                .css('height', '170px')
	                .css('text-align', 'center')
	                .css('padding', '0.5em')
	                .position({my : "center center", at : "center center", of : window})
	                .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front')
	                .html('<br />Checking Form...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait while your form is checked, this may take a while to process...</div>');

	            // Get a form check
	            var jqxhr = $.ajax(
	                {
	                    type : 'GET',
	                    url : '<?php echo url('/forms/registration/spe/' . $information['submission']->id . '/check'); ?>',
	                    dataType : 'html'
	                })
	                .done(function (data)
	                {                                                
	                    $('[data-check]').remove();

	                    var check = $.parseJSON(data);
	                    //console.log(check);

	                    if (!check[0])
	                    {
	                        showCheckResults(check);
	                        return;
	                    }                    

	                    // Passed, now confirm
	                    $('<div></div>')
	                        .appendTo('body')
	                        .dialog(
	                        {                       
	                            modal : true,
	                            draggable : true,
	                            resizable : false,
	                            height : 325,
	                            width : 450,                    
	                            title : 'Confirm Form Submission',
	                            buttons: [
	                                {
	                                    text : "Submit",
	                                    'class' : "float_left",
	                                    icons : { primary : 'ui-icon-circle-arrow-e'},
	                                    click : function()
	                                            {                                                       
	                                                // Submit the form
	                                                $('<div><div>')
	                                                    .attr('data-check', 1)
	                                                    .addClass('ui-widget-overlay ui-front')
	                                                    .appendTo('body');
	                                                  
	                                                $('<div><div>').appendTo('body')
	                                                    .attr('data-check', 1)
	                                                    .css('width', '225px')
	                                                    .css('height', '170px')
	                                                    .css('text-align', 'center')
	                                                    .css('padding', '0.5em')
	                                                    .position({my : "center center", at : "center center", of : window})
	                                                    .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front')
	                                                    .html('<br />Submitting Form...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Form check passed, now please wait while your form is submitted, this may take a while to process...</div>');

	                                                // Submit the form
	                                                window.location.href= "<?php echo url('/forms/registration/spe/' . $information['submission']->id . '/submit'); ?>?code=<?php echo $information['submission']->data->code; ?>";
	                                            }
	                                },                        
	                                {
	                                    text : "Cancel",
	                                    'class' : "float_right",
	                                    'data-autofocus' : "true",
	                                    icons : { primary : 'ui-icon-cancel'},
	                                    click : function()
	                                            {
	                                                // Close this dialog box
	                                                $(this).dialog("close");	                                                
	                                            }
	                                }
	                            ],
	                            open : function ()
	                                {  
	                                    var dialog_object = $(this);	                                    

	                                    var html = '<div style="font-size: 10pt; margin: 1em 0;">';
	                                    html += '<span class="ui-icon ui-icon-alert" style="display: inline-block; vertical-align: middle; margin-right: 4px;"></span>';
	                                    
                                        html += '<b>Are you sure you want to submit this form to the OSAA?</b>';
                                        html += '<br /><br />';
                                        html += '<div class="small gray">Your form has passed initial inspection for all of the required information.  Please note that once you submit this form, any school with a state qualifying participant will be notified of these results by e-mail.</div><br />';
                                        html += '<div class="ui-state-error">You can only submit this form once.  Once submitted, you will no longer be able to make any changes.</div>';
	                                    html += '</div>';

	                                    dialog_object.html(html);
	                                    
	                                    $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
	                                    $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');   

	                                    $('[data-autofocus="true"]').focus();                            
	                                },
	                            close : function ()
	                                {
	                                    var dialog_object = $(this);
	                                    dialog_object.dialog("close");
	                                    dialog_object.remove();
	                                }                
	                        });                    
	                })
	                .fail(function (jqXHR, status, error)
	                {                                                   
	                    var response = jqXHR.responseText;
	                    var errorData = $.parseJSON(response);
	                    //console.log(errorData);
	                    alert("There was an error checking form's data.\n\n" + errorData.error.message + "\n\nThis page will be reloaded.");
	                    location.reload();
	                });
	        }); 

        <?php if ($information['submission']->data->complete and (!Auth::check() or !Auth::user()->isOsaaUser())): ?>
            /*
             * Remove buttons: submit, check, add proven, add judge
             */
            $('[data-action="submit"], [data-action="check"], .add_judge, .add_proven_qualifier, .delete_judge, .delete_proven_qualifier').remove();

            /*
             * Make all text fields and textareas read-only
             */
            $('input[type="text"], input[type="checkbox"], textarea, select')
                .attr('readonly', 'readonly')
                .attr('disabled', 'disabled');
        <?php endif; ?>




	    /* alertRequiredField
	     *
	     * Shows an alert box when attempting to save a blank value to a required field.
	     */
	    function alertRequiredField()
	    {
	        $('<div></div>')
	            .appendTo('body')
	            .dialog(
	            {                       
	                modal : true,
	                draggable : false,
	                resizable : false,                    
	                height : 275,                    
	                width : 415,                    
	                title : 'Required Field',                    
	                buttons: [
	                    {
	                        text : "OK",
	                        'class' : "float_right",
	                        icons : { primary : 'ui-icon-check'},
	                        click : function()
	                                {                                                       
	                                    // Close the dialog box
	                                    $(this).dialog("close"); 
	                                }
	                    }
	                ],
	                open : function ()
	                    {  
	                        var dialog_object = $(this);

	                        dialog_object.html('<br />You\'ve entered in a blank value for a required field.  Required fields cannot be empty.<div style="font-size: 9pt; margin-top: 1em;" class="small gray note">The original value has been restored.</div>');
	                        
	                        $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
	                        $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');
	                        $('.ui-dialog-buttonpane .ui-dialog-buttonset').append('<div style="font-size: 8pt; line-height: 1.25em; margin-top: 0.5em;">Still having trouble?<br />(503) 682-6722 x228</div>');
	                    },                    
	                close : function ()
	                    {
	                        var dialog_object = $(this);
	                        $(dialog_object).remove();
	                    }                
	            });
	    }


	    /* saveFormData
	     *
	     * Given a form field and a value, this function will do a
	     * JSON POST request to save the form's information.  The optional
	     * third parameter will determine if the page will be reloaded or not.
	     */
	    function saveFormData(field, value, type, reload)
	    {
	        // Ensure the field and value parameters are provided
	        if (typeof field == 'undefined' || typeof value == 'undefined' || typeof type == 'undefined')
	        {
	            alert('Scripting error.  Unable to save form data.');
	        }

	        // Get the optional reload parameter
	        reload = typeof reload !== 'undefined' ? reload : false;

	        // Get the form ID (same across all pages for this form)
	        var form_id = <?php echo $information['submission']->id; ?>;

	        $('*').css({'cursor':'wait'});

	        var jqxhr = $.ajax(
	        {
	            type : 'POST',                      	            
	            url : '<?php echo url('/forms/league-forms'); ?>/' + form_id + '/update',
	            data : { 'field' : field,
	                     'value' : value,
	                     'type'  : type },
	            dataType : 'html'
	        })
	        .done(function(returned_data)
	        {                               
	            // Success
	            //console.log("Successfully saved {'" + form_id + "|" + field + "' : '" + value + "'}");
	            
	            var info = $.parseJSON(returned_data);

	            $('#updated_at').fadeOut(400, function() {
	            	var updated_at = $(this);

	            	updated_at.html(info.updated_at);

	            	updated_at.fadeIn();
	        	});
	            

	            if (info.force_reload)
	            {
	                reload = true;
	            }

	        })
	        .fail(function(jqXHR, status, error)
	        {                                                   
	            // Error
	            var response = jqXHR.responseText;
	            var errorData = $.parseJSON(response);
	            //console.log(errorData);
	            alert("There was an error saving this form's data.\n\n" + errorData.error.message + "\n\nPlease try again.  Please note, that if you try to reload this page, your unsaved data will be lost.");
	        })
	        .complete(function ()
	        {
	            // Reload if necessary
	            if (reload)
	            {
	                location.reload();
	            }
	            else
	            {
	                $('*').css({'cursor':''});
	            }
	        });
	    }   

	    // Autosave text fields
	    function autoSaveTextField(input_field)
	    {
	        clearTimeout(autoSaveTextField.timeout);
	        autoSaveTextField.timeout = setTimeout(function (){
	            
	            var value = input_field.val();
	            var original_value = input_field.attr('data-original');
	            var field = input_field.attr('data-field');
	            var type = input_field.attr('data-type');                        
	            
	            var readonly_attr = input_field.attr('readonly');            
	            if (typeof readonly_attr !== typeof undefined && readonly_attr !== false)
	            {
	                return false;
	            }

	            var reload = false;
	            var reload_attr = input_field.attr('data-reload');            
	            if (typeof reload_attr !== typeof undefined && reload_attr !== false)
	            {
	                reload = true;
	            }

	            var required = false;
	            var required_attr = input_field.attr('data-required');            
	            if (typeof required_attr !== typeof undefined && required_attr !== false && required_attr != 'special')
	            {
	                required = true;
	            }

	            if (required && value == '' && !(original_value == '' || typeof original_value === typeof undefined || original_value === false))
	            {
	                input_field.val(original_value);

	                input_field.focus();

	                alertRequiredField();          

	                return;
	            }

	            if (value != original_value && ((required && value != '') || !required))
	            {
	                saveFormData(field, value, type, reload);
	                input_field.attr('data-original', value);
	            }
	        }, 50);
	    }

	    // Autosave text fields and textareas
	    $('input[type="text"][data-autosave]').on('change blur autocompletechange autocompleteselect', function (event)
	    {            
	        autoSaveTextField ($(this));
	    });
	    $('textarea[data-autosave]').on('change blur autocompletechange autocompleteselect', function (event)
	    {            
	        autoSaveTextField ($(this));
	    });   

	    // Autosave select fields    
	    $('select[data-autosave]').on('change', function(event)
	    {
	        var select_field = $(this);
	        var selected = $(':selected', select_field);
	        var value = selected.val();
	        var original_value = select_field.attr('data-original'); 
	        var field = select_field.attr('data-field');
	        var type = select_field.attr('data-type');                        
	     
	        var readonly_attr = select_field.attr('readonly');            
	        if (typeof readonly_attr !== typeof undefined && readonly_attr !== false)
	        {
	            return false;
	        }

	        var reload = false;
	        var reload_attr = select_field.attr('data-reload');            
	        if (typeof reload_attr !== typeof undefined && reload_attr !== false)
	        {
	            reload = true;
	        }

	        if (value != original_value)
	        {
	            saveFormData(field, value, type, reload);
	            select_field.attr('data-original', value);
	        }                
	    });

	    // Autosave check-box fields    
	    $('input[type="checkbox"][data-autosave]').on('change', function(event)
	    {
	        var checkbox_field = $(this);        
	        var value = checkbox_field.is(':checked');
	        var original_value = checkbox_field.attr('data-original'); 
	        var field = checkbox_field.attr('data-field');
	        var type = checkbox_field.attr('data-type');                        
	        
	        var readonly_attr = checkbox_field.attr('readonly');            
	        if (typeof readonly_attr !== typeof undefined && readonly_attr !== false)
	        {
	            return false;
	        }

	        var reload = false;
	        var reload_attr = checkbox_field.attr('data-reload');            
	        if (typeof reload_attr !== typeof undefined && reload_attr !== false)
	        {
	            reload = true;
	        }

	        if (value != original_value)
	        {
	            saveFormData(field, value, type, reload);
	            checkbox_field.attr('data-original', value);
	        }         
	    });

	    /* Add proven excellent qualifier button */
	    $('.add_proven_qualifier')
	    	.button({'icons' : {'primary' : 'ui-icon-circle-plus'}})
	    	.css({'font-size' : '9pt'})
	    	.click(function(event)
	    	{
	    		event.preventDefault();

	    		$('*').css({'cursor':'wait'});

				var form_id = <?php echo $information['submission']->id; ?>;

	    		var jqxhr = $.ajax(
		        {
		            type : 'POST',                      	            
		            url : '<?php echo url('/forms/registration/spe'); ?>/' + form_id + '/add-proven-qualifier',
		            data : { 'form_id' : form_id },
		            dataType : 'html'
		        })
		        .done(function(returned_data)
		        {                               
		            window.location.href = '<?php echo url('/forms/registration/spe'); ?>?league=<?php echo urlencode($information['league']->slug); ?>#proven-excellence-qualifiers';
					location.reload();
		        })
		        .fail(function(jqXHR, status, error)
		        {                                                   
		            $('*').css({'cursor':''});

		            // Error
		            var response = jqXHR.responseText;
		            var errorData = $.parseJSON(response);
		            //console.log(errorData);
		            alert("There was an error attempting to add a new proven excellence qualifier to this form's data.\n\n" + errorData.error.message + "\n\nPlease try again.  Please note, that if you try to reload this page, your unsaved data will be lost.");
		        })
		        .complete(function ()
		        {
		            
		        });
	    	});

	    /* Remove a proven excellence qualifier button */
	    $('.delete_proven_qualifier').click(function(event)
	    {
	    	event.preventDefault();

            var link = $(this);
            var index = parseInt(link.attr('data-index'));                       
            var form_id = <?php echo $information['submission']->id; ?>;
            var row = $('.qualifier.additional[data-index="' + index + '"]');            

            // Highlight the row
            row.addClass('hightlight');

            // Show a dialog box to get confirmation
            $('<div></div>')
                .appendTo('body')
                .dialog(
                {                       
                    modal : true,
                    draggable : true,
                    resizable : false,
                    title : 'Remove This Qualifier?',
                    height : 250,
                    width : 400, 
                    position : {my : "bottom", at : "top", of : row},
                    buttons: [
                        {
                            text : "Cancel",
                            'class' : "float_right",                            
                            icons : { primary : 'ui-icon-cancel'},
                            click : function()
                                    {
                                        // Close the dialog box
                                        $(this).dialog("close");                                         
                                    }
                        },
                        {
                            text : "Delete",
                            'class' : "float_left",
                            icons : { primary : 'ui-icon-trash'},
                            click : function()
                                  {                                                       
                                      var dialog_object = $(this);                                      

                                      $('<div><div>')
                                          .attr('data-processing', 1)
                                          .addClass('ui-widget-overlay ui-front')
                                          .appendTo('body');
                                        
                                      $('<div><div>').appendTo('body')
                                          .attr('data-processing', 1)
                                          .css('width', '225px')
                                          .css('height', '170px')
                                          .css('text-align', 'center')
                                          .css('padding', '0.5em')
                                          .position({my : "center center", at : "center center", of : window})
                                          .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front')
                                          .html('<br />Removing Qualifier...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait, this may take a while to process...</div>');

                                      var data = {
                                          'form_id' : form_id,
                                          'index' : index
                                      };

                                      // Remove the qualifier
                                      var jqxhr = $.ajax(
                                          {
                                              type : 'POST',
                                              url : '<?php echo url('/forms/registration/spe'); ?>/' + form_id + '/delete-proven-qualifier',
                                              data : data,
                                              dataType : 'html'
                                          })
                                          .done(function (data)
                                          {                                                
                                              //$('[data-processing]').remove();
                                              //location.reload();

                                              window.location.href = '<?php echo url('/forms/registration/spe'); ?>?league=<?php echo urlencode($information['league']->slug); ?>#proven-excellence-qualifiers';
                                              location.reload();
                                          })
                                          .fail(function (jqXHR, status, error)
                                          {                                                   
                                              var response = jqXHR.responseText;
                                              var errorData = $.parseJSON(response);
                                              //console.log(errorData);
                                              alert("There was an error removing this qualifier.\n\n" + errorData.error.message + "\n\nPlease try again.");
                                              
                                              $('[data-processing]').remove();                                              
                                              
                                              // Close the dialog box
                                              $(dialog_object).dialog("close");                                               
                                          });                                      
                                  }
                        }                        
                    ],                                 
                    open : function ()
                    {  
                        var dialog_object = $(this);

                        var html = '<div style="font-size: 10pt;">';
                        html += '<span class="ui-icon ui-icon-alert float_left" style="vertical-align: middle;"></span>';
                        html += 'Are you sure you want to delete this highlighted proven excellence qualifier from your form?';
                        html += '<br /><br />';
                        html += '<span class="small gray note">Once you delete this row, the proven excellence qualifier\'s information will be removed from this form.  This cannot be undone.</span>';
                        html += '</div>';

                        dialog_object.html(html);
                        
                        $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
                        $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');                       
                    },
                    close : function ()
                    {
                        // Unhighlight the row
                        row.removeClass('hightlight');

                        var dialog_object = $(this);
                        $(dialog_object).remove();                        
                    }                
                });  
        });		

        /* Add judge button */
	    $('.add_judge')
	    	.button({'icons' : {'primary' : 'ui-icon-circle-plus'}})
	    	.css({'font-size' : '9pt'})
	    	.click(function(event)
	    	{
	    		event.preventDefault();

	    		$('*').css({'cursor':'wait'});

				var form_id = <?php echo $information['submission']->id; ?>;

	    		var jqxhr = $.ajax(
		        {
		            type : 'POST',                      	            
		            url : '<?php echo url('/forms/registration/spe'); ?>/' + form_id + '/add-judge',
		            data : { 'form_id' : form_id },
		            dataType : 'html'
		        })
		        .done(function(returned_data)
		        {                               
		            window.location.href = '<?php echo url('/forms/registration/spe'); ?>?league=<?php echo urlencode($information['league']->slug); ?>#judges';
					location.reload();
		        })
		        .fail(function(jqXHR, status, error)
		        {                                                   
		            $('*').css({'cursor':''});

		            // Error
		            var response = jqXHR.responseText;
		            var errorData = $.parseJSON(response);
		            //console.log(errorData);
		            alert("There was an error attempting to add a new judge to this form's data.\n\n" + errorData.error.message + "\n\nPlease try again.  Please note, that if you try to reload this page, your unsaved data will be lost.");
		        })
		        .complete(function ()
		        {
		            
		        });
	    	});

	    /* Remove a judge button */
	    $('.delete_judge').click(function(event)
	    {
	    	event.preventDefault();

            var link = $(this);
            var index = parseInt(link.attr('data-index'));                       
            var form_id = <?php echo $information['submission']->id; ?>;
            var row = $('.qualifier.judges[data-index="' + index + '"]');            

            // Highlight the row
            row.addClass('hightlight');

            // Show a dialog box to get confirmation
            $('<div></div>')
                .appendTo('body')
                .dialog(
                {                       
                    modal : true,
                    draggable : true,
                    resizable : false,
                    title : 'Remove This Judge?',
                    height : 250,
                    width : 400, 
                    position : {my : "bottom", at : "top", of : row},
                    buttons: [
                        {
                            text : "Cancel",
                            'class' : "float_right",                            
                            icons : { primary : 'ui-icon-cancel'},
                            click : function()
                                    {
                                        // Close the dialog box
                                        $(this).dialog("close");                                         
                                    }
                        },
                        {
                            text : "Delete",
                            'class' : "float_left",
                            icons : { primary : 'ui-icon-trash'},
                            click : function()
                                  {                                                       
                                      var dialog_object = $(this);                                      

                                      $('<div><div>')
                                          .attr('data-processing', 1)
                                          .addClass('ui-widget-overlay ui-front')
                                          .appendTo('body');
                                        
                                      $('<div><div>').appendTo('body')
                                          .attr('data-processing', 1)
                                          .css('width', '225px')
                                          .css('height', '170px')
                                          .css('text-align', 'center')
                                          .css('padding', '0.5em')
                                          .position({my : "center center", at : "center center", of : window})
                                          .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front')
                                          .html('<br />Removing Judge...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait, this may take a while to process...</div>');

                                      var data = {
                                          'form_id' : form_id,
                                          'index' : index
                                      };

                                      // Remove the qualifier
                                      var jqxhr = $.ajax(
                                          {
                                              type : 'POST',
                                              url : '<?php echo url('/forms/registration/spe'); ?>/' + form_id + '/delete-judge',
                                              data : data,
                                              dataType : 'html'
                                          })
                                          .done(function (data)
                                          {                                                
                                              //$('[data-processing]').remove();
                                              //location.reload();

                                              window.location.href = '<?php echo url('/forms/registration/spe'); ?>?league=<?php echo urlencode($information['league']->slug); ?>#judges';
                                              location.reload();
                                          })
                                          .fail(function (jqXHR, status, error)
                                          {                                                   
                                              var response = jqXHR.responseText;
                                              var errorData = $.parseJSON(response);
                                              //console.log(errorData);
                                              alert("There was an error removing this judge.\n\n" + errorData.error.message + "\n\nPlease try again.");
                                              
                                              $('[data-processing]').remove();                                              
                                              
                                              // Close the dialog box
                                              $(dialog_object).dialog("close");                                               
                                          });                                      
                                  }
                        }                        
                    ],                                 
                    open : function ()
                    {  
                        var dialog_object = $(this);

                        var html = '<div style="font-size: 10pt;">';
                        html += '<span class="ui-icon ui-icon-alert float_left" style="vertical-align: middle;"></span>';
                        html += 'Are you sure you want to delete this highlighted judge from your form?';
                        html += '<br /><br />';
                        html += '<span class="small gray note">Once you delete this row, the judges\'s information will be removed from this form.  This cannot be undone.</span>';
                        html += '</div>';

                        dialog_object.html(html);
                        
                        $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
                        $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');                       
                    },
                    close : function ()
                    {
                        // Unhighlight the row
                        row.removeClass('hightlight');

                        var dialog_object = $(this);
                        $(dialog_object).remove();                        
                    }                
                });  
        });


	<?php endif; ?>    

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?> 	

	<?php if (!is_null($information['league'])): ?>
		<a href="#" class="help_button" data-topic="edit">Help</a>

		<a href="<?php echo url('/forms/registration/spe'); ?>" class="back_button tooltip" title="Go back to the league selection page.">Back</a>
	<?php else: ?>
        
        <?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
            <a href="<?php echo url('/reports/spe-entries'); ?>" target="_blank" class="entries_button">Entries</a>
        <?php endif; ?>

		<a href="#" class="help_button" data-topic="select_league">Help</a>

		<a href="<?php echo url('/activities/spe'); ?>" class="close_button tooltip" title="Close this registration form.">Close</a>		
	<?php endif; ?>

<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    
	
	<?php /*  Success Bar  */ ?>
 	<?php if (Session::has('success')): ?>
		<div class="success_bar">
			<div class="message">				
				<?php echo Session::get('success'); ?>
			</div>			
		</div>
	<?php endif; ?>

	<?php /*  Action Area  */ ?>
	<?php if (!is_null($information['submission'])): ?>
		<div class="ui-corner-bottom action_area">
	        <div class="title">
	            Form Actions

	            <div class="title_right">
	                League Form ID = <?php echo $information['submission']->id; ?>
	            </div>
	        </div>

	        <?php foreach ($information['action_items'] as $action => $item): ?>

	            <?php if ($item['enabled']): ?>

	                <a href="<?php echo (isset($item['link'])) ? $item['link'] : '#'; ?>"
	                   <?php if (isset($item['target'])): ?> target="<?php echo $item['target']; ?>" <?php endif; ?>
	                   <?php if (isset($item['icon'])): ?> data-icon="<?php echo $item['icon']; ?>" <?php endif; ?>
	                   <?php if (isset($item['help'])): ?> data-help="<?php echo $item['help']; ?>" <?php endif; ?>
	                   data-action="<?php echo $action; ?>">
	                   <?php echo $item['text']; ?>
	                </a>

	            <?php endif; ?>

	        <?php endforeach; ?> 


	        <div class="status">
						
				<div class="state">
					<?php if ($information['submission']->data->complete): ?>					
						<img src="<?php echo asset('images/icons/check_mark_16px.png'); ?>" alt="" title="" />Complete
					<?php else: ?>
						<img src="<?php echo asset('images/icons/incomplete_16px.png'); ?>" alt="" title="" />Incomplete
					<?php endif; ?>	
				</div>

				Last updated at <span id="updated_at"><?php echo date('g:i a m/d/Y', strtotime($information['submission']->updated_at)); ?></span><br />
				Form created at <?php echo date('g:i a m/d/Y', strtotime($information['submission']->created_at)); ?>						
				
			</div>       
	        
	    </div>
	<?php endif; ?>	

	<?php /*  Past Due  */ ?>
	<?php if ($information['is_past_due']): ?>
		<div class="online_form_late ui-state-error ui-corner-all">
			<span class="ui-icon ui-icon-alert" style="display:inline-block; position:relative; top:2px;"></span>
			This form was due by <?php echo date('g:i A l, F j, Y', strtotime($information['activity_form']->due_at)); ?> and is now past the deadline.  Please submit your entries now before the form closes and becomes unavailable.
		</div>
	<?php endif; ?>
	

	<?php /*  Need to select a league  */ ?>
	<?php if (is_null($information['league'])): ?>		
		
		<br />		

		<h1>Speech Special District Results</h1>

		<br />

		<p>
			This form is for <b>District Directors</b> to submit special district contest results identifying state qualifying participants.
		</p>

		<div class="online_form_instructions ui-corner-all">
			<span class="ui-icon ui-icon-info" style="display:inline-block; position:relative; top:2px;"></span>
			<b>Instructions</b> <br />
			<ol>						
				<li>Begin by selecting the special district from the drop-down list.</li>
				<li>Then enter the district director key code/password provided by the OSAA.</li>
				<li>Click <b>Next</b> to continue with the selection.</li>
				<li>All entries must be submitted by <b><?php echo date('g:i A l, F j, Y', strtotime($information['activity_form']->due_at)); ?></b> using this online form.</li>
			</ol>

			<br />

			For questions, contact <?php echo $information['staff']->first_name; ?> <?php echo $information['staff']->last_name; ?> at (503) 682-6722 x231 or by e-mail to <?php echo Helpers::obfuscateEmailLink ($information['staff']->email); ?>.  For technical assistance, you can email <?php echo Helpers::obfuscateEmailLink ("support@osaa.org"); ?>.
		</div>		

		<br /><br />	
		
		<h2>Select Your Special District</h2>		
		
		<?php echo Form::open(array('url'    => url('/forms/registration/' . strtolower($information['activity']->slug)),
						    'method' => 'get',
						    'id'     => 'select_league_form')); ?>		
			
			<div class="columns">
				<div class="third" style="width: 155px;">
					<b>Special District</b><br />
					<?php echo Form::select('league',
								    $information['leagues_list'],
								    null,
								    array('style' => 'margin-top: 0.5em;')); ?>
				</div>

				<div class="third" style="width: 225px;">
					<b>Key Code/Password</b><br />
					<?php echo Form::text('code',
								  (Auth::check() and Auth::user()->isOsaaUser()) ? 'STATEREGISTRATION' : null,
								  array('style' => 'margin-top: 0.5em; width: 200px;')); ?>

					<img src="<?php echo asset('/images/icons/ajax_loader2.gif'); ?>" alt="" title="" />
				</div>

				<div class="third" style="width: 60px;">
					<br />
					<?php echo Form::submit('Next', array('class' => 'select_league_button',
												  'style' => 'font-size: 9pt; margin-top: 0.25em;')); ?>
				</div>
			</div>					

		<?php echo Form::close(); ?>

		<br class="clear" />
		<br />
		<div class="horizontal_divider" style="width: 100%;"></div>
		<br />

		<h2>Note to District Directors</h2>
		<p>
			Use this form to submit your district's results.  You will not be able to make changes once you submit this form.  To complete this form, you will need to supply the following information.
			<ul>
				<li>Your contact information (name, e-mail address, phone number)</li>
				<li>Information about the district contest (date, location)</li>
				<li>State qualifiers' information (name, school, events)</li>
				<li>Judges for state (name, contact information, availability)</li>
			</ul>

		</p>
			

	<?php /*  A league is selected  */ ?>
	<?php elseif (!is_null($information['league'])): ?>
				
		<br />

		<img src="<?php echo asset('images/icons/speech_64px.png'); ?>" alt="" title="" style="float: left; width: 64px; height: 64px; position: relative; top: -1em; margin-right: 0.5em;" />		

		<h1>Speech District <?php echo $information['league']->name; ?> State Qualifiers</h1>

		<br />		

	    <?php /*  Work in Progress  */ ?>
	    <?php if (!$information['submission']->data->complete): ?>        
	        <div class="ui-state-highlight progress_alert">
	            <img src="<?php echo asset('/images/icons/yield_icon_2_32px.png'); ?>" alt="" title="" style="float: left; width: 32px; display: inline-block; margin-right: 10px;" />
	            This form has not yet been submitted to the OSAA by the District Director.
	            <br class="clear" />
	        </div>
	    <?php endif; ?>       


	    <h3>Instructions for District Directors</h3>
        <div class="small">
            All entries must be entered with proper capitalization (e.g. "Title Case" not "UPPER CASE").  Enter names on this form in "First Last" name format.  Do not use all upper-case letters.  Be sure to spell names correctly.  Proofread this form before submitting results.  To list qualifiers for each speech event, you must first provide the number of speakers that participated in that event.  Depending on the number of competitors, a number of eligible state entry slots will become available for input.  If the event qualifier includes a speech title, you must provide a title in that field.  If the title of the speech is required and not known, enter in "TBD".
        </div>

        <br class="clear" />

	    <div class="clear float_right small gray" style="margin-top: -1em; text-align: right; line-height: 1.15em;">
	        Required fields are indicated with a red asterisk, <span style="color: #990000; font-weight: bold; font-size: 14pt !important; position: relative; top: 6px;">*</span>.<br />Fields with a blue asterisk, <span style="color: #000099; font-weight: bold; font-size: 14pt !important; position: relative; top: 6px;">*</span>, are required if a qualifier is listed.
	    </div>

		<b>Note:</b> All entries must be submitted by <?php echo date('g:i A l, F j, Y', strtotime($information['activity_form']->due_at)); ?> using this online form.

		<br /><br />

		<h2>Schools in Speech District <?php echo $information['league']->name; ?></h2>
		<table>
			<thead>
				<tr>
					<th>School</th>
					<?php /*  <th>Activities Director</th>  */ ?>
					<th>Speech Coach</th>
				</tr>
			</thead>

			<tbody>
				<?php foreach ($information['school_list'] as $item): ?>
					<tr>
						<td><b><?php echo $item->school; ?></b></td>
						<?php /*  <td><?php echo (!is_null($item->admin)) ? $item->admin->getDisplayName() . ' (' . $item->admin->email . ')' : '- -'; ?></td>  */ ?>
						<td><?php echo (!is_null($item->coach)) ? $item->coach->getDisplayName() . ' (' . $item->coach->email . ')' : '- -'; ?></td>
					</tr>
				<?php endforeach; ?>
			</tbody>

		</table>

		<br class="clear" />

		<?php if (Session::has('errors')): ?>                
            <div class="ui-state-error" style="padding: 2px 4px;">
				<span class="ui-icon ui-icon-alert" style="display:inline-block; position:relative; top:2px;"></span>
            	<?php foreach ($errors->all() as $error): ?><?php echo $error; ?> <?php endforeach; ?>
            </div>
            <br />
        <?php endif; ?>        
		
		<?php echo Form::open(array('url'    => url('/forms/submit'),
						    'method' => 'post',
						    'class'  => 'registration_form')); ?>

			<?php echo Form::hidden('form', 'REGISTRATION'); ?>			
			<?php echo Form::hidden('activity', $information['activity']->slug); ?>
			<?php echo Form::hidden('league', $information['league']->slug); ?>			
			
			<h2 class="line">District Director</h2>

			<div class="columns">
				<div class="half">

					<?php echo Form::label('director_name', 'Name'); ?>
		            <?php echo Form::text('director_name',
		                          $information['submission']->data->director->name,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->director->name',
		                                'data-type'     => 'STRING',
		                                'data-original' => $information['submission']->data->director->name,
		                                'data-required' => true,
		                                'style'         => 'width: 150px;')); ?>
		            <span class="small gray note">(First Last)</span>

		            <br /><br />

		            <?php echo Form::label('director_email', 'E-Mail'); ?>
		            <?php echo Form::text('director_email',
		                          $information['submission']->data->director->email,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->director->email',
		                                'data-type'     => 'STRING',
		                                'data-original' => $information['submission']->data->director->email,
		                                'data-required' => true,
		                                'style'         => 'width: 200px;')); ?>

		            <br /><br />

		            <?php echo Form::label('director_school', 'School'); ?>
		            <?php echo Form::text('director_school',
		                          $information['submission']->data->director->school,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->director->school',
		                                'data-type'     => 'STRING',
		                                'data-original' => $information['submission']->data->director->school,
		                                'data-autocomplete' => true,
		                                'data-source'   => url('/forms/registration/spe/lookup/school'),
		                                'style'         => 'width: 300px;')); ?>
		            <br />
		            <span class="small gray note" style="margin-left: 115px; display: inline-block;">(What school are you associated with?)</span>

		        </div>

		        <div class="columns">

		        	<?php echo Form::label('director_mobile', 'Cell Phone'); ?>
		            <?php echo Form::text('director_mobile',
		                          $information['submission']->data->director->cell_phone,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->director->cell_phone',
		                                'data-type'     => 'PHONE',
		                                'data-original' => $information['submission']->data->director->cell_phone,
		                                'data-required' => true,
		                                'data-format'   => 'phone',
		                                'style'         => 'width: 100px;')); ?>	            

		            <br /><br />

		            <?php echo Form::label('director_home', 'Home Phone'); ?>
		            <?php echo Form::text('director_home',
		                          $information['submission']->data->director->home_phone,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->director->home_phone',
		                                'data-type'     => 'PHONE',
		                                'data-original' => $information['submission']->data->director->home_phone,		                                
		                                'data-format'   => 'phone',
		                                'style'         => 'width: 100px;')); ?>					

		            <br /><br />

		            <span class="small gray note">Your contact information will not be published.  This information will be visible to OSAA staff only in order to contact you if any question arises.</span>

		       	</div>
		    </div>			

			<br class="clear" />

			<h2 class="line">District Tournament Information</h2>
			
			<div class="columns">
				<div class="half">
					<?php echo Form::label('event_date', 'Date'); ?>
		            <?php echo Form::text('event_date',
		                          (is_null($information['submission']->data->event->date)) ? null : date('m/d/Y', strtotime($information['submission']->data->event->date)),
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->event->date',
		                                'data-type'     => 'DATE',
		                                'data-original' => (is_null($information['submission']->data->event->date)) ? null : date('m/d/Y', strtotime($information['submission']->data->event->date)),
		                                'data-required' => true,
		                                'data-format'   => 'date-picker',
		                                'style'         => 'width: 80px;')); ?>
		            <span class="small gray note">(When was the last day of the event?)</span>
		        </div>

		        <div class="half">
		        	<?php echo Form::label('event_location', 'Location'); ?>
		            <?php echo Form::text('event_location',
		                          $information['submission']->data->event->location,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->event->location',
		                                'data-type'     => 'STRING',		                                
		                                'data-original' => $information['submission']->data->event->location,
		                                'data-autocomplete' => true,
		                                'data-source'   => url('/forms/registration/spe/lookup/location'),
		                                'style'         => 'width: 300px;')); ?>
		            <br />
		            <span class="small gray note" style="margin-left: 115px; display: inline-block;">(Where was the event held?)</span>

		       	</div>
		    </div>

			<br class="clear" />

			<?php echo Form::label('event_notes', 'Notes', array('class' => 'auto_width')); ?>
		    <span class="small gray note" style="display: inline-block; margin-lefT: 10px;">(Notes / Comments)</span><br />
            <?php echo Form::textarea('event_notes',
                          	  $information['submission']->data->event->notes,
                               array('data-autosave' => true,
                                     'data-field'    => 'data->event->notes',
                                     'data-type'     => 'STRING',
                                     'data-original' => $information['submission']->data->event->notes,                                     
                                     'style'         => 'width: 100%; height: 5em; font-family: Arial,Helvetica,sans-serif; font-size: 11pt;')); ?>

			<br class="clear" /><br />


			
			<h2 class="line new_page">Individual Events</h2>

			<span class="ui-icon ui-icon-info float_left" style="vertical-align: middle;"></span>
			To list qualifiers for each speech event, you must first provide the number of speakers that participated in that event.  Depending on the number of competitors, a number of eligible state entry slots will become available for input.

			<br />

			<?php foreach ($information['submission']->data->entries->individual as $index => $entry): ?>

				<?php
					$event = $information['events'][$entry->event];
				?>

				<div class="event_group">

					<h3 class="event_name"><?php echo $event->name; ?></h3>

					<?php echo Form::label($entry->event . '_count', 'Number of Speakers', array('style' => 'width: 175px;')); ?>
		            <?php echo Form::text($entry->event . '_count',
		                          $entry->count,
		                          array('data-autosave' => true,
		                                'data-field'    => 'data->entries->individual[' . $index . ']->count',
		                                'data-type'     => 'INT',
		                                'data-original' => $entry->count,
		                                'data-required' => true,
		                                'data-format'   => 'numbers',
		                                'data-reload'   => true,
		                                'maxlength'     => 3,	                                
		                                'style'         => 'width: 30px;')); ?>

		            <span class="small gray note" style="padding-left: 20px;">(This is the number of <?php echo $event->name; ?> <?php echo strtolower(str_plural($event->label)); ?> that competed in this district tournament.)</span>

		            <br /><br />

		            <h4>Qualifiers (<?php echo $entry->allowed; ?> allowed)</h4>

		            
		            <?php foreach ($entry->qualifiers as $sub_index => $qualifier): ?>

		            	<div class="qualifier" <?php echo ($qualifier->disabled) ? 'data-qualifier-disabled="true"' : null; ?>>

		            		<div class="qualifier_number"><?php echo ($sub_index + 1); ?>.</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_name', ucfirst(strtolower((($event->multiple) ? str_plural($event->label) : $event->label))), array('class' => 'auto_width')); ?>
		            			<span class="small gray note" style="padding-left: 10px;"><?php echo ($event->multiple) ? '(First Last / First Last)' : '(First Last)'; ?></span>
		            			<br />
					            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_name',
					                          $qualifier->name,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->entries->individual[' . $index . ']->qualifiers[' . $sub_index . ']->name',
					                                'data-type'     => 'STRING',
                                                    'data-required' => 'special',
					                                'data-original' => $qualifier->name,				                                
					                                'style'         => 'width: 200px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_school', 'School', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_' . $sub_index . '_school',				                            
					                            $information['school_options'],
					                            $qualifier->school,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->individual[' . $index . ']->qualifiers[' . $sub_index . ']->school',
					                                  'data-type'     => 'STRING',
                                                      'data-required' => 'special',
					                                  'data-original' => $qualifier->school,				                                
					                                  'style'         => 'width: 175px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php if (!property_exists($event, 'no_title')): ?>
			            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_title', 'Title', array('class' => 'auto_width')); ?>
			            			<span class="small gray note" style="padding-left: 10px;">(Title of the speech)</span>
			            			<br />
						            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_title',
						                          $qualifier->title,
						                          array('data-autosave' => true,
						                                'data-field'    => 'data->entries->individual[' . $index . ']->qualifiers[' . $sub_index . ']->title',
						                                'data-type'     => 'STRING',
                                                        'data-required' => 'special',
						                                'data-original' => $qualifier->title,				                                
						                                'style'         => 'width: 215px;')); ?>
						        <?php else: ?>
						        	<div style="width: 228.5px; display: inline-block;"></div>
						        <?php endif; ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<div class="label auto_width">Event</div><br />	            			
					            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_first_event',
					                          $entry->event,
					                          array('readonly' => 'readonly',				                                
					                                'style'    => 'width: 45px;')); ?>
		            		</div>

		            		<div class="qualifier_information" style="margin-right: 0;">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_second_event', '2nd Individual Event', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_' . $sub_index . '_second_event',
					            				$information['other_event_options'],
					                            $qualifier->other_event,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->individual[' . $index . ']->qualifiers[' . $sub_index . ']->other_event',
					                                  'data-type'     => 'STRING',
					                                  'data-original' => $qualifier->other_event,				                                
					                                  'style'         => 'width: 185px;')); ?>
		            		</div>

		            	</div>

		            <?php endforeach; ?>


		            <?php
			            $qualifier = $entry->alternate;
			        ?>
		            <?php if (!$qualifier->disabled and $entry->allowed > 0): ?>

			            <div class="qualifier">

		            		<div class="qualifier_number" style="font-size: 14pt;">ALT</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_name', ucfirst(strtolower((($event->multiple) ? str_plural($event->label) : $event->label))), array('class' => 'auto_width')); ?>
		            			<span class="small gray note" style="padding-left: 10px;"><?php echo ($event->multiple) ? '(First Last / First Last)' : '(First Last)'; ?></span>
		            			<br />
					            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_name',
					                          $qualifier->name,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->entries->individual[' . $index . ']->alternate->name',
					                                'data-type'     => 'STRING',
                                                    'data-required' => 'special',
					                                'data-original' => $qualifier->name,				                                
					                                'style'         => 'width: 200px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_school', 'School', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_ALT_school',				                            
					                            $information['school_options'],
					                            $qualifier->school,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->individual[' . $index . ']->alternate->school',
					                                  'data-type'     => 'STRING',
                                                      'data-required' => 'special',
					                                  'data-original' => $qualifier->school,				                                
					                                  'style'         => 'width: 175px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php if (!property_exists($event, 'no_title')): ?>
			            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_title', 'Title', array('class' => 'auto_width')); ?>
			            			<span class="small gray note" style="padding-left: 10px;">(Title of the speech)</span>
			            			<br />
						            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_title',
						                          $qualifier->title,
						                          array('data-autosave' => true,
						                                'data-field'    => 'data->entries->individual[' . $index . ']->alternate->title',
						                                'data-type'     => 'STRING',
                                                        'data-required' => 'special',
						                                'data-original' => $qualifier->title,				                                
						                                'style'         => 'width: 215px;')); ?>
						        <?php else: ?>
						        	<div style="width: 228.5px; display: inline-block;"></div>
						        <?php endif; ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<div class="label auto_width">Event</div><br />	            			
					            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_first_event',
					                          $entry->event,
					                          array('readonly' => 'readonly',				                                
					                                'style'    => 'width: 45px;')); ?>
		            		</div>

		            		<div class="qualifier_information" style="margin-right: 0;">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_second_event', '2nd Individual Event', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_ALT_second_event',
					            	            $information['other_event_options'],
					                            $qualifier->other_event,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->individual[' . $index . ']->alternate->other_event',
					                                  'data-type'     => 'STRING',
					                                  'data-original' => $qualifier->other_event,				                                
					                                  'style'         => 'width: 185px;')); ?>
		            		</div>

		            	</div>
		            <?php endif; ?>
			    </div>

	            <br class="clear" />

			<?php endforeach; ?>	

			</div>			

			<br />

			<h2 class="line new_page">Team Events</h2>

			<?php foreach ($information['submission']->data->entries->team as $index => $entry): ?>

				<?php
					$event = $information['events'][$entry->event];
				?>

				<div class="event_group">

					<h3 class="event_name"><?php echo $event->name; ?></h3>

					<?php if (!property_exists($event, 'guarantee')): ?>

						<?php echo Form::label($entry->event . '_count', 'Number of Teams', array('style' => 'width: 175px;')); ?>
			            <?php echo Form::text($entry->event . '_count',
			                          $entry->count,
			                          array('data-autosave' => true,
			                                'data-field'    => 'data->entries->team[' . $index . ']->count',
			                                'data-type'     => 'INT',
			                                'data-original' => $entry->count,
			                                'data-required' => true,
			                                'data-format'   => 'numbers',
			                                'data-reload'   => true,
			                                'maxlength'     => 3,	                                
			                                'style'         => 'width: 30px;')); ?>

			            <span class="small gray note" style="padding-left: 20px;">(This is the number of <?php echo $event->name; ?> teams that competed in this district tournament.)</span>

						<br />

					<?php elseif (property_exists($event, 'instructions')): ?>

						<?php echo $event->instructions; ?>

			        <?php endif; ?>	            
					
					<br />
		            
		            <h4>Qualifiers (<?php echo $entry->allowed; ?> allowed)</h4>

		            <?php foreach ($entry->qualifiers as $sub_index => $qualifier): ?>

		            	<div class="qualifier" <?php echo ($qualifier->disabled) ? 'data-qualifier-disabled="true"' : null; ?>>

		            		<div class="qualifier_number"><?php echo ($sub_index + 1); ?>.</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_name', ucfirst(strtolower((($event->multiple) ? str_plural($event->label) : $event->label))), array('class' => 'auto_width')); ?>
		            			<span class="small gray note" style="padding-left: 10px;"><?php echo ($event->multiple) ? '(First Last / First Last)' : '(First Last)'; ?></span>
		            			<br />
					            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_name',
					                          $qualifier->name,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->entries->team[' . $index . ']->qualifiers[' . $sub_index . ']->name',
					                                'data-type'     => 'STRING',
                                                    'data-required' => 'special',
					                                'data-original' => $qualifier->name,				                                
					                                'style'         => 'width: 200px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_school', 'School', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_' . $sub_index . '_school',				                            
					                            $information['school_options'],
					                            $qualifier->school,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->team[' . $index . ']->qualifiers[' . $sub_index . ']->school',
					                                  'data-type'     => 'STRING',
                                                      'data-required' => 'special',
					                                  'data-original' => $qualifier->school,				                                
					                                  'style'         => 'width: 175px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php if (!property_exists($event, 'no_title')): ?>
			            			<?php echo Form::label($entry->event . '_' . $event->type . '_' . $sub_index . '_title', 'Title', array('class' => 'auto_width')); ?>
			            			<span class="small gray note" style="padding-left: 10px;">(Title of the speech)</span>
			            			<br />
						            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_title',
						                          $qualifier->title,
						                          array('data-autosave' => true,
						                                'data-field'    => 'data->entries->team[' . $index . ']->qualifiers[' . $sub_index . ']->title',
						                                'data-type'     => 'STRING',
                                                        'data-required' => 'special',
						                                'data-original' => $qualifier->title,				                                
						                                'style'         => 'width: 215px;')); ?>
						        <?php else: ?>
						        	<div style="width: 228.5px; display: inline-block;"></div>
						        <?php endif; ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<div class="label auto_width">Event</div><br />	            			
					            <?php echo Form::text($entry->event . '_' . $event->type . '_' . $sub_index . '_first_event',
					                          $entry->event,
					                          array('readonly' => 'readonly',				                                
					                                'style'    => 'width: 45px;')); ?>
		            		</div>

		            		

		            	</div>

		            <?php endforeach; ?>

		            <?php
			            $qualifier = $entry->alternate;
			        ?>
		            <?php if (!$qualifier->disabled and $entry->allowed > 0): ?>

			            <div class="qualifier">

		            		<div class="qualifier_number" style="font-size: 14pt;">ALT</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_name', ucfirst(strtolower((($event->multiple) ? str_plural($event->label) : $event->label))), array('class' => 'auto_width')); ?>
		            			<span class="small gray note" style="padding-left: 10px;"><?php echo ($event->multiple) ? '(First Last / First Last)' : '(First Last)'; ?></span>
		            			<br />
					            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_name',
					                          $qualifier->name,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->entries->team[' . $index . ']->alternate->name',
					                                'data-type'     => 'STRING',
                                                    'data-required' => 'special',
					                                'data-original' => $qualifier->name,				                                
					                                'style'         => 'width: 200px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_school', 'School', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select($entry->event . '_' . $event->type . '_ALT_school',				                            
					                            $information['school_options'],
					                            $qualifier->school,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->team[' . $index . ']->alternate->school',
					                                  'data-type'     => 'STRING',
                                                      'data-required' => 'special',
					                                  'data-original' => $qualifier->school,				                                
					                                  'style'         => 'width: 175px;')); ?>
		            		</div>
		            		
		            		<div class="qualifier_information">
		            			<?php if (!property_exists($event, 'no_title')): ?>
			            			<?php echo Form::label($entry->event . '_' . $event->type . '_ALT_title', 'Title', array('class' => 'auto_width')); ?>
			            			<span class="small gray note" style="padding-left: 10px;">(Optional speech title)</span>
			            			<br />
						            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_title',
						                          $qualifier->title,
						                          array('data-autosave' => true,
						                                'data-field'    => 'data->entries->team[' . $index . ']->alternate->title',
						                                'data-type'     => 'STRING',
                                                        'data-required' => 'special',
						                                'data-original' => $qualifier->title,				                                
						                                'style'         => 'width: 215px;')); ?>
						        <?php else: ?>
									<div style="width: 228.5px; display: inline-block;"></div>
						        <?php endif; ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<div class="label auto_width">Event</div><br />	            			
					            <?php echo Form::text($entry->event . '_' . $event->type . '_ALT_first_event',
					                          $entry->event,
					                          array('readonly' => 'readonly',				                                
					                                'style'    => 'width: 45px;')); ?>
		            		</div>            		

		            	</div>
		            <?php endif; ?>
		        </div>

	            <br class="clear" />

			<?php endforeach; ?>			

			<br />
			
			<div class="event_group">
				<h2 class="line event_name" id="proven-excellence-qualifiers" name="proven-excellence-qualifiers">Proven Excellence Qualifiers</h2>

				<div style="float: left; width: 23%; text-align: left;">
					<a href="#" class="add_proven_qualifier">Add Another Proven<br />Excellence Qualifier</a>
				</div>
				<div style="float: left; width: 75%;">
					<span class="ui-icon ui-icon-info float_left" style="vertical-align: middle;"></span>
					No more than two qualifiers per school.  
					<?php if (count($information['submission']->data->entries->additional) > 0): ?>
						To add an additional proven excellence qualifier, click the button to the left to insert a new row.  
						To remove a qualifier, click the red X icon in the corresponding qualifier's row.
					<?php else: ?>
						To add a proven excellence qualifier, click the button to the left.  
					<?php endif; ?>
				</div>			

				<br class="clear" /><br />

				<?php if (count($information['submission']->data->entries->additional) > 0): ?>

					<?php foreach ($information['submission']->data->entries->additional as $index => $qualifier): ?>

						<?php
							if (!is_null($qualifier->event))
							{
								$event = $information['events'][$qualifier->event];
							}
							else
							{
								$event = null;
							}
						?>

						<div class="qualifier additional" data-index="<?php echo $index; ?>">
		            		
							<div class="qualifier_information" style="margin-right: 15px;">
		            			<?php echo Form::label('ADD_' . $index . '_event', 'Event', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select('ADD_' . $index . '_event',
					            	            $information['event_options'],
					                            $qualifier->event,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->entries->additional[' . $index . ']->event',
					                                  'data-type'     => 'STRING',
					                                  'data-original' => $qualifier->event,
					                                  'data-reload'   => true,
                                                      'data-required' => true,
					                                  'style'         => 'width: 200px;')); ?>
		            		</div>

		            		<?php if (!is_null($event)): ?>

			            		<div class="qualifier_information" style="margin-right: 15px;">
			            			<?php echo Form::label('ADD_' . $index . '_name', ucfirst(strtolower((($event->multiple) ? str_plural($event->label) : $event->label))), array('class' => 'auto_width')); ?>
			            			<span class="small gray note" style="padding-left: 0px;"><?php echo ($event->multiple) ? '(First Last / First Last)' : '(First Last)'; ?></span>
			            			<br />
						            <?php echo Form::text('ADD_' . $index . '_name',
						                          $qualifier->name,
						                          array('data-autosave' => true,
						                                'data-field'    => 'data->entries->additional[' . $index . ']->name',
						                                'data-type'     => 'STRING',
                                                        'data-required' => true,
						                                'data-original' => $qualifier->name,				                                
						                                'style'         => 'width: 205px;')); ?>
			            		</div>

			            		<div class="qualifier_information" style="margin-right: 15px;">
			            			<?php echo Form::label('ADD_' . $index . '_school', 'School', array('class' => 'auto_width')); ?>
			            			<br />
						            <?php echo Form::select('ADD_' . $index . '_school',				                            
						                            $information['school_options'],
						                            $qualifier->school,
						                            array('data-autosave' => true,
						                                  'data-field'    => 'data->entries->additional[' . $index . ']->school',
						                                  'data-type'     => 'STRING',
                                                          'data-required' => true,
						                                  'data-original' => $qualifier->school,				                                
						                                  'style'         => 'width: 150px;')); ?>
			            		</div>

			            		<div class="qualifier_information" style="margin-right: 15px;">
			            			<?php if (!property_exists($event, 'no_title')): ?>
				            			<?php echo Form::label('ADD_' . $index . '_title', 'Title', array('class' => 'auto_width')); ?>
				            			<span class="small gray note" style="padding-left: 5px;">(Title of the speech)</span>
				            			<br />
							            <?php echo Form::text('ADD_' . $index . '_title',
							                          $qualifier->title,
							                          array('data-autosave' => true,
							                                'data-field'    => 'data->entries->additional[' . $index . ']->title',
							                                'data-type'     => 'STRING',
                                                            'data-required' => true,
							                                'data-original' => $qualifier->title,				                                
							                                'style'         => 'width: 130px;')); ?>
							        <?php else: ?>
							        	<div style="width: 147px; display: inline-block;"></div>
							        <?php endif; ?>
			            		</div>

                                <?php if (Helpers::strEqual($event->type, 'INDIVIDUAL')): ?>
                                    <div class="qualifier_information" style="margin-right: 0;">
                                        <?php echo Form::label('ADD_' . $index . '_second_event', '2nd Individual Event', array('class' => 'auto_width')); ?>
                                        <br />
                                        <?php echo Form::select('ADD_' . $index . '_second_event',
                                                        $information['other_event_options'],
                                                        $qualifier->other_event,
                                                        array('data-autosave' => true,
                                                              'data-field'    => 'data->entries->additional[' . $index . ']->other_event',
                                                              'data-type'     => 'STRING',
                                                              'data-original' => $qualifier->other_event,                                               
                                                              'style'         => 'width: 185px;')); ?>
                                    </div>
                                <?php endif; ?>

			            	<?php else: ?>

			            		<span class="small gray note"><br />(Begin by selecting this proven excellence qualifier's event.)</span>
			            		
			            	<?php endif; ?>    

			            	<div style="position: absolute; right: 0; top: 1em;">
		            			<a href="#" data-index="<?php echo $index; ?>" class="delete_proven_qualifier"><img src="<?php echo asset('/images/icons/missing_24px.png'); ?>" alt="" title="" data-tooltip="Delete this proven excellence qualifier" /></a>
		            		</div>        		

		            	</div>	            	            	

		            <?php endforeach; ?>


				<?php else: ?>

					<span class="small gray note">You have not added any proven excellence qualifiers.  Click the <b>Add Another Proven Excellence Qualifier</b> button to insert a row which you can provide the information for a new proven excellence qualifier.</span><br />

				<?php endif; ?>

			</div>

			<br class="clear" /><br />
			
			<div class="event_group new_page">

				<h2 class="line event_name" id="judges" name="judges">Judges</h2>

				<div style="float: left; width: 23%; text-align: left;">
					<a href="#" class="add_judge">Add Another<br />Judge</a>
				</div>
				<div style="float: left; width: 75%;">
					<span class="ui-icon ui-icon-info float_left" style="vertical-align: middle;"></span>
					Every participating school must provide at least one judge to cover any entries in debate and/or individual events.  That judge may be the coach.  If a coach does not fulfill assigned judging obligations without prior clearance from the Judging Committee, the school may be subject to censure and fine by the OSAA.
				</div>			

				<br class="clear" /><br />

				<?php if (count($information['submission']->data->judges) > 0): ?>

					<?php foreach ($information['submission']->data->judges as $index => $judge): ?>
						
						<div class="qualifier judges" data-index="<?php echo $index; ?>" style="height: 10em;">
		            		
							<div style="position: absolute; right: 0; top: 2.125em;">
		            			<a href="#" data-index="<?php echo $index; ?>" class="delete_judge"><img src="<?php echo asset('/images/icons/missing_24px.png'); ?>" alt="" title="" data-tooltip="Delete this judge" /></a>
		            		</div>        		

							<div class="qualifier_information">
		            			<?php echo Form::label('JUDGE_' . $index . '_name', 'Name', array('class' => 'auto_width')); ?>
		            			<span class="small gray note" style="padding-left: 10px;">(First Last)</span>
		            			<br />
					            <?php echo Form::text('JUDGE_' . $index . '_name',
					                          $judge->name,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->judges[' . $index . ']->name',
					                                'data-type'     => 'STRING',
                                                    'data-required' => true,
					                                'data-original' => $judge->name,				                                
					                                'style'         => 'width: 150px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label('JUDGE_' . $index . '_school', 'School', array('class' => 'auto_width')); ?>
		            			<br />
					            <?php echo Form::select('JUDGE_' . $index . '_school',				                            
					                            $information['school_options'],
					                            $judge->school,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->judges[' . $index . ']->school',
					                                  'data-type'     => 'STRING',
					                                  'data-original' => $judge->school,
					                                  'style'         => 'width: 175px;')); ?>
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label('JUDGE_' . $index . '_cell_phone', 'Cell Phone', array('class' => 'auto_width')); ?>	            			
		            			<br />
					            <?php echo Form::text('JUDGE_' . $index . '_cell_phone',
					                          $judge->cell_phone,
					                          array('data-autosave' => true,
					                                'data-field'    => 'data->judges[' . $index . ']->cell_phone',
					                                'data-type'     => 'PHONE',
					                                'data-original' => $judge->cell_phone,		                                
			                                		'data-format'   => 'phone',
			                                		'style'         => 'width: 100px;')); ?>					                                
		            		</div>

		            		<div class="qualifier_information">
		            			<?php echo Form::label('JUDGE_' . $index . '_type', 'Type', array('class' => 'auto_width')); ?>	            			
		            			<br />
					            <?php echo Form::select('JUDGE_' . $index . '_type',
					                            array('COACH' => 'Coach', 'VOLUNTEER' => 'Volunteer', 'PAID' => 'Paid Judge'),
					                            $judge->type,
					                            array('data-autosave' => true,
					                                  'data-field'    => 'data->judges[' . $index . ']->type',
					                                  'data-type'     => 'STRING',
					                                  'data-original' => $judge->type,		                                		
			                                  		  'style'         => 'width: 100px;')); ?>					                                
		            		</div>

		            		<div class="qualifier_information">
		            			<div class="label auto_width">Days Available:</div><br />
					            <?php echo Form::label('JUDGE_' . $index . '_availability_day_r', 'Thurs.', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_day_r',
					                              true,
					                              $judge->availability->days->thursday,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->days->thursday',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->days->thursday,		                                		
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>					

			                    <div style="display: inline-block; width: 25px;"></div>

			                    <?php echo Form::label('JUDGE_' . $index . '_availability_day_f', 'Fri.', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_day_f',
					                              true,
					                              $judge->availability->days->friday,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->days->friday',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->days->friday,		                                		
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>

			                    <div style="display: inline-block; width: 25px;"></div>

			                    <?php echo Form::label('JUDGE_' . $index . '_availability_day_s', 'Sat.', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_day_s',
					                              true,
					                              $judge->availability->days->saturday,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->days->saturday',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->days->saturday,		                                		
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>

		            		</div>

		            		<br class="clear" /><br />

		            		<div class="label auto_width" style="margin-right: 10px;">Events Available:</div>

		            		<?php echo Form::label('JUDGE_' . $index . '_availability_events_cxl', 'CXL', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_cxl',
					                              true,
					                              $judge->availability->events->CXL,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->CXL',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->CXL,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_par', 'PAR', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_par',
					                              true,
					                              $judge->availability->events->PAR,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->PAR',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->PAR,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_pfd', 'PFD', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_pfd',
					                              true,
					                              $judge->availability->events->PFD,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->PFD',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->PFD,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_ldv', 'LDV', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_ldv',
					                              true,
					                              $judge->availability->events->LDV,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->LDV',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->LDV,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_cong', 'CONG', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_cong',
					                              true,
					                              $judge->availability->events->CONG,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->CONG',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->CONG,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_ie', 'Any Individual Event', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_ie',
					                              true,
					                              $judge->availability->events->IE,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->IE',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->IE,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>
							
							<div style="display: inline-block; width: 25px;"></div>

							<?php echo Form::label('JUDGE_' . $index . '_availability_events_all', 'All Events', array('class' => 'auto_width', 'style' => 'font-weight: normal; float: none;')); ?>
					            <?php echo Form::checkbox('JUDGE_' . $index . '_availability_events_all',
					                              true,
					                              $judge->availability->events->ALL,
					                              array('data-autosave' => true,
					                                    'data-field'    => 'data->judges[' . $index . ']->availability->events->ALL',
					                                    'data-type'     => 'BOOL',
					                                    'data-original' => $judge->availability->events->ALL,
			                                  	  	    'style'         => 'margin-left: 4px; vertical-align: middle;')); ?>			            		
			            	
			            	<br class="clear" /><br />

                            <?php echo Form::label('JUDGE_' . $index . '_notes', 'Notes', array('class' => 'auto_width', 'style' => 'margin-right: 10px;')); ?>
                            <?php echo Form::textarea('JUDGE_' . $index . '_notes',
                                              $judge->notes,
                                              array('data-autosave' => true,
                                                    'data-field'    => 'data->judges[' . $index . ']->notes',
                                                    'data-type'     => 'STRING',
                                                    'data-original' => $judge->notes,
                                                    'class'         => 'judge_notes',
                                                    'style'         => 'width: 80%; height: 3.5em; font-family: Arial,Helvetica,sans-serif; font-size: 9pt; line-height: 1.15em;')); ?>

		            	</div>	            	            	

		            <?php endforeach; ?>


				<?php else: ?>

					<span class="small gray note">You have not added any judges.  Click the <b>Add Another Judge</b> button to insert a row which you can provide the information for a new judge.</span>

				<?php endif; ?>
			</div>
			
		<?php echo Form::close(); ?>

		<br class="clear" /><br />

	<?php endif; ?>
	
	<img src="http://www.osaa.org/images/icons/ajax_loader3.gif" style="display: none;" />

<?php $__env->stopSection(); ?>

