	function remoteView(vbmsip,devid,time) {
		var ocxobj = document.getElementById('DXVideoShow1');
        ocxobj.RemoteCommand(101,-1,0);
        ocxobj.RemoteCommand(2,-1,0);
        if (time != ""){
			ocxobj.RemotePlay(vbmsip,80,"root","pass","#ExID",devid,time);
		}else{
			ocxobj.RemoteView(vbmsip,80,"root","pass","#ExID",devid);
		}
        ocxobj.RemoteCommand(0,1,0);
        ocxobj.VPSetLayout(1);
   		ocxobj.RemoteCommand(1,-1, 1);
		ocxobj.RemoteCommand(200,-1,1);	
        ocxobj.RemoteCommand(202,-1,0);
        ocxobj.RemoteCommand(300,-1,0);
        ocxobj.RemoteCommand(301,0,0);		
	}

	function createObj(divid,objid,pathstr,dwidth,dheight){
	//	document.write('<div id="'+divid+'">');
		document.write('<OBJECT id="'+objid+'"');
		document.write(' style="LEFT: 0px; WIDTH: '+dwidth+'px; TOP: 0px; HEIGHT: '+dheight+'px"');
		document.write(' codeBase="'+pathstr+'xVideoShow.cab#version=2,1,0,3"');
		document.write(' classid="clsid:A8C1E502-4FCF-4AF2-ADDB-ABF540CA5BA7">');
		document.write('  <PARAM NAME="_Version" VALUE="65536">');
		document.write('  <PARAM NAME="_ExtentX" VALUE="17648">');
		document.write('  <PARAM NAME="_ExtentY" VALUE="12621">');
		document.write('  <PARAM NAME="_StockProps" VALUE="0">');
		document.write('<a href="http://webcam.www.gov.tw/use.php#t1" target="_blank"><img src="http://webcam.www.gov.tw/images/noactivex.jpg" alt="noActiveX" border="0" width="'+dwidth+'" height="'+dheight+'" ></a>');
		document.write('</OBJECT>');
	//	document.write('</div>');
	}
	
	function createFox(divid,vip,width,height){
	
		document.write('<applet codebase = "/includes/plugin/"  code = "JViewer.class" name = "JViewer Applet" archive = "JViewer.jar" width  = "'+width+'"  height = "'+height+'" hspace = "0" vspace = "0" align  = "middle">');
		document.write('<param name="image" value="http://www.gov.tw/images/we_r15_c14.jpg"/>');
		document.write('<param name="vrsip" value="'+vip+'"/>');
		document.write('<param name="vrsport" value="80"/>');
		document.write('<param name="Camip" value="#ExID"/>');
		document.write('<param name="Ccdid" value="'+divid+'"/>');
		document.write('<param name="Cmd" value="10001"/>');
		document.write('<param name="Stime" value="0"/>');
		document.write('<param name="Etime" value="0"/>');
		//document.write('<param name="ShowInfo" value="0"/>');
		//document.write('若您見到此文字,表示您的瀏覽器可能不支援JAVA或未打開JAVA允許.');
		document.write('</applet>');	
	}
	
	function re_createObj(divid,objid,pathstr,dwidth,dheight){

		var Objstr ='<OBJECT id="'+objid+'" style="LEFT: 0px; WIDTH: '+dwidth+'px; TOP: 0px; HEIGHT: '+dheight+'px" codeBase="'+pathstr+'xVideoShow.cab#version=2,1,0,3" classid="clsid:A8C1E502-4FCF-4AF2-ADDB-ABF540CA5BA7"><PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="17648"><PARAM NAME="_ExtentY" VALUE="12621"><PARAM NAME="_StockProps" VALUE="0"><a href="http://webcam.www.gov.tw/use.php#t1" target="_blank"><img src="http://webcam.www.gov.tw/images/noactivex.jpg" alt="noActiveX" border="0" width="'+dwidth+'" height="'+dheight+'" ></a></OBJECT>';
		
		return Objstr;
	}
	
	function re_createFox(divid,vip,width,height){
	
		var Foxstr ='<applet alt="webcam" codebase = "/includes/plugin/"  code = "JViewer.class" name = "DXVideoShow1" archive = "JViewer.jar" width  = "'+width+'"  height = "'+height+'" hspace = "0" vspace = "0" align  = "middle"><param name="image" value=""/><param name="ver" value="v2"/><param name="vrsip" value="'+vip+'"/><param name="vrsport" value="80"/><param name="Camip" value="#ExID"/><param name="Ccdid" value="'+divid+'"/><param name="Cmd" value="10001"/><param name="Stime" value="0"/><param name="Etime" value="0"/><param name="ShowInfo" value="0"/></applet>';	
	
		return Foxstr;
	}
	
	function createFlv(devid,date,width,height){
	
		Flvstr = '<object width="'+width+'" height="'+height+'"><param name="webcam" value="http://webcamflv.www.gov.tw/swf/video.php?devid='+devid+'&datetime='+date+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://webcamflv.www.gov.tw/swf/video.php?devid='+devid+'&datetime='+date+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+width+'" height="'+height+'"></embed></object>';
		
		return Flvstr;
		
	}	
	
