<?xml version="1.0"?>
<!DOCTYPE window SYSTEM "chrome://livemargins/locale/livemargins.dtd">
<?xml-stylesheet href="chrome://livemargins/skin/videoPlayer.css" type="text/css"?>

<window id="livemargins_player_window"
		xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
		contenttitlesetting="true"
		windowtype="mozilla:favpart_widget"
		hidechrome="true"
		orient="vertical"
		width="225" height="450"
>
	<script type="application/x-javascript" src="chrome://livemargins/content/windowTools.js"/>
	<script type="application/x-javascript" src="chrome://livemargins/content/dockable.js"/>
	<script type="application/x-javascript" src="chrome://livemargins/content/widget-base.js"/>	
	<script type="application/x-javascript" src="player.js"/>
	<hbox flex="1" id="widget-box">
		<vbox width="2">
			<resizer dir="topleft" height="2" style="cursor: nw-resize;"/>
			<resizer dir="left" flex="1" style="cursor: w-resize;"/>
			<resizer dir="bottomleft" height="2" style="cursor: sw-resize;"/>
		</vbox>
		<vbox flex="1">
			<resizer dir="top" height="1" style="cursor: n-resize;"/>
			<vbox flex="1" style="min-width: 150px; max-width: none;">
				<hbox id="chrome-title-box" class="frame-title-box">
					<hbox id="left-base-button-box">
						<image id="video-icon" class="channel-icon" src="chrome://livemargins/skin/videoplayer-icon.png"/>
					</hbox>
					<vbox flex="1">
						<titlebar id="titlebar-space" class="frame-titlebar" flex="1" height="20px">
							<label crop="end" flex="1" id="chromeTitle" class="title-text"/>
						</titlebar>
					</vbox>
					<hbox id="right-button-box">
						<toolbarbutton id="ext-button" class="favpart-control-buttons" onclick = "widget.switchExtendedControl();"/>
						<arrowscrollbox orient="horizontal" pack="end" id="extended-button-box" style="display:none;min-width: 1px;" flex="1" chromedir="ltr">
							<toolbarbutton class="favpart-control-buttons" id="bookmark-button" tooltiptext="&bookmark_tooltip;" onclick="widget.toggleBookmark();"></toolbarbutton>
							<toolbarbutton class="favpart-control-buttons" id="titlebar-reload" tooltiptext="&reloadButton;" type="checkbox" autoCheck="false" ondblclick="clearTimeout(window.reloadTimer);widget.switchAutoReload(event);" oncommand = "window.reloadTimer = setTimeout(function(){widget.reload();},400);"/>					
							<toolbarbutton id="returnURL" class="favpart-control-buttons" tooltiptext="&returnURLButton;" onclick = "widget.returnURL();"/>					</arrowscrollbox>
						<toolbarseparator/>
						<toolbarbutton id="ontop-button" class="favpart-control-buttons" tooltiptext="&ontopButton_tooltip_clear;" tooltip_set="&ontopButton_tooltip_set;" tooltip_clear="&ontopButton_tooltip_clear;" onclick = "widget.switchTopMost();"/>
						<!--<toolbarbutton id="transparent" class="favpart-control-buttons" type="checkbox" tooltiptext="&transparentButton;" autoCheck="false" onclick = "widget.switchTransparent();"/>-->
						<toolbarbutton id="favpart-minimize-button" class="favpart-control-buttons" tooltiptext="&minimizeButton;" oncommand="windowTools.minimized=true"/>
						<toolbarbutton id="favpart-close-button" class="favpart-control-buttons" tooltiptext="&closeButton;" oncommand="widget.close();"/>
					</hbox>
				</hbox>
				<browser id="player_browser" autoscroll="false" flex="1" src="about:blank" type="content" style="overflow:hidden"/>
			</vbox>

			<resizer dir="bottom" height="2" style="cursor: s-resize;"/>
		</vbox>
		<vbox width="2" style="overflow: hidden;">
			<resizer dir="topright" height="2" style="cursor: ne-resize;"/>
			<resizer dir="right" flex="1" style="cursor: e-resize;"/>
			<resizer dir="bottomright" height="2" style="cursor: se-resize;"/>
		</vbox>
	</hbox>

	<popupset>
		<panel id="modify-panel" class="msgPanel" flex="1" onmousedown="widget.startMove(event);" onmousemove="widget.moving(event);" onmouseup="widget.endMove(event);">
			<hbox id="modify-div" width="200px" height="200px">
				<vbox flex="1">
					<spacer flex="1"/>
					<hbox>
						<spacer flex="1"/>
						<label id="resizer" value="RS" flex="0"/>
					</hbox>
				</vbox>
			</hbox>
		</panel>
		<panel id="control-panel" class="msgPanel" level="top" flex="1">		
			<hbox id="panel-title-box" class="frame-title-box">
				<hbox id="panel-button-box">
					<!--<toolbarbutton id="startWithFirefox" class="favpart-control-buttons" type="checkbox" onclick = "widget.toggleStartWithFirefox();"/>-->
					<toolbarbutton id="returnURL" class="favpart-control-buttons" onclick = "widget.returnURL();"/>
					<toolbarbutton id="controlbar-reload" class="favpart-control-buttons" type="checkbox" autoCheck="false" ondblclick="widget.switchAutoReload(event);" onclick = "widget.reload();"/>	
					<!--<toolbarbutton id="zoomin-button" class="favpart-control-buttons" onclick = "widget.zoomIn();"/>
					<toolbarbutton id="zoomout-button" class="favpart-control-buttons" onclick = "widget.zoomOut();"/>-->
					<toolbarbutton id="transparent" class="favpart-control-buttons" type="checkbox" autoCheck="false" onclick = "widget.switchTransparent();"/>
				</hbox>
			</hbox>
		</panel>
		<panel id="opaque-panel" level="top" flex="1" style="border:0px;" noautohide="true">
			<hbox width="16" height="16">
				<image src="chrome://livemargins/skin/opaque.png" width="16" height="16" onclick="windowTools.transparent=false"/>
			</hbox>
		</panel>
	</popupset>
</window>
