/**
 * @author zerostyle
 * @QQ:83226227
 * @namespace ZeroStyle.VVSWeb.API
 * @projectDescription _本文件描述了API接口，与创建控件对象的方法_
 * @warning _本文件采用ANSI编码，请使用ANSI编码的编辑器编辑，如果因编码问题导致的程序无法运行，本人不负责任_
 * @since 2010/6/3-2010/6/4_
 * @version 1.0.0.1 BETA
 */
Namespace.register("ZeroStyle.VVSWeb.API");
ZeroStyle.VVSWeb.API=
{DebugMode:ZeroStyle.FrameWork.RunningTime.DebugMode,
controlId:"VVSWeb_ActiveX",
thisCom:null,
cabUrl:"ActiveX/JdvrOcx.cab#version=1,0,0,1",
classId:"clsid:2A45895C-8E67-450b-A385-25DB47494C85",
Events:{OnSearchGetOneRECResult:function(){throw new Error()},OnCustomVideoGroupChange:function(){throw new Error()},OnDwonloadStatsChange:function(){throw new Error()}},
AddEventListener:function(){
with(this){
if(thisCom.addEventListener!=undefined&&thisCom.addEventListener!="undefined")
{thisCom.addEventListener("JSOnGetOneRECFile",Events.OnSearchGetOneRECResult,false);
thisCom.addEventListener("JSOnCustomVideoGroupChange",Events.OnCustomVideoGroupChange,false);
thisCom.addEventListener("JSOnDwonloadStatsChange",Events.OnDwonloadStatsChange,false);
}
else{
	thisCom.attachEvent("JSOnGetOneRECFile",Events.OnSearchGetOneRECResult);
	thisCom.attachEvent("JSOnCustomVideoGroupChange",Events.OnCustomVideoGroupChange);
	thisCom.attachEvent("JSOnDwonloadStatsChange",Events.OnDwonloadStatsChange);
	}}},
Init:function()
{
	with(this){thisCom=ZeroStyle.Web.UI.Helper.$("VVSWeb_ActiveX");
	thisCom.style.border="0";thisCom.style.borderColor="red";thisCom.style.width="100%";thisCom.style.height="100%";
	AddEventListener();
}}
,
RenderTo:function(containerId,width,height){try{with(this){var containerObj=ZeroStyle.Web.UI.Helper.$(containerId);if(containerObj=="undefined"){throw new Error("container is null");}if(width){thisCom.style.width=width;}if(height){thisCom.style.height=height;}containerObj.appendChild(thisCom);}}catch(e){alert("11"+e.message);}},
Dispose:function(){this.controlId="";this.thisCom=null;this.Events=null;thisObj=null;},
Connect:function(){try{with(this){thisCom.JSLink();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
DisConnect:function(){try{with(this){thisCom.JSUnLink();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
ConnectAll:function(){try{with(this){thisCom.JSLinkAll();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
DisConnectAll:function(){try{with(this){thisCom.JSUnLinkAll();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
StartREC:function(){try{with(this){thisCom.JSRecStart();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
StopREC:function(){try{with(this){thisCom.JSRecStop();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
StartAllREC:function(){try{with(this){thisCom.JSRecStartAll();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
StopAllREC:function(){try{with(this){thisCom.JSRecStopAll();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
PicManage:function(){try{with(this){thisCom.JSPicMan();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
logManage:function(){try{with(this){thisCom.JSLogsMan();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
PlayBack:function(){try{with(this){thisCom.JSPlayerBack();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Config:function(){try{with(this){thisCom.JSConfig();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
OpenSound:function(){try{with(this){thisCom.JSOpenSound();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloseSound:function(){try{with(this){thisCom.JSCloseSound();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
GetPicture:function(){try{with(this){thisCom.JSPicture();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
DivideWindow:function(divideCount){try{with(this){thisCom.JSDivideWindow(divideCount);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloudControl_top:function(mouseDown){try{with(this){thisCom.JSCloDeck(mouseDown,1);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloudControl_bottom:function(mouseDown){try{with(this){thisCom.JSCloDeck(mouseDown,2);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloudControl_left:function(mouseDown){try{with(this){thisCom.JSCloDeck(mouseDown,3);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloudControl_right:function(mouseDown){try{with(this){thisCom.JSCloDeck(mouseDown,4);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
CloudControl_Auto:function(mouseDown){try{with(this){thisCom.JSCloDeck(mouseDown,5);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Aperture_l:function(mouseDown){try{with(this){thisCom.JSIris(mouseDown,1);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Aperture_s:function(mouseDown){try{with(this){thisCom.JSIris(mouseDown,2);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Focus_n:function(mouseDown){try{with(this){thisCom.JSFocus(mouseDown,1);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Focus_f:function(mouseDown){try{with(this){thisCom.JSFocus(mouseDown,2);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Zoom_i:function(mouseDown){try{with(this){thisCom.JSZoom(mouseDown,1);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Zoom_o:function(mouseDown){try{with(this){thisCom.JSZoom(mouseDown,2);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Login:function(userName,userPasswd,lang){try{if(userName=="undefined"){throw new Error(JoveTech.VVSWeb.Language.Error.error1);}if(userPasswd=="undefined"){throw new Error(JoveTech.VVSWeb.Language.Error.error2);}var loginSucc=false;with(this){loginSucc=thisCom.JSLogin(userName,userPasswd,lang);}return loginSucc;}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
Exit:function(){with(this){Dispose();}},
SearchRECFile:function(datetimeStr){try{with(this){thisCom.JSSearchRECFile(datetimeStr);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
PlayBackRECFile:function(playId,recFileType){try{with(this){thisCom.JSPlayBackRECFile(playId,recFileType);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
DownLoadRECFile:function(playId,recFileType){try{with(this){/*alert(playId+"   "+recFileType);*/thisCom.JSDownLoadRECFile(playId,recFileType);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
GetCustomVideoGroups:function(parentNodeId){try{with(this){var result=null;if(!parentNodeId){result=thisCom.JSGetCustomVideoGroups("");}else{result=thisCom.JSGetCustomVideoGroups(parentNodeId);}return result;}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
PlayCustomVideoGroupPoint:function(groupIndex,pointIndex){try{with(this){thisCom.JSPlayCustomVideoGroupPoint(groupIndex,pointIndex);}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
RefreshWindow:function(){try{with(this){thisCom.JSRefreshWindow();}}catch(e){throw new Error(JoveTech.VVSWeb.Language.Error.error4);}},
StopDownLoadRECFile:function(){with(this){thisCom.JSStopDownLoadRECFile();}},
thisObj:this
	
}


