function load_edit_header_image(_destination,_sender,_module_id,_page_id) {
	JsHttpRequest.query(
        'module.php',
		{
			module: _module_id,
			task: 'open_popup_menu',
			id: _destination,
			sender: _sender.name,
			page_id: _page_id
		},
		function(responseJS, responseText) {
			document.getElementById(responseJS.id).innerHTML = responseText;
			show_dialog(responseJS.id);
			init_bookmark("bkm_edit_dialog",3);
			set_width(responseJS.id);
        },
        true
    );
	return false;
}

function doLoad_edit_header_image(_form,_sender,_module_id,_page_id) {
//	if ( _form.file.value == "" && _form.fileURL.value == "" ) {
//			//alert( _PICTUREVOTE_ENTER_FILE_ );
//			return true;
//	}
	JsHttpRequest.query(
        'module.php',
        {
			destination: 'edit_headerimage_dialog',
			module: _module_id,
			task: 'save_header_image',
			page_id: _page_id,
			file: _form.file,
			sender: _form.block_id,
			fileURL: _form.fileURL
		},
	    function(responseJS, responseText) {

			if ( responseJS.failed == true  ) {
       			alert( responseJS.message );
    			close_dialog(responseJS.sender);
        	} else {
				if(responseText != "")
					alert(responseText);
				close_dialog(responseJS.destination);
				window.location.reload();
			}
    },
        true
    );
	return false;
}

