var s_title_name="\u3000",s_model_name="WJ-NX400K",s_pre_model_name="WJ-NX400K",s_app_name="i-PRO Active Guard Calculator (for Genetec)",s_app_ver="Ver 1.5.0.0 ENG (2023/09/20)",s_app_reqspec="Requirements : Windows 11 / 10, Microsoft Edge , Google Chrome, Mozilla Firefox",s_app_reqspec_notenough="Browser does not meet required operating environment",s_app_dst_ja="ja",s_app_dst_asa_ja="asa_ja",s_app_dst_vi_en="vi_en",s_app_dst_gen_en="gen_en",s_app_dst_asm_en="asm_en",s_app_dst_xpro_en="xpro_en",
s_app_dst_en_p="en_p",s_app_dst_ch="ch",s_app_dst_fr="fr",s_app_dst_sp="sp",s_app_dst_ge="ge",s_app_dst_it="it",s_app_dst_ru="ru",s_app_dst=s_app_dst_gen_en,s_note_overview="This tool supports you to select suitable system architecture for i-PRO Active Guard server on your environments by following 4steps below.",s_step1_title="STEP1: The number of i-PRO AI camera",s_step1_row_item1="The number of AI camera (with AI face detection)",s_step1_row_item2="The number of AI camera (with AI app other than AI face detection)",
s_step1_row_item3="The total number of AI camera",s_step2_title="STEP2: The number of extension software",s_ai_app_face="Face",s_ai_app_people="People",s_ai_app_vehicle="Vehicle",s_ai_app_lpr="License plate",s_ai_app_people_counting="People counting for 360-degree fisheye camera",s_step2_row_item1="The number of extentsion software",s_step2_row_item2="# of people/vehicle<br>[per camera, per hour]",s_step2_row_item3="Max",s_step2_row_item4="Average",s_step2_row_item5="The number of detection in total [per sec]",
s_step3_title="STEP3: Total bitrate server receives",s_step3_row_item1="Maximum bitrate of best shot image [Mbps]",s_step3_row_item2="Maximum bitrate of People counting [Mbps]",s_step3_row_item3="Total bitrate of video recording for all cameras [Mbps]",s_step3_row_item4="Total bitrate that server PC receives [Mbps]",s_step3_row_item5="",s_step4_title="STEP4: Retention period and storage",s_step4_row_item1="Retention period (day)<br>&nbsp;Face, People, Vehicle, License plate (1-31)<br>&nbsp;count,heatmap,statistics (1-92)<br>* Up to 366 days when using SQL Server Standard Edition",
s_step4_row_item2="Operating time (hours per day)",s_step4_row_item3="Estimated used disk size for best shot images[GB]",s_step4_row_item4="Estimated used disk size for People counting data[GB]",s_step4_row_item5="Estimated used disk size for database[GB]",s_step4_row_item6="-",s_step4_note="",s_step4_note2="",s_button_result="Goto Result",s_error1="There are item(s) not entered value or had invalid value.",s_help_step1='When the numbers of cameras with AI People detection, AI Vehicle detection, AI Occupancy detection/AI People Counting, AI-VMD, Sound, AI-VMD/AI People Counting for 360-degree fisheye camera, AI Scene Change detection or License plate detection is no more than 100(AI Face detection is no more than 20), it may be possible that AI server is installed to PC with Security Center.<br><br>When over 100 (or over 20 for AI Face detection), i-PRO Active Guard server should be installed in dedicated server PC.<br><br>In case of multi-sensor camera, extension software can be installed for each camera and the each camera needs to be registered to i-PRO Active Guard server.<p><table><tr bgcolor="#6464e6" style="color:#ffffff"><td align="left">Item</td><td align="left">Target extension software or camera\u2019s firmware function</td></tr><tr bgcolor="#eeeeee"><td align="left">The number of AI camera (with AI face detection)</td><td align="left">AI Face detection</td></tr><tr bgcolor="#eeeeee"><td rowspan="8" align="left">The number of AI camera (with AI app other than AI face detection)</td><td align="left">AI People detection</td></tr><tr bgcolor="#eeeeee"><td align="left">AI Vehicle detection</td></tr><tr bgcolor="#eeeeee"><td align="left">AI Occupancy detection/AI People Counting</td></tr><tr bgcolor="#eeeeee"><td align="left">AI-VMD</td></tr><tr bgcolor="#eeeeee"><td align="left">AI-VMD/AI People Counting for 360-degree fisheye camera</td></tr><tr bgcolor="#eeeeee"><td align="left">AI Scene Change detection</td></tr><tr bgcolor="#eeeeee"><td align="left">License plate detection</td></tr></table>',
s_help_step2="To calculate the bitrate of best shot, the number of extension software (Face, People, Vehicle, License plate and People Counting for 360-degree fisheye camera) should be considered. Since the amount of counting data by AI-VMD, AI Occupancy detection/AI People Counting, AI Scene Change detection is small, it is not necessary to consider it. Multiple extension software can be installed to each camera.<br>(Ex, When People and Vehicle are installed to a camera, add 1 for People and Vehicle, respectively.)<br><br>When \u201cMaximum number of detection in total\u201c is less than 100, HDD or SSD is available for disk drive.<br>When \u201cMaximum number of detection in total\u201c is over 100, SSD is required.",
s_help_step3="If the \u201cTotal bitrate that server PC receives\u201d exceeds 500Mbps, i-PRO Active Guard server should be installed in dedicated server PC.",s_help_step4='When "Estimated used disk size for database" is under 8 GB, SQL Server Express Edition or Standard Edition can be used. When more than 8GB, SQL Server Express Edition cannot to be used due to the limitation of Express Edition. Standard Edition is must.<p>Since the amount of counting data by AI-VMD, AI Occupancy detection/AI People Counting, AI Scene Change detection is small, it is not necessary to consider it.',
s_print_help='<u>To output PDF on Edge</u><br>1. click "Print" from right-click menu or menu<img src="menuicon_edge.png" align="middle">.<br>2. select "Save as PDF"<br>3. check "Background graphics".<br>4. click "Save".<br><p><u>To output PDF on Chrome</u><br>1. click "Print..." from right-click menu or menu<img src="menuicon_chrome.png" align="middle">.<br>2. select "Save as PDF"<br>3. check "Background graphics".<br>4. click "Save".<br><p><u>To output PDF on Firefox</u><br>1. click "Print..." from right-click menu or menu<img src="menuicon_firefox.png" align="middle">.<br>2. select "Save to PDF"<br>3. check "Print backgrounds".<br>4. click "Save".',
s_close="Close",s_result_title1="Result",s_button_textoutput="for printing",s_result_appinfo_title="Application information",s_textoutput="When you press the button, the setting and calculation result are displayed for printing..",s_result_title2="Recommended system architecture",s_result_col_item1="Item",s_result_col_item2="Result",s_result_col_item3="Desctiption",s_result_row_item1="Server architecture",s_result_row_item2="Storage",s_result_row_item3="Database",s_result_server1="i-PRO Active Guard server installed to PC with Security Center or <br>i-PRO Active Guard server installed to dedicated server PC",
s_result_server2="i-PRO Active Guard server installed to dedicated server PC",s_result_server_desc1="Since both the number of cameras and the total bitrate are below the specified values, either shared or dedicated servers can be configured.",s_result_server_desc2="A dedicated server is required because either the number of cameras or the total bit rate or both exceed the specified values.",s_result_server_tabletitle="<u>Current judgement</u><br>When all results are true, it can be configured either Server architecture i-PRO Active Guard server installed to PC with Security Center or i-PRO Active Guard server installed to dedicated server PC.",
s_result_server_row_item1="Condition",s_result_server_row_item2="Result",s_result_server_row_item3="Description",s_result_server_col_item1="Cond.1",s_result_server_col_item2="Cond.2",s_result_server_col_item3="Cond.3",s_result_server_col_desc1="The number of camera(AI face) \u2264 20",s_result_server_col_desc2="The number of camera(all AI camera) \u2264 100",s_result_server_col_desc3="Total bitrate \u2264 500Mbps",s_result_server_result1="true",s_result_server_result2="false",s_result_storage1="HDD or SSD",
s_result_storage2="SSD",s_result_storage_desc1="Since the maximum number of detections per second is less than 100, either HDD or SSD can be configured.",s_result_storage_desc2="SSD is required because the maximum number of detections per second is over 100.",s_result_database1="SQL Server Express Edition or<br>SQL Server Standard Edition",s_result_database2="SQL Server Standard Edition",s_result_database_desc1="Either SQL Server Express Edition or SQL Server Standard Edition can be used because the estimated database disk space usage is less than 8GB.",
s_result_database_desc2="SQL Server Standard Edition is required because the estimated disk space usage of the database is 8GB or more.",s_result_database_desc3="SQL Server Standard Edition is required because the retention period is over 31 days(WV-XAE300W, over 92 days).",s_result_title3="Your selection",s_appinfo_date_title="Date",s_appinfo_app_title="Software",s_appinfo_version_title="Version",s_button_input_cond="Back",outputLangDate="2023/09/12 12:45:11";var SizeBestshotFace=40,SizeBestshotPeople=34,SizeBestshotVehicle=24,SizeBestshotLpr=29,DbSize1RecordFace=3,DbSize1RecordPeople=2,DbSize1RecordVehicle=1.5,DbSize1RecordLpr=1,NumFaceBestshotPer1People=8,NumPeopleBestshotPer1People=2,NumVehicleBestshotPer1Vehicle=1,NumLprBestshotPer1Vehicle=1,PeopleCountingData=4.8,HeatmapData=24,AvePeopleCountingData=1152,AveHeatmapData=1440,SizeIndexImageHeatmapPer1Data=46,SizeBinaryDataHeatmapPer1Data=9,SizeIndexImageHeatmapPerHour=2760,SizeBinaryDataHeatmapPerHour=
540,DbSizePer1RecordPeopleCounting=.03,DbSizePer1RecordHeatmap=1.55,DbSizePerHourCameraPeopleCounting=1.8,DbSizePerHourCameraHeatmap=93,LimitUpperNumAiCamera=65535,LimitUpperNumExtsoftFace=60,LimitUpperNumExtsoft=300,LimitUpperTotalBitrateServer=1048576,LimitUpperPeriod=31,LimitLowerPeriod=14,LimitUpperPeriodPeopleCounting=92,LimitLowerPeriodPeopleCounting=14,LimitUpperOpTime=24,LimitUpperPeriodOnSQLSvrExpress=366,LimitLowerPeriodOnSQLSvrExpress=1,timeOverUnderLimit=0,thresholdTimeOverUnderLimit=
200,defalutSelectedValue=1E3,defaultPeriod=31,defaultPeriodPeopleCounting=92,defaultOpTime=8,thNumAICameraFace=20,thNumAICameraOther=100,thTotalBitrate=500,thDetectPerSec=100,thEstimatedDBDiskSize=8;s_app_dst_ja==s_app_dst||s_app_dst_asa_ja==s_app_dst?thNumAICameraOther=thNumAICameraFace=4:s_app_dst_asm_en==s_app_dst&&(thNumAICameraFace=4);
var NumAiCamera=0,NumAiCameraFace=0,NumAiCameraOther=0,NumDetectPerSec=0,NumExtsoftFace=0,NumExtsoftPeople=0,NumExtsoftVehicle=0,NumExtsoftLpr=0,NumExtsoftPeopleCouting=0,NumDetectFaceMax=0,NumDetectPeopleMax=0,NumDetectVehicleMax=0,NumDetectLprMax=0,NumDetectFaceAvr=0,NumDetectPeopleAvr=0,NumDetectVehicleAvr=0,NumDetectLprAvr=0,MaxBitrateBestshot=0,MaxBitratePeopleCounting=0,TotalBitrateServer=0,TotalBitrateVideo=0,EstimatedDiskSizeBestshot=0,EstimatedDiskSizePeopleCounting=0,EstimatedDiskSizeDatabase=
0,PeriodFace=0,PeriodPeople=0,PeriodVehicle=0,PeriodLpr=0,PeriodPeopleCounting=0,OpTimeFace=0,OpTimePeople=0,OpTimeVehicle=0,OpTimeLpr=0,OpTimePeopleCounting=0,PeriodFacePeopleVehicle_min=14,PeriodFacePeopleVehicle_max=31,PeriodPeopleCounting_min=14,PeriodPeopleCounting_max=92;function CheckWebBrowser(){if(window.URL&&window.Blob)return!0;txt_reccond_title.innerHTML=s_app_reqspec_notenough;return!1}function InitDisplay(){InitDisplayFramework();InitDisplayMask();SetEventHandler();InitDisplayDest()}
function InitDisplayFramework(){document.title=s_app_name;var a='<div class="header_row_style app_name_style">'+s_app_name+"</div>";a+='<div class="header_row_style app_ver_style">'+s_app_ver+"</div>";a+='<div class="header_row_style app_reqspec_style">'+s_app_reqspec+"</div>";a+='<div class="header_row_style app_selmodel_style"><span class="title_name_stype">'+s_title_name+"</span></div>";$("#app_header").append(a)}
function InitDisplayDest(){s_app_dst==s_app_dst_ja||s_app_dst==s_app_dst_asa_ja||s_app_dst==s_app_dst_asm_en||s_app_dst==s_app_dst_xpro_en?($("#multiaicalc_step3").css("display","none"),$("#multiaicalc_step4_vi").css("display","none"),$("#cond_only_vi").css("display","none"),s_app_dst==s_app_dst_xpro_en&&$("#multiaicalc_step1").css("display","none")):($("#multiaicalc_step_asa100").css("display","none"),$("#multiaicalc_step4_asa100").css("display","none"));s_app_dst!=s_app_dst_vi_en&&s_app_dst!=s_app_dst_gen_en&&
($("#step2_ai_app_lpr").css("display","none"),$("#extsoft_lpr").css("display","none"),$("#detect_lpr_max").css("display","none"),$("#detect_lpr_avr").css("display","none"),$("#step4_ai_app_lpr").css("display","none"),$("#td_period_lpr").css("display","none"),$("#td_optime_lpr").css("display","none"))}function SetInnerHtml(a,b){document.getElementById(a).innerHTML=b}function GetItemValueNum(a){a=document.getElementById(a).value.replace(/,/g,"");var b=0;isNaN(a)||(b=Number(a));return b}
function SetBtnText(a,b){document.getElementById(a).value=b}function SetBtnTextError(a,b,e){a=document.getElementById(a);a.value=b;0==e?(a.style.fontWeight="normal",a.style.color="black"):(a.style.fontWeight="bold",a.style.color="red")}function enableComma(a,b){0==a.value.trim().length||isNaN(a.value)||(a.value=Number(a.value).toLocaleString(void 0,{minimumFractionDigits:b,maximumFractionDigits:b}))}function disableComma(a){var b=a.value.replace(/,/g,"");isNaN(b)||(a.value=b)}
function SetResultAll(){SetResultStep1();SetResultStep2();SetResultStep3();SetResultStep4()}
function SetResultStep1(){SetBtnText("num_camera_sum",NumAiCamera.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_camera_sum",NumAiCamera.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_camera_face",NumAiCameraFace.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_camera_other",NumAiCameraOther.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}))}
function SetResultStep2(){SetBtnText("result_num_extsoft_face",String(NumExtsoftFace));SetBtnText("result_num_extsoft_people",String(NumExtsoftPeople));SetBtnText("result_num_extsoft_vehicle",String(NumExtsoftVehicle));SetBtnText("result_num_extsoft_lpr",String(NumExtsoftLpr));SetBtnText("result_num_extsoft_people_counting",String(NumExtsoftPeopleCouting));SetBtnText("result_num_detect_face_max",NumDetectFaceMax.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_people_max",
NumDetectPeopleMax.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_vehicle_max",NumDetectVehicleMax.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_lpr_max",NumDetectLprMax.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_face_avr",NumDetectFaceAvr.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_people_avr",
NumDetectPeopleAvr.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_vehicle_avr",NumDetectVehicleAvr.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_lpr_avr",NumDetectLprAvr.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("result_num_detect_persec",NumDetectPerSec.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}));SetBtnText("num_detect_persec",
NumDetectPerSec.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}))}
function SetResultStep3(){SetBtnText("max_bitrate_bestshot",MaxBitrateBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("max_bitrate_people_counting",MaxBitratePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("total_bitrate_serverpc",TotalBitrateServer.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("max_bitrate_bestshot_asa100",MaxBitrateBestshot.toLocaleString(void 0,
{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("max_bitrate_people_counting_asa100",MaxBitratePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("total_bitrate_serverpc_asa100",TotalBitrateServer.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_max_bitrate_bestshot",MaxBitrateBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_max_bitrate_people_counting",
MaxBitratePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_total_bitrate_video",TotalBitrateVideo.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_total_bitrate_serverpc",TotalBitrateServer.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_max_bitrate_bestshot_asa100",MaxBitrateBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));
SetBtnText("result_max_bitrate_people_counting_asa100",MaxBitratePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_total_bitrate_serverpc_asa100",TotalBitrateServer.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))}
function SetResultStep4(){SetBtnText("result_period_face",String(PeriodFace));SetBtnText("result_period_people",String(PeriodPeople));SetBtnText("result_period_vehicle",String(PeriodVehicle));SetBtnText("result_period_lpr",String(PeriodLpr));SetBtnText("result_period_people_counting",String(PeriodPeopleCounting));SetBtnText("result_optime_face",String(OpTimeFace));SetBtnText("result_optime_people",String(OpTimePeople));SetBtnText("result_optime_vehicle",String(OpTimeVehicle));SetBtnText("result_optime_lpr",
String(OpTimeLpr));SetBtnText("result_optime_people_counting",String(OpTimePeopleCounting));SetBtnText("result_disksize_bestshot",String(Math.round(100*EstimatedDiskSizeBestshot)/100).toLocaleString());SetBtnText("result_disksize_people_counting",String(Math.round(100*EstimatedDiskSizePeopleCounting)/100).toLocaleString());SetBtnText("result_disksize_database",String(Math.round(100*EstimatedDiskSizeDatabase)/100).toLocaleString());SetBtnText("disksize_bestshot",String(Math.round(100*EstimatedDiskSizeBestshot)/
100).toLocaleString());SetBtnText("disksize_people_counting",String(Math.round(100*EstimatedDiskSizePeopleCounting)/100).toLocaleString());SetBtnText("disksize_database",String(Math.round(100*EstimatedDiskSizeDatabase)/100).toLocaleString());SetBtnText("result_disksize_bestshot",EstimatedDiskSizeBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_disksize_people_counting",EstimatedDiskSizePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,
maximumFractionDigits:2}));SetBtnText("disksize_bestshot",EstimatedDiskSizeBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("disksize_people_counting",EstimatedDiskSizePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("disksize_database",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_disksize_bestshot_asa100",EstimatedDiskSizeBestshot.toLocaleString(void 0,
{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_disksize_people_counting_asa100",EstimatedDiskSizePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("result_disksize_sum_asa100",(EstimatedDiskSizeBestshot+EstimatedDiskSizePeopleCounting).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnTextError("result_disksize_database_asa100",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,
maximumFractionDigits:2}),0);SetBtnTextError("result_disksize_database",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),0);SetBtnText("disksize_bestshot_asa100",EstimatedDiskSizeBestshot.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("disksize_people_counting_asa100",EstimatedDiskSizePeopleCounting.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));SetBtnText("disksize_sum_asa100",(EstimatedDiskSizeBestshot+
EstimatedDiskSizePeopleCounting).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));EstimatedDiskSizeDatabase>thEstimatedDBDiskSize?(SetBtnTextError("disksize_database_asa100",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),1),SetBtnTextError("disksize_database",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),1)):(SetBtnTextError("disksize_database_asa100",EstimatedDiskSizeDatabase.toLocaleString(void 0,
{minimumFractionDigits:2,maximumFractionDigits:2}),0),SetBtnTextError("disksize_database",EstimatedDiskSizeDatabase.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),0))}
function InitInput(){SetBtnText("num_camera_face","");SetBtnText("num_camera_other","");SetBtnText("num_camera_sum","");SetBtnText("num_extsoft_face","");SetBtnText("num_extsoft_people","");SetBtnText("num_extsoft_vehicle","");SetBtnText("num_extsoft_people_counting","");SetBtnText("max_bitrate_bestshot","");SetBtnText("max_bitrate_people_counting","");SetBtnText("total_bitrate_video","");SetBtnText("total_bitrate_serverpc","");SetBtnText("max_bitrate_bestshot_asa100","");SetBtnText("max_bitrate_people_counting_asa100",
"");SetBtnText("total_bitrate_serverpc_asa100","");SetBtnText("num_detect_persec","");SetBtnText("period_face",defaultPeriod.toString(10));SetBtnText("period_people",defaultPeriod.toString(10));SetBtnText("period_vehicle",defaultPeriod.toString(10));SetBtnText("period_people_counting",defaultPeriodPeopleCounting.toString(10));SetBtnText("optime_face",defaultOpTime.toString(10));SetBtnText("optime_people",defaultOpTime.toString(10));SetBtnText("optime_vehicle",defaultOpTime.toString(10));SetBtnText("optime_people_counting",
defaultOpTime.toString(10));SetBtnText("period_face","");SetBtnText("period_people","");SetBtnText("period_vehicle","");SetBtnText("period_people_counting","");SetBtnText("optime_face","");SetBtnText("optime_people","");SetBtnText("optime_vehicle","");SetBtnText("optime_people_counting","");SetBtnText("disksize_bestshot","");SetBtnText("disksize_people_counting","");SetBtnText("disksize_database","");SetBtnText("disksize_bestshot_asa100","");SetBtnText("disksize_people_counting_asa100","");SetBtnText("disksize_sum_asa100",
"");SetBtnText("disksize_database_asa100","")}
function SetResultRecommend(){var a=NumAiCameraFace<=thNumAICameraFace;var b=NumAiCamera<=thNumAICameraOther;var e=TotalBitrateServer<=thTotalBitrate;var c=PeriodFace<=LimitUpperPeriod&&PeriodPeople<=LimitUpperPeriod&&PeriodVehicle<=LimitUpperPeriod&&PeriodPeopleCounting<=LimitUpperPeriodPeopleCounting;s_app_dst!=s_app_dst_xpro_en&&(a&&b&&e?(SetInnerHtml("recommend_result_server",s_result_server1),SetInnerHtml("recommend_desc_server1",s_result_server_desc1)):(SetInnerHtml("recommend_result_server",
s_result_server2),SetInnerHtml("recommend_desc_server1",s_result_server_desc2)),a?(SetInnerHtml("recommend_desc_server_result1",s_result_server_result1),$("#recommend_desc_server_result1").addClass("cond_true"),$("#recommend_desc_server_result1").removeClass("cond_false"),SetInnerHtml("recommend_desc_server_result1_asa100",s_result_server_result1),$("#recommend_desc_server_result1_asa100").addClass("cond_true"),$("#recommend_desc_server_result1_asa100").removeClass("cond_false")):(SetInnerHtml("recommend_desc_server_result1",
s_result_server_result2),$("#recommend_desc_server_result1").removeClass("cond_true"),$("#recommend_desc_server_result1").addClass("cond_false"),SetInnerHtml("recommend_desc_server_result1_asa100",s_result_server_result2),$("#recommend_desc_server_result1_asa100").removeClass("cond_true"),$("#recommend_desc_server_result1_asa100").addClass("cond_false")),b?(SetInnerHtml("recommend_desc_server_result2",s_result_server_result1),$("#recommend_desc_server_result2").addClass("cond_true"),$("#recommend_desc_server_result2").removeClass("cond_false"),
SetInnerHtml("recommend_desc_server_result2_asa100",s_result_server_result1),$("#recommend_desc_server_result2_asa100").addClass("cond_true"),$("#recommend_desc_server_result2_asa100").removeClass("cond_false")):(SetInnerHtml("recommend_desc_server_result2",s_result_server_result2),$("#recommend_desc_server_result2").removeClass("cond_true"),$("#recommend_desc_server_result2").addClass("cond_false"),SetInnerHtml("recommend_desc_server_result2_asa100",s_result_server_result2),$("#recommend_desc_server_result2_asa100").removeClass("cond_true"),
$("#recommend_desc_server_result2_asa100").addClass("cond_false")),e?(SetInnerHtml("recommend_desc_server_result3",s_result_server_result1),$("#recommend_desc_server_result3").addClass("cond_true"),$("#recommend_desc_server_result3").removeClass("cond_false")):(SetInnerHtml("recommend_desc_server_result3",s_result_server_result2),$("#recommend_desc_server_result3").removeClass("cond_true"),$("#recommend_desc_server_result3").addClass("cond_false")));NumDetectPerSec<=thDetectPerSec?(SetInnerHtml("recommend_result_storage",
s_result_storage1),SetInnerHtml("recommend_desc_storage",s_result_storage_desc1)):(SetInnerHtml("recommend_result_storage",s_result_storage2),SetInnerHtml("recommend_desc_storage",s_result_storage_desc2));EstimatedDiskSizeDatabase<thEstimatedDBDiskSize&&c?(SetInnerHtml("recommend_result_db",s_result_database1),SetInnerHtml("recommend_desc_db",s_result_database_desc1)):(SetInnerHtml("recommend_result_db",s_result_database2),c?SetInnerHtml("recommend_desc_db",s_result_database_desc2):SetInnerHtml("recommend_desc_db",
s_result_database_desc3))}
function InitDisplayWords(){SetInnerHtml("note_overview",s_note_overview);SetInnerHtml("step1_title",s_step1_title);SetInnerHtml("step1_row_item1",s_step1_row_item1);SetInnerHtml("step1_row_item2",s_step1_row_item2);SetInnerHtml("step1_row_item3",s_step1_row_item3);SetInnerHtml("step2_title",s_step2_title);SetInnerHtml("step2_ai_app_face",s_ai_app_face);SetInnerHtml("step2_ai_app_people",s_ai_app_people);SetInnerHtml("step2_ai_app_vehicle",s_ai_app_vehicle);SetInnerHtml("step2_ai_app_people_counting",s_ai_app_people_counting);
SetInnerHtml("step2_row_item1",s_step2_row_item1);SetInnerHtml("step2_row_item2",s_step2_row_item2);SetInnerHtml("step2_row_item3",s_step2_row_item3);SetInnerHtml("step2_row_item4",s_step2_row_item4);SetInnerHtml("step2_row_item5",s_step2_row_item5);SetInnerHtml("step3_title",s_step3_title);SetInnerHtml("step3_row_item1",s_step3_row_item1);SetInnerHtml("step3_row_item2",s_step3_row_item2);SetInnerHtml("step3_row_item3",s_step3_row_item3);SetInnerHtml("step3_row_item4",s_step3_row_item4);SetInnerHtml("step3_row_item1_asa100",
s_step3_row_item1);SetInnerHtml("step3_row_item2_asa100",s_step3_row_item2);SetInnerHtml("step3_row_item4_asa100",s_step3_row_item4);SetInnerHtml("step4_title",s_step4_title);SetInnerHtml("step4_ai_app_face",s_ai_app_face);SetInnerHtml("step4_ai_app_people",s_ai_app_people);SetInnerHtml("step4_ai_app_vehicle",s_ai_app_vehicle);SetInnerHtml("step4_ai_app_people_counting",s_ai_app_people_counting);SetInnerHtml("step4_row_item1",s_step4_row_item1);SetInnerHtml("step4_row_item2",s_step4_row_item2);SetInnerHtml("step4_note",
s_help_step4);SetInnerHtml("step4_note2",s_step4_note2);SetInnerHtml("step4_row_item3",s_step4_row_item3);SetInnerHtml("step4_row_item4",s_step4_row_item4);SetInnerHtml("step4_row_item5",s_step4_row_item5);SetInnerHtml("step4_row_item3_asa100",s_step4_row_item3);SetInnerHtml("step4_row_item4_asa100",s_step4_row_item4);SetInnerHtml("step4_row_item5_asa100",s_step4_row_item5);SetInnerHtml("step4_row_item6_asa100",s_step4_row_item6);SetBtnText("btn_result",s_button_result);SetInnerHtml("result_title1",
s_result_title1);SetBtnText("btn_output_text",s_button_textoutput);SetInnerHtml("app_info_title",s_result_appinfo_title);SetInnerHtml("output_text",s_textoutput);SetInnerHtml("recommend",s_result_title2);SetInnerHtml("recommend_item",s_result_col_item1);SetInnerHtml("recommend_result",s_result_col_item2);SetInnerHtml("recommend_desc",s_result_col_item3);SetInnerHtml("recommend_server",s_result_row_item1);SetInnerHtml("recommend_storage",s_result_row_item2);SetInnerHtml("recommend_database",s_result_row_item3);
SetInnerHtml("multiaicalc_yourselection",s_result_title3);SetInnerHtml("recommend_server_table_title",s_result_server_tabletitle);SetInnerHtml("recommend_server_table_title_asa100",s_result_server_tabletitle);SetInnerHtml("recommend_server_table_header_cond",s_result_server_row_item1);SetInnerHtml("recommend_server_table_header_result",s_result_server_row_item2);SetInnerHtml("recommend_server_table_header_desc",s_result_server_row_item3);SetInnerHtml("recommend_server_table_row_cond1",s_result_server_col_item1);
SetInnerHtml("recommend_server_table_row_desc1",s_result_server_col_desc1);SetInnerHtml("recommend_server_table_row_cond2",s_result_server_col_item2);SetInnerHtml("recommend_server_table_row_desc2",s_result_server_col_desc2);SetInnerHtml("recommend_server_table_row_cond3",s_result_server_col_item3);SetInnerHtml("recommend_server_table_row_desc3",s_result_server_col_desc3);SetInnerHtml("recommend_server_table_header_cond_asa100",s_result_server_row_item1);SetInnerHtml("recommend_server_table_header_result_asa100",
s_result_server_row_item2);SetInnerHtml("recommend_server_table_header_desc_asa100",s_result_server_row_item3);SetInnerHtml("recommend_server_table_row_cond1_asa100",s_result_server_col_item1);SetInnerHtml("recommend_server_table_row_desc1_asa100",s_result_server_col_desc1);SetInnerHtml("recommend_server_table_row_cond2_asa100",s_result_server_col_item2);SetInnerHtml("recommend_server_table_row_desc2_asa100",s_result_server_col_desc2);SetInnerHtml("result_step1_result_title",s_step1_title);SetInnerHtml("result_step1_row_item1",
s_step1_row_item1);SetInnerHtml("result_step1_row_item2",s_step1_row_item2);SetInnerHtml("result_step1_row_item3",s_step1_row_item3);SetInnerHtml("result_step2_result_title",s_step2_title);SetInnerHtml("result_step2_ai_app_face",s_ai_app_face);SetInnerHtml("result_step2_ai_app_people",s_ai_app_people);SetInnerHtml("result_step2_ai_app_vehicle",s_ai_app_vehicle);SetInnerHtml("result_step2_ai_app_people_counting",s_ai_app_people_counting);SetInnerHtml("result_step2_row_item1",s_step2_row_item1);SetInnerHtml("result_step2_row_item2",
s_step2_row_item2);SetInnerHtml("result_step2_row_item3",s_step2_row_item3);SetInnerHtml("result_step2_row_item4",s_step2_row_item4);SetInnerHtml("result_step2_row_item5",s_step2_row_item5);SetInnerHtml("result_step3_title",s_step3_title);SetInnerHtml("result_step3_row_item1",s_step3_row_item1);SetInnerHtml("result_step3_row_item2",s_step3_row_item2);SetInnerHtml("result_step3_row_item3",s_step3_row_item3);SetInnerHtml("result_step3_row_item4",s_step3_row_item4);SetInnerHtml("result_step3_row_item1_asa100",
s_step3_row_item1);SetInnerHtml("result_step3_row_item2_asa100",s_step3_row_item2);SetInnerHtml("result_step3_row_item4_asa100",s_step3_row_item4);SetInnerHtml("result_step4_title",s_step4_title);SetInnerHtml("result_step4_ai_app_face",s_ai_app_face);SetInnerHtml("result_step4_ai_app_people",s_ai_app_people);SetInnerHtml("result_step4_ai_app_vehicle",s_ai_app_vehicle);SetInnerHtml("result_step4_ai_app_people_counting",s_ai_app_people_counting);SetInnerHtml("result_step4_row_item1",s_step4_row_item1);
SetInnerHtml("result_step4_row_item2",s_step4_row_item2);SetInnerHtml("result_step4_row_item3",s_step4_row_item3);SetInnerHtml("result_step4_row_item4",s_step4_row_item4);SetInnerHtml("result_step4_row_item5",s_step4_row_item5);SetInnerHtml("result_step4_row_item3_asa100",s_step4_row_item3);SetInnerHtml("result_step4_row_item4_asa100",s_step4_row_item4);SetInnerHtml("result_step4_row_item5_asa100",s_step4_row_item5);SetInnerHtml("result_step4_row_item6_asa100",s_step4_row_item6);SetBtnText("input_cond",
s_button_input_cond)}
function clearErrorStatus(){$("#num_camera_face").removeClass("textbox_error");$("#num_camera_other").removeClass("textbox_error");$("#total_bitrate_video").removeClass("textbox_error");$("#num_extsoft_face").removeClass("textbox_error");$("#num_extsoft_people").removeClass("textbox_error");$("#num_extsoft_vehicle").removeClass("textbox_error");$("#num_extsoft_lpr").removeClass("textbox_error");$("#num_extsoft_people_counting").removeClass("textbox_error");$("#period_face").removeClass("textbox_error");$("#period_people").removeClass("textbox_error");
$("#period_vehicle").removeClass("textbox_error");$("#period_lpr").removeClass("textbox_error");$("#period_people_counting").removeClass("textbox_error");$("#optime_face").removeClass("textbox_error");$("#optime_people").removeClass("textbox_error");$("#optime_vehicle").removeClass("textbox_error");$("#optime_lpr").removeClass("textbox_error");$("#optime_people_counting").removeClass("textbox_error")}
var arr_num_people_vehicle_listbox=[100,200,500,1E3,2E3,3E3,4E3,5E3,6E3,7E3,8E3,9E3,1E4,15E3,2E4,25E3,3E4];
function SetSelectBox(a,b){for(var e=document.getElementById(a),c=0;e.lastChild;)e.removeChild(e.lastChild);for(var d=0;d<arr_num_people_vehicle_listbox.length;d++)arr_num_people_vehicle_listbox[d]<=b&&(c=document.createElement("option"),c.value=arr_num_people_vehicle_listbox[d],c.text=arr_num_people_vehicle_listbox[d].toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),e.appendChild(c),c=d);document.getElementById(a).options[c].selected=!0}
function InitSelectStep2(){for(var a=["num_detect_face_max","num_detect_people_max","num_detect_vehicle_max","num_detect_lpr_max"],b=["num_detect_face_avr","num_detect_people_avr","num_detect_vehicle_avr","num_detect_lpr_avr"],e=0,c=0;c<a.length;c++){for(var d=0;d<arr_num_people_vehicle_listbox.length;d++){var f=document.createElement("option");f.value=arr_num_people_vehicle_listbox[d];f.text=arr_num_people_vehicle_listbox[d].toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0});
document.getElementById(a[c]).appendChild(f);f.value==defalutSelectedValue&&(e=d)}document.getElementById(a[c]).options[e].selected=!0}for(c=0;c<b.length;c++)SetSelectBox(b[c],defalutSelectedValue)}
function dispHelp(a){var b=640,e=200,c=0,d=[[[700,750],[700,300],[700,260],[700,220]],[[700,480],[700,200],[700,170],[700,180]],[[700,480],[700,200],[700,140],[700,170]],[[700,480],[700,200],[700,180],[700,180]],[[700,230],[700,200],[700,190],[700,170]]];switch(s_app_dst){case s_app_dst_ja:c=0;break;case s_app_dst_asa_ja:c=0;break;case s_app_dst_vi_en:c=1;break;case s_app_dst_gen_en:c=2;break;case s_app_dst_asm_en:c=3;break;case s_app_dst_xpro_en:c=4}switch(a){case 1:b=d[c][0][0];e=d[c][0][1];break;
case 2:b=d[c][1][0];e=d[c][1][1];break;case 3:b=d[c][2][0];e=d[c][2][1];break;case 4:b=d[c][3][0],e=d[c][3][1]}newwin&&!newwin.closed&&newwin.close();newwin=window.open(tooltip_step_name+a+".html",s_app_name,"width="+b+",height="+(e+40)+",toolbar=yes,menubar=no,scrollbars=no")}function closeWindow(){open("about:blank","_self").close()}function closeHelpWindow(){newwin&&!newwin.closed&&newwin.close();newprintwin&&!newprintwin.closed&&newprintwin.close()}
function dispHelpPrint(){var a=0,b=[[[700,450]],[[700,380]]];switch(s_app_dst){case s_app_dst_ja:a=0;break;case s_app_dst_asa_ja:a=0;break;case s_app_dst_vi_en:a=1;break;case s_app_dst_gen_en:a=1;break;case s_app_dst_asm_en:a=1;break;case s_app_dst_xpro_en:a=1}newprintwin=window.open(tooltip_print_name+".html","MultiAI Calc Print","width="+b[a][0][0]+",height="+b[a][0][1]+",toolbar=yes,menubar=no,scrollbars=no")}
function InitDisplayMask(){s_app_dst_ja!=s_app_dst&&s_app_dst_asa_ja!=s_app_dst&&s_app_dst_asm_en!=s_app_dst||"undefined"!==typeof DspSmartCodingInfo||$(".reccond_smartcoding_block").css("display","none");s_app_dst_ch==s_app_dst&&$(".reccond_secure_block").css("display","none");"undefined"===typeof DspFaceMatchingInfo&&$(".reccond_txt_style_advance_facematch").css("display","none");s_app_dst_ja!=s_app_dst&&s_app_dst_asa_ja!=s_app_dst&&s_app_dst_asm_en!=s_app_dst&&($("#txt_recresult_license_camera_64_nx400").css("visibility",
"hidden"),$("#recresult_license_camera_64_nx400").css("visibility","hidden"),$("#txt_recresult_license_camera_nx300_max").css("visibility","hidden"),$("#recresult_license_camera_nx300_max").css("visibility","hidden"))};function SearchOptionValue(a,b){var e=!1;a=$(a).children();for(var c=a.length,d=0;d<c;d++)if(Number(a[d].value)==b){e=!0;break}return e}function CheckInputNumberOnly(a,b){return 46==a.keyCode||37==a.keyCode||39==a.keyCode||96<=a.keyCode&105>=a.keyCode||"Tab"==a.key||"Backspace"==a.key||"Enter"==a.key||1==b&&"."==a.key||window.event.ctrlKey&&(67==a.keyCode||86==a.keyCode)?!0:0>"0123456789\b\r\t".indexOf(a.key,0)?!1:!0}
function ConverZenNum2HanNum(a){return a.replace(/[\uff10-\uff19]/g,function(b){return String.fromCharCode(b.charCodeAt(0)-65248)})}function CheckString(a){var b="";for(i=0;i<a.length;i++)0<="0123456789.\b\r\t".indexOf(a[i],0)&&(b+=a[i]);return b}
function issue_result(){var a=new Date,b=a.getFullYear(),e=a.getMonth()+1,c=a.getDate(),d=a.getHours(),f=a.getMinutes();a=a.getSeconds();SetInnerHtml("issue_date_title",s_appinfo_date_title);SetInnerHtml("software_title",s_appinfo_app_title);SetInnerHtml("version_title",s_appinfo_version_title);SetInnerHtml("issue_date_value",b+"/"+e+"/"+c+" "+("00"+d).substr(-2)+":"+("00"+f).substr(-2)+":"+("00"+a).substr(-2));SetInnerHtml("software_value",s_app_name);SetInnerHtml("version_value",s_app_ver);$("#header_note").css("display",
"none");$("#multiaicalc_step1").css("display","none");$("#multiaicalc_step2").css("display","none");$("#multiaicalc_step3").css("display","none");$("#multiaicalc_step4").css("display","none");$("#print_result").css("display","none");$("#print_date").css("display","block");$("#btn_result").css("display","none");$("#result").css("display","block");dispHelpPrint()}
function input_cond(){$("#header_note").css("display","block");$("#multiaicalc_step1").css("display","block");$("#multiaicalc_step2").css("display","block");s_app_dst_ja!=s_app_dst&&s_app_dst_asa_ja!=s_app_dst&&s_app_dst_asm_en!=s_app_dst&&s_app_dst_xpro_en!=s_app_dst&&$("#multiaicalc_step3").css("display","block");s_app_dst==s_app_dst_xpro_en&&$("#multiaicalc_step1").css("display","none");$("#multiaicalc_step4").css("display","block");$("#btn_result").css("display","block");$("#result").css("display",
"none")};function SetEventHandler(){$(window).on("beforeunload",function(a){InitInput();document.getElementById("num_detect_face_max").options[0].selected=!0;document.getElementById("num_detect_people_max").options[0].selected=!0;document.getElementById("num_detect_vehicle_max").options[0].selected=!0;document.getElementById("num_detect_people_counting_max").options[0].selected=!0;document.getElementById("num_detect_face_avr").options[0].selected=!0;document.getElementById("num_detect_people_avr").options[0].selected=
!0;document.getElementById("num_detect_vehicle_avr").options[0].selected=!0;document.getElementById("num_detect_people_counting_avr").options[0].selected=!0});$('[id^="num_camera_"][id$="face"],[id^="num_camera_"][id$="other"]').keydown(function(a){a=CheckInputNumberOnly(a,!1);$(this).removeClass("textbox_error");$(this).addClass("textbox_normal");return a});$('[id^="num_extsoft_"]').keydown(function(a){a=CheckInputNumberOnly(a,!1);$(this).removeClass("textbox_error");$(this).addClass("textbox_normal");
return a});$('[id^="total_bitrate_video"]').keydown(function(a){a=CheckInputNumberOnly(a,!0);$(this).removeClass("textbox_error");$(this).addClass("textbox_normal");return a});$('[id^="period_"],[id^="optime_"]').keydown(function(a){a=CheckInputNumberOnly(a,!1);$(this).removeClass("textbox_error");$(this).addClass("textbox_normal");return a});$('[id^="num_camera_"][id$="face"],[id^="num_camera_"][id$="other"]').change(function(a){$(this).val(CheckString($(this).val()));a=Number($(this).val());0>a?
($(this).value=0,$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()):a>LimitUpperNumAiCamera&&($(this).val(String(LimitUpperNumAiCamera)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit());DoCalculateAll();SetResultAll()});$('[id^="num_extsoft_face"]').change(function(a){$(this).val(CheckString($(this).val()));a=Number($(this).val());0>a?($(this).value=0,$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),
updateTimeOverUnderLimit()):a>LimitUpperNumExtsoftFace&&($(this).val(String(LimitUpperNumExtsoftFace)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit());DoCalculateAll();SetResultAll()});$('[id^="num_extsoft_"][id$="people"],[id^="num_extsoft_"][id$="vehicle"],[id^="num_extsoft_"][id$="lpr"],[id^="num_extsoft_"][id$="people_counting"]').change(function(a){$(this).val(CheckString($(this).val()));a=Number($(this).val());0>a?($(this).value=0,$(this).removeClass("textbox_normal"),
$(this).addClass("textbox_error"),updateTimeOverUnderLimit()):a>LimitUpperNumExtsoft&&($(this).val(String(LimitUpperNumExtsoft)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit());DoCalculateAll();SetResultAll()});$('[id^="num_detect_"][id$="_max"]').change(function(a){DoCalculateAll();SetResultAll();a=this.id.substr(11);a=a.substr(0,a.length-4);SetSelectBox("num_detect_"+a+"_avr",Number(this.value))});$('[id^="num_detect_"][id$="_avr"]').change(function(a){DoCalculateAll();
SetResultAll()});$('[id^="total_bitrate_video"]').change(function(a){$(this).val(CheckString($(this).val()));a=Number($(this).val());0>a?($(this).value=0,$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error")):a>LimitUpperTotalBitrateServer&&($(this).val(String(LimitUpperTotalBitrateServer)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"));DoCalculateAll();SetResultAll()});$('[id^="period_people_counting"]').change(function(a){$(this).val(CheckString($(this).val()));
a=$(this).val();var b=Number($(this).val());""!=a&&(b<LimitLowerPeriodOnSQLSvrExpress?($(this).val(String(LimitLowerPeriodOnSQLSvrExpress)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()):b>LimitUpperPeriodOnSQLSvrExpress&&($(this).val(String(LimitUpperPeriodOnSQLSvrExpress)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()));DoCalculateAll();SetResultAll()});$('[id^="period_"][id$="face"],[id^="period_"][id$="people"],[id^="period_"][id$="vehicle"],[id^="period_"][id$="lpr"]').change(function(a){$(this).val(CheckString($(this).val()));
a=$(this).val();var b=Number($(this).val());""!=a&&(b<LimitLowerPeriodOnSQLSvrExpress?($(this).val(String(LimitLowerPeriodOnSQLSvrExpress)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()):b>LimitUpperPeriodOnSQLSvrExpress&&($(this).val(String(LimitUpperPeriodOnSQLSvrExpress)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()));DoCalculateAll();SetResultAll()});$('[id^="optime_"]').change(function(a){$(this).val(CheckString($(this).val()));
a=Number($(this).val());0>a?($(this).value=0,$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit()):a>LimitUpperOpTime&&($(this).val(String(LimitUpperOpTime)),$(this).removeClass("textbox_normal"),$(this).addClass("textbox_error"),updateTimeOverUnderLimit());DoCalculateAll();SetResultAll()})}function updateTimeOverUnderLimit(){timeOverUnderLimit=(new Date).getTime()};function DoCalculateAll(){NumAiCameraFace=GetItemValueNum("num_camera_face");NumAiCameraOther=GetItemValueNum("num_camera_other");NumExtsoftFace=GetItemValueNum("num_extsoft_face");NumExtsoftPeople=GetItemValueNum("num_extsoft_people");NumExtsoftVehicle=GetItemValueNum("num_extsoft_vehicle");NumExtsoftLpr=GetItemValueNum("num_extsoft_lpr");NumExtsoftPeopleCouting=GetItemValueNum("num_extsoft_people_counting");NumDetectFaceMax=GetItemValueNum("num_detect_face_max");NumDetectPeopleMax=GetItemValueNum("num_detect_people_max");
NumDetectVehicleMax=GetItemValueNum("num_detect_vehicle_max");NumDetectLprMax=GetItemValueNum("num_detect_lpr_max");NumDetectFaceAvr=GetItemValueNum("num_detect_face_avr");NumDetectPeopleAvr=GetItemValueNum("num_detect_people_avr");NumDetectVehicleAvr=GetItemValueNum("num_detect_vehicle_avr");NumDetectLprAvr=GetItemValueNum("num_detect_lpr_avr");TotalBitrateVideo=GetItemValueNum("total_bitrate_video");PeriodFace=GetItemValueNum("period_face");PeriodPeople=GetItemValueNum("period_people");PeriodVehicle=
GetItemValueNum("period_vehicle");PeriodLpr=GetItemValueNum("period_lpr");PeriodPeopleCounting=GetItemValueNum("period_people_counting");OpTimeFace=GetItemValueNum("optime_face");OpTimePeople=GetItemValueNum("optime_people");OpTimeVehicle=GetItemValueNum("optime_vehicle");OpTimeLpr=GetItemValueNum("optime_lpr");OpTimePeopleCounting=GetItemValueNum("optime_people_counting");NumAiCamera=NumAiCameraFace+NumAiCameraOther;DoCalculateStep2(NumExtsoftFace,NumExtsoftPeople,NumExtsoftVehicle,NumExtsoftLpr,
NumDetectFaceMax,NumDetectPeopleMax,NumDetectVehicleMax,NumDetectLprMax);DoCalculateStep3(NumExtsoftFace,NumExtsoftPeople,NumExtsoftVehicle,NumExtsoftLpr,NumExtsoftPeopleCouting,NumDetectFaceMax,NumDetectPeopleMax,NumDetectVehicleMax,NumDetectLprMax,TotalBitrateVideo);DoCalculateStep4(NumExtsoftFace,NumExtsoftPeople,NumExtsoftVehicle,NumExtsoftLpr,NumExtsoftPeopleCouting,NumDetectFaceAvr,NumDetectPeopleAvr,NumDetectVehicleAvr,NumDetectLprAvr,PeriodFace,PeriodPeople,PeriodVehicle,PeriodLpr,PeriodPeopleCounting,
OpTimeFace,OpTimePeople,OpTimeVehicle,OpTimeLpr,OpTimePeopleCounting)}function DoCalculateStep2(a,b,e,c,d,f,g,h){NumDetectPerSec=0;return NumDetectPerSec=(a*d+b*f*NumPeopleBestshotPer1People+e*g*NumVehicleBestshotPer1Vehicle+c*h*NumLprBestshotPer1Vehicle)/60/60}
function DoCalculateStep3(a,b,e,c,d,f,g,h,k,l){TotalBitrateServer=TotalBitrateVideo=MaxBitratePeopleCounting=MaxBitrateBestshot=0;MaxBitrateBestshot=8*SizeBestshotFace/1024*NumFaceBestshotPer1People*(f/3600)*a+8*SizeBestshotPeople/1024*NumPeopleBestshotPer1People*(g/3600)*b+8*SizeBestshotVehicle/1024*NumVehicleBestshotPer1Vehicle*(h/3600)*e+8*SizeBestshotLpr/1024*NumLprBestshotPer1Vehicle*(k/3600)*c;MaxBitratePeopleCounting=8*AvePeopleCountingData/1024/3600*d+8*AveHeatmapData/1024/3600*d;TotalBitrateVideo=
l;TotalBitrateServer=MaxBitrateBestshot+MaxBitratePeopleCounting+TotalBitrateVideo}
function DoCalculateStep4(a,b,e,c,d,f,g,h,k,l,m,n,p,q,r,t,u,v,w){EstimatedDiskSizeDatabase=EstimatedDiskSizePeopleCounting=EstimatedDiskSizeBestshot=0;EstimatedDiskSizeBestshot=SizeBestshotFace/1024/1024*f*r*a*l+SizeBestshotPeople/1024/1024*g*t*b*m+SizeBestshotVehicle/1024/1024*h*u*e*n+SizeBestshotLpr/1024/1024*k*v*c*p;EstimatedDiskSizePeopleCounting=SizeIndexImageHeatmapPerHour/1024/1024*d*q*w+SizeBinaryDataHeatmapPerHour/1024/1024*d*q*w;EstimatedDiskSizeDatabase=DbSize1RecordFace/1024/1024*f*r*
a*l+DbSize1RecordPeople/1024/1024*g*t*b*m+DbSize1RecordVehicle/1024/1024*h*u*e*n+DbSize1RecordLpr/1024/1024*k*v*c*p}
function calc_result(){if(!((new Date).getTime()-timeOverUnderLimit<=thresholdTimeOverUnderLimit)){clearErrorStatus();var a=document.getElementById("num_camera_face"),b=document.getElementById("num_camera_other"),e=document.getElementById("total_bitrate_video");a=""==a.value;b=""==b.value;e=""==e.value;var c=!1;s_app_dst!=s_app_dst_xpro_en&&(a&&b&&(c=!0,a&&($("#num_camera_face").removeClass("textbox_normal"),$("#num_camera_face").addClass("textbox_error")),b&&($("#num_camera_other").removeClass("textbox_normal"),
$("#num_camera_other").addClass("textbox_error"))),e&&s_app_dst!=s_app_dst_ja&&s_app_dst!=s_app_dst_asa_ja&&s_app_dst!=s_app_dst_asm_en&&s_app_dst!=s_app_dst_xpro_en&&(c=!0,$("#total_bitrate_video").removeClass("textbox_normal"),$("#total_bitrate_video").addClass("textbox_error")),NumAiCameraFace=GetItemValueNum("num_camera_face"),NumAiCameraOther=GetItemValueNum("num_camera_other"),NumExtsoftFace=GetItemValueNum("num_extsoft_face"),0==NumAiCamera&&(c=!0,"0"==document.getElementById("num_camera_face").value&&
($("#num_camera_face").removeClass("textbox_normal"),$("#num_camera_face").addClass("textbox_error")),"0"==document.getElementById("num_camera_other").value&&($("#num_camera_other").removeClass("textbox_normal"),$("#num_camera_other").addClass("textbox_error"))),0==TotalBitrateVideo&&s_app_dst!=s_app_dst_ja&&s_app_dst!=s_app_dst_asa_ja&&s_app_dst!=s_app_dst_asm_en&&s_app_dst!=s_app_dst_xpro_en&&(c=!0,$("#total_bitrate_video").removeClass("textbox_normal"),$("#total_bitrate_video").addClass("textbox_error")));
c?window.alert(s_error1):(DoCalculateAll(),SetResultStep1(),SetResultStep2(),SetResultStep3(),SetResultStep4(),SetResultRecommend(),$("#header_note").css("display","none"),$("#multiaicalc_step1").css("display","none"),$("#multiaicalc_step2").css("display","none"),$("#multiaicalc_step3").css("display","none"),$("#multiaicalc_step4").css("display","none"),$("#print_result").css("display","block"),$("#print_date").css("display","none"),$("#btn_result").css("display","none"),$("#result").css("display",
"block"),s_app_dst==s_app_dst_ja||s_app_dst==s_app_dst_asa_ja||s_app_dst==s_app_dst_asm_en||s_app_dst==s_app_dst_xpro_en?($("#cond_vi").css("display","none"),$("#multiaicalc_step3_result").css("display","none"),$("#multiaicalc_step4_result_vi").css("display","none"),s_app_dst==s_app_dst_xpro_en&&($("#recommend_server_cond").css("display","none"),a=$("#recommend_table tbody").children(),3<a.length&&a[1].remove())):($("#cond_asa100").css("display","none"),$("#multiaicalc_step2_result_only_asa100").css("display",
"none"),$("#multiaicalc_step4_result_asa100").css("display","none")),s_app_dst!=s_app_dst_vi_en&&s_app_dst!=s_app_dst_gen_en&&($("#result_step2_ai_app_lpr").css("display","none"),$("#td_result_num_extsoft_lpr").css("display","none"),$("#td_result_num_detect_lpr_max").css("display","none"),$("#td_result_num_detect_lpr_avr").css("display","none"),$("#result_step4_ai_app_lpr").css("display","none"),$("#td_result_period_lpr").css("display","none"),$("#td_result_optime_lpr").css("display","none")),s_app_dst==
s_app_dst_xpro_en&&$("#multiaicalc_step1_result").css("display","none"),clearErrorStatus())}};
