	<fontstyle name="my_font_8" size="8" _face="Globus" style="none" />
	<fontstyle name="my_font_10" size="10" _face="Globus" style="none" />
	<fontstyle name="my_font_12" size="12" _face="Globus" style="none" />
	<fontstyle name="my_font_12_bold" size="12" _face="Globus" style="bold" />
	
	<color name="transparent">0x00000000</color>

	<!-- Default Skin Theme Colors (for use by the ID3, Settings, Interface Browser popups) -->
	<!-- default colors -->
	<color name="color1">0xFF303030</color> <!-- dark grey -->
	<color name="color2">0xFFBBBBBB</color> <!-- grey -->
	<color name="color3">0xFFFFFFFF</color> <!-- white 100% -->
	<color name="color3_25">0x44FFFFFF</color>	<!-- white 25% -->
	<color name="color3_50">0x88FFFFFF</color>	<!-- white 50% -->
	<!-- 1. Mamboreta colors -->
	<!-- jay's version
	<color name="theme1_color1">0xFF333333</color>
	<color name="theme1_color2">0xFF669966</color>
	-->
	<color name="theme1_color1">0xFF303030</color> 
	<color name="theme1_color2">0xFF99EE00</color>
	<color name="theme1_color3">0xFFFFFFFF</color>

	<!-- 2. Earth colors -->
	<color name="theme2_color1">0xFFFF9900</color>
	<color name="theme2_color2">0xFFB83F3F</color>
	<color name="theme2_color3">0xFFFFFFFF</color>
	<color name="theme2_color3_25">0x44FFFFFF</color>	
	<color name="theme2_color3_50">0x88FFFFFF</color>
	<!-- 3. Sea colors -->
	<color name="theme3_color1">0xFF28497F</color>
	<color name="theme3_color2">0xFFCBFF66</color>
	<color name="theme3_color3">0xFFFFFFFF</color>
	<color name="theme3_color3_25">0x44FFFFFF</color>	
	<color name="theme3_color3_50">0x88FFFFFF</color>
	<!-- 4. Metropolitan colors -->
	<!--<color name="theme4_color1">0xFF669900</color>
	<color name="theme4_color2">0xFFA8B72B</color>
	-->
	<color name="theme4_color1">0xFF000000</color>
	<color name="theme4_color2">0xFFFF0000</color>
	<color name="theme4_color3">0xFFFFFFFF</color>
	<color name="theme4_color3_25">0x44FFFFFF</color>	
	<color name="theme4_color3_50">0x88FFFFFF</color>
	<!-- 5. Absence colors -->
	<!-- hotdog stand 
	<color name="theme5_color1">0xFFFE0000</color>
	<color name="theme5_color2">0xFFFCFD07</color>
	-->
	<color name="theme5_color1">0xFF888888</color>
	<color name="theme5_color2">0xFFBBBBBB</color>
	<color name="theme5_color3">0xFFFFFFFF</color>
	<color name="theme5_color3_25">0x44FFFFFF</color>
	<color name="theme5_color3_50">0x88FFFFFF</color>
	<!-- Paulus blue -->
	<color name="theme6_color1">0xFF303030</color>
	<color name="theme6_color2">0xFF00CCFF</color>
	<color name="theme6_color3">0xFFFFFFFF</color>
	<color name="theme6_color3_25">0x44FFFFFF</color>
	<color name="theme6_color3_50">0x88FFFFFF</color>

<!--     ???-red -->
	<color name="theme7_color1">0xFF606060</color>
	<color name="theme7_color2">0xFFFF0000</color>
	<color name="theme7_color3">0xFFFFFFFF</color>
	<color name="theme7_color3_25">0xFFFF0000</color>
	<color name="theme7_color3_50">0xFFFF0000</color>


<!--     grass -->
	<color name="theme8_color1">0xFF143B14</color>
	<color name="theme8_color2">0xFF00B200</color>
	<color name="theme8_color3">0xFFFFFFFF</color>
	<color name="theme8_color3_25">0xFF000000</color>
	<color name="theme8_color3_50">0xFF000000</color>


<!--     chilled -->
	<color name="theme9_color1">0xFF303030</color>
	<color name="theme9_color2">0xFF588FBA</color>
	<color name="theme9_color3">0xFFFFFFFF</color>
	<color name="theme9_color3_25">0xFF345345</color>
	<color name="theme9_color3_50">0xFF345345</color>

<!--     desert -->
	<color name="theme10_color1">0xFF303030</color>
	<color name="theme10_color2">0xFFCBD64D</color>
	<color name="theme10_color3">0xFFFFFFFF</color>
	<color name="theme10_color3_25">0xFFFF0000</color>
	<color name="theme10_color3_50">0xFFFF0000</color>


<!--     ???-orange
	<color name="theme10_color1">0xFF606060</color>
	<color name="theme10_color2">0xFFFF2300</color>
	<color name="theme10_color3">0xFFFFFFFF</color>
	<color name="theme10_color3_25">0xFFFF0000</color>
	<color name="theme10_color3_50">0xFFFF0000</color>
 -->

<!--    yellow
	<color name="theme10_color1">0xFF414141</color>
	<color name="theme10_color2">0xFFFFFF00</color>
	<color name="theme10_color3">0xFF000000</color>
	<color name="theme10_color3_25">0xFFFFFF00</color>
	<color name="theme10_color3_50">0xFFFFFF00</color>

-->

<?macrodef tag_edit_row
	<window name="$(name)_Title" transparent="true" type="textdisplay" offset="$(title_offset)" alignment="$(title_alignment)" >
		<script name="OnInit"> SetText(:language.Translate("tagedit/label.$(name)")); </script>
		<property edge_offset_rect="4,1,-1,-1" font_style="my_font_10" font_color="color3" font_justification="v_center|left"/>
		<imagestyle name="background"> 
			<color_fill alignment="0,0,1,1" offset="1,0,0,0" color="color3" opacity="0.1"/> 
			<color_line color="color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme1"> 
			<color_fill color="theme1_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme1_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme1_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme1_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme1_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme2"> 
			<color_fill color="theme2_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme2_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme2_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme2_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme2_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme3"> 
			<color_fill color="theme3_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme3_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme3_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme3_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme3_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme4"> 
			<color_fill color="theme4_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme4_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme4_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme4_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme4_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme5"> 
			<color_fill color="theme5_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme5_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme5_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme5_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme5_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme6"> 
			<color_fill color="theme6_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme6_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme6_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme6_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme6_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme7"> 
			<color_fill color="theme7_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme7_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme7_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme7_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme7_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme8"> 
			<color_fill color="theme8_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme8_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme8_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme8_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme8_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme9"> 
			<color_fill color="theme9_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme9_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme9_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme9_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme9_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
		<imagestyle name="theme10"> 
			<color_fill color="theme10_color3" alignment="0,0,1,1" offset="1,0,0,0"  opacity="0.1"/> 
			<color_line color="theme10_color2" alignment="0,0,1,0" offset="2,0,0,0" />
			<color_line color="theme10_color2" alignment="0,1,1,1" offset="1,-1,0,-1" />
			<color_line color="theme10_color2" alignment="0,0,0,0.5" offset="1,0,0,-2" />
			<color_line color="theme10_color2" alignment="0,0.5,0,1" offset="0,2,0,-2" />
		</imagestyle>
	</window>
	<window name="$(name)Edit" offset="$(edit_offset)" alignment="$(edit_alignment)" type="EditBox" transparent="true">
		<property font_color="color3" font_style="my_font_10" cursor_on_color="color3" cursor_off_color="transparent" text_offset_rect="4,1,-4,-1" />
		<imagestyle name="my_background">
			<color_fill alignment="0,0,1,1" offset="0,0,-1,0" color="color3" opacity="0.1"/> 
			<color_line color="color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="background_inactive"> 
			<include source="my_background" />
		</imagestyle>
		<imagestyle name="background_active"> 
			<include source="my_background" />
		</imagestyle>
		<imagestyle name="theme1">
			<color_fill color="theme1_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme1_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme1_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme1_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme1_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme2">
			<color_fill color="theme2_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme2_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme2_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme2_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme2_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme3">
			<color_fill color="theme3_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme3_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme3_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme3_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme3_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme4">
			<color_fill color="theme4_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme4_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme4_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme4_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme4_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme5">
			<color_fill color="theme5_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme5_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme5_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme5_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme5_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme6">
			<color_fill color="theme6_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme6_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme6_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme6_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme6_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme7"> 
			<color_fill color="theme7_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme7_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme7_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme7_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme7_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme8"> 
			<color_fill color="theme8_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme8_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme8_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme8_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme8_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme9"> 
			<color_fill color="theme9_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme9_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme9_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme9_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme9_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
		<imagestyle name="theme10"> 
			<color_fill color="theme10_color3" alignment="0,0,1,1" offset="0,0,-1,0" opacity="0.1"/> 
			<color_line color="theme10_color2" alignment="0,0,1,0" offset="0,0,-2,0" />
			<color_line color="theme10_color2" alignment="0,1,1,1" offset="0,-1,-2,-1" />
			<color_line color="theme10_color2" alignment="1,0,1,0.5" offset="-1,1,-1,-2" />
			<color_line color="theme10_color2" alignment="1,0.5,1,1" offset="-1,2,-1,-2" />
		</imagestyle>
	</window>
?>

	<rect name="popup_outer_rect"> sq2res.psd|chassis </rect>
	<rect name="popup_inner_rect"> sq2res.psd|inner_resize_rect </rect>
<?macrodef popup_window
	<window name="$(popup_name)" hitstyle="frame_hitstyle" shape="popup_chassis_shape"
				transparent="false" default_size="$(default_size)" min_size="$(min_size)" max_size="1024,1024">
		<shape name="popup_chassis_shape">
			<shape_raster source="sq2res.psd|chassis" alignment="0,0,1,1" 
					fillmode="resize" inner_rect="popup_inner_rect" outer_rect="popup_outer_rect"/>
		</shape>
		<imagestyle name="background">
			<raster source = "sq2res.psd|chassis" offset="0,0,0,0" alignment="0,0,1,1" blendmode="ps_normal" 
					fillmode="resize" opacity="1"
					inner_rect="popup_inner_rect"	outer_rect="popup_outer_rect"/>
		</imagestyle>
		<hitstyle name="frame_hitstyle" default_hitcode="DRAG" >
			<hitcode type="BOTTOMRIGHT"><shape><shape_raster source="sq2res.psd|resize_handle" alignment="1,1,1,1" offset="sq2res.psd|resize_handle @ popup_outer_rect" /></shape></hitcode>
			<hitcode type="LEFT"><shape><shape_rect alignment="0,0,0,1" offset="0,0,5,0" /></shape></hitcode>
			<hitcode type="BOTTOM"><shape><shape_rect alignment="0,1,1,1" offset="0,-5,0,0" /></shape></hitcode>
			<hitcode type="TOP"><shape><shape_rect alignment="0,0,1,0" offset="0,0,0,5" /></shape></hitcode>
			<hitcode type="RIGHT"><shape><shape_rect alignment="1,0,1,1" offset="-5,0,0,0" /></shape></hitcode>
		</hitstyle>

		<!-- monitor dock points -->
		<dock_point type="slave" name="MonitorUL" alignment="0,0,0,0" /> 
		<dock_point type="slave" name="MonitorTC" alignment="0.5,0,0.5,0" /> 		
		<dock_point type="slave" name="MonitorUR" alignment="1,0,1,0" /> 
		<dock_point type="slave" name="MonitorLL" alignment="0,1,0,1" /> 
		<dock_point type="slave" name="MonitorBC" alignment="0.5,1,0.5,1" /> 		
		<dock_point type="slave" name="MonitorLR" alignment="1,1,1,1" /> 
		<dock_point type="slave" name="MonitorRC" alignment="1,0.5,1,0.5" /> 		
		<dock_point type="slave" name="MonitorLC" alignment="0,0.5,0,0.5" /> 		

		<!-- master dock points -->
		<dock_point type="master" name="Popup_UL" alignment="0,0,0,0" /> 
		<dock_point type="master" name="Popup_TC" alignment="0.5,0,0.5,0" /> 
		<dock_point type="master" name="Popup_UR" alignment="1,0,1,0" /> 
		<dock_point type="master" name="Popup_LL" alignment="0,1,0,1" /> 
		<dock_point type="master" name="Popup_BC" alignment="0.5,1,0.5,1" /> 
		<dock_point type="master" name="Popup_LR" alignment="1,1,1,1" /> 
		<dock_point type="master" name="Popup_RC" alignment="1,0.5,1,0.5" />
		<dock_point type="master" name="Popup_LC" alignment="0,0.5,0,0.5" />

		<!-- slave to other popups -->
		<dock_point type="slave" name="Popup_UL" alignment="1,0,1,0" /> 
		<dock_point type="slave" name="Popup_UL" alignment="0,1,0,1" /> 
		<dock_point type="slave" name="Popup_UR" alignment="0,0,0,0" /> 
		<dock_point type="slave" name="Popup_UR" alignment="1,1,1,1" /> 
		<dock_point type="slave" name="Popup_LL" alignment="0,0,0,0" /> 
		<dock_point type="slave" name="Popup_LL" alignment="1,1,1,1" /> 
		<dock_point type="slave" name="Popup_LR" alignment="0,1,0,1" /> 
		<dock_point type="slave" name="Popup_LR" alignment="1,0,1,0" /> 

		<!-- slave to the main window -->
		<dock_point type="slave" name="Main_UL" alignment="1,0,1,0" /> 
		<dock_point type="slave" name="Main_UL" alignment="0,1,0,1" /> 
		<dock_point type="slave" name="Main_UR" alignment="0,0,0,0" /> 
		<dock_point type="slave" name="Main_UR" alignment="1,1,1,1" /> 
		<dock_point type="slave" name="Main_LL" alignment="0,0,0,0" /> 
		<dock_point type="slave" name="Main_LL" alignment="1,1,1,1" /> 
		<dock_point type="slave" name="Main_LR" alignment="0,1,0,1" /> 
		<dock_point type="slave" name="Main_LR" alignment="1,0,1,0" /> 

		<script name="OnInit">
			rightQuadReady = 0;

			// todo deal with FPS better - user settings
			SetDesiredFPS(45);
			$(popup_title_script)
			$(oninit_script)
			StartIntro();

			:sonique.InterfacePrefsCreateSection("$(popup_name)");
			$$size = :sonique.InterfacePrefsGetStringArray("$(popup_name)", "size");
			if ($$size.IsArray() == true) { 
				if ( ($$size[0] gt 0) and ($$size[1] gt 0) ){
					// todo - fix bug where if SetSize comes to early, the OS window shape sometimes isn't updated.  grrr...
					//SetSize($$size, 0, 0, "linear_accel"); 
				}
			}
			$$location = :sonique.InterfacePrefsGetStringArray("$(popup_name)", "location");
			if ($$location.IsArray())	{ 
				$$dim = :app.GetScreenDimensions();
				if ( ($$location[0] gte $$dim[0]["left"]) and ($$location[1] gte $$dim[0]["top"]) ) {
					if ( ($$location[0] lt $$dim[0]["right"]) and ($$location[1] lt $$dim[0]["bottom"]) ) {
						SetLocation($$location); 
					}
				}
			}
			if( :sonique.InterfacePrefsGetString("$(popup_name)", "alwaysontop") ) { SetAlwaysOnTop( 1 ); } 
			else { SetAlwaysOnTop( 0 ); }
			// hotkeys
			$$section = "sonique/gui/slate/hotkeys";
			:sonique.prefs.CreateSection($$section);
			alwaysontop = :sonique.prefs.GetString($$section, "alwaysontop"); 
			if (alwaysontop) { :app.RegisterWindowKeyScript( alwaysontop, "SetAlwaysOnTop(!GetAlwaysOnTop());", this ); }
			
			$theme = :sonique.prefs.GetString("misc", "theme" );
			SetTheme($theme);
		</script>
		<script name="OnDestroy">
			$(ondestroy_script)
			$$size = GetSize();
			:sonique.InterfacePrefsSetStringArray("$(popup_name)", "size", $$size);
			$$location = GetLocation();
			:sonique.InterfacePrefsSetStringArray("$(popup_name)", "location", $$location );
			:sonique.InterfacePrefsSetString("$(popup_name)", "alwaysontop", GetAlwaysOnTop());
			// hotkeys
			if (alwaysontop) { :app.UnregisterWindowKeyScript( alwaysontop, "SetAlwaysOnTop(!GetAlwaysOnTop());", this ); }
		</script>
		<script name="OnAlwaysOnTopChange"> 
			// todo $params doesn't work in macros
			window_controls_window.always_on_top_button_window.UpdateAlwaysOnTopState($$params[0]); 
		</script>
		<script name="OnActivate">
			background_window.left_quadrant_window.SetOffset({12,32,20,-110},0,1000,"linear_decel");
			if (rightQuadReady == 1) { background_window.right_quadrant_window.MoveSomething(1000); }
			window_controls_window.help_button_window.SetOpacity(1.0);
			window_controls_window.always_on_top_button_window.SetOpacity(1.0);
			window_controls_window.minimize_button_window.SetOpacity(1.0);
			window_controls_window.close_button_window.SetOpacity(1.0);
		</script>
		<script name="OnDeactivate">
			background_window.left_quadrant_window.SetOffset({12,1112,20,20},0,1000,"linear_accel");
			if (rightQuadReady == 1) { background_window.right_quadrant_window.MoveSomething(1000); }
			window_controls_window.help_button_window.SetOpacity(0.5);
			window_controls_window.always_on_top_button_window.SetOpacity(0.5);
			window_controls_window.minimize_button_window.SetOpacity(0.5);
			window_controls_window.close_button_window.SetOpacity(0.5);
		</script>

		<window name="background_window" transparent="true" shape="background_shape">
			<shape name="background_shape">
				<shape_raster fillmode="resize" alignment="0,0,1,1" source="sq2res.psd|backgound_color_region" 
						source_offset="sq2res.psd|backgound_color_region @ popup_outer_rect" 
						inner_rect="popup_inner_rect" outer_rect="popup_outer_rect"	/>
			</shape>
			<imagestyle name="background"><color_fill color="color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme1"><color_fill color="theme1_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme2"><color_fill color="theme2_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme3"><color_fill color="theme3_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme4"><color_fill color="theme4_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme5"><color_fill color="theme5_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme6"><color_fill color="theme6_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme7"><color_fill color="theme7_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme8"><color_fill color="theme8_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme9"><color_fill color="theme9_color1" alignment="0,0,1,1"/></imagestyle> 
			<imagestyle name="theme10"><color_fill color="theme10_color1" alignment="0,0,1,1"/></imagestyle> 
			<window name="main_background_grid" transparent="true" >
				<imagestyle name="background" transparent="true"><raster source="sq2res.psd|background_tile_grid" opacity="0.1" fillmode="tile" blendmode="ps_normal" /></imagestyle>
			</window>
			<window name="display_lines_window" transparent="true" >
				<imagestyle name="background_rasters">
					<raster source="sq2res.psd|display_corner_top_left"  offset="sq2res.psd|display_corner_top_left @ sq2res.psd|chassis" alignment="0,0,0,0"  blendmode="ps_normal" opacity="0.45" />
					<raster source="sq2res.psd|display_corner_top_right" offset="sq2res.psd|display_corner_top_right @ sq2res.psd|chassis" alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.45" />
					<raster source="sq2res.psd|display_corner_bottom_right" offset="sq2res.psd|display_corner_bottom_right @ sq2res.psd|chassis" alignment="1,1,1,1"  blendmode="ps_normal" opacity="0.45" />
					<raster source="sq2res.psd|display_line_over_mini_windows" offset="sq2res.psd|display_line_over_mini_windows @ sq2res.psd|chassis" alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.45" />
					<raster source="sq2res.psd|display_top_line_level_1" offset="sq2res.psd|display_top_line_level_1 @ sq2res.psd|chassis" alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.45" />
				</imagestyle>
				<imagestyle name="background">
					<include source="background_rasters" />
					<!-- main left and right vertical lines -->
					<color_line color="color3" alignment="0,0,0,1" offset="7,33,7,-15" opacity="0.45" />
					<color_line color="color3" alignment="1,0,1,1" offset="-9,41,-9,-38" opacity="0.45" />
					<!-- top horizontal lines -->
					<color_line color="color3" alignment="1,0,1,0" offset="-105,26,-87,26" opacity="0.45" />
					<!-- right hand tiny very line-->
					<color_line color="color3" alignment="1,0,1,0" offset="-106,20,-106,26" opacity="0.45" />
					<!-- first long horizontal line -->
					<color_line color="color3" alignment="1,0,1,0" offset="-259,16,-13,16" opacity="0.45" />
					<!-- second long horizontal line -->
					<color_line color="color3" alignment="1,0,1,0" offset="-259,20,-107,20" opacity="0.45" />
					<!-- top_right_lines -->
					<color_line color="color3" alignment="1,0,1,0" offset="-248,5,-9,5" opacity="0.45" />
					<!-- lower hor. -->
					<color_line color="color3" alignment="1,0,1,0" offset="-252,9,-112,9" opacity="0.45" />
					<!-- righthand mini vert -->
					<color_line color="color3" alignment="1,0,1,0" offset="-9,6,-9,8" opacity="0.45" />
					<!-- center mini verts -->
					<color_line color="color3" alignment="1,0,1,0" offset="-146,6,-146,8" opacity="0.45" />
					<color_line color="color3" alignment="1,0,1,0" offset="-175,6,-175,8" opacity="0.45" />
					<color_fill color="color3" alignment="1,0,1,0" offset="-123,6,-111,9" opacity="0.45" />
					<color_fill color="color3" alignment="1,0,1,0" offset="-208,6,-196,9" opacity="0.45" />
					<color_fill color="color3" alignment="1,0,1,0" offset="-230,6,-218,9" opacity="0.45" />
					<color_line color="color3" alignment="1,0,1,0" offset="-251,8,-249,6" opacity="0.45" />
					<!-- bottom left lines with squares -->
					<color_line color="color3" alignment="0,1,0,1" offset="11,-93,11,-19" opacity="0.45" />
					<color_line color="color3" alignment="0,1,0,1" offset="12,-93,14,-93" opacity="0.45" />
					<color_fill color="color3" alignment="0,1,0,1" offset="12,-74,15,-62" opacity="0.45" />
					<color_fill color="color3" alignment="0,1,0,1" offset="12,-52,15,-40" opacity="0.45" />
					<color_line color="color3" alignment="0,1,0,1" offset="12,-19,14,-19" opacity="0.45" />
					<color_line color="color3" alignment="0,1,0,1" offset="15,-93,15,-19" opacity="0.45" />
					<!-- bottom left criss cross -->
					<color_line color="color3" alignment="0,1,0,1" offset="8,-15,19,-15" opacity="0.45" />
					<!-- bottom lines -->
					<!-- horizontals -->
					<!-- leaving spaces for the playbar controls -->
					<color_line color="color3" alignment="1,1,1,1" offset="-191,-18,-107,-18" opacity="0.45" />
					<color_line color="color3" alignment="1,1,1,1" offset="-95,-18,-90,-18" opacity="0.45" />
					<color_line color="color3" alignment="1,1,1,1" offset="-78,-18,-73,-18" opacity="0.45" />
					<color_line color="color3" alignment="1,1,1,1" offset="-61,-18,-56,-18" opacity="0.45" />
					<color_line color="color3" alignment="1,1,1,1" offset="-44,-18,-29,-18" opacity="0.45" />
					<color_line color="color3" alignment="1,1,1,1" offset="-191,-14,-130,-14" opacity="0.45" />
					<!-- verts -->
					<color_line color="color3" alignment="1,1,1,1" offset="-129,-17,-129,-14" opacity="0.45" />
					<!-- rects -->
					<color_fill color="color3" alignment="1,1,1,1" offset="-176,-17,-164,-14" opacity="0.45" />
					<color_fill color="color3" alignment="1,1,1,1" offset="-154,-17,-142,-14" opacity="0.45" />
				</imagestyle>
			</window> <!-- display_lines_window -->

			<window name="left_quadrant_window" alignment="0,0,0,1" offset="12,2112,20,20" transparent="true" >
				<imagestyle name="background"> <raster source="sq2res.psd|left_quad" fillmode="tile" blendmode="ps_normal" opacity="0.45" />	</imagestyle>
				<script name="OnIntro"> SetOffset({12,32,20,-115},0,$$params[0],"linear_decel"); </script>
			</window> 
		</window> <!-- background_window -->

		<window name="title_window" type="textdisplay" transparent="true" shape="my_shape"
				alignment="0,0,1,0" offset="22,11,-259,26" >
			<property font_style="my_font_10" font_color="color3" font_justification="left|v_center|single_line_only|trim_chars_w_ellipses" 
					edge_offset_rect="7,1,-7,-1"/>
			<shape name="my_shape"><shape_roundrect corner_size="5,5" /></shape>
			<imagestyle name="background">
				<color_rect color="color2" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="color3" cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme1">
				<color_rect color="theme1_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme1_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme2">
				<color_rect color="theme2_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme2_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme3">
				<color_rect color="theme3_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme3_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme4">
				<color_rect color="theme4_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme4_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme5">
				<color_rect color="theme5_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme5_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme6">
				<color_rect color="theme6_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme6_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme7">
				<color_rect color="theme7_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme7_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme8">
				<color_rect color="theme8_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme8_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme9">
				<color_rect color="theme9_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme9_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme10">
				<color_rect color="theme10_color2" filled="true" cornerradius="5.0" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme10_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<script name="OnInit"> $(window_title_script) </script>
		</window> <!-- title_window -->

		<window name="status_display_window" type="Sonique2_StatusBar"  transparent="true" shape="my_shape"
					alignment="0,1,1,1" offset="20,-26,-191,-10" >
			<shape name="my_shape"><shape_roundrect corner_size="5,5" /></shape>
			<imagestyle name="background">
				<color_fill color="color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme1">
				<color_fill color="theme1_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme1_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme2">
				<color_fill color="theme2_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme2_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme3">
				<color_fill color="theme3_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme3_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme4">
				<color_fill color="theme4_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme4_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme5">
				<color_fill color="theme5_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme5_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme6">
				<color_fill color="theme6_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme6_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme7">
				<color_fill color="theme7_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme7_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme8">
				<color_fill color="theme8_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme8_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme9">
				<color_fill color="theme9_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme9_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<imagestyle name="theme10">
				<color_fill color="theme10_color2" blendmode="ps_normal" opacity="0.45" />
				<color_rect color="theme10_color3"  cornerradius="5.0" blendmode="ps_normal" opacity="0.5"/>
			</imagestyle>
			<property scroll_mode="horizontal" scroll_speed="50" whitespace="50"
					rect_status_offset= "7,1,-7,-1" rect_progress_offset="7,1,-7,-1"
					info_font_color="color3" info_font_style="my_font_10" info_font_justification="left|v_center|single_line_only"
					error_font_color="color1" error_font_style="my_font_10" error_font_justification="left|v_center |single_line_only"
					warning_font_color="color1" warning_font_style="my_font_10" warning_font_justification="left|v_center"
					fallback_font_color="color3" fallback_font_style="my_font_10" fallback_font_justification="left|v_center|single_line_only" 
			/>
			<script name="OnInit"> 
				if ( $(local_status_only) == "true" ) {
					:sonique.LocalStatus("", "fallback", this); 
				}
			</script>
		</window> <!--  status_display_window -->

		<window name="window_controls_window" transparent="true">
			<window name="help_button_window" type="button" shape="my_shape" transparent="true" hitstyle="ACTIVE" >
				<property hover="true" />
				<shape name="my_shape"><shape_raster source="sq2res.psd|help_button" offset="sq2res.psd|help_button @ sq2res.psd|chassis" alignment="1,0,1,0" /></shape>
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|help_button" offset="sq2res.psd|help_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|help_button" offset="sq2res.psd|help_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit"> $(help_hint_script) </script>
				<script name="OnClick">  $(help_script) </script>
			</window>
			<window name="always_on_top_button_window" type="button" shape="my_shape" transparent="true" hitstyle="ACTIVE" >
				<property hover="true" />
				<shape name="my_shape"><shape_raster source="sq2res.psd|always_on_top_button" offset="sq2res.psd|always_on_top_button @ sq2res.psd|chassis" alignment="1,0,1,0" /></shape>
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|always_on_top_button" offset="sq2res.psd|always_on_top_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|always_on_top_button" offset="sq2res.psd|always_on_top_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<imagestyle name="state1">
					<raster state="hit,hover" source="sq2res.psd|always_on_top_button" offset="sq2res.psd|always_on_top_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="1.0" />
					<raster state="normal" source="sq2res.psd|always_on_top_button" offset="sq2res.psd|always_on_top_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.75" />
				</imagestyle> 
				<script name="OnInit">
					$topstate = parent.parent.GetAlwaysOnTop();
					if ($topstate == true) { SetButtonState(1); } else { SetButtonState(0); }
					SetHoverHint(:language.Translate("topment/file.ontop")); 
				</script>
				<script name="OnClick"> 
					$topstate = parent.parent.GetAlwaysOnTop();
					if ($topstate == true) {
						parent.parent.SetAlwaysOnTop(0);
						SetButtonState(0);
					} else {	
						parent.parent.SetAlwaysOnTop(1);
						SetButtonState(1);						
					}
				</script>
				<script name="UpdateAlwaysOnTopState">
					if ($$params[0] == true) { SetButtonState(1); } else { SetButtonState(0); }
				</script>
			</window>
			<window name="minimize_button_window" type="button" shape="my_shape" transparent="true" hitstyle="ACTIVE" >
				<property hover="true" />
				<shape name="my_shape"><shape_raster source="sq2res.psd|minimize_button" offset="sq2res.psd|minimize_button @ sq2res.psd|chassis" alignment="1,0,1,0" /></shape>
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|minimize_button" offset="sq2res.psd|minimize_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|minimize_button" offset="sq2res.psd|minimize_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit"> SetHoverHint(:language.Translate("topmenu/file.minwin")); </script>
				<script name="OnClick"> parent.parent.MinimizeWindow(true); </script>
			</window>
			<window name="close_button_window" type="button" shape="my_shape" transparent="true" hitstyle="ACTIVE" >
				<property hover="true" />
				<shape name="my_shape"><shape_raster source="sq2res.psd|close_button" offset="sq2res.psd|close_button @ sq2res.psd|chassis" alignment="1,0,1,0" /></shape>
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|close_button" offset="sq2res.psd|close_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|close_button" offset="sq2res.psd|close_button @ sq2res.psd|chassis"
						alignment="1,0,1,0"  blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit">SetHoverHint(:language.Translate("topmenu/file.closewin")); </script>
				<script name="OnClick"> 
					parent.parent.DestroyWindow();
				</script>
			</window>
		</window> <!-- window_controls_window --> 

		<window name="playbar_controls_window" transparent="true">
			<imagestyle name="background">
				<raster opacity="0.75" source="sq2res.psd|control_circles" offset="sq2res.psd|control_circles @ sq2res.psd|chassis" alignment="1,1,1,1" blendmode="ps_normal" />
			</imagestyle> 
			<window name="prev_button_window" type="button" transparent="true" hitstyle="ACTIVE" 
					offset="sq2res.psd|prev_button @ sq2res.psd|chassis" alignment="1,1,1,1" >
				<property hover="true" />
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|prev_button" blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|prev_button" blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit">SetHoverHint(:language.Translate("general/hint.prevtrack")); </script>
				<script name="OnClick"> :sonique.players.default.Previous();</script>
			</window>
			<window name="playpause_button_window" type="button" transparent="true" hitstyle="ACTIVE" 
					offset="sq2res.psd|pause_button @ sq2res.psd|chassis" alignment="1,1,1,1" >
				<property hover="true" />
				<imagestyle name="state0">
					<raster state="hover" source="sq2res.psd|play_button" blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|play_button" blendmode="ps_normal" opacity="1.0" />
					<raster state="hit" source="sq2res.psd|pause_button" blendmode="ps_normal" opacity="0.75" />					
				</imagestyle> 
				<imagestyle name="state1">
					<raster state="hover" source="sq2res.psd|pause_button" blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|pause_button" blendmode="ps_normal" opacity="1.0" />
					<raster state="hit" source="sq2res.psd|play_button" blendmode="ps_normal" opacity="0.75" />
				</imagestyle> 
				<script name="OnInit">
					:sonique.players.default.RegisterCallback("Playing","UpdateState()", this);
					:sonique.players.default.RegisterCallback("Stopping","UpdateState()", this);
					:sonique.players.default.RegisterCallback("Pausing","UpdateState()", this);
					UpdateState();
				</script>
				<script name="OnDestroy">
					:sonique.players.default.UnregisterCallback("Playing", this);
					:sonique.players.default.UnregisterCallback("Stopping", this);
					:sonique.players.default.UnregisterCallback("Pausing", this);
				</script>
				<script name="OnClick"> 
					if (:sonique.players.default.IsPlaying()) {
						:sonique.players.default.TogglePause(); 
					} else { 
						:sonique.players.default.Play(); 
					} 
					UpdateState();
				</script>
				<script name="UpdateState">
					if (:sonique.players.default.IsPlaying()) {
						if (:sonique.players.default.IsPaused()) {
							SetButtonState(0);
							SetHoverHint(:language.Translate("general/hint.play")); 
						} else {
							SetButtonState(1);
							SetHoverHint(:language.Translate("general/hint.pause")); 
						}
					} else { 
						SetButtonState(0);
						SetHoverHint(:language.Translate("general/hint.play")); 
					} 
				</script>
			</window>
			<window name="stop_button_window" type="button" transparent="true" hitstyle="ACTIVE" 
				offset="sq2res.psd|stop_button @ sq2res.psd|chassis" alignment="1,1,1,1" >
				<property hover="true" />
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|stop_button" blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|stop_button" blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit">SetHoverHint(:language.Translate("general/hint.stop")); </script>
				<script name="OnClick"> :sonique.players.default.Stop(); </script>
			</window>
			<window name="next_button_window" type="button" transparent="true" hitstyle="ACTIVE" 
					offset="sq2res.psd|next_button @ sq2res.psd|chassis" alignment="1,1,1,1" >
				<property hover="true" />
				<imagestyle name="state0">
					<raster state="hit,hover" source="sq2res.psd|next_button" blendmode="ps_normal" opacity="0.75" />
					<raster state="normal" source="sq2res.psd|next_button" blendmode="ps_normal" opacity="1.0" />
				</imagestyle> 
				<script name="OnInit">SetHoverHint(:language.Translate("general/hint.nexttrack")); </script>
				<script name="OnClick"> :sonique.players.default.Next();</script>
			</window>
		</window> <!-- playbar_controls_window -->
	?>


<?mml version="0.6" ?>
<mml>
	<interface unique_name="teamsonique/default_sonique2_mood/1.0" >

		<windowtype name="Sonique2_Frame"	 uid="A22BA869-CF90-42f2-AA81-2A5890A49A3E" />
		<windowtype name="Sonique2_Remote"	 uid="57B7FE49-F8E8-4c01-81FF-751073C990A5" />
		<windowtype name="Sonique2_Display"	 uid="72811F79-2986-4358-BE4D-20D35DC0BFB5" />
		<windowtype name="Sonique2_Visual"	 uid="1A4888AE-2117-453c-AECB-59130D7C65EE" />
		<windowtype name="Sonique2_Equalizer"	 uid="2902361A-A4D9-4cda-855B-B13BA8C6956C" />
		<windowtype name="Sonique2_Playlist"	 uid="09234CE2-064B-4ac6-BB5C-A0CBE7795402" />
		<windowtype name="Sonique2_MMLDisplay"	 uid="7B86C313-0CA8-43ed-A2FF-0E50A0A421A6" />
		<windowtype name="Sonique2_StatusBar"	 uid="6185AFA7-E1F6-4136-A630-DA9D29CF7EA0" />
		<windowtype name="Sonique2_TrackDisplay" uid="EAF97DBF-DAA2-466e-B58B-0457B9205D75" />
		<windowtype name="Sonique2_TimeDisplay"  uid="E4903287-3DA0-4415-87E9-E3BCDC4C5A6B" />
		<windowtype name="Sonique2_InfoDisplay"  uid="C358B396-550B-4bad-889B-B5EF9ED5E74A" />
		<windowtype name="Sonique2_Progress"	 uid="6C96207C-3D3D-4ebf-9968-BC1814BEDEA1" />
		<windowtype name="Sonique2_Settings"	 uid="BDF7BA75-B066-41ee-9495-2C3982E960E4" />
		<windowtype name="Sonique2_Online"		 uid="5D82D185-E90F-41f0-B069-4AA1A5F24804" />
		<windowtype name="Sonique2_Interfaces"	uid="AD225159-90E2-4b94-81BF-30E7766A0A93" />
		<windowtype name="Sonique2_Thumb"	uid="7FB21D26-1CF6-4101-A233-5A0B865FD531" />

		<rect name="upperleft">	0,0,0,0	</rect>
		<rect name="lowerleft">	0,1,0,1	</rect>
		<rect name="lowerright">	1,1,1,1	</rect>
		<rect name="upperright">	1,0,1,0	</rect>
		<rect name="center">	.5,.5,.5,.5 </rect>
		<rect name="centre">	.5,.5,.5,.5 </rect>
		<rect name="topcenter">	.5,0,.5,0	</rect>
		<rect name="topcentre">	.5,0,.5,0	</rect>
		<rect name="bottomcenter">.5,1,.5,1</rect>
		<rect name="bottomcentre">.5,1,.5,1</rect>
		<rect name="leftcenter">	0,.5,0,.5	</rect>
		<rect name="leftcentre">	0,.5,0,.5	</rect>
		<rect name="rightcenter">1,.5,1,.5	</rect>
		<rect name="rightcentre">1,.5,1,.5	</rect>
		<rect name="entire">	0,0,1,1	</rect>
		
		<color name="SQ2_Color1">0xFF0C9306</color>
		<color name="SQ2_Color2">0xFF0a6cc4</color>

		<color name="SQ2_Color3">0xFF888888</color>
		<color name="SQ2_Color4">0xFFFFFFFF</color>
		


<!-- ************************************************************************************************ -->
<!-- ****************<<<<<<                   MML                     >>>>>>******************** -->
<!-- ************************************************************************************************ -->

		<!-- **************** Dialog MOOD - start - ***************** -->

		<color name="MML_Mood_Color1">0xFF303030</color> <!-- dark grey -->
		<color name="MML_Mood_Color2">0xFFBBBBBB</color> <!-- grey -->
		<color name="MML_Mood_Color3">0xFFFFFFFF</color> <!-- white -->

		<imagestyle name ="MML_Mood_DlgCheckBoxState0" >	
			<!-- 
			<color_rect alignment="entire" state="normal" color="SQ2_Color3" />	
			<color_rect alignment="entire" state="hit,hover" color="SQ2_Color4" />	
			<color_fill offset="3,3,-3,-3" alignment="entire" state="hit" color="SQ2_Color3" />	
			jmctodo - todo - as nice as these checkboxes are, they could be pure MML -->
			<raster source="sq2res.psd|checkbox_background" opacity="0.3" alignment="center" offset="-4,-4,5,5" blendmode="ps_normal" />
			<raster source="sq2res.psd|checkbox_foreground" state="normal" opacity="1.0" alignment="center" offset="-3,-3,5,5" blendmode = "ps_normal" />
			<raster source="sq2res.psd|checkbox_foreground" state="hit,hover" opacity="0.75" alignment="center" offset="-3,-3,5,5" blendmode = "ps_normal" />
			<raster source="sq2res.psd|checkbox_check" state="hit" opacity="1.0" blendmode = "ps_normal" alignment="center" offset="-1,-1,3,3"/>
		</imagestyle>																
		<imagestyle name ="MML_Mood_DlgCheckBoxState1" >							
			<!--<color_rect alignment="entire" state="normal" color="SQ2_Color3" />	
			<color_rect alignment="entire" state="hit,hover" color="SQ2_Color4" />	
			<_color_fill offset="3,3,-3,-3" alignment="entire" state="normal,hover" color="SQ2_Color3" />	
			<color_fill offset="3,3,-3,-3" alignment="entire" state="normal,hover" color="SQ2_Color4" />	-->
			<raster source="sq2res.psd|checkbox_background" opacity="0.3" alignment="center" offset="-4,-4,5,5" blendmode="ps_normal" />
			<raster source="sq2res.psd|checkbox_foreground" state="normal" opacity="1.0" alignment="center" offset="-3,-3,5,5" blendmode = "ps_normal" />
			<raster source="sq2res.psd|checkbox_foreground" state="hit,hover" opacity="0.75" alignment="center" offset="-3,-3,5,5" blendmode = "ps_normal" />
			<raster source="sq2res.psd|checkbox_check" state="hover,normal" opacity="1.0" alignment="center" offset="-1,-1,3,3" blendmode = "ps_normal" />
		</imagestyle>	
		<property	name			= "MML_DlgCheckBox"	
				checkbox_offset		= "0,0,10,0"				
				checkbox_alignment	= "0,0,0,1"				
				text_offset		= "20,1,0,0"				
				text_alignment		= "0,0,1,1"				
				state0_imagestyle	= "MML_Mood_DlgCheckBoxState0"	
				state1_imagestyle	= "MML_Mood_DlgCheckBoxState1"
				font_color="0xFFFFFFFF"
		/>																	
		<imagestyle name ="MML_Small_DlgCheckBoxState0" >							
			<color_rect alignment="entire" state="normal" color="SQ2_Mood_menu_text_color_001" />	
			<color_rect alignment="entire" state="hit,hover" color="SQ2_Mood_menu_text_color_002" />	
			<color_fill offset="2,2,-2,-2" alignment="entire" state="hit" color="SQ2_Mood_menu_text_color_001" />	
		</imagestyle>																
		<imagestyle name ="MML_Small_DlgCheckBoxState1" >							
			<color_rect alignment="entire" state="normal" color="SQ2_Mood_menu_text_color_001" />	
			<color_rect alignment="entire" state="hit,hover" color="SQ2_Mood_menu_text_color_002" />	
			<color_fill offset="2,2,-2,-2" alignment="entire" state="normal,hover" color="SQ2_Mood_menu_text_color_001" />	
		</imagestyle>																


		<HitStyle name="MoodyFrame" default_hitcode="DRAG" >
			<hitcode type="LEFT"><shape><shape_rect alignment="0,0,0,1" offset="0,0,5,0" /></shape></hitcode>
			<hitcode type="BOTTOM"><shape><shape_rect alignment="0,1,1,1" offset="0,-5,-20,0" /></shape></hitcode>
			<hitcode type="TOP"><shape><shape_rect alignment="0,0,1,0" offset="0,0,0,5" /></shape></hitcode>
			<hitcode type="RIGHT"><shape><shape_rect alignment="1,0,1,1" offset="-5,0,0,-20" /></shape></hitcode>
			<hitcode type="BOTTOMRIGHT"><shape><shape_rect alignment="1,1,1,1" offset="-20,-20,0,0"	/></shape></hitcode>
		</HitStyle>
				
		<!-- jmctodo - spice these up! -->
		<!-- Mood Fillbar -->
		<imagestyle name="MML_Mood_Fillbar_Background"> <color_fill color="MML_Mood_Color3" alignment="entire"/> </imagestyle>
		<imagestyle name="MML_Mood_Fillbar_Empty"><color_fill color="MML_Mood_Color2" alignment="entire" offset="1,1,-1,-1" /> </imagestyle>
		<imagestyle name="MML_Mood_Fillbar_Filled"> <color_fill color="MML_Mood_Color1" alignment="entire" offset="1,1,-1,-1" /> </imagestyle>
		<imagestyle name="MML_Mood_Fillbar_Handle"> <!-- todo ---> </imagestyle>

		<!-- mood Picker -->
		<imagestyle name="MML_Mood_Picker_Menu_Background" transparent="true"> <color_fill alignment="entire" color="MML_Mood_Color1" /> </imagestyle>
		<imagestyle name="MML_Mood_Picker_Background" transparent="true"> <color_fill alignment="entire" color="MML_Mood_Color1" /> </imagestyle>
		<imagestyle name="MML_Mood_Picker_Item" transparent="true"> 
			<color_fill state="hover,hit" alignment="entire" color="MML_Mood_Color1" offset="1,1,-1,-1"/> 
			<color_fill state="normal" alignment="entire" color="MML_Mood_Color2" offset="1,1,-1,-1"/> 
		</imagestyle>
		<imagestyle name="MML_Mood_Picker_Item_Only" transparent="true">  <include source="MML_Mood_Picker_Item" /></imagestyle>
		<imagestyle name="MML_Mood_Picker_Item_First" transparent="true"> <include source="MML_Mood_Picker_Item" /> </imagestyle>
		<imagestyle name="MML_Mood_Picker_Item_Middle" transparent="true"> <include source="MML_Mood_Picker_Item" /> </imagestyle>
		<imagestyle name="MML_Mood_Picker_Item_Last" transparent="true">  <include source="MML_Mood_Picker_Item" /></imagestyle>

		<imagestyle name="MML_Mood_Button_State0" transparent="true"> 
			<color_fill state="hover" alignment="entire" color="MML_Mood_Color2"/> 
			<color_fill state="normal" alignment="entire" color="MML_Mood_Color1"/> 
			<color_rect alignment="entire" color="MML_Mood_Color3"/>
		</imagestyle>

		<imagestyle name="MML_Mood_EditBox_Background_Inactive"><color_fill alignment="entire" color="MML_Mood_Color2" /></imagestyle>
		<imagestyle name="MML_Mood_EditBox_Background_Active"><color_fill alignment="entire" color="MML_Mood_Color1" /></imagestyle>"

		<imagestyle name="MML_Mood_SelectionList_Item_On" transparent="false">
			<color_fill alignment="entire" color="MML_Mood_Color1" />
			<color_fill state="HOVER" alignment="entire" color="MML_Mood_Color3" />
			<color_fill state="HIT" alignment="entire" color="MML_Mood_Color2" />
			<color_rect alignment="entire" color="MML_Mood_Color3" />
		</imagestyle>
		<imagestyle name="MML_Mood_SelectionList_Item_Off" transparent="false">
			<color_fill alignment="entire" color="MML_Mood_Color2" />
			<color_fill state="HOVER" alignment="entire" color="MML_Mood_Color3" />
			<color_fill state="HIT" alignment="entire" color="MML_Mood_Color1" />
		</imagestyle>
		<imagestyle name="MML_Mood_SelectionList_Background" transparent="false">
			<color_fill alignment="entire" color="MML_Mood_Color1" />
		</imagestyle>

		<imagestyle name ="MML_Mood_NotSelectedIcon" >
		</imagestyle>
		<imagestyle name ="MML_Mood_SelectedIcon" >
			<color_fill offset="3,3,-3,-3" alignment="entire" state="normal"    color="0xFF888888" />
			<color_fill offset="3,3,-3,-3" alignment="entire" state="hover"     color="0xFFCCCCCC" />
		</imagestyle>

 		<!-- **************** Dialog MOOD - end -   ***************** -->

<!-- ************************************************************************************************ -->
<!-- ****************<<<<<<                   Sonique2                     >>>>>>******************** -->
<!-- ************************************************************************************************ -->

		<!-- **************** basics - start -   ***************** -->
		<color name="SQ2_Mood_fill_color_001" > 0xFF93D6FF </color>
		<color name="SQ2_Mood_text_color_001" > 0xFFFFFFFF </color>

		<color name="SQ2_Mood_menu_line_color_001" > 0xFF000080 </color>
		<color name="SQ2_Mood_menu_fill_color_001" > 0xFF007FBB </color>
		<color name="SQ2_Mood_menu_fill_color_002" > 0xFF004099 </color>
		<color name="SQ2_Mood_menu_text_color_001" > 0xFF93D6FF </color>
		<color name="SQ2_Mood_menu_text_color_002" > 0xFFFFFFFF </color>

		<imagestyle name="SQ2_Mood_menu_bar_imagestyle" >
			<color_fill state="normal" alignment="entire" color="SQ2_Mood_menu_fill_color_001" />
			<color_fill state="hover"  alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
		</imagestyle>
		<imagestyle name="SQ2_Mood_menu_bar_left_imagestyle">
			<include source="SQ2_Mood_menu_bar_imagestyle" />
			<color_rect state="normal" offset="-1,-1,0,1" alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
			<color_rect state="hover"  offset="1,1,-1,-1" alignment="entire" color="SQ2_Mood_menu_text_color_001" />
		</imagestyle>
		<imagestyle name="SQ2_Mood_menu_bar_right_imagestyle" >
			<include source="SQ2_Mood_menu_bar_imagestyle" />
			<color_rect state="normal" offset="-1,-1,0,1" alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
			<color_rect state="hover"  offset="1,1,-1,-1" alignment="entire" color="SQ2_Mood_menu_text_color_001" />
		</imagestyle>
		<imagestyle name="SQ2_Mood_menu_dropbar_imagestyle" transparent="true" >
			<color_fill state="normal" alignment="entire" color="SQ2_Mood_menu_fill_color_001" opacity="0.85" />
			<color_fill state="hover"  alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
		</imagestyle>
		<imagestyle name="SQ2_Mood_menu_dropbar_top_imagestyle" transparent="true">
			<include source="SQ2_Mood_menu_dropbar_imagestyle" />
			<color_rect state="normal" offset="0,0,0,1"   alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
			<color_rect state="hover"  offset="1,1,-1,-1" alignment="entire" color="SQ2_Mood_menu_text_color_001" />
		</imagestyle>
		<imagestyle name="SQ2_Mood_menu_dropbar_bottom_imagestyle" transparent="true">
			<include source="SQ2_Mood_menu_dropbar_imagestyle" />
			<color_rect state="normal" offset="0,0,0,0"   alignment="entire" color="SQ2_Mood_menu_fill_color_002" />
			<color_rect state="hover"  offset="1,1,-1,-1" alignment="entire" color="SQ2_Mood_menu_text_color_001" />
		</imagestyle>
		<!-- **************** basics -  end  -   ***************** -->

<!-- ************************************************************************************************ -->
<!-- ****************<<<<<<                   basic image styles           >>>>>>******************** -->
<!-- ************************************************************************************************ -->

		<!-- ArrowLeft Macro: args: (normcolor, hitcolor) -->

		<?macrodef ArrowLeft
			<palette name="button_normal">
      			<cp x="0.0" value="$(normcolor):rgb" />
				<cp x="1.0" value="$(normcolor)" />
	  		</palette>
			<palette name="button_hit">
      			<cp x="0.0" value="$(hitcolor):rgb" />
				<cp x="1.0" value="$(hitcolor)" />
	  		</palette>

			<raster 
				source="sq2res.psd|arrow_left" 
				offset="-5,-6,4,5"
				alignment="center" 
				blendmode="ps_normal" 
				state="normal"
				force8bit="alpha"
				palette="button_normal"
			/>
			<raster 
				source="sq2res.psd|arrow_left" 
				offset="-5,-6,4,5"
				alignment="center"
				blendmode="ps_normal" 
				state="hit"
				force8bit="alpha"
				palette="button_hit"
			/>
		?>

		<!-- ArrowLeft Macro: args: (normcolor, hitcolor) -->
		<?macrodef ArrowRight
			<palette name="button_normal">
      			<cp x="0.0" value="$(normcolor):rgb" />
				<cp x="1.0" value="$(normcolor)" />
	  		</palette>
			<palette name="button_hit">
      			<cp x="0.0" value="$(hitcolor):rgb" />
				<cp x="1.0" value="$(hitcolor)" />
	  		</palette>

			<raster 
				source="sq2res.psd|arrow_right" 
				offset="-5,-6,4,5"
				alignment="center"
				blendmode="ps_normal" 
				state="normal"
				force8bit="alpha"
				palette="button_normal"
			/>
			<raster 
				source="sq2res.psd|arrow_right" 
				offset="-5,-6,4,5"
				alignment="center"
				blendmode="ps_normal" 
				state="hit"
				force8bit="alpha"
				palette="button_hit"
			/>
		?>

		<!-- **************** for visualpopup screen   ***************** -->
		<imagestyle name="arrow_left"  > <?macroins ArrowLeft  normcolor="0xFF93D6FF" hitcolor="SQ2_Mood_menu_text_color_002" ?> </imagestyle>
		<imagestyle name="arrow_right" > <?macroins ArrowRight normcolor="0xFF93D6FF" hitcolor="SQ2_Mood_menu_text_color_002" ?> </imagestyle>

		<!-- **************** SQ2_DisplayArea - start -   ***************** -->
		<color name="sq2title0">0xfffee764</color>
		<imagestyle name="SQ2_Mood_DisplayArea_imagestyle" >
			<_color_fill color = "0xFF007BBA" />
			<_color_fill color = "0xFFaa0022" />	 
			<_color_fill  color = "0xFF00FF00" />

			<_gradient_fourpoint
				color_ul = "0xFF1FB3EF" color_ur = "0xFF1FB3EF"
				color_ll = "0xFF007BBA" color_lr = "0xFF007BBA"
				blendmode ="PS_NORMAL"
			/>


			<gradient_fourpoint
				color_ul = "0xFF000080" color_ur = "0xFF000080"
				color_ll = "0xFF0000FF" color_lr = "0xFF0000FF"
				blendmode ="COPY|PIXEL"
			/>
			<_gradient_fourpoint
				color_ul = "0xFF0000FF" color_ur = "0x70FFFF00"
				color_ll = "0xDFFF0000" color_lr = "0x50FF0000"
			/>
			<_raster 
				source="sq2res.psd|hlines" 
				blendmode="ps_normal" 
				fillmode="tile" 
				tile_size="128,128" 
				opacity=".5" 
			/>
		</imagestyle>
		<property	name					="SQ2_DisplayArea"	
				img_background			="SQ2_Mood_DisplayArea_imagestyle"
		/>

		<!-- **************** SQ2_DisplayArea -  end  -   ***************** -->

		<!-- **************** SQ2_TopMenu - start -   ***************** -->

		<imagestyle name="menu_background">
			<color_fill color="color1"/>
			<color_rect color="color3" />
		</imagestyle>
		<imagestyle name="menu_item_imagestyle" transparent="true">
			<color_fill color="color2" state="normal" alignment="0,0,1,1" opacity="0.50" />
			<color_fill color="color2" state="hover"  alignment="0,0,1,1" opacity="0.25"/>
		</imagestyle>


		 <property	name					= "SQ2_TopMenu"
					img_top_empty_left		= ""
					img_top_empty_right		= ""
					img_top_background		="menu_background"
					img_top_item_first		="menu_item_imagestyle"
					img_top_item_middle		="menu_item_imagestyle"
					img_top_item_last		="menu_item_imagestyle"
					img_drop_background		="menu_background"
					img_drop_item_first		="menu_item_imagestyle"
					img_drop_item_middle		="menu_item_imagestyle"
					img_drop_item_last		="menu_item_imagestyle"
					textshadow			= "true"
					top_font_color1		= "SQ2_Mood_menu_text_color_001"
					top_font_color2		= "SQ2_Mood_menu_text_color_002"
					top_font_justification	= "left"
					top_fade_duration		= "300"
					drop_fade_duration		= "300"
					drop_font_color1		= "SQ2_Mood_menu_text_color_001"
					drop_font_color2		= "SQ2_Mood_menu_text_color_002"
					drop_font_justification	= "left"
					text_offset_top		= "0,0,0,0"
					text_alignment_top		= "entire"
					text_offset_drop		= "0,0,0,0"
					text_alignment_drop		= "entire"
					rect_borderoffset		= "25,0,-25,-5"

					img_checkoff			="MML_Mood_DlgCheckBoxState0"
					img_checkon			="MML_Mood_DlgCheckBoxState1"
					text_offset_toggle		="0,0,-16,0"
					text_alignment_toggle	="0,0,1,1"
					checkbox_offset			="-15,-6,-2,7"
					checkbox_alignment		="1, 0.5, 1, 0.5"

					img_notselected			="MML_Mood_NotSelectedIcon"
					img_selected			="MML_Mood_SelectedIcon"
					text_offset_select		="0,0,-16,0"
					text_alignment_select	="0,0,1,1"
					selecticon_offset		="-15,-6,-2,7"
					selecticon_alignment	="1, 0.5, 1, 0.5"
		 />
		<!-- **************** SQ2_TopMenu - end -   ***************** -->

		<!-- **************** SQ2_PopupMenu - start -   ***************** -->
		 <property	name					="SQ2_PopupMenu"
					img_drop_background		="menu_background"
					img_drop_item_first		="menu_item_imagestyle"
					img_drop_item_middle		="menu_item_imagestyle"
					img_drop_item_last		="menu_item_imagestyle"
					textshadow			="true"
					drop_fade_duration		="300"
					drop_font_color1		="SQ2_Mood_menu_text_color_001"
					drop_font_color2		="SQ2_Mood_menu_text_color_002"
					drop_font_justification	="left"
					text_offset_drop		="0,0,0,0"
					text_alignment_drop		="entire"
					rect_borderoffset		="25,0,-25,-5"

					img_checkoff			="MML_Small_DlgCheckBoxState0"
					img_checkon			="MML_Small_DlgCheckBoxState1"
					text_offset_toggle		="0,0,-16,0"
					text_alignment_toggle	="0,0,1,1"
					checkbox_offset		="-15,-6,-2,7"
					checkbox_alignment		="1, 0.5, 1, 0.5"

					img_notselected		="MML_Mood_NotSelectedIcon"
					img_selected			="MML_Mood_SelectedIcon"
					text_offset_select		="0,0,-16,0"
					text_alignment_select	="0,0,1,1"
					selecticon_offset		="-15,-6,-2,7"
					selecticon_alignment	="1, 0.5, 1, 0.5"
		 />	
		<!-- **************** SQ2_PopupMenu - end -   ***************** -->


		<!-- **************** MML_Scrollbar - start -   ***************** -->
<!-- jmctodo - come, on we can do better than this -->
		 <imagestyle name="SQ2_Mood_scrollbar_background">
		 	<color_fill alignment="entire" color="SQ2_Mood_menu_fill_color_001" />
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_scrollbar_foreground">
		 	<color_fill alignment="entire" color="SQ2_Mood_menu_fill_color_002" state="normal" />
		 	<color_fill alignment="entire" color="0xFF808080" state="hover" />
			<color_rect color="0xFFFFFFFF" state="hover,normal"/>
			<color_fill alignment="entire" color="0xFFFFFFFF" state="hit" />
			<color_rect color="SQ2_Mood_menu_fill_color_002" state="hit" />
			</imagestyle>
		 <imagestyle name="SQ2_Mood_scrollbar_upbutton">
		 	<color_fill alignment="entire" color="0xFFFFFFFF" />
			<color_rect color="SQ2_Mood_menu_fill_color_002"/>
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_scrollbar_downbutton">
		 	<color_fill alignment="entire" color="0xFFFFFFFF" />
			<color_rect color="SQ2_Mood_menu_fill_color_002"/>
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_scrollbar_leftbutton">
		 	<color_fill alignment="entire" color="0xFFFFFFFF" />
			<color_rect color="SQ2_Mood_menu_fill_color_002"/>
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_scrollbar_rightbutton">
		 	<color_fill alignment="entire" color="0xFFFFFFFF" />
			<color_rect color="SQ2_Mood_menu_fill_color_002"/>
		 </imagestyle>
		 <property	name				="MML_Scrollbar"
					img_background		="SQ2_Mood_scrollbar_background"
					img_bar			="SQ2_Mood_scrollbar_foreground"
					img_upbutton		="SQ2_Mood_scrollbar_upbutton"
					img_downbutton		="SQ2_Mood_scrollbar_downbutton"
					img_leftbutton		="SQ2_Mood_scrollbar_leftbutton"
					img_rightbutton	="SQ2_Mood_scrollbar_rightbutton"
		 />
		<!-- **************** MML_Scrollbar - end -   ***************** -->
		


		<!-- **************** MML_ConsoleWindow - start -   ***************** -->
		 <property 	name				="MML_ConsoleWindow"
rect_borderoffset	="300,1,-300,-1"
					color_debug		="0xFFC0C0C0"
					color_logtext		="0xFFFFFFFF"
					color_commandtext	="0xFF000080"
					color_commandresult ="0xFFFFFFFF"
					color_info		="0xFFFFFFFF"
					color_warning		="0xFFFFFF80"
					color_error		="0xFFFFC0C0"

		 />
		<!-- **************** MML_ConsoleWindow -  end  -   ***************** -->

		<!-- **************** SQ2_ViewerWindow - start -   ***************** -->
		 <property 	name				="SQ2_ViewerWindow"
					rect_borderoffset	="3,1,-3,-1"
		 />
		<!-- **************** SQ2_ViewerWindow -  end  -   ***************** -->

		<!-- **************** SQ2_SettingsWindow - start -   ***************** -->
		<property 	name				="SQ2_SettingsWindow"
					_img_background	=""
					rect_borderoffset	="3,1,-3,-1"
										
					img_top_empty_left		= ""
					img_top_empty_right		= ""
					img_top_background		="menu_background"
					img_top_item_first		="menu_item_imagestyle"
					img_top_item_middle		="menu_item_imagestyle"
					img_top_item_last		="menu_item_imagestyle"
					img_drop_background		="menu_background"
					img_drop_item_first		="menu_item_imagestyle"
					img_drop_item_middle		="menu_item_imagestyle"
					img_drop_item_last		="menu_item_imagestyle"
					textshadow			= "true"
					top_font_color1		= "SQ2_Mood_menu_text_color_001"
					top_font_color2		= "SQ2_Mood_menu_text_color_002"
					top_font_justification	= "left"
					top_fade_duration		= "300"
					drop_fade_duration		= "300"
					drop_font_color1		= "SQ2_Mood_menu_text_color_001"
					drop_font_color2		= "SQ2_Mood_menu_text_color_002"
					drop_font_justification	= "left"
					text_offset_top		= "0,0,0,0"
					text_alignment_top		= "entire"
					text_offset_drop		= "0,0,0,0"
					text_alignment_drop		= "entire"
					rect_borderoffset		= "25,0,-25,-5"
		/>

 		<window name="SQ2_Settings" type="Sonique2_MMLDisplay" transparent="true" >
			<property title="Settings"/>
			<window type="Sonique2_Settings" />
		</window>

		<!-- **************** SQ2_SettingsWindow -  end  -   ***************** -->


		<!-- **************** SQ2_PlaylistWindow - start -   ***************** -->

		  <imagestyle name="mediumgreyfill" transparent="false">
			<_color_fill	color	  = "0xFF4A4A4A"
						alignment = "0,0,1,1"
			/>
		 </imagestyle>
		 <imagestyle name="pumpkinfillblackborder" transparent="false">
			<color_fill	color	  = "0xFFE7651A"
						alignment = "0,0,1,1"
			/>
			<color_rect	color	  = "0xFF000000"
						alignment = "0,0,1,1"
			/>
		 </imagestyle>
		 <imagestyle name="orangefillblackborder" transparent="false">
			<color_fill	color	  = "0xFFFF952A"
						alignment = "0,0,1,1"
			/>
			<color_rect	color	  = "0xFF000000"
						alignment = "0,0,1,1"
			/>
		 </imagestyle>
		 <imagestyle name="blackfill" transparent="false">
			<color_fill	color	  = "0xFF000000"
						alignment = "0,0,1,1"
			/>
		 </imagestyle>
		 <imagestyle name="blackborder" transparent="true">
			<color_rect	color	  = "0xFF000000"
						alignment = "0,0,1,1"
			/>
		 </imagestyle>
		 <imagestyle name="bluefillblackborder" transparent="true">
			<color_fill	color	  = "0x80000080"
						alignment = "0,0,1,1"
						blendmode = "RGB|COPY|ALPHA_SRCALPHA"
			/>
			<include source="blackborder" />
		 </imagestyle>
		 <imagestyle name="transparent" transparent="true" />
		 <imagestyle name="xor" transparent="false">
			<color_fill	color	  = "0xFFFFFFFF" blendmode  = "XOR|RGB" />
			<color_fill	color	  = "0xFFFFFF00" blendmode  = "PS_COLOR" />
		 </imagestyle>
		 <FontStyle name="headerfont" size="+3" style="normal" />
		 <FontStyle name="headersortfont" size="+1" style="bold underlined" />
		 <imagestyle name="uparrow" transparent="true">
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,1,-9,5"
						antialiased = "true"
			/>
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,1,-1,5"
						antialiased = "true"
			/>
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,1,-5,9"
						antialiased = "true"
			/>
		 </imagestyle>
		 <imagestyle name="downarrow" transparent="true">
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,9,-9,5"
						antialiased = "true"
			/>
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,9,-1,5"
						antialiased = "true"
			/>
			<color_line		color	  = "0xFFFFFFFFF"
						alignment = "1,0,1,0"
						offset	  = "-5,9,-5,1"
						antialiased = "true"
			/>
		 </imagestyle>
		 <imagestyle name="selected" transparent="true">
			<color_fill	color		= "0xE08080B0"
						alignment	= "0,0,1,1"
						blendmode	= "COPY|RGB|ALPHA_SRCALPHA"
			/>
		 </imagestyle>
		 <imagestyle name="darkbluetrans" transparent="true">
			<_color_fill	color		= "0x800040C0"
						alignment	= "0,0,1,1"
						blendmode	= "COPY|RGB|ALPHA_SRCALPHA"
			/>
			<color_fill	color		= "0x00FFFFFF"
						alignment	= "0,0,1,1"
						blendmode	= "SUBDST"
			/>
		 </imagestyle>


		 <property	name							="SQ2_PlaylistWindow"
					img_background					="mediumgreyfill"
					img_column						="blackborder"
					img_selectcolumn				="bluefillblackborder"
					img_header_background			="blackfill"
					img_header						="pumpkinfillblackborder"
					img_sortheader					="orangefillblackborder"
					item_height					="16"
					header_height					="16"
					font_header_color				="0xFF000000"
					font_header_justification		="h_center|v_center"
					font_header					="headerfont"
					font_headersort_color			="0xFF000000"
					font_headersort_justification		="right"
					font_headersort				="headersortfont"
					rect_headertext_offsets			="3,1,-3,-1"
					rect_headersorttext_offsets		="3,1,-10,-1"
					img_headerdrophintstyle			="darkbluetrans"
					img_itemdrophintstyle			="xor"
					img_sortheader_sortforwardimage	="downarrow"
					img_sortheader_sortreverseimage	="uparrow"
					img_searchhighlightstyle		="darkbluetrans"
					rect_borderoffset				="3,1,-3,-1"

					img_selectedrow					="selected"
					img_currentselectedrow			="selected"
					font_currentselecteditem_color	="0xFFC0C0FF"
					font_selecteditem_color			="0xFFF0F0FF"
					font_currentitem_color			="0xFFC0C0FF"
					font_playingitem_color			="0xFFFFFF00"
					font_currentsongitem_color		="0xFFFF8000"

		 />

		 <property	name				="slate_scrollbar"
					img_background		="transparent"
		 />

		<!-- **************** SQ2_PlaylistWindow -  end  -   ***************** -->

		<!-- **************** SQ2_ContextMenu  - start -   ***************** -->
		<window  name="SQ2_ContextMenu"  alignment="entire" transparent="true" >
		</window>
		<!-- **************** SQ2_ContextMenu  -  end  -   ***************** -->
		
		
		
		<!-- **************** SQ2_ConsoleDisplayWindow  - start -   ***************** -->
		<window name="SQ2_ConsoleDisplayWindow" type="Sonique2_MMLDisplay" transparent="true" >
			<property title="Console"/>
			<window type="Console" />
		</window>
		<!-- **************** SQ2_ConsoleDisplayWindow  -  end  -   ***************** -->



		<!-- **************** SQ2_NavigationBar  - start -   ***************** -->
		<FontStyle name="NavPickerFS" size="14"  />

		<property	name	= "NavBarProperty"
				title = "Picker"
				edge = "top"
				thickness	= "20"
		/>


		<window name="SQ2_NavigationBar" type="Sonique2_MMLDisplay" transparent="true" property="NavBarProperty" >
			<imagestyle name="background" >
				<gradient_fourpoint 
					color_ul	= "0x8089D8FF" color_ur = "0x80C2F2FF"
					color_ll	= "0xFF89D8FF" color_lr = "0xFFC2F2FF"
					blendmode	= "ps_normal"
					alignment = "entire"
				/>
				<color_line offset="9,0,9,0" alignment="0,0,0,1" color="0xFF00537B" />
				<color_line offset="39,0,39,0" alignment="0,0,0,1" color="0xFF00537B" />
			</imagestyle>
			<script name="OnInit">
				// jmctodo - this OnInit is called twice.
				$section = "sonique/gui/slate/hotkeys";
				:sonique.prefs.CreateSection($section);
				next = :sonique.prefs.GetString($section, "nextscreen");
				prev = :sonique.prefs.GetString($section, "prevscreen");
				if (next) { :app.RegisterGlobalKeyScript( next, "OnClick();", SQ2_NavigationBar.forward ); }
				if (prev) { :app.RegisterGlobalKeyScript( prev, "OnClick();", SQ2_NavigationBar.back ); }
			</script>
			<script name="OnDestroy">
				// jmctodo - the SQ2_NavigationBar context is no longer valid in the OnDestroy.  which seems a bit premature to me.  
				//if (next) { :app.UnregisterGlobalKeyScript( next, "OnClick();", SQ2_NavigationBar.forward ); next = 0; }
				//if (prev) { :app.UnregisterGlobalKeyScript( prev, "OnClick();", SQ2_NavigationBar.back ); prev = 0; }
			</script>
			<window name="back" type="button" offset="10,0,25,0" alignment="0,0,0,1"  transparent="true" hitstyle="ACTIVE" >
				<imagestyle name="state0" > <?macroins ArrowLeft normcolor="0xFF00537B" hitcolor="0xFFFFFFFF" ?> </imagestyle>
				<script name="OnClick" > slate_display.History(-1); </script>
				<property hoverhint="Go to last visited screen"/>
			</window>
			<window name="forward" type="button" offset="25,0,40,0" alignment="0,0,0,1" transparent="true" hitstyle="ACTIVE" >
				<imagestyle name="state0" > <?macroins ArrowRight normcolor="0xFF00537B" hitcolor="0xFFFFFFFF" ?> </imagestyle>
				<script name="OnClick" > slate_display.History(1); </script>
				<property hoverhint="Go to next visited screen"/>
			</window>
			<_window name="navpicker" type="picker" offset="40,0,0,0" alignment="0,0,1,1" transparent="true" hitstyle="ACTIVE">
				<property   name="NavBarProperty"
							hoverhint="Screen visit history"
							textshadow="false" 
							font_style="NavPickerFS" 
							font_color1="0xFF00537B" 
							font_color2="0xFFFFFFFF" 
							font_color3="0xFF00537B" 
							fade_duration="0"
							font_justification="v_center"
				/>
				<imagestyle name="img_picker_background" transparent="true">
					<color_fill
						state         ="normal"
        					color         ="0xFF0066CC"
						opacity       ="1.0"
					/>
				</imagestyle>
				<imagestyle name="img_menu_background" transparent="true">
					<color_fill
						state         ="normal"
        					color         ="0xFF0066CC"
						opacity       ="0.5"
					/>
				</imagestyle>
				<imagestyle name="img_item" transparent="true">
				</imagestyle>
				<property
					fade_duration   ="200"
					font_color1     ="0xCCFFFFFF"
					font_color2     ="color3"
					font_color3     ="0xFF808080"
					textshadow      ="true"
				/>
				<script name="OnInit"> 
					SetAllItems({"Sonique", "CheesyBrand(tm) Bran Muffins"}); 
				</script>

			</_window>
		</window>
		<!-- **************** SQ2_NavigationBar  -  end  -   ***************** -->



		<!-- **************** SQ2_StatusBar  - start -   ***************** -->
		<imagestyle name="SQ2_StatusBar1" >
			<color_fill alignment="entire" color="#93D6FF" />
		</imagestyle>
		<imagestyle name="SQ2_StatusBar2" >
			<color_fill alignment="entire" color="#007FBB" />
		</imagestyle>
		<imagestyle name="SQ2_StatusBar3" >
			<color_fill alignment="entire" color="#C2EBFE" />
		</imagestyle>

		<window name="SQ2_StatusBar" type="Sonique2_MMLDisplay" transparent="true"  >
			<property	title="Status"	edge="bottom"	thickness= "20" border_offset="3,1,-3,-1" />
			<window type="Sonique2_StatusBar" alignment="entire">
				<property 	
                    scroll_mode		    = "horizontal"
					scroll_speed		= "50"
					whitespace          = "40"
					rect_status_offset	="15,5,-15,-5"
					info_font_color			="#007FBB"
					info_font_justification	="left|v_center"
					warning_font_color			="#007FBB"
					warning_font_justification	="left|v_center"
					error_font_color			="#007FBB"
					error_font_justification	="left|v_center"
					fallback_font_color			="#007FBB"
					fallback_font_justification	="left|v_center"
					rect_progress_offset="10,2,-10,-2"
				/>
				<imagestyle name="background" >
					<color_fill alignment="entire" color="#93D6FF" />
				</imagestyle>
				<imagestyle name="progress_fill" >
					<color_fill alignment="entire" color="#007FBB" />
				</imagestyle>
				<imagestyle name="progress_empty" >
					<color_fill alignment="entire" color="#C2EBFE" />
				</imagestyle>
			</window>
		</window>

		<!-- **************** SQ2_StatusBar  -  end  -   ***************** -->


		<!-- **************** SQ2_PlayBar  - start -   ***************** -->

		<!-- PlayBar Colors -->
		<color name="btn_border">			#93D6FF </color>
		<color name="btn_border_glow">		0xFFFFFFFF </color>
		<color name="btn_foreground" >		0xFFC2EBFE </color>
		<color name="btn_foreground_hit" >  0xFF00537B </color>
		<color name="btn_background" >		0xFF00537B </color>
		<color name="btn_background_hit" >	0xFF93D6FF </color>

		<color name="sldr_volume_fill_start" >	0xFF00537B </color>
		<color name="sldr_volume_fill_end"   >	0xFF93D6FF </color>
		<color name="sldr_volume_empty"		 >	0xFF007FBB </color>

		<color name="sldr_song_empty"		 >	0xFF007FBB </color>
		<color name="sldr_song_hit">#FFFFFF</color>
		<color name="sldr_song_fill"		 >	0xFF00537B </color>

		<color name="playbar_font_color">0xFFFFFFFF</color>

		<!-- PlayBar Palettes -->
		<palette name="btn_border">
      		<cp x="0.0" value="btn_border:rgb" />
			<cp x="1.0" value="btn_border" />
	  	</palette>

		<palette name="btn_border_glow">
      		<cp x="0.0" value="btn_border_glow:rgb" />
			<cp x="1.0" value="btn_border_glow" />
	  	</palette>

		<palette name="btn_foreground">
      		<cp x="0.0" value="btn_foreground:rgb" />
			<cp x="1.0" value="btn_foreground" />
	  	</palette>

		<palette name="btn_foreground_hit">
      		<cp x="0.0" value="btn_foreground_hit:rgb" />
			<cp x="1.0" value="btn_foreground_hit" />
	  	</palette>

		<palette name="btn_background">
      		<cp x="0.0" value="btn_background:rgb" />
			<cp x="1.0" value="btn_background" />
	  	</palette>

		<palette name="btn_background_hit">
      		<cp x="0.0" value="btn_background_hit:rgb" />
			<cp x="1.0" value="btn_background_hit" />
	  	</palette>
		
		
		<!-- Button Macro -->
		<?macrodef btnWindow
			<window name="$(btn)" type="button" transparent="true" offset="playbar.psd|btn$(btn) @ playbar.psd" alignment=".5,0,.5,0" hitstyle="ACTIVE" >
				<property hover="true" hoverhint="$(hint)" />
				<imagestyle name="state0">
					<raster source		= "playbar.psd|bg_btn$(btn)"
							offset		= "playbar.psd|bg_btn$(btn) @ playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_background"
							state		= "normal,hover,hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|bg_btn$(btn)"
							offset		= "playbar.psd|bg_btn$(btn) @ playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_background_hit"
							state		= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btn$(btn)"
							offset		= "playbar.psd|fg_btn$(btn) @ playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_foreground"
							state		= "normal,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btn$(btn)"
							offset		= "playbar.psd|fg_btn$(btn) @ playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_foreground_hit"
							state		= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_border"
							state		= "normal"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btn$(btn)"
							force8bit	= "alpha"
							palette		= "btn_border_glow"
							state		= "hit,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
				</imagestyle>
		?>

		<FontStyle name="playbar_font" type="raster" source="playbar.psd|fntNumbers" monochrome="true">
			<glyphlist>0123456789:.&#e001;&#e000;&#e002;</glyphlist>
		</FontStyle>

		<!--<FontStyle name="playbar_font" size="15" face="Globus" />-->
		
		<!-- PlayBar Window -->
		<window name="SQ2_PlayBar" type="Sonique2_MMLDisplay" transparent="true"  >
			<script name="OnVolumeChanged">
			    sldrVolume.SetRealPos( :sonique.players.default.GetVolume() );
			</script>
			<script name="OnInit">
				:sonique.players.default.RegisterCallback("VolumeChanged","OnVolumeChanged()", this);
				OnVolumeChanged();
			</script>
			<property		title	= "PlayBar";
						edge		= "bottom"
						thickness	= "33"
			/>
			<?macroins btnWindow btn="Prev" hint="Previous track" ?>
				<script name="OnClick"> :sonique.players.default.Previous(); </script>
			</window>
<!--			<?macroins btnWindow btn="Play" hint="Play" ?>
				<script name="OnClick"> :sonique.players.default.Play(); </script>
			</window>
			<?macroins btnWindow btn="Pause" hint="Pause" ?>
				<script name="OnClick"> :sonique.players.default.TogglePause(); </script>
			</window> 
-->
			<?macroins btnWindow btn="Stop" hint="Stop" ?>
				<script name="OnClick"> :sonique.players.default.Stop(); </script>
			</window>
			<?macroins btnWindow btn="Next" hint="Next track" ?>
				<script name="OnClick"> :sonique.players.default.Next(); </script>
			</window>
			<?macroins btnWindow btn="Rev" hint="Scan backwards" ?>
				<script name="OnLeftButtonDown"> :system.timer.SetTimer("backward",50,":sonique.players.default.Scan(-5, \"false\");",this,1); </script>
				<script name="OnLeftButtonUp">   :system.timer.UnsetTimer("backward",this); </script>
			</window>
			<?macroins btnWindow btn="For" hint="Scan forwards" ?>
				<script name="OnLeftButtonDown"> :system.timer.SetTimer("forward",50,":sonique.players.default.Scan(5, \"false\");",this,1); </script>
				<script name="OnLeftButtonUp">   :system.timer.UnsetTimer("forward",this); </script>
			</window>
			<?macroins btnWindow btn="Open" hint="Open audio" ?>
				<script name="OnClick"> :sonique.OpenFiles(); </script>
			</window>
			<?macroins btnWindow btn="Shuffle" hint="Toggle shuffle" ?>
				<script name="OnClick"> 
					:sonique.players.default.ToggleShuffle(); 
				</script>
			</window>
			<?macroins btnWindow btn="Repeat" hint="Cycle through repeat modes" ?>
				<script name="OnClick"> 
					:sonique.players.default.ToggleRepeat();
				</script>
			</window>
			<?macroins btnWindow btn="Mute" hint="Mute" ?>
				<script name="OnClick"> 
					if (:app.mutevol == 0.0) { 
						:app.mutevol = :sonique.players.default.GetVolume(); 
						:sonique.players.default.SetVolume(0.0); 
					} else {
						:sonique.players.default.SetVolume(:app.mutevol); 
						:app.mutevol = 0.0;
					}
				</script>
			</window>
<!--
			<?macroins btnWindow btn="Playlist" hint="Playlist?" ?> 
				<script name="OnClick"> DisplayWindow("SQ2_Playlist");</script>
			</window>
			<?macroins btnWindow btn="EQ" hint="EQ?" ?>
				<script name="OnClick"> main.drawer.OnClick();</script>
			</window>
-->			
			<window name="PlayPause" type="button" transparent="true" offset="playbar.psd|btnPlay @ playbar.psd" alignment=".5,0,.5,0" hitstyle="ACTIVE" >
				<property hover="true" hoverhint="Play/Pause toggle" />
				<imagestyle name="state0">
					<raster source="playbar.psd|bg_btnPlay" offset="playbar.psd|bg_btnPlay @ playbar.psd|btnPlay"
							force8bit	= "alpha" palette = "btn_background" state = "normal,hover,hit" alignment = "entire" blendmode = "ps_normal"/>
					<raster source		= "playbar.psd|bg_btnPlay" offset="playbar.psd|bg_btnPlay @ playbar.psd|btnPlay"
							force8bit	= "alpha"
							palette		= "btn_background_hit"
							state		= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btnPlay"
							offset		= "playbar.psd|fg_btnPlay @ playbar.psd|btnPlay"
							force8bit	= "alpha"
							palette		= "btn_foreground"
							state		= "normal,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btnPlay"
							offset	= "playbar.psd|fg_btnPlay @ playbar.psd|btnPlay"
							force8bit	= "alpha"
							palette	= "btn_foreground_hit"
							state	= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btnPlay"
							force8bit	= "alpha"
							palette	= "btn_border"
							state	= "normal"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btnPlay"
							force8bit	= "alpha"
							palette	= "btn_border_glow"
							state	= "hit,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
				</imagestyle>				
				<imagestyle name="state1">
					<raster source="playbar.psd|bg_btnPause" offset="playbar.psd|bg_btnPause @ playbar.psd|btnPause"
							force8bit	= "alpha" palette = "btn_background" state = "normal,hover,hit" alignment = "entire" blendmode = "ps_normal"/>
					<raster source		= "playbar.psd|bg_btnPause" offset="playbar.psd|bg_btnPause @ playbar.psd|btnPause"
							force8bit	= "alpha"
							palette		= "btn_background_hit"
							state		= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btnPause"
							offset		= "playbar.psd|fg_btnPause @ playbar.psd|btnPause"
							force8bit	= "alpha"
							palette		= "btn_foreground"
							state		= "normal,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|fg_btnPause"
							offset	= "playbar.psd|fg_btnPause @ playbar.psd|btnPause"
							force8bit	= "alpha"
							palette	= "btn_foreground_hit"
							state	= "hit"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btnPause"
							force8bit	= "alpha"
							palette	= "btn_border"
							state	= "normal"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
					<raster source		= "playbar.psd|btnPause"
							force8bit	= "alpha"
							palette	= "btn_border_glow"
							state	= "hit,hover"
							alignment	= "entire"
							blendmode	= "ps_normal"
					/>
				</imagestyle>
				<script name="OnInit">
					:sonique.players.default.RegisterCallback("Playing","UpdateState()", this);
					:sonique.players.default.RegisterCallback("Stopping","UpdateState()", this);
					:sonique.players.default.RegisterCallback("Pausing","UpdateState()", this);
					UpdateState();
				</script>
				<script name="OnClick"> 
					if (:sonique.players.default.IsPlaying()) {
						:sonique.players.default.TogglePause(); 
					} else { 
						:sonique.players.default.Play(); 
					} 
					UpdateState();
				</script>
				<script name="UpdateState">
					if (:sonique.players.default.IsPlaying()) 
					{
						if (:sonique.players.default.IsPaused()) {
							SetButtonState(0);
						} else {
							SetButtonState(1);
						}
					} else { 
						SetButtonState(0);
					} 
				</script>
			</window> 
			<window name="sldrVolume" type="fillbar" offset="playbar.psd|sldrVolume @ playbar.psd" alignment=".5,0,.5,0" transparent="true"  hitstyle="ACTIVE" >
				<Property orientation="left_to_right"
						  hover="true"
						  hoverhint="Adjust volume"
						  bar_offset_rect="playbar.psd|bg_sldrVolume @ playbar.psd|sldrVolume"
						  bar_align_rect ="0,0,1,1"
  				          outer_handle_offset_rect="-1,-4,2,5"
						  outer_handle_align_rect="0,.5,0,.5"
						  _outer_handle_offset_rect="-10,-40,10,20"
						  fill_offset_rect="0,0,-2,0"
						  empty_offset_rect="3,0,0,0"
				/>
				<imagestyle name="state0">
		 			<raster 
		 					source			= "playbar.psd|sldrVolume"
		 					alignment		= "entire"
							force8bit		= "alpha"
							palette			= "btn_border"
		 					blendmode		= "ps_normal"
							state			= "normal"
					/>
					
		 			<raster 
		 					source			= "playbar.psd|sldrVolume"
		 					alignment		= "entire"
							force8bit		= "alpha"
							state			= "hover,hit"
							palette			= "btn_border_glow"
		 					blendmode		= "ps_normal"
					/>
				</imagestyle>
				<imagestyle name="barfilled">
					<gradient_fourpoint
							color_ul = "sldr_volume_fill_start"
							color_ll = "sldr_volume_fill_start"
							color_ur = "sldr_volume_fill_end"
							color_lr = "sldr_volume_fill_end"
							alignment="entire"
					/>
				</imagestyle>
				<imagestyle name="barempty">
					<color_fill	color	= "sldr_volume_empty"
								alignment="entire"
					/>
				</imagestyle>
				<imagestyle name="handle">
					<_color_fill color="#00FF00" />
		 			<raster source			="playbar.psd|handle"
		 					alignment		="entire"
		 					blendmode		="ps_normal"
					/>
				</imagestyle>


				<script name="OnPosChange">
					:sonique.players.default.SetVolume( GetRealPos() );
				</script>
			</window>

			<_window name="test" transparent="true" type="Sonique2_InfoDisplay" offset="0,0,100,10" alignment="0,0,0,0" />
			<window name="txtTrack" transparent="true" type="Sonique2_TrackDisplay" offset="playbar.psd|txtTrack@ playbar.psd" alignment=".5,0,.5,0" hitstyle="ACTIVE" >
				<property hoverhint="Current track number" format="04" font_style="playbar_font" font_color="playbar_font_color" font_justification="v_center|left" />
			</window>
			<window name="txtTime" transparent="true" type="Sonique2_TimeDisplay" offset="playbar.psd|txtTime@ playbar.psd" alignment=".5,0,.5,0"  hitstyle="ACTIVE" >
				<property font_style="playbar_font" font_color="playbar_font_color" font_justification="v_center|right" updateinterval="100" hovertext="true" />
			</window> 

			<window name="sldrSong" type="Sonique2_Progress" offset="playbar.psd|sldrSong @ playbar.psd" alignment=".5,0,.5,0" transparent="true"  hitstyle="ACTIVE" >
				<Property orientation="left_to_right"
					      hover="true"
						  hovertext="true"
						  _hoverhint="Seek in audio stream"
						  bar_offset_rect="playbar.psd|bg_sldrSong @ playbar.psd|sldrSong"
						  bar_align_rect ="0,0,1,1" 
						  outer_handle_offset_rect="-1,-5,2,4"
						  outer_handle_align_rect="0,.5,0,.5"
						  fill_offset_rect="0,0,-2,0"
						  empty_offset_rect="3,0,0,0"
						  type="SongProgress"
						  _type="PlaylistProgress"
				/>
				<imagestyle name="state0">
		 			<raster 
		 					source			= "playbar.psd|sldrSong"
		 					alignment		= "entire"
							force8bit		= "alpha"
							palette			= "btn_border"
		 					blendmode		= "ps_normal"
							state			= "normal"
					/>
		 			<raster 
		 					source			= "playbar.psd|sldrSong"
		 					alignment		= "entire"
							force8bit		= "alpha"
							palette			= "btn_border_glow"
		 					blendmode		= "ps_normal"
							state			= "hit,hover"
					/>
				</imagestyle>
				<imagestyle name="barfilled">
					<color_fill	color	= "sldr_song_fill"
								alignment="entire"
								state			= "normal,hover"
					/>
					<color_fill	color	= "sldr_song_hit"
								alignment="entire"
								state			= "hit"
					/>
				</imagestyle>
				<imagestyle name="barempty">
					<color_fill	color	= "sldr_song_empty"
								alignment="entire"
					/>
				</imagestyle>
				<imagestyle name="handle">
		 			<raster source			="playbar.psd|handle"
		 					alignment		="entire"
		 					blendmode		="ps_normal"
					/>
				</imagestyle>

			</window>

		</window>
		<!-- **************** SQ2_PlayBar  -  end  -   ***************** -->

		<!-- **************** SQ2_Playlist  -  start  -   ***************** -->
		<color name="sldr_playlist_fill">0xFFFFFFFF</color>
		<color name="sldr_playlist_empty">0xFF000000</color>

		<window name="SQ2_Playlist" type="Sonique2_MMLDisplay" transparent="true"  >
			<property title="Playlist"/>
			<window name="Playlist" type="Sonique2_Playlist" offset="0,0,0,-38" alignment="entire">
				<property playlistname="default" player = "default" />
				<script name="OnInit">
					$playerstate = :sonique.players.default.GetInfo();
					if( $playerstate and $playerstate.IsValidIndex("cursongid") )
					{
						if ($playerstate["cursongid"] > 0)
						{
							ScrollToShowItem($playerstate["cursongid"]);
						}
					}
				</script>
			</window>
			<window name="Test_Progress" type="Sonique2_Progress" offset="0,-38,0,-30" alignment="0,1,1,1" transparent="false"  hitstyle="ACTIVE" >
				<Property _hoverhint  ="Progress through playlist"
							hovertext  ="true"
							orientation="left_to_right"
							type ="PlaylistProgress" />
				<imagestyle name="background">
		 			<color_fill color = "sldr_playlist_empty" />
				</imagestyle>
				<imagestyle name="barfilled">
		 			<color_fill color = "sldr_playlist_fill" />
				</imagestyle>
			</window>
			<window name="Controls" type="generic" offset="0,-30,0,0" alignment="0,1,1,1">
				<imagestyle name="background">
					<color_fill color = "0xFF404070" alignment="entire" />
					<color_rect color = "0xFF000000" alignment="entire" />
				</imagestyle>

				<window name="txtCount" transparent="true" type="textdisplay" offset="5,2,100,14" >
					<property font_color="0xFFFFFFFF" font_justification="h_center|v_center" />
					<script name="OnInit">
						Playlist.playlist.RegisterCallback("ItemsAdded", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("ItemsRemoved", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("AllItemsRemoved", "UpdateText()", this);
						UpdateText();
					</script>
					<script name="UpdateText"> SetText( Playlist.playlist.GetCount() | " files"); </script>
				</window>
				<window name="txtTotal" transparent="true" type="textdisplay" offset="5,16,100,28" >
					<property font_color="0xFFFFFFFF" font_justification="h_center|v_center" />
					<script name="OnInit">
						Playlist.playlist.RegisterCallback("ItemsAdded", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("ItemsRemoved", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("ItemsUpdated", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("AllItemsRemoved", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("ScanningStarted", "UpdateText()", this);
						Playlist.playlist.RegisterCallback("ScanningFinished", "UpdateText()", this);
						UpdateText();
					</script>
					<script name="UpdateText"> if( Playlist.playlist.IdleScanningIsActive() ) { $str = "scan..."; } else { $str = "total " }; SetText( $str | :sonique.player.GetTotalTimeString( "", Playlist.playlist.Name()) ); </script>
				</window>
				<!-- top row buttons -->
				<window name="RandomizeButton" type="button" offset="105,2,175,14" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.randomize"));
					</script>
					<script name="OnClick">
						Playlist.playlist.RandomizeList();
					</script>
					<Property	hoverhint		= "Randomize the order of the items in the playlist"
							default_delay	= "150"
							text			= "Randomize"
							font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="SortButton" type="button" offset="180,2,225,14" transparent="false" hitstyle="ACTIVE">
					<Property	hoverhint	= "Sort the playlist entries" default_delay = "150" font_color = "0xFFFFFFFF"/>
					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.sort"));
					</script>
					<script name="OnClick">
						:sonique.prefs.CreateSection("sonique/gui/slate/defaultsort"); 
						$origFieldArray = :sonique.prefs.GetStringArray("sonique/gui/slate/defaultsort","Fields");
						$origDirectionArray = :sonique.prefs.GetStringArray("sonique/gui/slate/defaultsort","Directions");
						$ick	= 0;

						if ($origFieldArray.IsArray()) { 
							$ick = $origFieldArray.ArraySize();
							if ($origDirectionArray.IsArray()) {
								if ($ick != $origDirectionArray.ArraySize())	{
									$origDirectionArray = 0;
								}
							}
						}
						else	{
							$origFieldArray = {"artist","album","track","filename"};
							$ick = $origFieldArray.ArraySize();
							$origDirectionArray = 0;
						}

						// for simplicity, assume a max of 6 fields.  this logic is ugly.							
						if ($ick > 5) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]},{$origFieldArray[1],$origDirectionArray[1]},{$origFieldArray[2],$origDirectionArray[2]},{$origFieldArray[3],$origDirectionArray[3]},{$origFieldArray[4],$origDirectionArray[4]},{$origFieldArray[5],$origDirectionArray[5]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]},{$origFieldArray[1]},{$origFieldArray[2]},{$origFieldArray[3]},{$origFieldArray[4]},{$origFieldArray[5]});
							}
						}
						else if ($ick > 4) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]},{$origFieldArray[1],$origDirectionArray[1]},{$origFieldArray[2],$origDirectionArray[2]},{$origFieldArray[3],$origDirectionArray[3]},{$origFieldArray[4],$origDirectionArray[4]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]},{$origFieldArray[1]},{$origFieldArray[2]},{$origFieldArray[3]},{$origFieldArray[4]});
							}
						}
						else if ($ick > 3) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]},{$origFieldArray[1],$origDirectionArray[1]},{$origFieldArray[2],$origDirectionArray[2]},{$origFieldArray[3],$origDirectionArray[3]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]},{$origFieldArray[1]},{$origFieldArray[2]},{$origFieldArray[3]});
							}
						}
						else if ($ick > 2) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]},{$origFieldArray[1],$origDirectionArray[1]},{$origFieldArray[2],$origDirectionArray[2]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]},{$origFieldArray[1]},{$origFieldArray[2]});
							}
						}
						else if ($ick > 1) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]},{$origFieldArray[1],$origDirectionArray[1]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]},{$origFieldArray[1]});
							}
						}
						else if ($ick > 0) {
							if ($origDirectionArray.IsArray()) {
								Playlist.playlist.AdvancedSort({$origFieldArray[0],$origDirectionArray[0]});
							}
							else {
								Playlist.playlist.AdvancedSort({$origFieldArray[0]});
							}
						}
						else {
							// this should never happen
							Playlist.playlist.AdvancedSort({"artist"},{"album"},{"track"},{"filename"});
						}					
					</script>
				</window>
				<window name="ReverseButton" type="button" offset="230,2,285,14" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.reverse"));
					</script>
					<script name="OnClick">
						Playlist.playlist.Reverse();
					</script>
					<Property	hoverhint		= "Reverse the order of the items in the playlist"
								default_delay	= "150"
								text			= "Reverse"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="ClearButton" type="button" offset="290,2,340,14" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.clear"));
					</script>
					<script name="OnClick">
						Playlist.playlist.RemoveAll();
					</script>
					<Property	hoverhint		= "Remove all items from the playlist"
								default_delay	= "150"
								text			= "Clear"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="SetupButton" type="button" offset="345,2,395,14" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.setup"));
					</script>
					<script name="OnClick">
						DisplayWindow("824FFD4E-FB19-43eb-8761-55ED7FF3B590","4");
					</script>
					<Property	hoverhint		= "Setup your playlist preferences"
								default_delay	= "150"
								text			= "setup"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>

				<!-- bottom row buttons -->
				<window name="ScanButton" type="button" offset="105,16,175,28" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						Playlist.playlist.RegisterCallback("IdleScanStarted","OnScanChanged(1)",this);
						Playlist.playlist.RegisterCallback("IdleScanStopped","OnScanChanged(0)",this);
						scanning = Playlist.playlist.CurrentlyIdleScanning();
						UpdateButtonText();
					</script>
					<script name="OnScanChanged">
						scanning = $params[0];
						UpdateButtonText();
					</script>
					<script name="UpdateButtonText">
						if( scanning )
						{
							SetText(:language.Translate("playlistwindow/playlist.stopscan"));
						} else {
							SetText(:language.Translate("playlistwindow/playlist.startscan"));
						}
					</script>
					<script name="OnClick">
						if( scanning )
						{
							Playlist.playlist.StopIdleScan();
						} else {
							Playlist.playlist.StartIdleScan();
						}
					</script>
					<Property	hoverhint		= "Start or stop scanning of information for playlist items"
								default_delay	= "150"
								text			= ""
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
					<imagestyle name="state1">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="LoadButton" type="button" offset="180,16,225,28" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.load"));
					</script>
					<script name="OnClick">
						$name = :sonique.LoadPlaylistFile(Playlist.playlist);
					</script>
					<Property	hoverhint		= "Load a playlist file"
								default_delay	= "150"
								text			= "Load"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="AppendButton" type="button" offset="230,16,285,28" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.append"));
					</script>
					<script name="OnClick">
						$name = :sonique.LoadPlaylistFile(Playlist.playlist, "true");
					</script>
					<Property	hoverhint		= "Append the contents of a playlist file to the playlist"
								default_delay	= "150"
								text			= "Append"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="SaveButton" type="button" offset="290,16,340,28" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.save"));
					</script>
					<script name="OnClick">
						$name = :sonique.SavePlaylistFile(Playlist.playlist);
					</script>
					<Property	hoverhint		= "Save the playlist to a file"
								default_delay	= "150"
								text			= "Save"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
				<window name="HelpButton" type="button" offset="345,16,395,28" transparent="false" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("playlistwindow/playlist.help"));
					</script>
					<script name="OnClick">
						:sonique.LaunchHelp("playlist");
					</script>
					<Property	hoverhint		= "Launch the Playlist Window help"
								default_delay	= "150"
								text			= "help"
								font_color		= "0xFFFFFFFF" />

					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
				</window>
			</window>
		</window>
		<!-- **************** SQ2_Playlist  -  end  -   ***************** -->

		


		<!-- **************** SQ2_OnlineWindow - start -   ***************** -->
		<property name = "SQ2_OnlineWindow"
				_img_background	=""
				rect_borderoffset	="3,1,-3,-1"
		/>
		<window name="SQ2_OnlineWindow" type="Sonique2_MMLDisplay" transparent="true" >
			<property title="OnlineWindow"/>
			<window type="Sonique2_Online" />
		</window>

		<!-- **************** SQ2_OnlineWindow -  end  -   ***************** -->



		<!-- **************** SQ2_Interfaces - start -   ***************** -->
		 <imagestyle name="SQ2_Mood_tab_left_001" transparent="true">
			<color_fill color = "SQ2_Mood_menu_fill_color_001"
					alignment = "0,0,1,1"
					blendmode = "RGB|COPY|ALPHA_SRCALPHA" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,0,1"
					offset	= "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,1,0"
					offset	  = "0,0,0,0" />
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_tab_right_002" transparent="true">
			<color_fill color = "SQ2_Mood_menu_fill_color_002"
					alignment = "0,0,1,1"
					blendmode = "RGB|COPY|ALPHA_SRCALPHA" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,0,1"
					offset	= "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,1,0"
					offset	  = "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "1,0,1,1"
					offset	  = "0,0,0,0" />
		 </imagestyle>

		 <imagestyle name="SQ2_Mood_tab_left_002" transparent="true">
			 <color_fill color = "SQ2_Mood_menu_fill_color_002"
					alignment = "0,0,1,1"
					blendmode = "RGB|COPY|ALPHA_SRCALPHA" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,0,1"
					offset	= "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,1,0"
					offset	  = "0,0,0,0" />
		 </imagestyle>
		 <imagestyle name="SQ2_Mood_tab_right_001" transparent="true">
			 <color_fill color = "SQ2_Mood_menu_fill_color_001"
					alignment = "0,0,1,1"
					blendmode = "RGB|COPY|ALPHA_SRCALPHA" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,0,1"
					offset	= "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "0,0,1,0"
					offset	  = "0,0,0,0" />
			<color_line color = "SQ2_Mood_menu_line_color_001" antialiased = "true"
					alignment = "1,0,1,1"
					offset	  = "-1,0,-1,0" />
		 </imagestyle>
		 <FontStyle name="browser_tab_font" size="10" style="bold" antialias="false"/>
		 <FontStyle name="browser_header_font" size="8" style="italic" antialias="false"/>
		 <FontStyle name="browser_authorurl_font" size="10" style="normal" antialias="false"/>
		 <FontStyle name="browser_title_font" size="12" antialias="true"/>
		 <FontStyle name="browser_launch_font" size="12" style="bold" antialias="true"/>
		 <FontStyle name="normalfont" />
		 <FontStyle name="normalfont_underlined" style="underline,proportional" />		 

		 <property 	name						="SQ2_InterfacesWindow"
					img_background				="transparent"
					rect_borderoffset				="3,1,-3,-1"

					min_tab_height					="14"
					font_tab						="browser_tab_font"
					font_tab_justification			="h_center|v_center|single_line_only|trim_chars_w_ellipses"
					rect_tabtext_offsets			="2,2,-2,-2"
					img_all_tab					="SQ2_Mood_tab_left_001"
					font_all_tab_color				="SQ2_Mood_menu_text_color_001"
					img_all_tab_selected			="SQ2_Mood_tab_left_002"
					font_all_tab_color_selected		="SQ2_Mood_menu_text_color_002"
					img_skins_tab					="SQ2_Mood_tab_left_001"
					font_skins_tab_color			="SQ2_Mood_menu_text_color_001"
					img_skins_tab_selected			="SQ2_Mood_tab_left_002"
					font_skins_tab_color_selected		="SQ2_Mood_menu_text_color_002"
					img_remotes_tab				="SQ2_Mood_tab_right_001"
					font_remotes_tab_color			="SQ2_Mood_menu_text_color_001"
					img_remotes_tab_selected			="SQ2_Mood_tab_right_002"
					font_remotes_tab_color_selected	="SQ2_Mood_menu_text_color_002"

					img_content_background			="transparent"
					img_column					="blackborder"

					header_height					="12"
					font_header					="browser_header_font"
					font_header_justification		="left|v_center|single_line_only|trim_chars_w_ellipses"
					rect_headertext_offsets			="3,1,-3,-1"
					font_skin_header_color			="0xFF000000"
					img_skin_header				="pumpkinfillblackborder"
					_img_skin_header_first			=""
					_img_skin_header_last			=""
					_img_skin_header_even			=""
					_img_skin_header_last_even		=""
					font_remote_header_color			="0xFF000000"
					img_remote_header				="orangefillblackborder"
					_img_remote_header_first			=""
					_img_remote_header_last			=""
					_img_remote_header_even			=""
					_img_remote_header_last_even		=""

					title_height					="20" 
					rect_titletext_offsets			="3,1,-3,-1"
					font_title					="browser_title_font"
					font_title_justification			="left|v_center|single_line_only|trim_chars_w_ellipses"
					font_skin_title_color			="0xFFFF8800"
					img_skin_title					="bluefillblackborder"
					font_remote_title_color			="0xFFFF952A"
					img_remote_title				="bluefillblackborder"

					thumb_height					="120" 
					thumb_border_height				="20"
					thumb_border_width				="20"

					launch_height					="20"
					rect_launchtext_offsets			="3,1,-3,-1"
					font_launch					="browser_launch_font"
					font_launch_justification		="left|v_center|single_line_only|trim_chars_w_ellipses"
					font_skin_launch_color			="0xFFFF8800"
					img_skin_launch				="bluefillblackborder"
					font_remote_launch_color			="0xFFFF952A"
					img_remote_launch				="bluefillblackborder"

					author_height					="14"
					rect_authortext_offsets			="3,1,-3,-1"
					font_author					="browser_authorurl_font"
					font_author_justification		="left|v_center|single_line_only|trim_chars_w_ellipses"
					font_skin_author_color			="0xFFFFFFFF"
					img_skin_author				="transparent"
					font_remote_author_color			="0xFFFFFFFF"
					img_remote_author				="transparent"

					url_height					="14"
					rect_urltext_offsets			="3,1,-3,-1"
					font_url_justification			="left|v_center|single_line_only|trim_chars_w_ellipses"
					font_url						="browser_authorurl_font"
					font_skin_url_color				="0xFFFFFFFF"
					img_skin_url					="transparent"
					font_remote_url_color			="0xFFFFFFFF"
					img_remote_url					="transparent"

					rect_nothumb_text_offsets		="3,1,-3,-1"
					font_nothumb_justification		="h_center|v_center"
					font_nothumb					="normalfont"
					font_skin_nothumb_color			="0xFFFFFF00"
					img_skin_nothumb				="bluefillblackborder"
					font_remote_nothumb_color		="0xFFFFFF00"
					img_remote_nothumb				="bluefillblackborder"
		 >
		</property>
		
		<window name="SQ2_InterfacesWindow" type="Sonique2_MMLDisplay" transparent="true" >
			<property title="InterfacesBrowser"/>
			<window type="Sonique2_Interfaces"/>
		</window>

		<!-- **************** SQ2_Interfaces -  end  -   ***************** -->




		<!-- **************** VisViewerVisWindow  -  start  -   ***************** -->
		<FontStyle name="vis_headerfont" size="+3" style="bold" />

		<!-- jmctodo change this to follow the standard options above:
		<window name="SQ2_Playlist" type="Sonique2_MMLDisplay" transparent="true"  >
			<property title="Playlist"/>
			<window name="Playlist" type="Sonique2_Playlist" offset="0,0,0,-38" alignment="entire">
		-->
		<window name="VisViewerVisWindow" alignment="entire" >
			<script name="OnInit">
				// jmctodo - there is a bug where registering the script to the vis window grabs a reference that
				// isn't released with the OnDestroy.  causing mayhem when sonique2 tries to shut down.  for now, 
				// just don't use the vis window as the script context.  use its' parent.
				// to repro the bug:  ...( next, "ClickPrev();", VisViewerVisWindow.dummyvis.vis );

				$section = "sonique/gui/slate/hotkeys";
				:sonique.prefs.CreateSection($section);
				next = :sonique.prefs.GetString($section, "nextvis");
				prev = :sonique.prefs.GetString($section, "prevvis");
				if (next) { :app.RegisterGlobalKeyScript( next, "vis.ClickNext();", VisViewerVisWindow.dummyvis ); }
				if (prev) { :app.RegisterGlobalKeyScript( prev, "vis.ClickPrev();", VisViewerVisWindow.dummyvis ); }
			</script>
			<script name="OnDestroy">
				if (next) { :app.UnregisterGlobalKeyScript( next, "vis.ClickNext();", VisViewerVisWindow.dummyvis ); next = 0; }
				if (prev) { :app.UnregisterGlobalKeyScript( prev, "vis.ClickPrev();", VisViewerVisWindow.dummyvis ); prev = 0; }
			</script>
			<window name="dummyvis" alignment="entire" offset="1,1,-1,-1" hitstyle="ACTIVE" >
				<script name="OnMouseOver" >
					vis.vispopup.SetOffset({0,0,0,16},0,300,"linear_decel");
				</script>
				<script name="OnMouseExit" >
					vis.vispopup.SetOffset({0,-16,0,0},1500,300,"linear_accel");
				</script>

				<window name="vis" type="Sonique2_Visual" alignment="entire" hitstyle="ACTIVE">
					<property group="default" />
					<script name="UpdateBar" >
						$cur = GetVisual();
						if( $cur ) { vispopup.curvistext.SetText( :sonique.visuals.GetVisualInfo( $cur )["description"] ); }
					</script>
					<script name="ClickPrev" >
						PrevVisual();
						UpdateBar();
					</script>
					<script name="ClickNext">
						NextVisual();
						UpdateBar();
					</script>
					<script name="OnInit">
						vispopup.SetOffset({0,-16,0,0},1500,300,"linear_accel");
						UpdateBar();

						// bitsnote - this should maybe be set by the visual group preferences aswell
						SetDesiredFPS(45);
					</script>
					<window name="vispopup" alignment="0,0,1,0" offset="0,0,0,16" transparent="true" >
						<imagestyle name="background">
							<color_fill alignment="entire" color="0xFFFFFFFF"				   blendmode="COLORIZE" />
							<color_fill alignment="entire" color="SQ2_Mood_menu_fill_color_001" opacity = ".5" />
						</imagestyle>
						<window type="button" name="prev" alignment="1,0,1,1" offset="-28,0,-14,0" transparent="true" hitstyle="ACTIVE" >
							<property hoverhint="Previous visual"/>
							<imagestyle name="state0" > <include source="arrow_left" /> </imagestyle>
							<script name="OnClick" > ClickPrev(); </script>
						</window>
						<window type="button" name="next" alignment="1,0,1,1" offset="-14,0,0,0" transparent="true" hitstyle="ACTIVE" >
							<property hoverhint="Next visual"/>
							<imagestyle name="state0" > <include source="arrow_right" /> </imagestyle>
							<script name="OnClick" > ClickNext(); </script>
						</window>
						<window name="curvistext" type="textdisplay" alignment="0,0,1,1" offset="0,0,-28,0" transparent="true" >
							<property	hoverhint			="Current visual's name"
								font_color			="SQ2_Mood_text_color_001"							
								font_style			="vis_headerfont"
								scroll_mode			="horizontal"
								scroll_speed		="25"
								text_offset			="5,1,-5,-1"
								whitespace			="20"
							/>
						</window>
					</window>
					<window name="border" alignment="entire" transparent="true" hitstyle="bh" >
						<hitstyle name="bh" >
							<hitcode type="ACTIVE" >
								<shape> 
									<shape_rect offset="0,0,-28,16"  alignment="0,0,1,0" /> 
									<shape_rect offset="-20,-20,0,0" alignment="1,1,1,1" /> 
								</shape>
							</hitcode>
						</hitstyle>

						<script name="OnLeftButtonDown">
							$cursize = GetSize();

							// size if you click the lower rightt
							if( $params[0][0] &gt; $cursize[0] - 20 and $params[0][1] &gt; $cursize[1] - 20 )
							{
								VisViewerVisWindow.StartSize( "BOTTOMRIGHT", $params[0], "MBUTTON_LEFT" );
							}
							// move if you click the top area
							else //if( $params[0][1] &lt;= 16 ) 
							{
								VisViewerVisWindow.StartDrag( "DRAG", $params[0], "MBUTTON_LEFT" );
							}
						</script>

						<imagestyle name="background" >
							<color_rect alignment="entire" color="0xFF93D6FF" blendmode="COPY|RGB" />
						</imagestyle>
					</window>
				</window>
			</window>
		</window>
		<!-- **************** VisViewerVisWindow  -  end  -   ***************** -->

		<!-- start SQ2_SettingsPopup -->
		<?macroins popup_window popup_name="SQ2_SettingsPopup" 
			default_size="485,365" min_size="400,200"
			popup_title_script="SetWindowTitle(:language.Translate("topmenu/view.setup"),true);"
			window_title_script="SetText(:language.Translate("topmenu/view.setup"));"
			help_hint_script="SetHoverHint(:language.Translate("general/hint.help")); // todo settings"
			help_script=":sonique.LaunchHelp(); // todo settings"
			oninit_script=""
			ondestroy_script=""
			onvisualchanged_script=""
			local_status_only="true"
			?> 
			<script name="SetTheme">
				theme = :sonique.prefs.GetString("misc", "theme");
				// all popups need these:
				SetMenuProperty("theme" | theme | "_popupmenu");
				background_window.SetImageStyle("background","theme" | theme);
				title_window.SetImageStyle("background","theme" | theme);
				status_display_window.SetImageStyle("background","theme" | theme);
			</script>
			<window name="container" transparent="true" offset="25,35,-20,-35" alignment="0,0,1,1" >
				<window name="settings_screen" type="Sonique2_Settings" transparent="true"/>
			</window>
		</window>
		<!-- end SQ2_SettingsPopup -->

		<!-- start SQ2_ID3EditPopup -->
		<?macroins popup_window popup_name="SQ2_ID3EditPopup" 
			default_size="446,225" min_size="446,225"
			popup_title_script="SetWindowTitle(:language.Translate("tagedit/dialog.title"),true);"
			window_title_script="SetText(:language.Translate("tagedit/dialog.title"));"
			help_hint_script="SetHoverHint(:language.Translate("general/hint.help")); // todo id3"
			help_script=":sonique.LaunchHelp(); // todo id3"
			oninit_script="g_path=""; :app.RegisterWindowKeyScript( "tab", "OnTab();", id3edit_screen );"
			ondestroy_script=":app.UnregisterWindowKeyScript( "tab", "OnTab();", id3edit_screen );"
			onvisualchanged_script=""
			local_status_only="true"
			?> 
			<script name="SetTheme">
				theme = :sonique.prefs.GetString("misc", "theme");
				// all popups need these:
				SetMenuProperty("theme" | theme | "_popupmenu");
				background_window.SetImageStyle("background","theme" | theme);
				title_window.SetImageStyle("background","theme" | theme);
				status_display_window.SetImageStyle("background","theme" | theme);

				id3edit_screen.BrowseButton.SetImageStyle("state0", "theme" | theme | "_state0");
				id3edit_screen.save.SetImageStyle("state0", "theme" | theme | "_state0");
				id3edit_screen.cancel.SetImageStyle("state0", "theme" | theme | "_state0");
				id3edit_screen.wipe.SetImageStyle("state0", "theme" | theme | "_state0");
				id3edit_screen.reload.SetImageStyle("state0", "theme" | theme | "_state0");
				id3edit_screen.pathEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.pathEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.path_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.titleEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.titleEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.title_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.artistEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.artistEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.artist_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.yearEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.yearEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.year_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.albumEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.albumEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.album_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.trackEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.trackEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.track_Title.SetImageStyle("background", "theme" | theme);
				id3edit_screen.genreEdit.SetImageStyle("background_active", "theme" | theme);
				id3edit_screen.genreEdit.SetImageStyle("background_inactive", "theme" | theme);
				id3edit_screen.genre_Title.SetImageStyle("background", "theme" | theme);
			</script>
			<window name="id3edit_screen" transparent="true" offset="25,35,-20,-35" alignment="0,0,1,1" >
				<script name="OnInit">
					:sonique.ID3Editor.RegisterCallback("SetSucceeded", "SetSucceeded();", this);
					:sonique.ID3Editor.RegisterCallback("SetFailed", "SetFailed($params[1])", this);
					:sonique.ID3Editor.RegisterCallback("GetSucceeded", "GetSucceeded($params[1]);", this);
					:sonique.ID3Editor.RegisterCallback("GetFailed", "GetFailed($params[1]);", this);
					$path = :sonique.ID3Editor.path;
					if ($path) {
						pathEdit.SetText($path);
						artistEdit.SetInputFocus();
						reload.OnClick();
					} else {
						pathEdit.SetInputFocus();
					}
				</script>
				<script name="OnDestroy">
					:sonique.ID3Editor.UnregisterCallback("SetSucceeded", this);
					:sonique.ID3Editor.UnregisterCallback("SetFailed", this);

					:sonique.ID3Editor.UnregisterCallback("GetSucceeded", this);
					:sonique.ID3Editor.UnregisterCallback("GetFailed", this);
				</script>
				<script name="OnTab"> 
					if (pathEdit.HasInputFocus()) { artistEdit.SetInputFocus() }
					else if (artistEdit.HasInputFocus()) { titleEdit.SetInputFocus() }
					else if (titleEdit.HasInputFocus()) { albumEdit.SetInputFocus() }
					else if (albumEdit.HasInputFocus()) { yearEdit.SetInputFocus() }
					else if (yearEdit.HasInputFocus()) { trackEdit.SetInputFocus() }
					else if (trackEdit.HasInputFocus()) { genreEdit.SetInputFocus() }
					else if (genreEdit.HasInputFocus()) { pathEdit.SetInputFocus() }
				</script>
				<script name="ClearFields">
					artistEdit.SetText("");
					titleEdit.SetText("");
					albumEdit.SetText("");
					trackEdit.SetText("");
					genreEdit.SetText("");
					yearEdit.SetText("");
				</script>			
				<script name="MyDisable">
					Disable();
					pathEdit.Disable();
					artistEdit.Disable();
					titleEdit.Disable();
					albumEdit.Disable();
					trackEdit.Disable();
					genreEdit.Disable();
					yearEdit.Disable();
				</script>			
				<script name="MyEnable">
					Enable();
					pathEdit.Enable();
					artistEdit.Enable();
					titleEdit.Enable();
					albumEdit.Enable();
					trackEdit.Enable();
					genreEdit.Enable();
					yearEdit.Enable();
				</script>			
				<script name="SetSucceeded">
					:sonique.LocalStatus("Tags have been updated!", "info", status_display_window); 
					MyEnable();
					foreach ( $pl in :sonique.playlists.GetPlaylistList() ) 
					{
						if (g_path != "") {
							:sonique.playlists.GetPlaylist($pl).ScanFile(g_path,"quick");
						}
					}
				</script>
				<script name="SetFailed">
					:sonique.LocalStatus("Failed to save tags: " | $params[0], "error", status_display_window);
					MyEnable(); 
				</script
				<script name="GetSucceeded">
					ClearFields();
					MyEnable();

					$tags = $params[0];
					if ($tags.IsArray())
					{	
						:sonique.LocalStatus("Tags retreived.", "info", status_display_window);
						$val = $tags["artist"];
						if ($val)	{ artistEdit.SetText($val); }
						else { artistEdit.SetText(""); }

						$val = $tags["title"];
						if ($val)	{ titleEdit.SetText($val); }
						else { titleEdit.SetText(""); }

						$val = $tags["album"];
						if ($val)	{ albumEdit.SetText($val); }
						else { albumEdit.SetText(""); }

						$val = $tags["track"];
						if ($val)	{ trackEdit.SetText($val); }
						else { trackEdit.SetText(""); }

						$val = $tags["genre"];
						if ($val)	{ genreEdit.SetText($val); }
						else { genreEdit.SetText(""); }

						$val = $tags["year"];
						if ($val)	{ yearEdit.SetText($val); }
						else { yearEdit.SetText(""); }
					}
					else {	
						:sonique.LocalStatus("The file contained no tags.", "info", status_display_window);
					}
				</script>
				<script name="GetFailed">
					:sonique.LocalStatus("Failed to retreive tags: " | $params[0], "error", status_display_window);
					MyEnable(); 
				</script>

				<window name="BrowseButton" type="button" offset="-85,0,0,16" alignment="1,0,1,0" transparent="true" hitstyle="ACTIVE">
					<script name="OnInit">
						SetText(:language.Translate("tagedit/button.browse"));
						SetHoverHint(:language.Translate("tagedit/hint.browse"));
					</script>
					<script name="OnClick">
						$path = :sonique.BrowseForFiles("Select an MP3 file...", false, "*.mp3;*.mpa;*.mp2;*.mp1", "MPEG Audio Files (*.mp3, *.mpa, *.mp2, *.mp1)");
						if( $path ) { 
							ClearFields();
							pathEdit.SetText($path[0]); 
							reload.OnClick();
						}
					</script>
					<property	default_delay="150" text="Browse" font_style="my_font_10" font_color="color3" />
					<imagestyle name="state0"> 
						<color_fill color="color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect cornerradius="3.0" color="color2" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme1_state0"> 
						<color_fill color="theme1_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme1_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme2_state0"> 
						<color_fill color="theme2_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme2_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme3_state0"> 
						<color_fill color="theme3_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme3_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme4_state0"> 
						<color_fill color="theme4_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme4_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme5_state0"> 
						<color_fill color="theme5_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme5_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme6_state0"> 
						<color_fill color="theme6_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme6_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme7_state0"> 
						<color_fill color="theme7_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme7_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme8_state0"> 
						<color_fill color="theme8_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme8_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme9_state0"> 
						<color_fill color="theme9_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme9_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme10_state0"> 
						<color_fill color="theme10_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme10_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
				</window>

				<!-- fields -->
				<?macroins tag_edit_row name="path" title_offset="0,0,60,16" title_alignment="0,0,0,0" edit_offset="60,0,-90,16" edit_alignment="0,0,1,0" ?>
				<?macroins tag_edit_row name="title" title_offset="0,30,60,46" title_alignment="0,0,0,0" edit_offset="60,30,0,46" edit_alignment="0,0,1,0" ?>
				<?macroins tag_edit_row name="artist" title_offset="0,50,60,66" title_alignment="0,0,0,0" edit_offset="60,50,-102,66" edit_alignment="0,0,1,0" ?>
				<?macroins tag_edit_row name="year" title_offset="-100,50,-60,66" title_alignment="1,0,1,0" edit_offset="-60,50,0,66" edit_alignment="1,0,1,0" ?>
				<?macroins tag_edit_row name="album" title_offset="0,70,60,86" title_alignment="0,0,0,0" edit_offset="60,70,-102,86" edit_alignment="0,0,1,0" ?>
				<?macroins tag_edit_row name="track" title_offset="-100,70,-60,86" title_alignment="1,0,1,0" edit_offset="-60,70,0,86" edit_alignment="1,0,1,0" ?>
				<?macroins tag_edit_row name="genre" title_offset="0,90,60,106" title_alignment="0,0,0,0" edit_offset="60,90,-90,106" edit_alignment="0,0,1,0" ?>

				<!-- check boxes -->
				<window name="stripoldtagsCheck" type="DlgCheckBox" offset="0,110,110,125" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
					<script name="OnInit"> 
						SetButtonState(0);
						SetText(:language.Translate("tagedit/label.stripoldtags"));
						SetHoverHint(:language.Translate("tagedit/hint.stripoldtags")); 
					</script>
				</window>
				<window name="unicodeCheck" type="DlgCheckBox" offset="135,110,240,125" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
					<script name="OnInit"> 
						SetButtonState(0);
						SetText(:language.Translate("tagedit/label.unicode")); 
						SetHoverHint(:language.Translate("tagedit/hint.unicode")); 
					</script>
					<script name="OnClick"> 
						if (GetButtonState()) { id3v1Check.SetButtonState(0); }				
					</script>
				</window>
				<window name="id3v1Check" type="DlgCheckBox" offset="280,110,340,125" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
					<script name="OnInit"> 
						SetButtonState(1);
						SetText(:language.Translate("tagedit/label.id3v1")); 
						SetHoverHint(:language.Translate("tagedit/hint.id3v1")); 
					</script>
					<script name="OnClick"> 
						 if (GetButtonState()) { unicodeCheck.SetButtonState(0); } 			
					</script>
				</window>

				<window  name="save" type="button" transparent="true" alignment="0,0,0,0" offset="0,130,90,146" hitstyle="ACTIVE">
					<property	default_delay="150" font_style="my_font_10" text="Save Tags" font_color="0xFFFFFFFF" />
					<imagestyle name="state0"> 
						<color_fill color="color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect cornerradius="3.0" color="color2" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme1_state0"> 
						<color_fill color="theme1_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme1_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme2_state0"> 
						<color_fill color="theme2_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme2_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme3_state0"> 
						<color_fill color="theme3_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme3_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme4_state0"> 
						<color_fill color="theme4_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme4_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme5_state0"> 
						<color_fill color="theme5_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme5_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme6_state0"> 
						<color_fill color="theme6_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme6_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme7_state0"> 
						<color_fill color="theme7_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme7_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme8_state0"> 
						<color_fill color="theme8_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme8_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme9_state0"> 
						<color_fill color="theme9_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme9_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>
					<imagestyle name="theme10_state0"> 
						<color_fill color="theme10_color2" opacity="0.25" alignment="0,0,1,1" blendmode="ps_normal"/>
						<color_rect color="theme10_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/>
					</imagestyle>	
					<property	default_delay = "150" text = "Save Tags" font_color = "0xFFFFFFFF" />
					<script name="OnInit">
						SetText(:language.Translate("tagedit/button.save"));
						SetHoverHint(:language.Translate("tagedit/hint.save"));
					</script>
					<script name="OnClick"> 
						id3edit_screen.MyDisable();
						g_path  = pathEdit.GetText();
						if( g_path ) 
						{	
							:sonique.LocalStatus("Writing tags, please wait...", "info", status_display_window);

							// hack jmctodo
							$tags = { junk: "junk" };

							$temp = artistEdit.GetText();
							if ($temp) { $tags = $tags | { artist: $temp }; }

							$temp = titleEdit.GetText();
							if ($temp) { $tags = $tags | { title: $temp }; }

							$temp = albumEdit.GetText();
							if ($temp) { $tags = $tags | { album: $temp }; }

							$temp = trackEdit.GetText();
							if ($temp) { $tags = $tags | { track: $temp }; }

							$temp = genreEdit.GetText();
							if ($temp) { $tags = $tags | { genre: $temp }; }

							$temp = yearEdit.GetText();
							if ($temp) { $tags = $tags | { year: $temp }; }

							$ret = :sonique.ID3Editor.SetTags(g_path,stripoldtagsCheck.GetButtonState(),unicodeCheck.GetButtonState(),id3v1Check.GetButtonState(),$tags); 

							if (!$ret) { 
								id3edit_screen.MyEnable();
								:sonique.LocalStatus("Failed to set tags! Is file read only or in use?", "error", status_display_window); 
							}
						} else {
							id3edit_screen.MyEnable();
							:sonique.LocalStatus("Failed to set tags! Please select a file!", "error", status_display_window); 
						}
					</script>
				</window>

				<window name="reload" type="button" transparent="true" alignment="1,0,1,0" offset="-290,130,-190,146" hitstyle="ACTIVE">
					<imagestyle name="state0"><color_rect color="color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme1_state0"><color_rect color="theme1_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme2_state0"><color_rect color="theme2_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme3_state0"><color_rect color="theme3_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme4_state0"><color_rect color="theme4_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme5_state0"><color_rect color="theme5_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme6_state0"><color_rect color="theme6_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme7_state0"><color_rect color="theme7_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme8_state0"><color_rect color="theme8_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme9_state0"><color_rect color="theme9_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme10_state0"><color_rect color="theme10_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<property	default_delay = "150" font_style="my_font_10" text = "Reload Tags" font_color = "0xFFFFFFFF" />
					<script name="OnInit">
						SetText(:language.Translate("tagedit/button.reload"));
						SetHoverHint(:language.Translate("tagedit/hint.reload"));
					</script>
					<script name="OnClick">
						id3edit_screen.ClearFields();
						$path  = pathEdit.GetText();
						if( $path ) {
							id3edit_screen.MyDisable();
							:sonique.LocalStatus("Fetching tags, please wait...", "info", status_display_window);
							:sonique.ID3Editor.GetTags($path);
						} else {
							:sonique.LocalStatus("Failed to fetched tags! Please select a file!", "error", status_display_window);
						}
					</script>
				</window>

				<window name="wipe" type="button" transparent="true" alignment="1,0,1,0" offset="-188,130,-90,146" hitstyle="ACTIVE">
					<imagestyle name="state0"><color_rect color="color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme1_state0"><color_rect color="theme1_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme2_state0"><color_rect color="theme2_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme3_state0"><color_rect color="theme3_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme4_state0"><color_rect color="theme4_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme5_state0"><color_rect color="theme5_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme6_state0"><color_rect color="theme6_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme7_state0"><color_rect color="theme7_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme8_state0"><color_rect color="theme8_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme9_state0"><color_rect color="theme9_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme10_state0"><color_rect color="theme10_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<property	default_delay = "150" font_style="my_font_10" text = "Wipe Tags" font_color = "0xFFFFFFFF" />
					<script name="OnInit">
						SetText(:language.Translate("tagedit/button.wipe"));
						SetHoverHint(:language.Translate("tagedit/hint.wipe"));
					</script>
					<script name="OnClick"> 
						id3edit_screen.MyDisable();
						g_path  = pathEdit.GetText();
						if( g_path ) 
						{
							:sonique.LocalStatus("Wiping tags, please wait...", "info", status_display_window);
							$ret = :sonique.ID3Editor.SetTags(g_path,1,stripoldtagsCheck.GetButtonState(),id3v1Check.GetButtonState()); 

							if (!$ret) {
								:sonique.LocalStatus("Failed to wipe tags! Is file read-only or in use?", "error", status_display_window);
								id3edit_screen.MyEnable();
							}
						} else {
							:sonique.LocalStatus("Failed to wipe tags! Please select a file!", "error", status_display_window);
							id3edit_screen.MyEnable();
							id3edit_screen.ClearFields();
						}
					</script>
				</window>
				<window name="cancel" type="button" transparent="true" alignment="1,0,1,0" offset="-88,130,0,146" hitstyle="ACTIVE">
					<imagestyle name="state0"><color_rect color="color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme1_state0"><color_rect color="theme1_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme2_state0"><color_rect color="theme2_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme3_state0"><color_rect color="theme3_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme4_state0"><color_rect color="theme4_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme5_state0"><color_rect color="theme5_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme6_state0"><color_rect color="theme6_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme7_state0"><color_rect color="theme7_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme8_state0"><color_rect color="theme8_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme9_state0"><color_rect color="theme9_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<imagestyle name="theme10_state0"><color_rect color="theme10_color2" cornerradius="3.0" alignment="0,0,1,1" blendmode="ps_normal"/></imagestyle>
					<property	default_delay = "150" font_style="my_font_10" text = "Cancel" font_color = "color3" />
					<script name="OnInit">
						SetText(:language.Translate("settings/generic.cancel"));
						SetHoverHint(:language.Translate("tagedit/hint.cancel"));
					</script>
					<script name="OnClick"> parent.parent.DestroyWindow(); </script>
				</window>
			</window>

			<window name="warning" transparent="true" type="textdisplay" alignment="0,1,1,1" offset="0,-40,0,-26" >
				<property font_color="0xFFFF0000" font_justification="h_center|v_center|single_line_only"/>
				<imagestyle name="background"> 
					<color_fill color="color3" opacity="0.75" alignment="0,0,1,1" blendmode="ps_normal"/>
				</imagestyle>
				<script name="OnInit">SetText("Beta Warning - back up important files before editing them.");</script>
			</window>
		</window>

		<!-- end SQ2_ID3EditPopup -->

		<!-- start  -->
		<?macroins popup_window popup_name="SQ2_InterfaceBrowserPopup" 
			default_size="485,265" min_size="302,100"
			popup_title_script="SetWindowTitle(:language.Translate("topmenu/file.interfacebrowser"),true);"
			window_title_script="SetText(:language.Translate("topmenu/file.interfacebrowser"));"
			help_hint_script="SetHoverHint(:language.Translate("general/hint.help")); // todo interface browser"
			help_script=":sonique.LaunchHelp(); // todo interface browser"
			oninit_script=""
			ondestroy_script=""
			onvisualchanged_script=""
			local_status_only="true"
			?> 
			<script name="SetTheme">
				theme = :sonique.prefs.GetString("misc", "theme");
				SetMenuProperty("theme" | theme | "_popupmenu");
				background_window.SetImageStyle("background","theme" | theme);
				title_window.SetImageStyle("background","theme" | theme);
				status_display_window.SetImageStyle("background","theme" | theme);
			</script>
			<window name="container" transparent="true" offset="25,35,-20,-35" alignment="0,0,1,1" >
				<window name="interfaces_browser" type="Sonique2_Interfaces" transparent="true"/>
			</window>
		</window>
		<!-- end SQ2_InterfaceBrowserPopup -->


	</interface>

	<interface unique_name="teamsonique/default_sonique2_globalinit/1.0" >
		<script name="SoniqueAppInit">
		
		// misc /////////////////////////////////////////////////
			:sonique.prefs.CreateSection("misc");
			if( :sonique.prefs.GetString("misc", "radialknobs") )
			{
				:sonique.SetKnobRadialControl( "true" );
			} else {
				:sonique.SetKnobRadialControl( "false" );
			}
			$val = :sonique.prefs.GetString("misc", "knobsensitivity");
			if( $val )
			{
				:sonique.SetKnobSensitivity( $val );
			} else {
				:sonique.prefs.SetString("misc", "knobsensitivity", :sonique.GetKnobSensitivity());
			}
			:sonique.prefs.PrepString("misc", "dithering", "true");
			if( :sonique.prefs.GetString("misc", "dithering") )
			{
				:sonique.EnableDithering( "true" );
			} else {
				:sonique.EnableDithering( "false" );
			}
			// jmctodo - revisit this at a later date.
			:sonique.prefs.CreateSection("sonique/gui/visuals/groups/default");
			:sonique.prefs.PrepString("sonique/gui/visuals/groups/default", "PostEffects", "10B82A0E-1B28-4F4E-AF53-145248A73AB5");

			// mute /////////////////////////////////////////////////
			:app.mutevol = 0.0;

			// Theme - for use by the default popups
			:sonique.prefs.PrepString("misc", "theme", "1");

		// EQ presets //////////////////////////////////////////
			:sonique.prefs.CreateSection("eqpresets");

			// Rock'n'Roll
			$presets = { "rock" };
			$eqsection = "eqpresets/rock";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Rock"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0.232880","0.424660","0.260270","0.150680","0.131710","0.170730","0.180490","0.131710","0.053660","-0.041000","-0.369860","-0.232880","-0.043900","-0.043900","-0.043900","0.034150","0.102440","0.205480","0.342470","0.180490"});

			// Cars Go Boom
			$presets = $presets | {"carsgoboom"};
			$eqsection = "eqpresets/carsgoboom";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Cars Go Boom"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0.315070","0.671230","0.369860","0.287670","0.205480","0","0","0","0","0","-0.068490","-0.232880","-0.260270","-0.232880","-0.095890","0.013600","-0.013600","0.150680","0.287670","0.013600"});

			// Dance and HipHop
			$eqsection = "eqpresets/dancehiphop";
			$presets = $presets | {"dancehiphop"};
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Dance and HipHop"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0.589040","0.479450","0.068490","0.013600","0.013600","0.013600","0","0","-0.013600","-0.013600","-0.013600","0.041000","-0.150680","-0.260270","-0.287670","-0.232880","-0.342470","-0.287670","0"});

			// Jazz
			$eqsection = "eqpresets/jazz";
			$presets = $presets | {"jazz"};
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Jazz"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","-0.205480","-0.232880","-0.041000","0","0","0.013600","-0.123290","-0.397260","-0.178080","0.041000","0.041000","0","0","0.013600","0.013600"});

			// Party Upstairs
			$eqsection = "eqpresets/partyupstairs";
			$presets = $presets | {"partyupstairs"};
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Party Upstairs"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0.123290","0.315070","0.506850","0.452050","0.342470","0.506850","0.178080","-0.150680","-0.315070","-0.479450","-0.287670","-0.698630","-0.863010","-1.000000","-1.000000","-1.000000","-0.972600","-0.972600","-1.000000","-1.000000"});

			// Top 40 Radio
			$eqsection = "eqpresets/top40";
			$presets = $presets | {"top40"};
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Top 40 Radio"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0.178080","0.287670","0.369860","0.369860","0.287670","0.205480","0.013600","0","0","-0.095890","-0.205480","-0.260270","-0.315070","-0.342470","-0.287670","-0.232880","-0.095890","0.013600","0.205480","0.424660"});

			// Stoner V
			$presets = $presets | {"stonerV"};
			$eqsection = "eqpresets/stonerV";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Stoner V"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0.397260","1.000000","0.671230","0.424660","0.205480","0.041000","-0.123290","-0.315070","-0.479450","-0.616440","-0.780820","-0.616440","-0.424660","-0.205480","-0.013600","0.123290","0.287670","0.424660","0.561640","0.671230"});

			// classical
			$presets = $presets | {"classical"};
			$eqsection = "eqpresets/classical";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Classical"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"-0.561640","0","0","0","0","0","0","0","0","0","0","0","0","0.013600","-0.205480","-0.260270","-0.369860","-0.342470","-0.342470","-0.369860"});

			// headphones
			$presets = $presets | {"headphones"};
			$eqsection = "eqpresets/headphones";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Headphones"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"-0.041000","0.232880","0.232880","0.369860","0.287670","0","0","0","-0.260270","0","0","0","0","0.041000","0.068490","0.123290","0.178080","0.452050","0.150680","0.205480"});

			// telephone
			$presets = $presets | {"telephone"};
			$eqsection = "eqpresets/telephone";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Telephone"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"-1.000000","-1.000000","-1.000000","-1.000000","-1.000000","-1.000000","-1.000000","-1.000000","-1.000000","-0.506850","-0.342470","-0.205480","-0.041000","0.287670","0.698630","0.150680","-0.013600","-0.616440","-0.917810","-1.000000"});

			// voice
			$presets = $presets | {"voice"};
			$eqsection = "eqpresets/voice";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "Voice"); 
			//:sonique.prefs.PrepString($eqsection, "NumBands", "20"); 
			//:sonique.prefs.SetStringArray($eqsection, "BandWidth", {"93.233643","62.155762","82.874352","110.499138","147.332184","196.442902","261.923859","349.231812","465.642395","620.856506","827.808655","1103.744873","1471.659912","1962.213135","2616.284170","3488.378906","4651.171875","6201.562500","8268.750000","11025.000000"});
			//:sonique.prefs.SetStringArray($eqsection, "Frequency", {"46.616821","93.233643","124.311527","165.748707","220.998276","294.664352","392.885788","523.847717","698.463593","931.284750","1241.712982","1655.617300","2207.489868","2943.319702","3924.426260","5232.568359","6976.757813","9302.343750","12403.125000","16537.500000"});
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0.260270","0","-0.123290","-0.506850","-0.534250","0","0","0","0","0","0.013600","0.260270","0.315070","0.479450","0.397260","0","0","0"});

			// user presets
			$presets = $presets | {"user1"};
			$eqsection = "eqpresets/user1";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "User1"); 
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
			$presets = $presets | {"user2"};
			$eqsection = "eqpresets/user2";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "User2"); 
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
			$presets = $presets | {"user3"};
			$eqsection = "eqpresets/user3";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "User3"); 
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
			$presets = $presets | {"user4"};
			$eqsection = "eqpresets/user4";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "User4"); 
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
			$presets = $presets | {"user5"};
			$eqsection = "eqpresets/user5";
			:sonique.prefs.CreateSection($eqsection);
			:sonique.prefs.PrepString($eqsection, "Name", "User5"); 
			:sonique.prefs.SetStringArray($eqsection, "Gain", {"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});

			:sonique.prefs.SetStringArray("eqpresets", "Names", $presets); 

		// hotkeys /////////////////////////////////////////////////
			$section = "sonique/gui/slate/hotkeys";
			:sonique.prefs.CreateSection($section); 

			// enabled?
			:sonique.prefs.PrepString($section, "enabled", "true"); 
			$enabled = :sonique.prefs.GetString($section, "enabled");
			if ($enabled == "false") { :app.EnableKeyScripts(false); } else { :app.EnableKeyScripts(true); }

			// playback 
			:sonique.prefs.PrepString($section, "playpause1", "ctrl-space"); 
			:sonique.prefs.PrepString($section, "stop1", "ctrl-shift-space"); 
			:sonique.prefs.PrepString($section, "stop2", "decimal"); 
			:sonique.prefs.PrepString($section, "fastforward", "ctrl-shift-right"); 
			:sonique.prefs.PrepString($section, "rewind", "ctrl-shift-left"); 
			:sonique.prefs.PrepString($section, "nexttrack", "ctrl-right"); 
			:sonique.prefs.PrepString($section, "prevtrack", "ctrl-left"); 
			:sonique.prefs.PrepString($section, "repeatmodes", "ctrl-r"); 
			:sonique.prefs.PrepString($section, "toggleshuffle", "ctrl-h"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "playpause1"), "if (:sonique.players.default.IsPlaying()) { :sonique.players.default.TogglePause(); } else { :sonique.players.default.Play(); }" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "stop1"), ":sonique.players.default.Stop();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "stop2"), ":sonique.players.default.Stop();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "fastforward"), ":sonique.players.default.Scan(1, true);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "rewind"), ":sonique.players.default.Scan(-1, true);" ); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "nexttrack"), ":sonique.players.default.Next();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "prevtrack"), ":sonique.players.default.Previous();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "repeatmodes"), ":sonique.players.default.ToggleRepeat();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "toggleshuffle"), ":sonique.players.default.ToggleShuffle();" );
			// volume
			:sonique.prefs.PrepString($section, "volumeup1", "ctrl-up"); 
			:sonique.prefs.PrepString($section, "volumeup2", "add"); 
			:sonique.prefs.PrepString($section, "volumedown1", "ctrl-down"); 
			:sonique.prefs.PrepString($section, "volumedown2", "subtract"); 
			:sonique.prefs.PrepString($section, "volume0", "ctrl-oem_3"); 
			:sonique.prefs.PrepString($section, "volume1", "ctrl-1"); 
			:sonique.prefs.PrepString($section, "volume2", "ctrl-2"); 
			:sonique.prefs.PrepString($section, "volume3", "ctrl-3"); 
			:sonique.prefs.PrepString($section, "volume4", "ctrl-4"); 
			:sonique.prefs.PrepString($section, "volume5", "ctrl-5"); 
			:sonique.prefs.PrepString($section, "volume6", "ctrl-6"); 
			:sonique.prefs.PrepString($section, "volume7", "ctrl-7"); 
			:sonique.prefs.PrepString($section, "volume8", "ctrl-8"); 
			:sonique.prefs.PrepString($section, "volume9", "ctrl-9"); 
			:sonique.prefs.PrepString($section, "volume10", "ctrl-0"); 
			:sonique.prefs.PrepString($section, "volume0n", "multiply"); 
			:sonique.prefs.PrepString($section, "volume1n", "numpad1"); 
			:sonique.prefs.PrepString($section, "volume2n", "numpad2"); 
			:sonique.prefs.PrepString($section, "volume3n", "numpad3"); 
			:sonique.prefs.PrepString($section, "volume4n", "numpad4"); 
			:sonique.prefs.PrepString($section, "volume5n", "numpad5"); 
			:sonique.prefs.PrepString($section, "volume6n", "numpad6"); 
			:sonique.prefs.PrepString($section, "volume7n", "numpad7"); 
			:sonique.prefs.PrepString($section, "volume8n", "numpad8"); 
			:sonique.prefs.PrepString($section, "volume9n", "numpad9"); 
			:sonique.prefs.PrepString($section, "volume10n", "numpad0"); 
			:sonique.prefs.PrepString($section, "mute", "ctrl-m"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumeup1"), "if (:sonique.players.default.GetVolume() != 1.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() + 0.1, 1));}" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumeup2"), "if (:sonique.players.default.GetVolume() != 1.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() + 0.1, 1));}" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumedown1"), "if (:sonique.players.default.GetVolume() != 0.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() - 0.1, 1));}" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumedown2"), "if (:sonique.players.default.GetVolume() != 0.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() - 0.1, 1));}" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume0"), ":sonique.players.default.SetVolume(0.0);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume1"), ":sonique.players.default.SetVolume(0.1);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume2"), ":sonique.players.default.SetVolume(0.2);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume3"), ":sonique.players.default.SetVolume(0.3);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume4"), ":sonique.players.default.SetVolume(0.4);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume5"), ":sonique.players.default.SetVolume(0.5);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume6"), ":sonique.players.default.SetVolume(0.6);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume7"), ":sonique.players.default.SetVolume(0.7);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume8"), ":sonique.players.default.SetVolume(0.8);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume9"), ":sonique.players.default.SetVolume(0.9);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume10"), ":sonique.players.default.SetVolume(1.0);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume0n"), ":sonique.players.default.SetVolume(0.0);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume1n"), ":sonique.players.default.SetVolume(0.1);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume2n"), ":sonique.players.default.SetVolume(0.2);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume3n"), ":sonique.players.default.SetVolume(0.3);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume4n"), ":sonique.players.default.SetVolume(0.4);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume5n"), ":sonique.players.default.SetVolume(0.5);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume6n"), ":sonique.players.default.SetVolume(0.6);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume7n"), ":sonique.players.default.SetVolume(0.7);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume8n"), ":sonique.players.default.SetVolume(0.8);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume9n"), ":sonique.players.default.SetVolume(0.9);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume10n"), ":sonique.players.default.SetVolume(1.0);" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "mute"), "if (:app.mutevol == 0.0) { :app.mutevol = :sonique.players.default.GetVolume(); :sonique.players.default.SetVolume(0.0); } else { :sonique.players.default.SetVolume(:app.mutevol); :app.mutevol = 0.0;}" );
			// dialogs
			:sonique.prefs.PrepString($section, "openfiles", "ctrl-o"); 
			:sonique.prefs.PrepString($section, "addfolder", "ctrl-shift-o"); 
			:sonique.prefs.PrepString($section, "saveplaylist", "ctrl-s"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "openfiles"), ":sonique.OpenFiles();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "addfolder"), "$dir = :sonique.BrowseForFolder(); if ($dir) {:sonique.AddFile($dir);}" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "saveplaylist"), ":sonique.SavePlaylistFile(:sonique.playlists.default);" );
			// misc
			:sonique.prefs.PrepString($section, "settings", "f6"); 
			:sonique.prefs.PrepString($section, "defaultskin", "ctrl-home"); 
			:sonique.prefs.PrepString($section, "help", "f1"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "settings"), ":sonique.LaunchSettingsPopup();" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "defaultskin"),":sonique.LoadInterface(\"teamsonique/development_orange_skin/alpha\");" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "help"), ":sonique.LaunchHelp(\"index\");" );

			// visuals
			:sonique.prefs.PrepString($section, "nextvis", "ctrl-oem_comma"); 
			:sonique.prefs.PrepString($section, "prevvis", "ctrl-oem_period"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "nextvis"), ":sonique.visuals.GroupNextVisual(\"default\");" );
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "prevvis"), ":sonique.visuals.GroupPrevVisual(\"default\");" );
			:sonique.prefs.PrepString($section, "togglefullscreenvis", "f11"); 
			:app.RegisterGlobalKeyScript( :sonique.prefs.GetString($section, "togglefullscreenvis"), ":sonique.visuals.LaunchFullScreenVis(1);" );
			// used when in fullscreen mode:
			:sonique.prefs.PrepString($section, "prevbitdepth", "oem_4"); // [
			:sonique.prefs.PrepString($section, "nextbitdepth", "oem_6"); // ]
			:sonique.prefs.PrepString($section, "prevres", "oem_minus");
			:sonique.prefs.PrepString($section, "nextres", "oem_plus");

			// video window
			:sonique.prefs.PrepString($section, "vidskipback", "left");
			:sonique.prefs.PrepString($section, "vidskipforward", "right");
			:sonique.prefs.PrepString($section, "togglefullscreenvid", "f11");

			// main window
			:sonique.prefs.PrepString($section, "alwaysontop", "ctrl-t"); 
			// display window
			:sonique.prefs.PrepString($section, "nextscreen", "ctrl-tab"); 
			:sonique.prefs.PrepString($section, "prevscreen", "shift-ctrl-tab"); 

		// hack alert.  using a global was the easiest way to get data into the id3 edit popup.  
		// someday i hope to improve the LaunchSettingsPopup and LaunchID3EditPopup to use state params.
			:sonique.ID3Editor.path = "";
		</script>

		<script name="SoniqueAppDeinit">
			// hotkeys /////////////////////////////////////////////////
			$section = "sonique/gui/slate/hotkeys";

			// playback
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "playpause1"), "if (:sonique.players.default.IsPlaying()) { :sonique.players.default.TogglePause(); } else { :sonique.players.default.Play(); }" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "stop1"), ":sonique.players.default.Stop();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "stop2"), ":sonique.players.default.Stop();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "fastforward"), ":sonique.players.default.Scan(1, true);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "rewind"), ":sonique.players.default.Scan(-1, true);" ); 
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "nexttrack"), ":sonique.players.default.Next();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "prevtrack"), ":sonique.players.default.Previous();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "repeatmodes"), ":sonique.players.default.ToggleRepeat();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "toggleshuffle"), ":sonique.players.default.ToggleShuffle();" );
			// volume
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumeup1"), "if (:sonique.players.default.GetVolume() != 1.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() + 0.1, 1));}" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumeup2"), "if (:sonique.players.default.GetVolume() != 1.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() + 0.1, 1));}" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumedown1"), "if (:sonique.players.default.GetVolume() != 0.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() - 0.1, 1));}" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volumedown2"), "if (:sonique.players.default.GetVolume() != 0.0) {:sonique.players.default.SetVolume(:math.Truncate(:sonique.players.default.GetVolume() - 0.1, 1));}" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume0"), ":sonique.players.default.SetVolume(0.0);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume1"), ":sonique.players.default.SetVolume(0.1);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume2"), ":sonique.players.default.SetVolume(0.2);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume3"), ":sonique.players.default.SetVolume(0.3);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume4"), ":sonique.players.default.SetVolume(0.4);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume5"), ":sonique.players.default.SetVolume(0.5);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume6"), ":sonique.players.default.SetVolume(0.6);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume7"), ":sonique.players.default.SetVolume(0.7);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume8"), ":sonique.players.default.SetVolume(0.8);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume9"), ":sonique.players.default.SetVolume(0.9);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume10"), ":sonique.players.default.SetVolume(1.0);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume0n"), ":sonique.players.default.SetVolume(0.0);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume1n"), ":sonique.players.default.SetVolume(0.1);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume2n"), ":sonique.players.default.SetVolume(0.2);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume3n"), ":sonique.players.default.SetVolume(0.3);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume4n"), ":sonique.players.default.SetVolume(0.4);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume5n"), ":sonique.players.default.SetVolume(0.5);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume6n"), ":sonique.players.default.SetVolume(0.6);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume7n"), ":sonique.players.default.SetVolume(0.7);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume8n"), ":sonique.players.default.SetVolume(0.8);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume9n"), ":sonique.players.default.SetVolume(0.9);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "volume10n"), ":sonique.players.default.SetVolume(1.0);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "mute"), "if (:app.mutevol == 0.0) { :app.mutevol = :sonique.players.default.GetVolume(); :sonique.players.default.SetVolume(0.0); } else { :sonique.players.default.SetVolume(:app.mutevol); :app.mutevol = 0.0;}" );
			// dialogs
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "openfiles"), ":sonique.OpenFiles();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "addfolder"), "$dir = :sonique.BrowseForFolder(); if ($dir) {:sonique.AddFile($dir);}" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "saveplaylist"), ":sonique.SavePlaylistFile(:sonique.playlists.default);" );
			// misc
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "settings"), ":sonique.LaunchSettingsPopup();" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "defaultskin"),":sonique.LoadInterface(\"teamsonique/development_orange_skin/alpha\");" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "help"), ":sonique.LaunchHelp(\"index\");" );
			// visuals
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "togglefullscreenvis"), ":sonique.visuals.LaunchFullScreenVis(1);" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "nextvis"), ":sonique.visuals.GroupNextVisual(\"default\");" );
			:app.UnregisterGlobalKeyScript( :sonique.prefs.GetString($section, "prevvis"), ":sonique.visuals.GroupPrevVisual(\"default\");" );
		</script>

	</interface>
</mml>
