<!-- File: remote_playback_mini-playback.htm	Version:v2.0.20.0205-->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Expires" content="Tue, 1 Jul 1980 12:12:12 GMT">
		<title>Mini-Playback</title>
		<style>
		TD	{ font-size: 9pt; font-family: Arial,Helvetica,Sans-Serif; font-weight: bold; color:#003366;}
		
		</style>
	</head>
	<script>
		var szFileBase = top.szFileBase ;
		szFileBase = decodeURI(szFileBase) ;
		//document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + szFileBase + "Customization/style.css\">") ;
	</script>
		<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" scroll="no">
			<table border="0" cellspacing="2" cellpadding="1" width="100%" ID="Table3">
				<tr>
					<td>
						<table border="0" cellpadding="0" cellspacing="0" width="100%" class="AppltBlank" name="topTable"
							ID="Table4">
							<tr>
								<td>
									<table border="1" cellpadding="2" cellspacing="0" bordercolordark="#000000" bordercolorlight="#ffffff"
			width="100%">
										<tr><td align="left">Camera:<span id="SpCameraInfo"></span></td>
										    <td align="right">FileLoaction:<span id="SpFilePath"></span></td>
										</tr>
										<tr><td colspan="2">
												<table width="100%" ID="Table2" bgcolor=#e6e6fa>
													<td width="30" height="50" valign="top">BeginTime:<span id="spBeginTimd"></span><span id="intCount"></span></td>
													<th width="40%">
														<span id="spNow"></span><br>
														<span id="spCurrentPositio"></span></th>
													<td width="30" valign="top">EndTime:<span id="spEndTime"></span></td>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td align="center">
						<object id="MiniMedia" data="data:application/x-oleobject;base64,NvYbHGjX4Uqh6r+Ujzr5rxAHAAA1JQAA6BsAAA=="
							classid="CLSID:F8E691A0-C92E-4E42-9CDA-62FC07A9483B" width="730" height="610" VIEWASTEXT>
						</object>
						<script language="javascript" type="text/javascript" for="MiniMedia" event="OnTimeCode(intCamerid,szTime)">OnTimeCode(intCamerid,szTime)</script>
					</td>
				</tr>
			</table>
			<span id="txtSQL"></span>
			<div id="Infobackground" style="position:absolute;top:0;width:100%;height:100%;overflow:hidden;background-color:#f5f5f5;z-index:1;display:none;">
				<table width="100%" height="100%">
					<tr>
						<th>
							<table width="200" border=0 cellpadding=0 cellspacing =0>
								<tr height=30 bgcolor=#000000>
									<td style="border-left:#000000 1px solid;border-top:#000000 1px solid;border-right:#000000 1px solid;border-bottom:#f5f5f5 0px solid;"><nobr><font color="#ffffff">&nbsp;Message Box</font></nobr>
									</td>
									<td align=right  style="border-left:#000000 1px solid;border-top:#000000 1px solid;border-right:#000000 1px solid;border-bottom:#f5f5f5 0px solid;"><span style="color:red;cursor:hand;" onclick="window.close();">&nbsp;X&nbsp;</span></td>
								</tr>		
								<tr height=50>
									<td colspan=2 align="center" style="border-left:#000000 1px solid;border-right:#000000 1px solid;border-bottom:#000000 1px solid;"><font size=2>Can't Find File</font></td>
								</tr>
							</table>
						</th>
					</tr>
				</table>
			</div>
		</body>
<script language="javascript" type="text/javascript">
var intDateTime="";

try {
	var objArgs		= window.dialogArguments ;
	var oMainWin	= objArgs.oMainWin ;
	var	szEventID	= objArgs.szEventID ;
	var	szDateTime	= objArgs.szDateTime ;
	var	szASEMediaSource	= objArgs.szASEMediaSource ;
	var	szASEMediaUserName	= objArgs.szASEMediaUserName ;
	var	szASEMediaPassword	= objArgs.szASEMediaPassword ;
	var	szASEControlPort	= objArgs.szASEControlPort ;
	var	szASEStreamingPort	= objArgs.szASEStreamingPort ;
	
} catch(e) {}

	function Page_onload() {
		try {
			intDateTime=szDateTime;
			var arr_replace=szEventID.split("_");
			
			var str_File_path=szEventID;
			
			Playback('','',str_File_path);
		} catch (e) { }

	}
var intCamera_Id="";	
function Playback(RecordId,EventId,FilePath) {
	
	var szColumn="CAMERA_ID,RECORDING_ID,CAMERA_NAME,REC_TYPE,FILELOCATION,CONVERT(CHAR ,STARTTIME ,120 ) AS STARTTIME,CONVERT(CHAR ,ENDTIME ,120 ) AS ENDTIME";
	szTable="VIEW_LOG_RECORDING";
	var szParam="";
	if(FilePath!=""){
		szParam="FILELOCATION='"+FilePath+"'";
	}else{
		if(RecordId!=""){
			szParam="RECORDING_ID = '"+RecordId+"' And EVENT_ID='"+EventId+"'";
		}else{
			szParam="EVENT_ID='"+EventId+"'";
		}
	}	
	//txtSQL.innerHTML="select "+szColumn+" from "+szTable+" where "+szParam;
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") ;
	xmlDoc.loadXML(oMainWin.utility_get_data_xml(szTable,szColumn,szParam)) ;
	if(xmlDoc.selectSingleNode("/XML/DATA/CAMERA_ID").text!=""){
		intCamera_Id=xmlDoc.selectSingleNode("/XML/DATA/CAMERA_ID").text;
		SpFilePath.innerHTML = xmlDoc.selectSingleNode("/XML/DATA/FILELOCATION").text;
		SpCameraInfo.innerHTML = xmlDoc.selectSingleNode("/XML/DATA/CAMERA_ID").text+":"+xmlDoc.selectSingleNode("/XML/DATA/CAMERA_NAME").text
		if(xmlDoc.selectSingleNode("/XML/DATA/STATUS").text==1){
			window.setTimeout("Play('" + xmlDoc.selectSingleNode("/XML/DATA/FILELOCATION").text.replace(/\\/g,"\\\\") + "');",165) ;
		}else{
			alert("Can't Find File.");
		}
	}else{
		Infobackground.style.display="";
	}
}

function Play( objFile ) {
	
	if((szASEMediaSource!="(local)") && (szASEMediaSource!="localhost")){
		//=================================================================
		//Connect Remote 
			MiniMedia.ASEMediaSource=szASEMediaSource;//window.location.host
			MiniMedia.ASEMediaUserName=szASEMediaUserName;
			MiniMedia.ASEMediaPassword=szASEMediaPassword;
			MiniMedia.ASEControlPort=szASEControlPort;
			MiniMedia.ASEStreamingPort=szASEStreamingPort;
			MiniMedia.EnableASE = true ;
		}
		//=================================================================
	
	MiniMedia.MediaType=2;
	MiniMedia.ID=intCamera_Id;
	MiniMedia.MediaSource =objFile;
	MiniMedia.Connect(0);
	MiniMedia.CodesType = 3;
	MiniMedia.StretchToFit = 1 ;
	MiniMedia.StartStream();
	MiniMedia.SetCurrentTime(intDateTime);
	MiniMedia.SetPlayDirection(1);	
	MiniMedia.Play() ;
	MiniMedia.EnableMouseDigitalPTZ();
	MiniMedia.SetTitleBarTextLayout(9,12,10,19,1,14,3,14,4,18,5,12,6,12,7,0,0,0,0,0);
	
	spBeginTimd.innerHTML=MiniMedia.GetBeginTimeString();
	spEndTime.innerHTML=MiniMedia.GetEndTimeString();
}

function StopFile() {
	MiniMedia.Stop();
	MiniMedia.StopStream();
	MiniMedia.Disconnect() ;
}

function OnTimeCode(intCamerid,szTime) {
	spNow.innerHTML=szTime;	
}

Page_onload() ;
		</Script>
</html>
