		var swfu;
		function new_upload(){
		swfu = new SWFUpload({
				// Backend Settings
				upload_url: "/upload.php",
				//post_params: {"PHPSESSID": "<?php echo prestart_session(); ?>"},

				// File Upload Settings
				file_size_limit : "1500 KB",
				file_types : "*.jpg;*.png;*.gif;*.jpeg",
				file_types_description : "Изображения JPG,PNG,GIF",
				//file_upload_limit : files_max-cur_files,
        file_upload_limit : files_max-cur_files,
				// Event Handler Settings - these functions as defined in Handlers.js
				//  The handlers are not part of SWFUpload but are part of my website and control how
				//  my website reacts to the SWFUpload events.
				swfupload_preload_handler : preLoad,
				swfupload_load_failed_handler : loadFailed,
				file_queued_handler : fileQueued,				
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
//				upload_complete_handler : uploadComplete,
        queue_complete_handler : queueComplete,
				upload_start_handler : uploadStart,
				swfupload_loaded_handler:reset_upload_limit,
				// Button Settings
				button_placeholder_id : "upload_div",
				button_width: 94,
				button_height: 25,
				//button_text : '',
				//button_text_style : '.browse-button {border: 1px solid #d3d3d3; background: #e6e6e6 url(../../css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }',
				button_text_top_padding: 0,
				button_text_left_padding: 0,
				button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
				button_cursor: SWFUpload.CURSOR.HAND,
				prevent_swf_caching : false,
				// Flash Settings
				flash_url : "/js/swf/swfupload.swf",
				flash9_url : "/js/swf/swfupload_fp9.swf",

				
				// Debug Settings
				debug: false
			});
//			swfu.ready=function(){reset_upload_limit()}
			//alert(byid('browse_button'))
  }