<?php $this->headLink()->appendStylesheet($this->websiteUrl . 'system/css/seotoaster.css'); ?>
<?php $this->headLink()->appendStylesheet($this->websiteUrl . 'system/css/swfupload.css'); ?>
<?php echo $this->headLink(); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/swfupload/swfupload.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/swfupload/swfupload.queue.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/swfupload/fileprogress.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/swfupload/handlers.js'); ?>
<?php echo $this->headScript(); ?>
<div id="seotoaster" class="gallery">
<div class="close_window" onclick="parent.tb_remove();parent.location.reload();"></div>
<div class="admineditwhat">Upload picture <?php echo ($this->galleryName!=''?'in "'.$this->galleryName.'" gallery':'gallery'); ?></div>
<?php if($this->galleryName != ''): ?>
<script type="text/javascript">
window.onload = function(){
var swfu_gallery, url_website = '<?php echo $this->websiteUrl; ?>';
var settings = {
	flash_url : url_website+'system/js/swfupload/swfupload.swf',
	upload_url: url_website+'sys/backend_swfuploader/uploadimageingallery/',
	post_params: {'gallery' : '<?php echo $this->galleryName; ?>'},
	file_size_limit : "8 MB",
	file_types : "*.gif;*.png;*.jpg;",
	file_types_description : "Web Image",
	file_upload_limit : 50,
	file_queue_limit : 0,
	custom_settings : {
	    progressTarget : "UploadProgressGallery",
	    cancelButtonId : "btnCancelGallery"
	    },
	debug: false,
	// Button settings
	button_placeholder_id: 'adminuploadpics',
	button_image_url: url_website+'system/js/swfupload/swf-upload-browse-pictures.png',
	button_width: "200",
	button_height: "31",
	button_action: SWFUpload.BUTTON_ACTION.SELECT_FILES,
	button_cursor: SWFUpload.CURSOR.HAND,
	button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
	// The event handler functions are defined in handlers.js
	file_queued_handler : fileQueued,
	file_queue_error_handler : fileQueueError,
	file_dialog_complete_handler : fileDialogComplete,
	upload_start_handler : uploadStart,
	upload_progress_handler : uploadProgress,
	upload_error_handler : uploadError,
	upload_success_handler : uploadSuccess,
	upload_complete_handler : uploadComplete,
	queue_complete_handler : queueComplete 
	};
swfu_gallery = new SWFUpload(settings); 
};
</script>
<form action="javascript:;">
    <p align="right"><input name="adminuploadpics" type="button" value="BROWSE PICTURES" class="adminuploadpics" style="display:none;" id="adminuploadpics"/></p>
<input disabled="disabled" id="btnCancelGallery" value="Cancel All Uploads" onclick="cancelQueue(swfu_gallery);" style="margin-left: 2px; font-size: 8pt; height: 29px; display:none;" type="button">
</form>
<div id="UploadProgressGallery"></div>
<div id="info">Your can upload one or more pictures. The maximum picture size is 8M.</div>
<?php else: ?>
	<div class="errors" style="cursor: default;">This Gallery does not exist!</div>
<?php endif; ?>
</div>