	var swfu;
	var id;
	var relation;
	function swfInitialize(id, relation, session) {
		settings = {
			flash_url : "/swf/swfupload.swf",
			upload_url: "/images/uploader/"+id+"/"+relation+"/",
			post_params: {"PHPSESSID" : session},
			file_size_limit : "100 MB",
			file_types : "*.jpg",
			file_types_description : "All Files",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},
			debug: false,

			// Button settings
			button_image_url : "/img/upload/XPButtonUploadText_61x22.gif",
			button_placeholder_id : "spanButtonPlaceholder1",
			button_width: 61,
			button_height: 22,

			// 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 : myComplete,
			queue_complete_handler : queueComplete	// Queue plugin event
		};

		swfu = new SWFUpload(settings);
	};
	
	function swfInitialize_big(id, relation, session) {
		settings = {
			flash_url : "/swf/swfupload.swf",
			upload_url: "/images/uploader/"+id+"/"+relation+"/",
			post_params: {"PHPSESSID" : session},
			file_size_limit : "100 MB",
			file_types : "*.jpg",
			file_types_description : "All Files",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},
			debug: false,

			// Button settings
			button_image_url : "/css/common/swfuploadbutton.gif",
			button_placeholder_id : "spanButtonPlaceholder1",
			button_text: '<span class="btnText">Upload<br />photo</span><br /><span class="btnText_small">(you can select<br /> and upload more than one photo)</span>',
			button_text_style: '.btnText {font-size: 20; font-weight: bold; font-family: Arial; text-align: center;} .btnText_small {font-size: 11; font-family: Arial; text-align: center;}',
			button_text_top_padding: '80',
			button_width: 223,
			button_height: 223,

			// 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 : myComplete,
			queue_complete_handler : queueComplete	// Queue plugin event
		};

		swfu = new SWFUpload(settings);
	};
	
	function tinyInitialize(){
		tinyMCE_GZ.init({
			themes : "advanced",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
			languages : "en",
			disk_cache : true
		});
		
		tinyMCE.init({
			mode : "textareas",
			theme : "advanced",
			editor_selector : "Work",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,undo,redo",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,blockquote,|,link,unlink,anchor,cleanup,code,preview,|,forecolor,backcolor,|,spellchecker,table",
			theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,print,|,fullscreen",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			blockquote_clear_tag : "br",
			
			content_css : "/css/default.tiny.css",
			force_p_newlines : true,
			forced_root_block : ''
		});
		
		tinyMCE.init({
			mode : "textareas",
			theme : "simple",
			editor_selector : "Simple",
	
			force_br_newlines : true,
			forced_root_block : ''
		});
	}
