/*-- File:utility_setup_schedule_copy_camera_schedule_setting.js Version:v2.0.18.0116
	No Change
*/
function utility_setup_schedule_copy_camera_schedule_setting(strQuery,strInsertQuery,strSourceid,strDestination){
//===================for activator web using====================================
	if ( window.location.protocol=="http:" ) {
		try {
			if (window.XMLHttpRequest) {
				var xmlhttp = new XMLHttpRequest();// for IE7
			} else if (window.ActiveXObject) {
				var xmlhttp = new ActiveXObject('MSXML2.XMLHTTP.3.0');// for IE6
			}
		} catch (e) { alert(e.description);return; }
		
		var szURL = "CopyCameraSetting.Asp" ;
		var szParam  = "strQuery=" + strQuery + "&strInsertQuery=" + strInsertQuery + "&strSourceid=" + strSourceid + "&strDestination=" + strDestination ;
		var strDataXml = top.gf_SendCommand( szURL, szParam ) ;
		return strDataXml ;
	}
//===============================================================================
	var szSQL=strQuery;
	var strSourceid=strSourceid;
	var strInsertQuery
	var strDestination=strDestination;
	if(strQuery==""){
		//Delete Destination Camera Schedule Info
		var szSQLdelete="Delete from SCHEDULE_CONFIGURATION where CAMERA_ID="+strDestination
		g_adoConn.Execute( szSQLdelete )
		
		//AddNew Camera Schedule Info 
		szSQL="insert into  SCHEDULE_CONFIGURATION (SCHEDULE_TYPE,DAY_TYPE,CAMERA_ID,ENABLED,STATUS,APPLYTO_DEF_DAY,APPLYTO_WEEK,START_TIME,END_TIME) select SCHEDULE_TYPE,DAY_TYPE,"+strDestination+",ENABLED,STATUS,APPLYTO_DEF_DAY,APPLYTO_WEEK,START_TIME,END_TIME from SCHEDULE_CONFIGURATION where CAMERA_ID="+strSourceid
		g_adoConn.Execute( szSQL )
	}

}

