<Bindings>
	<Binding name="SW_BIND_TOGGLEBARS" header="SW_BINDINGS" runOnUp="true">
		if ( keystate == "down" ) then
			SW_ToggleBarFrame();
		end
	</Binding>
	<Binding name="SW_BIND_CONSOLE" runOnUp="true">
		if ( keystate == "down" ) then
			SW_ToggleConsole();
		end
	</Binding>
	<Binding name="SW_BIND_PAGE1" >
		if ( keystate == "down" ) then
			SW_OptKey("1");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE2" >
		if ( keystate == "down" ) then
			SW_OptKey("2");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE3" >
		if ( keystate == "down" ) then
			SW_OptKey("3");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE4" >
		if ( keystate == "down" ) then
			SW_OptKey("4");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE5" >
		if ( keystate == "down" ) then
			SW_OptKey("5");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE6" >
		if ( keystate == "down" ) then
			SW_OptKey("6");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE7" >
		if ( keystate == "down" ) then
			SW_OptKey("7");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE8" >
		if ( keystate == "down" ) then
			SW_OptKey("8");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE9" >
		if ( keystate == "down" ) then
			SW_OptKey("9");
		end
	</Binding>
	<Binding name="SW_BIND_PAGE10" >
		if ( keystate == "down" ) then
			SW_OptKey("10");
		end
	</Binding>
	<Binding name="SW_BIND_PAGENEXT" >
		if ( keystate == "down" ) then
			local se;
			if SW_Settings.BarFrames then
				se = SW_Settings.BarFrames.SW_BarFrame1
			end
			if not (se and se.Selected) then
				return;
			end
			
			if se.Selected + 1 > SW_OPT_COUNT then
				SW_OptKey(1);
			else
				SW_OptKey(se.Selected + 1);
			end
		end
	</Binding>
	<Binding name="SW_BIND_PAGEPREV" >
		if ( keystate == "down" ) then
			local se;
			if SW_Settings.BarFrames then
				se = SW_Settings.BarFrames.SW_BarFrame1
			end
			if not (se and se.Selected) then
				return;
			end
			
			if se.Selected == 1 then
				SW_OptKey(SW_OPT_COUNT);
			else
				SW_OptKey(se.Selected - 1);
			end
		end
	</Binding>
</Bindings>