	var swf_upload_control;

        window.onload = function () {
            swf_upload_control = new SWFUpload({
				// Backend settings
				upload_target_url: "upload.asp",
				upload_cookies: ["ASPSESSIONID","contactinfo"],

				// Flash file settings
				file_size_limit : "20480",	// 20 MB
				file_types : "*.jpg;*.gif;*.doc;*.pdf;*.xls;*.zip",	// or you could use something like: "*.doc;*.wpd;*.pdf",
				file_types_description : "Selected Types",
				file_upload_limit : "1",
				//file_queue_limit : "6", // this isn't needed because the upload_limit will automatically place a queue limit
				begin_upload_on_queue : false,

				// Event handler settings
				file_queued_handler : fileQueued,
				file_progress_handler : fileProgress,
				file_cancelled_handler : uploadCancelled,
				file_complete_handler : fileComplete,
				queue_complete_handler : queueComplete,
				error_handler : uploadError,

				// Flash Settings
				flash_container_element : "flashContainer",
				flash_url : "swfupload.swf",	// Relative to this file

				// UI settings
                ui_function: myShowUI,
				ui_container_id : "flashUI",
				degraded_container_id : "degradedUI",
				
				//object name
				object_name: "swf1",

				// Debug settings
				debug: false
			});
			
			swf_upload_control2 = new SWFUpload({
				// Backend settings
				upload_target_url: "upload.asp",
				upload_cookies: ["ASPSESSIONID","contactinfo"],

				// Flash file settings
				file_size_limit : "20480",	// 20 MB
				file_types : "*.jpg;*.gif;*.doc;*.pdf;*.xls;*.zip",	// or you could use something like: "*.doc;*.wpd;*.pdf",
				file_types_description : "Selected Types",
				file_upload_limit : "1",
				//file_queue_limit : "6", // this isn't needed because the upload_limit will automatically place a queue limit
				begin_upload_on_queue : false,

				// Event handler settings
				file_queued_handler : fileQueued,
				file_progress_handler : fileProgress,
				file_cancelled_handler : uploadCancelled,
				file_complete_handler : fileComplete,
				queue_complete_handler : queueComplete,
				error_handler : uploadError,

				// Flash Settings
				flash_container_element : "flashContainer",
				flash_url : "swfupload.swf",	// Relative to this file

				// UI settings
                ui_function: myShowUI,
				ui_container_id : "flashUI",
				degraded_container_id : "degradedUI",
				
				//object name
				object_name: "swf2",

				// Debug settings
				debug: false
			});
			
			swf_upload_control3 = new SWFUpload({
				// Backend settings
				upload_target_url: "upload.asp",
				upload_cookies: ["ASPSESSIONID","contactinfo"],

				// Flash file settings
				file_size_limit : "20480",	// 20 MB
				file_types : "*.jpg;*.gif;*.doc;*.pdf;*.xls;*.zip",	// or you could use something like: "*.doc;*.wpd;*.pdf",
				file_types_description : "Selected Types",
				file_upload_limit : "1",
				//file_queue_limit : "6", // this isn't needed because the upload_limit will automatically place a queue limit
				begin_upload_on_queue : false,

				// Event handler settings
				file_queued_handler : fileQueued,
				file_progress_handler : fileProgress,
				file_cancelled_handler : uploadCancelled,
				file_complete_handler : fileComplete,
				queue_complete_handler : queueComplete,
				error_handler : uploadError,

				// Flash Settings
				flash_container_element : "flashContainer",
				flash_url : "swfupload.swf",	// Relative to this file

				// UI settings
                ui_function: myShowUI,
				ui_container_id : "flashUI",
				degraded_container_id : "degradedUI",
				
				//object name
				object_name: "swf3",

				// Debug settings
				debug: false
			});		

            // This is a setting that my Handlers will use. It's not part of SWFUpload
            // But I can add it to the SWFUpload object and then use it where I need to
            swf_upload_control.addSetting("progress_target",  "uploadarea") 
            swf_upload_control2.addSetting("progress_target", "uploadarea2")
            swf_upload_control3.addSetting("progress_target", "uploadarea3")

        }

        function myShowUI() {
            document.getElementById("btnSubmit").onclick = doSubmit;
            
            this.showUI();  // Let SWFUpload finish loading the UI.

        }

        // Called by the submit button to start the upload
		function doSubmit() {
			try {
				var boo
	
			    boo = processForm();

			    if (boo == 'True') {
			   
			    	var btnBrowse;
			    	btnBrowse = document.getElementById("btnBrowse1");
			    	btnBrowse.disabled = true;
			    	btnBrowse = document.getElementById("btnBrowse2");
			    	btnBrowse.disabled = true;
			    	btnBrowse = document.getElementById("btnBrowse3");
			    	btnBrowse.disabled = true;
			    	
			    	var hfield1 = document.contactform.UO29SH;
			    	hfield1.value = 'True';  	

	                swf_upload_control.updateUploadStrings();
	                swf_upload_control2.updateUploadStrings();
	                swf_upload_control3.updateUploadStrings();
                    
				    swf_upload_control.startUpload();
				    swf_upload_control2.startUpload();
				    swf_upload_control3.startUpload();
				}
				
				
			} catch (ex) {

            }
            return false;
	    }

		 // Called by the queue complete handler to submit the form
	    function uploadDone() {
			try {    
			      var match = instance1 + instance2 + instance3;
			      if (total == match) {
			        document.contactform.method = 'POST';
                    document.contactform.action = 'thankyou.asp';
                    document.contactform.encoding = 'application/x-www-form-urlencoded';
				    document.contactform.submit();
				  }
			} catch (ex) {}
	    }