// CONFIGURE SWFUPLOAD

var swfu;

window.onload = function() {
	
	swfu = new SWFUpload({
		// Backend Settings
		upload_url: path_to_site+"index.php", // Relative to the SWF file (or you can use absolute paths)
		
		post_params: {"PHPSESSIONID" : sessionid},

		// File Upload Settings
		file_size_limit : "51200",	// 50MB
		file_types : "*.jpg;*.png;*.bmp;*.gif;",
		file_types_description : "Image Files",
		file_upload_limit : "20",
		file_queue_limit : "0",
		
		swfupload_loaded_handler : swfUploadLoaded,

		// Event Handler Settings (all my handlers are in the Handler.js file)
		
		file_dialog_start_handler : fileDialogStart,
		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,
		

		// Button Settings
		button_image_url : "images/XPButtonUploadText_61x22.png",	// Relative to the SWF file
		button_placeholder_id : "spanButtonPlaceholder1",
		button_width: 61,
		button_height: 22,
		
		// Flash Settings
		flash_url : "flash/swfupload.swf",
		

		custom_settings : {
			progressTarget : "fsUploadProgress1",
			cancelButtonId : "btnCancel1"
		},
		
		// Debug Settings
		debug: false
	});

	

 }