



function WhatsNext:ShowImportFrame(confirmFunction,cancelFunction)
	if not self.importFrame then
		local frame = self.AceGUI:Create("Window")
		_G["WhatsNext_ImportFrame"] = frame
		WhatsNext_AddOptionsScreen(frame.frame)
		tinsert(UISpecialFrames, "WhatsNext_ImportFrame") 
		self.importFrame = frame;
		frame:SetWidth(230)
		frame:SetHeight(114)
		frame:SetTitle("What's Next? - Import")
		frame:SetStatusText("")
		frame:EnableResize(false);
		frame:SetCallback("OnClose", cancelFunction)
		frame:SetLayout("Flow")
		frame:SetAutoAdjustHeight(true)	
		
		frame.label = WhatsNext.AceGUI:Create('Label');
		frame.label:SetText("Press Control-V to paste your import.");
		frame.label:SetFullWidth(true)
		frame.label.label:SetJustifyH("CENTER")
		frame.label.label:SetJustifyV("CENTER")
		frame:AddChild(frame.label)
		
		frame.importField = WhatsNext.AceGUI:Create('EditBox');
		frame.importField:SetText("");
		frame.importField:SetMaxLetters(0);
		frame.importField:SetFullWidth(true)
		frame.importField:DisableButton(true);
		frame.importField.editbox:SetAutoFocus(true)
		frame:AddChild(frame.importField)
		
		local okButton = WhatsNext.AceGUI:Create('Button');
		okButton:SetWidth(103);
		okButton:SetText('Okay');
		okButton:SetCallback('OnClick', function() 
			local success,errorMessage = confirmFunction(frame.importField:GetText())
			if success then
				frame.frame:Hide()
			else
				frame.label:SetText(errorMessage);
				frame:DoLayout()
			end
		end);
		frame:AddChild(okButton)
		
		local cancelButton = WhatsNext.AceGUI:Create('Button');
		cancelButton:SetWidth(103);
		cancelButton:SetText('Cancel');
		cancelButton:SetCallback('OnClick', function() 
			frame.frame:Hide()
			cancelFunction()
		end);
		frame:AddChild(cancelButton)
		
		frame:DoLayout()
	end
	WhatsNext_ShowOptionsScreen(self.importFrame.frame)
	self.importFrame.label:SetText("Press Control-V to paste your import.");
	self.importFrame:DoLayout()
	self.importFrame.importField:SetText("");
end