view.html 195 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  6. <meta http-equiv="Content-Style-Type" content="text/css" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  8. <title id="page_title"></title>
  9. <link rel="stylesheet" type="text/css" href="/resources/css/init.css" /> <!-- init -->
  10. <link rel="stylesheet" type="text/css" href="/resources/css/comm.css" /> <!-- comm -->
  11. <link rel="stylesheet" type="text/css" href="/resources/css/setup.css" />
  12. <link rel="stylesheet" type="text/css" href="/resources/css/live.css" /> <!-- live -->
  13. <script type="text/javascript" charset="utf-8" src="/resources/lib/jquery-1.9.1.min.js"></script> <!-- jquery -->
  14. <script src="/resources/lib/flot/jquery.flot.js" type="text/javascript"></script>
  15. <link rel="stylesheet" href="/resources/css/base/jquery.ui.all.css">
  16. <script src="/resources/lib/ui/jquery.ui.core.js"></script>
  17. <script src="/resources/lib/ui/jquery.ui.widget.js"></script>
  18. <script src="/resources/lib/ui/jquery.ui.mouse.js"></script>
  19. <script src="/resources/lib/ui/jquery.ui.draggable.js"></script>
  20. <script src="/resources/lib/ui/jquery.ui.slider.js"></script>
  21. <script src="/resources/lib/ui/jquery.ui.position.js"></script>
  22. <script src="/resources/lib/ui/jquery.ui.resizable.js"></script>
  23. <script src="/resources/lib/ui/jquery.ui.dialog.js"></script>
  24. <script src="/resources/lib/ui/jquery.ui.effect.js"></script>
  25. <script src="/resources/lib/ui/jquery.ui.tooltip.js"></script>
  26. <script src="/resources/lib/ui/jquery.ui.spinner.js"></script>
  27. <script src="/resources/lib/ui/jquery.ui.button.js"></script>
  28. <script type="text/javascript" charset="utf-8" src="/resources/lib/comm.js"></script> <!-- comm -->
  29. <script type="text/javascript" charset="utf-8" src="/resources/lib/live.js"></script> <!-- live -->
  30. <script type="text/javascript" charset="utf-8" src="/resources/lib/setup.js"></script>
  31. <script type="text/javascript" charset="utf-8" src="/resources/lib/jquery.customSelect.js"></script>
  32. <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Lib.js"></script>
  33. <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Util.js"></script>
  34. <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Param.js"></script>
  35. <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Dzoom.js"></script>
  36. <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Ptz.js"></script>
  37. <script src="/resources/lib/tvs.js"></script>
  38. <script src="/resources/lib/vxgmp.js"></script>
  39. <!-- vxgmp -->
  40. <script type="text/javascript" src="/vxgplayer/vxgplayer-2.8.41.js"></script>
  41. <link href="/vxgplayer/vxgplayer-2.8.41.min.css" rel="stylesheet"/>
  42. <script>
  43. if (VXGMP_GetBrowser() != BR_MSIE)
  44. {
  45. if (parseInt(readSetupByKey("SYS_SUPPORT_WEBSOCKET")) == 1)
  46. {
  47. load_script = function(src) {
  48. // Initialize scripts queue
  49. if( load_script.scripts === undefined ) {
  50. load_script.scripts = [];
  51. load_script.index = -1;
  52. load_script.loading = false;
  53. load_script.next = function() {
  54. if( load_script.loading ) return;
  55. // Load the next queue item
  56. load_script.loading = true;
  57. var item = load_script.scripts[++load_script.index];
  58. var head = document.getElementsByTagName('head')[0];
  59. var script = document.createElement('script');
  60. script.type = 'text/javascript';
  61. script.src = item.src;
  62. // When complete, start next item in queue and resolve this item's promise
  63. script.onload = function() {
  64. load_script.loading = false;
  65. if( load_script.index < load_script.scripts.length - 1 ) load_script.next();
  66. item.resolve();
  67. };
  68. head.appendChild(script);
  69. };
  70. };
  71. // Adding a script to the queue
  72. if( src ) {
  73. // Check if already added
  74. for(var i=0; i < load_script.scripts.length; i++) {
  75. if( load_script.scripts[i].src == src ) return load_script.scripts[i].promise;
  76. }
  77. // Add to the queue
  78. var item = { src: src };
  79. item.promise = new Promise(function(resolve) { item.resolve = resolve;});
  80. load_script.scripts.push(item);
  81. load_script.next();
  82. }
  83. // Return the promise of the last queue item
  84. return load_script.scripts[ load_script.scripts.length - 1 ].promise;
  85. };
  86. [ "/vxgwsplayer/media-stream-library.dev.js",
  87. "/vxgwsplayer/vxgwsplayer-1.0.9.js",
  88. ].forEach(load_script);
  89. $('head').append('<link href="\/vxgwsplayer\/vxgwsplayer-1.0.9.min.css" rel="stylesheet"\/>');
  90. }
  91. }
  92. </script>
  93. <script type="text/javascript">
  94. $(function() {
  95. var centerX;
  96. var centerY;
  97. var radius;
  98. var cursorSize;
  99. function getLengthFromCenter(event) {
  100. x = event.clientX - centerX;
  101. y = event.clientY - centerY;
  102. l = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
  103. return l;
  104. }
  105. function getIntersect(event) {
  106. r = radius - cursorSize / 2;
  107. r2 = Math.pow(r, 2);
  108. cx = event.clientX - centerX;
  109. cy = event.clientY - centerY;
  110. x = Math.sqrt(r2 / (1 + Math.pow(cy / cx, 2)));
  111. if(cx < 0)
  112. x = 0 - x;
  113. y = Math.sqrt(r2 / (1 + Math.pow(cx / cy, 2)));
  114. if(cy < 0)
  115. y = 0 - y;
  116. return new Array(x, y);
  117. }
  118. $( "#draggable3" ).draggable({
  119. containment: "#containment-wrapper", scroll: false, revert: true,
  120. revertDuration: 50, customPos: true, snap: "#containment-wrapper",
  121. start: function(event, ui) {
  122. },
  123. drag: function(event, ui) {
  124. var x;
  125. var y;
  126. var distance;
  127. var result = false;
  128. // yckim : browser resize 때문에
  129. var bt = document.body.scrollTop;
  130. var bl = document.body.scrollLeft;
  131. var et = document.documentElement ? document.documentElement.scrollTop : null;
  132. var el = document.documentElement ? document.documentElement.scrollLeft: null;
  133. centerX = $(containment).parent().position().left + radius - (bl || el);
  134. centerY = $(containment).parent().position().top + radius - (bt || et);
  135. distance = getLengthFromCenter(event);
  136. if(distance < (radius - cursorSize / 2))
  137. result = true;
  138. if(!result) {
  139. pos = getIntersect(event);
  140. x = pos[0] + radius - cursorSize / 2;
  141. y = pos[1] + radius - cursorSize / 2;
  142. }
  143. else {
  144. x = event.clientX - centerX + radius - cursorSize / 2;
  145. y = event.clientY - centerY + radius - cursorSize / 2;
  146. }
  147. ui.helper[0].style.left = x + "px";
  148. ui.helper[0].style.top = y + "px";
  149. // pan(-70 ~ 70) & tilt(-70 ~ 70)
  150. pan = x - radius + cursorSize / 2;
  151. tilt = y - radius + cursorSize / 2;
  152. // alert("PAN=" + pan + ", TILT=" + tilt);
  153. ptz_pt(ptzchannel, pan, tilt);
  154. return false;
  155. },
  156. stop: function() {
  157. // alert("test stop");
  158. ptz_pt(ptzchannel, 0, 0);
  159. }
  160. });
  161. pointer = $("#draggable3");
  162. containment = $("#draggable3").draggable("option", "containment");
  163. radius = $(containment).width() / 2;
  164. cursorSize = $("#draggable3").width();
  165. {
  166. var bt = document.body.scrollTop;
  167. var bl = document.body.scrollLeft;
  168. var et = document.documentElement ? document.documentElement.scrollTop : null;
  169. var el = document.documentElement ? document.documentElement.scrollLeft: null;
  170. centerX = $(containment).parent().position().left + radius - (bl || el);
  171. centerY = $(containment).parent().position().top + radius - (bt || et);
  172. //console.log("centerX = " + centerX + ", centerY = " + centerY);
  173. }
  174. // for mousedown and move on the containment-wrapper
  175. $("#containment-wrapper").slider({
  176. joystick: true,
  177. pointerId: "draggable3",
  178. pointerMove: function(event, pos) {
  179. ptz_pt(ptzchannel, pos.x, pos.y);
  180. }
  181. });
  182. });
  183. // $(function () {
  184. // 넓이 변경이 있을때 스크립트로 넓이 조절
  185. //$.changeWidth(100);
  186. // 메뉴의 경우 오픈 하고 싶은 메뉴에
  187. //<li class="menuWrap on"> 이렇게 on 클래스를 주시면 됩니다. 오픈이 아닐경우
  188. //<li class="menuWrap"> 온 클래스를 없애 주시면 닫힘니다. 세부 메뉴 링크도 동일 하게 on 클래스를 주시면 됩니다.
  189. // 각종 기능의 활성 비활성의 경우 - 초기값은 활성상태 입니다. 비활성 화 시키고 싶으실때는 아래 처럼 id를 주신 후 비활 성화 시키시면 됩니다.
  190. //$.khjDisable("accordion1", 0);
  191. //$.khjDisable("toggle1", 0);
  192. //$.khjDisable("selectBox1");
  193. //$.khjDisable("btn1");
  194. //$.khjDisable("slider");
  195. // });
  196. </script>
  197. <style type="text/css">
  198. /* 넓이 변경이 있을때 직접 조절 */
  199. /*
  200. .wrapWidth {width: 1026px;}
  201. .viewWidth {width: 785px;}
  202. */
  203. </style>
  204. <script language="JavaScript" type="text/javascript">
  205. var canvas_ptz = 0 ;
  206. var context_ptz;
  207. var canvas_detection_4ch = [0,0,0,0];
  208. var context_detection_4ch = [0,0,0,0];
  209. var canvas_PTZ_position = [0,0,0,0];
  210. var context_PTZ_position = [0,0,0,0];
  211. var player_init_completed = [0,0,0,0];
  212. var resolutionAPIString = "VID_RESOLUTION";
  213. var talk_disabled = 0;
  214. var isSemocon = 0;
  215. var browser = 0;
  216. var trnPlayer = 0;
  217. var trnPlayerForceJpeg = 0;
  218. var trnPlayerSupportWS = 0;
  219. var trnDetectionCamPlayerSupportWS = 0;
  220. var currentvalgo = 0;
  221. var indexcount = 0;
  222. var indexcount_detection_4ch = [0,0,0,0] ;
  223. var detection_4ch_IP = 0 ;
  224. var detection_4ch_HTTPPort = 0;
  225. var detection_4ch_HTTPSPort = 0;
  226. var detection_4ch_RtspPort = 0;
  227. var detection_4ch_BasePort = 0;
  228. var detection_4ch_ID = 0;
  229. var detection_4ch_PW = 0;
  230. const DETECTION_4CH_IMG_UPDATE_NAME = 'img_update_4_'
  231. const SHOW_DETECTIONCAM = 0;
  232. const HIDE_DETECTIONCAM = 1;
  233. const SHOW_IN_LIVE_DETECTIONCAM =0;
  234. const SHOW_IN_JPG_DETECTIONCAM =1;
  235. var show_hide_directioncam = 0; // show
  236. var live_jpg_directioncam = 1; // jpg
  237. var g_detection_info_valid = 0;
  238. function IS_SHOW_DETECTIONCAM()
  239. {
  240. if(SHOW_DETECTIONCAM == show_hide_directioncam) {
  241. return 1 ;
  242. }
  243. return 0 ;
  244. }
  245. function IS_SHOW_IN_LIVE_DETECTIONCAM()
  246. {
  247. if(SHOW_IN_LIVE_DETECTIONCAM == live_jpg_directioncam) {
  248. return 1 ;
  249. }
  250. return 0 ;
  251. }
  252. function Show_Hide_LiveOrJPGBtn(show)
  253. {
  254. if(is_tta) {
  255. $("[name=LiveOrJPGBtn]").css("display","none");
  256. return ;
  257. }
  258. if(show) {
  259. for (var i = 0; i < 4; i++) {
  260. if(trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET || trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN || trnDetectionCamPlayer[i] == PLAYER_ACTIVEX){
  261. $("[name=LiveOrJPGBtn]").css("display","");
  262. break;
  263. }
  264. }
  265. }
  266. else {
  267. $("[name=LiveOrJPGBtn]").css("display","none");
  268. }
  269. }
  270. function Show_Hide_ShowHideDirectionBtn(show)
  271. {
  272. if(show) {
  273. $("[name=ShowHideDirectionBtn]").css("display","");
  274. }
  275. else {
  276. $("[name=ShowHideDirectionBtn]").css("display","none");
  277. }
  278. }
  279. function Show_Hide_DetectionCamWarning(show)
  280. {
  281. if(0 == show) {
  282. $("[name=ShowHidBtns]").css("display", "none");
  283. $("[name=DetectionCamInit_Warning]").css("display", "none");
  284. $("[name=BtnGoDetectionCam]").css("display", "none");
  285. }
  286. else {
  287. if(g_detection_info_valid) {
  288. $("[name=ShowHidBtns]").css("display", "");
  289. $("[name=DetectionCamInit_Warning]").css("display", "none");
  290. $("[name=BtnGoDetectionCam]").css("display", "none");
  291. }
  292. else {
  293. $("[name=ShowHidBtns]").css("display", "none");
  294. $("[name=DetectionCamInit_Warning]").css("display", "");
  295. $("[name=BtnGoDetectionCam]").css("display", "");
  296. }
  297. }
  298. }
  299. let timerTickBusy = 0;
  300. let timerTickId = undefined;
  301. function timerTick()
  302. {
  303. if($("[name=SYS_MODE]").val() != 1) {
  304. if (timerTickBusy == 0)
  305. {
  306. timerTickBusy = 1;
  307. var sAddress = getJPGURL(is_secondary, 0);
  308. var img = new Image();
  309. img.onload = function() {
  310. timerTickBusy = 0;
  311. if (img.naturalWidth != 0 && img.naturalHeight != 0) {
  312. document["img_update"].src = img.src;
  313. }
  314. }
  315. img.onerror = function() { timerTickBusy = 0; }
  316. img.onabort = function() { timerTickBusy = 0; }
  317. img.src = "/capturx/"+sAddress+"?index=" + indexcount;
  318. indexcount++;
  319. }
  320. }
  321. }
  322. var timerTickDetection4ChId = undefined;
  323. function timerTickDetection4Ch()
  324. {
  325. if($("[name=SYS_MODE]").val() != 1) {
  326. if(IS_SHOW_DETECTIONCAM()) {
  327. if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
  328. if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
  329. return ;
  330. }
  331. for (var i = 0; i < 4; i++) {
  332. if (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP ||
  333. (!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM))
  334. {
  335. var sJPGURL = getJPGURL(i, 1);
  336. var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + i;
  337. // if (document.getElementById(img_update_detection_4ch).complete)
  338. {
  339. document[img_update_detection_4ch].src = "/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[i];
  340. indexcount_detection_4ch[i]++;
  341. }
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }
  348. function getJPGURL(sub,force_detection_cam)
  349. {
  350. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
  351. if(sub == 0){
  352. sAddress = 'ch1.jpg';
  353. resolutionAPIString = "VID_RESOLUTION";
  354. }
  355. else if(sub == 1){
  356. sAddress = 'ch2.jpg';
  357. resolutionAPIString = "VI1_RESOLUTION";
  358. }
  359. else if(sub == 2){
  360. sAddress = 'ch3.jpg';
  361. resolutionAPIString = "VI2_RESOLUTION";
  362. }
  363. else if(sub == 3){
  364. sAddress = 'ch4.jpg';
  365. resolutionAPIString = "VI3_RESOLUTION";
  366. }
  367. else if(sub == 4){
  368. sAddress = 'ch1_1.jpg';
  369. resolutionAPIString = "VID_DUALRESOLUTION";
  370. }
  371. else if(sub == 5){
  372. sAddress = 'ch2_1.jpg';
  373. resolutionAPIString = "VI1_DUALRESOLUTION";
  374. }
  375. else if(sub == 6){
  376. sAddress = 'ch3_1.jpg';
  377. resolutionAPIString = "VI2_DUALRESOLUTION";
  378. }
  379. else if(sub == 7){
  380. sAddress = 'ch4_1.jpg';
  381. resolutionAPIString = "VI3_DUALRESOLUTION";
  382. }
  383. else if(sub == 8){
  384. sAddress = 'ch5.jpg';
  385. resolutionAPIString = "VI4_RESOLUTION";
  386. }
  387. }
  388. else if(($("[name=SYS_BOARDID]").val() == 0xB001) || (1 == force_detection_cam)){
  389. if(sub == 0){
  390. sAddress = 'ch1.jpg';
  391. if(1 != force_detection_cam) {
  392. resolutionAPIString = "VID_RESOLUTION";
  393. }
  394. }
  395. else if(sub == 1){
  396. sAddress = 'ch2.jpg';
  397. if(1 != force_detection_cam) {
  398. resolutionAPIString = "VI1_RESOLUTION";
  399. }
  400. }
  401. else if(sub == 2){
  402. sAddress = 'ch3.jpg';
  403. if(1 != force_detection_cam) {
  404. resolutionAPIString = "VI2_RESOLUTION";
  405. }
  406. }
  407. else if(sub == 3){
  408. sAddress = 'ch4.jpg';
  409. if(1 != force_detection_cam) {
  410. resolutionAPIString = "VI3_RESOLUTION";
  411. }
  412. }
  413. else if(sub == 4){
  414. sAddress = 'ch1_1.jpg';
  415. if(1 != force_detection_cam) {
  416. resolutionAPIString = "VID_DUALRESOLUTION";
  417. }
  418. }
  419. else if(sub == 5){
  420. sAddress = 'ch2_1.jpg';
  421. if(1 != force_detection_cam) {
  422. resolutionAPIString = "VI1_DUALRESOLUTION";
  423. }
  424. }
  425. else if(sub == 6){
  426. sAddress = 'ch3_1.jpg';
  427. if(1 != force_detection_cam) {
  428. resolutionAPIString = "VI2_DUALRESOLUTION";
  429. }
  430. }
  431. else if(sub == 7){
  432. sAddress = 'ch4_1.jpg';
  433. if(1 != force_detection_cam) {
  434. resolutionAPIString = "VI3_DUALRESOLUTION";
  435. }
  436. }
  437. else if(sub == 8){
  438. sAddress = 'ch5.jpg';
  439. if(1 != force_detection_cam) {
  440. resolutionAPIString = "VI4_RESOLUTION";
  441. }
  442. }
  443. else if(sub == 9){
  444. sAddress = 'ch5_1.jpg';
  445. if(1 != force_detection_cam) {
  446. resolutionAPIString = "VI4_DUALRESOLUTION";
  447. }
  448. }
  449. }
  450. else{
  451. if(sub == 0){
  452. sAddress = 'ch1.jpg';
  453. resolutionAPIString = "VID_RESOLUTION";
  454. }
  455. else if(sub == 1){
  456. sAddress = 'ch1_1.jpg';
  457. resolutionAPIString = "VID_DUALRESOLUTION";
  458. }
  459. else if(sub == 2){
  460. sAddress = 'ch1_2.jpg';
  461. resolutionAPIString = "VID_TRIPLERESOLUTION1";
  462. }
  463. else if(sub == 3){
  464. sAddress = 'ch1_3.jpg';
  465. resolutionAPIString = "VID_TRIPLERESOLUTION2";
  466. }
  467. else{
  468. sAddress = 'ch1.jpg';
  469. resolutionAPIString = "VID_RESOLUTION";
  470. }
  471. }
  472. return sAddress;
  473. }
  474. function getRTSPURL(sub, force_detection_cam)
  475. {
  476. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
  477. if(sub == 0){
  478. sAddress = '/video1+audio1';
  479. resolutionAPIString = "VID_RESOLUTION";
  480. }
  481. else if(sub == 1){
  482. sAddress = '/video2+audio1';
  483. resolutionAPIString = "VI1_RESOLUTION";
  484. }
  485. else if(sub == 2){
  486. sAddress = '/video3+audio1';
  487. resolutionAPIString = "VI2_RESOLUTION";
  488. }
  489. else if(sub == 3){
  490. sAddress = '/video4+audio1';
  491. resolutionAPIString = "VI3_RESOLUTION";
  492. }
  493. else if(sub == 4){
  494. sAddress = '/video1s+audio1';
  495. resolutionAPIString = "VID_DUALRESOLUTION";
  496. }
  497. else if(sub == 5){
  498. sAddress = '/video2s+audio1';
  499. resolutionAPIString = "VI1_DUALRESOLUTION";
  500. }
  501. else if(sub == 6){
  502. sAddress = '/video3s+audio1';
  503. resolutionAPIString = "VI2_DUALRESOLUTION";
  504. }
  505. else if(sub == 7){
  506. sAddress = '/video4s+audio1';
  507. resolutionAPIString = "VI3_DUALRESOLUTION";
  508. }
  509. else if(sub == 8){
  510. sAddress = '/quad+audio1';
  511. resolutionAPIString = "VI4_RESOLUTION";
  512. }
  513. }
  514. else if( ($("[name=SYS_BOARDID]").val() == 0xB001) || (1 == force_detection_cam)){
  515. if(sub == 0){
  516. sAddress = '/video1';
  517. if(1 != force_detection_cam) {
  518. resolutionAPIString = "VID_RESOLUTION";
  519. }
  520. }
  521. else if(sub == 1){
  522. sAddress = '/video2';
  523. if(1 != force_detection_cam) {
  524. resolutionAPIString = "VI1_RESOLUTION";
  525. }
  526. }
  527. else if(sub == 2){
  528. sAddress = '/video3';
  529. if(1 != force_detection_cam) {
  530. resolutionAPIString = "VI2_RESOLUTION";
  531. }
  532. }
  533. else if(sub == 3){
  534. sAddress = '/video4';
  535. if(1 != force_detection_cam) {
  536. resolutionAPIString = "VI3_RESOLUTION";
  537. }
  538. }
  539. else if(sub == 4){
  540. sAddress = '/video1s1';
  541. if(1 != force_detection_cam) {
  542. resolutionAPIString = "VID_DUALRESOLUTION";
  543. }
  544. }
  545. else if(sub == 5){
  546. sAddress = '/video2s1';
  547. if(1 != force_detection_cam) {
  548. resolutionAPIString = "VI1_DUALRESOLUTION";
  549. }
  550. }
  551. else if(sub == 6){
  552. sAddress = '/video3s1';
  553. if(1 != force_detection_cam) {
  554. resolutionAPIString = "VI2_DUALRESOLUTION";
  555. }
  556. }
  557. else if(sub == 7){
  558. sAddress = '/video4s1';
  559. if(1 != force_detection_cam) {
  560. resolutionAPIString = "VI3_DUALRESOLUTION";
  561. }
  562. }
  563. else if(sub == 8){
  564. sAddress = '/quad';
  565. if(1 != force_detection_cam) {
  566. resolutionAPIString = "VI4_RESOLUTION";
  567. }
  568. }
  569. else if(sub == 9){
  570. sAddress = '/quads1';
  571. if(1 != force_detection_cam) {
  572. resolutionAPIString = "VI4_DUALRESOLUTION";
  573. }
  574. }
  575. }
  576. else{
  577. if(sub == 0){
  578. sAddress = '/video1+audio1';
  579. resolutionAPIString = "VID_RESOLUTION";
  580. }
  581. else if(sub == 1){
  582. sAddress = '/video1s+audio1';
  583. resolutionAPIString = "VID_DUALRESOLUTION";
  584. }
  585. else if(sub == 2){
  586. sAddress = '/video1s2+audio1';
  587. resolutionAPIString = "VID_TRIPLERESOLUTION1";
  588. }
  589. else if(sub == 3){
  590. sAddress = '/video1s3+audio1';
  591. resolutionAPIString = "VID_TRIPLERESOLUTION2";
  592. }
  593. else{
  594. sAddress = '/video1+audio1';
  595. resolutionAPIString = "VID_RESOLUTION";
  596. }
  597. }
  598. return sAddress;
  599. }
  600. function ptz_begin_local(cmd)
  601. {
  602. ptz_begin(ptzchannel, cmd);
  603. }
  604. function ptz_cmd_local(cmd)
  605. {
  606. ptz_cmd(ptzchannel, cmd);
  607. }
  608. function ptz_begin_semocon_ir_local(cmd, val)
  609. {
  610. ptz_begin_semocon_ir(ptzchannel, cmd, val)
  611. }
  612. function ptz_set_semocon_irvalue_preset(i)
  613. {
  614. var num;
  615. if(i < 10) num = "00" + i;
  616. else if(i < 100) num = "0" + i;
  617. else num = i;
  618. $("#after_action_select").val(readSetupByKey("PTZ_SEMOCON_PRESET_ACTION_" + num));
  619. }
  620. function on_preset_set()
  621. {
  622. var i = parseInt($( "#preset_select" ).val());
  623. if (i != 0) {
  624. if(isSemocon == 1) {
  625. var action = parseInt($("#after_action_select").val());
  626. ptz_preset_set_semocon(ptzchannel, i, action);
  627. }
  628. else {
  629. ptz_preset_set(ptzchannel, i);
  630. }
  631. }
  632. }
  633. function on_preset_goto()
  634. {
  635. var i = parseInt($( "#preset_select" ).val());
  636. if (i != 0) {
  637. ptz_preset_goto(ptzchannel, i);
  638. if(isSemocon == 1) {
  639. ptz_set_semocon_irvalue_preset(i);
  640. }
  641. }
  642. }
  643. function on_preset_clear()
  644. {
  645. var i = parseInt($( "#preset_select" ).val());
  646. if (i != 0) {
  647. ptz_preset_clear(ptzchannel, i);
  648. if(isSemocon == 1) {
  649. ptz_set_semocon_irvalue_preset(i);
  650. }
  651. }
  652. }
  653. function on_pattern_goto()
  654. {
  655. var i = parseInt($( "#list_select" ).val());
  656. if (i > 4){
  657. alert(GetLan(645));
  658. return;
  659. }
  660. else if (i != 0) ptz_pattern_goto(i);
  661. }
  662. function on_swing_goto()
  663. {
  664. var i = parseInt($( "#list_select" ).val());
  665. if (i != 0) ptz_swing_goto(i);
  666. }
  667. function on_group_goto()
  668. {
  669. var i = parseInt($( "#list_select" ).val());
  670. if (i != 0) ptz_group_goto(i);
  671. }
  672. function on_wiper()
  673. {
  674. writeSetupAsync("ETC_HOUSINGWIPER=0");
  675. }
  676. function on_defug()
  677. {
  678. writeSetupAsync("CAM_DEFOG_MODE_ONOFF=0");
  679. }
  680. function on_irpower()
  681. {
  682. writeSetupAsync("ETC_HOUSINGIRPOWER=0");
  683. }
  684. function on_setdo(index, state)
  685. {
  686. writeStateAsync("OUT_ALARM" + index + "=" + state);
  687. }
  688. function ptz_p7_wiper(start)
  689. {
  690. var i = parseInt($( "#WiperTime" ).val());
  691. if(start == 1){
  692. if(i == 0) ptz_general_command(0x1A);
  693. else if(i == 1) ptz_cmd_local('wiper_1h');
  694. else if(i == 2) ptz_cmd_local('wiper_2h');
  695. else if(i == 3) ptz_cmd_local('wiper_3h');
  696. }
  697. else{
  698. if(i == 0) ptz_general_command(0x1B);
  699. }
  700. }
  701. function on_reboot()
  702. {
  703. if (confirm(GetLan(269)) != true)
  704. {
  705. return;
  706. }
  707. writeSetupAsync("SYS_REBOOT=0");
  708. alert(GetLan(270));
  709. top.window.close();
  710. }
  711. function on_reset_zoom_module()
  712. {
  713. if (confirm(GetLan(1029)) != true)
  714. {
  715. return;
  716. }
  717. writeSetupAsync("SYS_ZOOMRESET=0");
  718. alert(GetLan(270));
  719. top.window.close();
  720. }
  721. var Full_Screen_Mode = 0;
  722. var FSM_Once = 1;
  723. var numofsensor;
  724. var numofalarm;
  725. var minwidth;
  726. var currnetRes = 0;
  727. var viewsizerate = 50;
  728. var displaybuffer = 0;
  729. var is_secondary = 0;
  730. var ptzchannel = 1;
  731. var viewaccordion;
  732. var started = 0;
  733. var initcanvas = 0;
  734. var Ccurrentrec = 0;
  735. function init_video_select(src,num)
  736. {
  737. var ch;
  738. var i;
  739. for( i=src.length; i>=0; --i ){
  740. src.remove( i );
  741. }
  742. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
  743. for( i=0; i<4; i++ )
  744. {
  745. var j = i+1;
  746. var tmpOption = new Option();
  747. tmpOption.value = i;
  748. tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(391);
  749. src.options.add( tmpOption, i );
  750. }
  751. for( i=4; i<8; i++ )
  752. {
  753. var j = i-3;
  754. var tmpOption = new Option();
  755. tmpOption.value = i;
  756. tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(392);
  757. src.options.add( tmpOption, i );
  758. }
  759. {
  760. var tmpOption = new Option();
  761. tmpOption.value = 8;
  762. tmpOption.text = "Quad " + GetLan(107);
  763. src.options.add( tmpOption, i );
  764. }
  765. }
  766. else if($("[name=SYS_BOARDID]").val() == 0xB001) {
  767. for( i=0; i<4; i++ )
  768. {
  769. var j = i+1;
  770. var tmpOption = new Option();
  771. tmpOption.value = i;
  772. tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(391);
  773. src.options.add( tmpOption, i );
  774. }
  775. for( i=4; i<8; i++ )
  776. {
  777. var j = i+1;
  778. var tmpOption = new Option();
  779. tmpOption.value = i;
  780. tmpOption.text = GetLan(107)+"#"+(j-4) + " " + GetLan(392);
  781. src.options.add( tmpOption, i );
  782. }
  783. {
  784. i = 8;
  785. var tmpOption = new Option();
  786. tmpOption.value = 8;
  787. tmpOption.text = "Quad " + GetLan(391);
  788. src.options.add( tmpOption, i );
  789. }
  790. {
  791. i = 9;
  792. var tmpOption = new Option();
  793. tmpOption.value = 9;
  794. tmpOption.text = "Quad " + GetLan(392);
  795. src.options.add( tmpOption, i );
  796. }
  797. }
  798. else{
  799. //disable Secondary#3 in AMBA
  800. if ((parseInt($("[name=SYS_BOARDID]").val()) & 0xF000) == 0x4000 || (parseInt($("[name=SYS_BOARDID]").val()) & 0xF000) == 0x6000
  801. || (parseInt($("[name=SYS_BOARDID]").val()) & 0xFFF0) == 0xD040/*S5L, TCAM/TR, IMX307*/) {num = num - 1;}
  802. for( i=0; i<num; i++ )
  803. {
  804. var tmpOption = new Option();
  805. tmpOption.value = i;
  806. if(i == 0){
  807. tmpOption.text = GetLan(391);
  808. }
  809. else{
  810. if(num == 2)
  811. tmpOption.text = GetLan(392);
  812. else
  813. tmpOption.text = GetLan(392)+"#"+i;
  814. }
  815. src.options.add( tmpOption, i );
  816. }
  817. }
  818. }
  819. function on_cameraselect_clicked()
  820. {
  821. var address = "";
  822. var ip = readSetupByKey("DIRECTIONCAM_IP");
  823. var port = 80;
  824. if (location.protocol == "https:") {
  825. port = readSetupByKey("DIRECTIONCAM_HTTPS_PORT");
  826. address = "https://" + ip + ":" + port;
  827. } else {
  828. port = readSetupByKey("DIRECTIONCAM_HTTP_PORT");
  829. address = "http://" + ip + ":" + port;
  830. }
  831. window.location.assign(address);
  832. }
  833. function on_videoselect_clicked()
  834. {
  835. is_secondary = $("#videosel").val();
  836. setCookie('truenvideoselect', is_secondary, 100);
  837. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007 || $("[name=SYS_BOARDID]").val() == 0xB001){
  838. if(is_secondary == 1 || is_secondary == 5) ptzchannel = 2;
  839. else if(is_secondary == 2 || is_secondary == 6) ptzchannel = 3;
  840. else if(is_secondary == 3 || is_secondary == 7) ptzchannel = 4;
  841. else ptzchannel = 1;
  842. }
  843. term();
  844. init();
  845. ZoomHome();
  846. }
  847. var password_warning = 1;
  848. function initDialog()
  849. {
  850. $( "#dialog-warning" ).dialog({
  851. autoOpen: false,
  852. height: 160,
  853. width: 650,
  854. modal: true,
  855. });
  856. $( "#dialog-warning2" ).dialog({
  857. autoOpen: false,
  858. height: 160,
  859. width: 650,
  860. modal: true,
  861. close: function() {
  862. password_warning = 0;
  863. term();
  864. init();
  865. }
  866. });
  867. }
  868. function on_dialog_close()
  869. {
  870. $( "#dialog-warning" ).dialog( "close" );
  871. }
  872. function on_dialog2_move()
  873. {
  874. location.href("/admin/useruserlist.html");
  875. }
  876. function on_dialog2_later()
  877. {
  878. $( "#dialog-warning2" ).dialog( "close" );
  879. }
  880. function on_dialog2_never()
  881. {
  882. writeSetup("SYS_IgnorePasswordWarning=1");
  883. $( "#dialog-warning2" ).dialog( "close" );
  884. }
  885. var shock_exist;
  886. var airwiper; // 3(P7), 4(P8)
  887. var boardid ;
  888. var ft_ir4 ;
  889. var is_tta ;
  890. var obj_ptz_getposition = { channel:0, nX:0, nY:0 }
  891. var prevobj_ptz_getposition = { channel:0, nX:0, nY:0 }
  892. var obj_ptz_getposition_realpos = { channel:0, nX:0, nY:0 }
  893. var prevobj_ptz_getposition_realpos = { channel:0, nX:0, nY:0 }
  894. var need_force_update = 0;
  895. var need_pause_ptzdrawpos = 0;
  896. var intervalPTZDrawPositionId = undefined;
  897. var intervalPTZDrawPositionST = 0;
  898. var intervalPTZDrawPositionUT = 0;
  899. function __cb_obj_ptz_getposition(data)
  900. {
  901. obj_ptz_getposition = data;
  902. intervalPTZDrawPositionUT = Date.now();
  903. }
  904. function intervalPTZDrawPosition()
  905. {
  906. var process = 0 ;
  907. if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
  908. return ;
  909. }
  910. if(need_pause_ptzdrawpos) {
  911. // console.log("Now need_pause_ptzdrawpos : " + need_pause_ptzdrawpos);
  912. return ;
  913. }
  914. var dnow = Date.now();
  915. if (dnow - intervalPTZDrawPositionUT > 2000) {
  916. ;
  917. }
  918. else {
  919. if (dnow - intervalPTZDrawPositionUT < 500) {
  920. return;
  921. }
  922. if (intervalPTZDrawPositionST > intervalPTZDrawPositionUT) {
  923. return;
  924. }
  925. }
  926. intervalPTZDrawPositionST = dnow;
  927. if( (prevobj_ptz_getposition.channel != obj_ptz_getposition.channel) ||
  928. (prevobj_ptz_getposition.nX != obj_ptz_getposition.nX) ||
  929. (prevobj_ptz_getposition.nY != obj_ptz_getposition.nY) || need_force_update)
  930. {
  931. // console.log("obj_ptz_getposition.channel : " + obj_ptz_getposition.channel + ", need_force_update : " + need_force_update);
  932. obj_ptz_getposition_realpos.channel = prevobj_ptz_getposition.channel = obj_ptz_getposition.channel ;
  933. if(obj_ptz_getposition.nX < 0) {
  934. obj_ptz_getposition.nX = 0 ;
  935. }
  936. if(obj_ptz_getposition.nY < 0) {
  937. obj_ptz_getposition.nY = 0 ;
  938. }
  939. if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  940. if(1 == player_init_completed[obj_ptz_getposition_realpos.channel]) {
  941. obj_ptz_getposition_realpos.nX = (obj_ptz_getposition.nX / 10) ;
  942. obj_ptz_getposition_realpos.nY = (obj_ptz_getposition.nY / 10) ;
  943. process = 1 ;
  944. //console.log("[IE obj_ptz_getposition_realpos] channel : " + obj_ptz_getposition_realpos.channel + ", nX : " + obj_ptz_getposition_realpos.nX + ", nY : " + obj_ptz_getposition_realpos.nY );
  945. //console.log("[IE obj_ptz_getposition] channel : " + obj_ptz_getposition.channel + ", nX : " + obj_ptz_getposition.nX + ", nY : " + obj_ptz_getposition.nY );
  946. }
  947. }
  948. else {
  949. if(1 == player_init_completed[obj_ptz_getposition_realpos.channel]) {
  950. obj_ptz_getposition_realpos.nX = (obj_ptz_getposition.nX * context_PTZ_position[obj_ptz_getposition_realpos.channel].canvas.width) / 1000 ;
  951. obj_ptz_getposition_realpos.nY = (obj_ptz_getposition.nY * context_PTZ_position[obj_ptz_getposition_realpos.channel].canvas.height) / 1000 ;
  952. process = 1 ;
  953. //console.log("[ obj_ptz_getposition_realpos] channel : " + obj_ptz_getposition_realpos.channel + ", nX : " + obj_ptz_getposition_realpos.nX + ", nY : " + obj_ptz_getposition_realpos.nY );
  954. //console.log("[ obj_ptz_getposition] channel : " + obj_ptz_getposition.channel + ", nX : " + obj_ptz_getposition.nX + ", nY : " + obj_ptz_getposition.nY );
  955. }
  956. }
  957. if(1 == process) {
  958. redraw_ptz_position(need_force_update);
  959. need_force_update = 0 ;
  960. prevobj_ptz_getposition.nX = obj_ptz_getposition.nX ;
  961. prevobj_ptz_getposition.nY = obj_ptz_getposition.nY ;
  962. }
  963. }
  964. ptz_det_getposition(__cb_obj_ptz_getposition);
  965. }
  966. function redraw_ptz_position(need_force_update)
  967. {
  968. if( (prevobj_ptz_getposition_realpos.channel != obj_ptz_getposition_realpos.channel) ||
  969. (prevobj_ptz_getposition_realpos.nX != obj_ptz_getposition_realpos.nX) ||
  970. (prevobj_ptz_getposition_realpos.nY != obj_ptz_getposition_realpos.nY) || need_force_update)
  971. {
  972. if(need_force_update) {
  973. for(index = 0 ; index < 4 ; ++index) {
  974. if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  975. tvs_SetDrawCross_4Ch(index, 0 , 0 , 0, 0, 0 );
  976. }
  977. else {
  978. context_PTZ_position[index].clearRect(0, 0, context_PTZ_position[index].canvas.width, context_PTZ_position[index].canvas.height); // Clears the canvas
  979. }
  980. }
  981. }
  982. else {
  983. var index = prevobj_ptz_getposition_realpos.channel ;
  984. if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  985. tvs_SetDrawCross_4Ch(index, 0 , 0 , 0, 0, 0 );
  986. }
  987. else {
  988. context_PTZ_position[index].clearRect(0, 0, context_PTZ_position[index].canvas.width, context_PTZ_position[index].canvas.height); // Clears the canvas
  989. }
  990. }
  991. }
  992. var index = obj_ptz_getposition_realpos.channel ;
  993. if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  994. tvs_SetDrawCross_4Ch(index, parseInt(obj_ptz_getposition_realpos.nX) , parseInt(obj_ptz_getposition_realpos.nY) , 20, 1, 0x7FFF0000 );
  995. }
  996. else {
  997. context_PTZ_position[index].strokeStyle = "red";
  998. context_PTZ_position[index].lineJoin = "round";
  999. context_PTZ_position[index].lineWidth = 4;
  1000. context_PTZ_position[index].beginPath();
  1001. context_PTZ_position[index].moveTo(obj_ptz_getposition_realpos.nX,obj_ptz_getposition_realpos.nY+20);
  1002. context_PTZ_position[index].lineTo(obj_ptz_getposition_realpos.nX,obj_ptz_getposition_realpos.nY-20);
  1003. context_PTZ_position[index].moveTo(obj_ptz_getposition_realpos.nX+20,obj_ptz_getposition_realpos.nY);
  1004. context_PTZ_position[index].lineTo(obj_ptz_getposition_realpos.nX-20,obj_ptz_getposition_realpos.nY);
  1005. context_PTZ_position[index].closePath();
  1006. context_PTZ_position[index].stroke();
  1007. }
  1008. prevobj_ptz_getposition_realpos.channel = obj_ptz_getposition_realpos.channel ;
  1009. prevobj_ptz_getposition_realpos.nX = obj_ptz_getposition_realpos.nX ;
  1010. prevobj_ptz_getposition_realpos.nY = obj_ptz_getposition_realpos.nY ;
  1011. }
  1012. function UpdateDrawCrossForce()
  1013. {
  1014. if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
  1015. return ;
  1016. }
  1017. need_force_update = 1;
  1018. need_pause_ptzdrawpos = 0 ;
  1019. console.log("need_force_update : "+need_force_update + ", need_pause_ptzdrawpos : " + need_pause_ptzdrawpos );
  1020. }
  1021. function timerVXGMP_Create0()
  1022. {
  1023. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  1024. if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1025. var index = 0 ;
  1026. var sRTSPUrl = getRTSPURL(index , 1);
  1027. var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1028. var vxgplayerID = 'vxgplayer_4_' + index ;
  1029. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1030. VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
  1031. VXGMP_resizePlayer(vxgplayerID, 320, 180);
  1032. if(getCookie('truendisplaybuffer') == ''){
  1033. VXGMP_SetBuffer(vxgplayerID,1);
  1034. }
  1035. else{
  1036. var buf = parseInt(getCookie('truendisplaybuffer'));
  1037. VXGMP_SetBuffer(vxgplayerID,buf);
  1038. }
  1039. }
  1040. else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[0] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1041. var index = 0;
  1042. var sRTSPUrl = getRTSPURL(index, 1);
  1043. var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1044. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  1045. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1046. if (location.protocol == "https:")
  1047. {
  1048. var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
  1049. }
  1050. else // http:
  1051. {
  1052. var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
  1053. }
  1054. var buf = 1;
  1055. if(getCookie('truendisplaybuffer') != ''){
  1056. buf = parseInt(getCookie('truendisplaybuffer'));
  1057. }
  1058. VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
  1059. VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
  1060. vxgwsplayer('vxgwsplayer_4_0').onStateChange(function(state){
  1061. if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
  1062. VXGWSMP_ShowError('vxgwsplayer_4_0', 'Too many connections');
  1063. }
  1064. else {
  1065. VXGWSMP_HideError('vxgwsplayer_4_0');
  1066. }
  1067. });
  1068. }
  1069. if((PLAYER_ACTIVEX == trnDetectionCamPlayer[0]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[0]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[0])){
  1070. canvasinit_detection_4ch(0);
  1071. canvasinit_getposition(0);
  1072. if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[0]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[0])) {
  1073. player_init_completed[0] = 1;
  1074. UpdateDrawCrossForce();
  1075. }
  1076. else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[0]) {
  1077. if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
  1078. player_init_completed[0] = 1;
  1079. UpdateDrawCrossForce();
  1080. }
  1081. }
  1082. }
  1083. }
  1084. }
  1085. function timerVXGMP_Create1()
  1086. {
  1087. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  1088. if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1089. var index = 1 ;
  1090. var sRTSPUrl = getRTSPURL(index , 1);
  1091. var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1092. var vxgplayerID = 'vxgplayer_4_' + index ;
  1093. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1094. VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
  1095. VXGMP_resizePlayer(vxgplayerID, 320, 180);
  1096. if(getCookie('truendisplaybuffer') == ''){
  1097. VXGMP_SetBuffer(vxgplayerID,1);
  1098. }
  1099. else{
  1100. var buf = parseInt(getCookie('truendisplaybuffer'));
  1101. VXGMP_SetBuffer(vxgplayerID,buf);
  1102. }
  1103. }
  1104. else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[1] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1105. var index = 1;
  1106. var sRTSPUrl = getRTSPURL(index, 1);
  1107. var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1108. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  1109. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1110. if (location.protocol == "https:")
  1111. {
  1112. var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
  1113. }
  1114. else // http:
  1115. {
  1116. var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
  1117. }
  1118. var buf = 1;
  1119. if(getCookie('truendisplaybuffer') != ''){
  1120. buf = parseInt(getCookie('truendisplaybuffer'));
  1121. }
  1122. VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
  1123. VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
  1124. vxgwsplayer('vxgwsplayer_4_1').onStateChange(function(state){
  1125. if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
  1126. VXGWSMP_ShowError('vxgwsplayer_4_1', 'Too many connections');
  1127. }
  1128. else {
  1129. VXGWSMP_HideError('vxgwsplayer_4_1');
  1130. }
  1131. });
  1132. }
  1133. if((PLAYER_ACTIVEX == trnDetectionCamPlayer[1]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[1]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[1])){
  1134. canvasinit_detection_4ch(1);
  1135. canvasinit_getposition(1);
  1136. if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[1]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[1])) {
  1137. player_init_completed[1] = 1;
  1138. UpdateDrawCrossForce();
  1139. }
  1140. else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[1]) {
  1141. if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
  1142. player_init_completed[1] = 1;
  1143. UpdateDrawCrossForce();
  1144. }
  1145. }
  1146. }
  1147. }
  1148. }
  1149. function timerVXGMP_Create2()
  1150. {
  1151. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  1152. if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1153. var index = 2 ;
  1154. var sRTSPUrl = getRTSPURL(index , 1);
  1155. var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1156. var vxgplayerID = 'vxgplayer_4_' + index ;
  1157. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1158. VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
  1159. VXGMP_resizePlayer(vxgplayerID, 320, 180);
  1160. if(getCookie('truendisplaybuffer') == ''){
  1161. VXGMP_SetBuffer(vxgplayerID,1);
  1162. }
  1163. else{
  1164. var buf = parseInt(getCookie('truendisplaybuffer'));
  1165. VXGMP_SetBuffer(vxgplayerID,buf);
  1166. }
  1167. }
  1168. else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[2] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1169. var index = 2;
  1170. var sRTSPUrl = getRTSPURL(index, 1);
  1171. var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1172. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  1173. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1174. if (location.protocol == "https:")
  1175. {
  1176. var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
  1177. }
  1178. else // http:
  1179. {
  1180. var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
  1181. }
  1182. var buf = 1;
  1183. if(getCookie('truendisplaybuffer') != ''){
  1184. buf = parseInt(getCookie('truendisplaybuffer'));
  1185. }
  1186. VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
  1187. VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
  1188. vxgwsplayer('vxgwsplayer_4_2').onStateChange(function(state){
  1189. if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
  1190. VXGWSMP_ShowError('vxgwsplayer_4_2', 'Too many connections');
  1191. }
  1192. else {
  1193. VXGWSMP_HideError('vxgwsplayer_4_2');
  1194. }
  1195. });
  1196. }
  1197. if((PLAYER_ACTIVEX == trnDetectionCamPlayer[2]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[2]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[2])){
  1198. canvasinit_detection_4ch(2);
  1199. canvasinit_getposition(2);
  1200. if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[2]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[2])) {
  1201. player_init_completed[2] = 1;
  1202. UpdateDrawCrossForce();
  1203. }
  1204. else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[2]) {
  1205. if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
  1206. player_init_completed[2] = 1;
  1207. UpdateDrawCrossForce();
  1208. }
  1209. }
  1210. }
  1211. }
  1212. }
  1213. function timerVXGMP_Create3()
  1214. {
  1215. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  1216. if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1217. var index = 3 ;
  1218. var sRTSPUrl = getRTSPURL(index , 1);
  1219. var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1220. var vxgplayerID = 'vxgplayer_4_' + index ;
  1221. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1222. VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
  1223. VXGMP_resizePlayer(vxgplayerID, 320, 180);
  1224. if(getCookie('truendisplaybuffer') == ''){
  1225. VXGMP_SetBuffer(vxgplayerID,1);
  1226. }
  1227. else{
  1228. var buf = parseInt(getCookie('truendisplaybuffer'));
  1229. VXGMP_SetBuffer(vxgplayerID,buf);
  1230. }
  1231. }
  1232. else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[3] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
  1233. var index = 3;
  1234. var sRTSPUrl = getRTSPURL(index, 1);
  1235. var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
  1236. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  1237. var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
  1238. if (location.protocol == "https:")
  1239. {
  1240. var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
  1241. }
  1242. else // http:
  1243. {
  1244. var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
  1245. }
  1246. var buf = 1;
  1247. if(getCookie('truendisplaybuffer') != ''){
  1248. buf = parseInt(getCookie('truendisplaybuffer'));
  1249. }
  1250. VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
  1251. VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
  1252. vxgwsplayer('vxgwsplayer_4_3').onStateChange(function(state){
  1253. if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
  1254. VXGWSMP_ShowError('vxgwsplayer_4_3', 'Too many connections');
  1255. }
  1256. else {
  1257. VXGWSMP_HideError('vxgwsplayer_4_3');
  1258. }
  1259. });
  1260. }
  1261. if((PLAYER_ACTIVEX == trnDetectionCamPlayer[3]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[3]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[3])){
  1262. canvasinit_detection_4ch(3);
  1263. canvasinit_getposition(3);
  1264. if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[3]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[3])) {
  1265. player_init_completed[3] = 1;
  1266. UpdateDrawCrossForce();
  1267. }
  1268. else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[3]) {
  1269. if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
  1270. player_init_completed[3] = 1;
  1271. UpdateDrawCrossForce();
  1272. }
  1273. }
  1274. }
  1275. }
  1276. }
  1277. function timerTVS_Init0()
  1278. {
  1279. tvs_init_detection_4ch(0 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
  1280. player_init_completed[0] = 1;
  1281. UpdateDrawCrossForce();
  1282. }
  1283. function timerTVS_Init1()
  1284. {
  1285. tvs_init_detection_4ch(1 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
  1286. player_init_completed[1] = 1;
  1287. UpdateDrawCrossForce();
  1288. }
  1289. function timerTVS_Init2()
  1290. {
  1291. tvs_init_detection_4ch(2 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
  1292. player_init_completed[2] = 1;
  1293. UpdateDrawCrossForce();
  1294. }
  1295. function timerTVS_Init3()
  1296. {
  1297. tvs_init_detection_4ch(3 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
  1298. player_init_completed[3] = 1;
  1299. UpdateDrawCrossForce();
  1300. }
  1301. function valid_check_detectioncam()
  1302. {
  1303. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  1304. if(isValidIP(detection_4ch_IP) == false) {
  1305. g_detection_info_valid = 0;
  1306. }
  1307. else if(detection_4ch_ID == "") {
  1308. g_detection_info_valid = 0;
  1309. }
  1310. else if(detection_4ch_PW == "") {
  1311. g_detection_info_valid = 0;
  1312. }
  1313. else {
  1314. g_detection_info_valid = 1;
  1315. }
  1316. }
  1317. else {
  1318. g_detection_info_valid = 0;
  1319. }
  1320. }
  1321. var trnDetectionCamPlayer = [0, 0, 0, 0];
  1322. var currentDetectionCamvalgo = [0, 0, 0, 0];
  1323. var tmpDetectionCamvalgo = [0, 0, 0, 0];
  1324. function __cb_GetDetectionCamvalgo(result)
  1325. {
  1326. var tmp = result.split(',');
  1327. if (tmp.length == 4) {
  1328. for (var i = 0; i < tmp.length; i++) {
  1329. tmpDetectionCamvalgo[i] = tmp[i];
  1330. }
  1331. }
  1332. }
  1333. function GetDetectionCamvalgo(__async)
  1334. {
  1335. if (__async)
  1336. {
  1337. readSetupByKeyAsync("DIRECTIONCAM_PRIMARY_ALGORITHM", __cb_GetDetectionCamvalgo);
  1338. }
  1339. else
  1340. {
  1341. var result = "";
  1342. result = readSetupByKey("DIRECTIONCAM_PRIMARY_ALGORITHM"); // 0, 2, 1, 0
  1343. var tmp = result.split(',');
  1344. if (tmp.length == 4) {
  1345. for (var i = 0; i < tmp.length; i++) {
  1346. currentDetectionCamvalgo[i] = tmpDetectionCamvalgo[i] = tmp[i];
  1347. }
  1348. }
  1349. }
  1350. }
  1351. var trnDetectionCamPlayerTimerId = undefined;
  1352. var trnDetectionCamPlayerTimerPause = 0;
  1353. function trnDetectionCamPlayerTimer()
  1354. {
  1355. if (trnDetectionCamPlayerTimerPause) {
  1356. return;
  1357. }
  1358. var changed = 0;
  1359. for (var i = 0; i < 4; i++) {
  1360. if (currentDetectionCamvalgo[i] != tmpDetectionCamvalgo[i]) {
  1361. currentDetectionCamvalgo[i] = tmpDetectionCamvalgo[i];
  1362. if (trnDetectionCamPlayer[i] != VXGMP_GetPlayer(UseActiveX, browser, currentDetectionCamvalgo[i]), 1) {
  1363. changed++;
  1364. }
  1365. }
  1366. }
  1367. if (changed) {
  1368. trnDetectionCamPlayerTimerPause = 1;
  1369. trnDetectionCamPlayerChange();
  1370. return;
  1371. }
  1372. GetDetectionCamvalgo(1/*async*/);
  1373. }
  1374. function trnDetectionCamPlayerChange()
  1375. {
  1376. term_directioncam();
  1377. init_directioncam();
  1378. init_directioncam_browser();
  1379. }
  1380. function trnDetectionCamPlayerTimerStart()
  1381. {
  1382. GetDetectionCamvalgo(0/*sync*/);
  1383. trnDetectionCamPlayerTimerPause = 0;
  1384. if (trnDetectionCamPlayerTimerId == undefined) {
  1385. trnDetectionCamPlayerTimerId = setTimeout(function _trnDetectionCamPlayerTimer() {
  1386. trnDetectionCamPlayerTimer();
  1387. trnDetectionCamPlayerTimerId = setTimeout(_trnDetectionCamPlayerTimer, 10000);
  1388. },10000);
  1389. }
  1390. }
  1391. function init_directioncam()
  1392. {
  1393. var contentsArray = [0,0,0,0];
  1394. T_LoadSetup("detectioncamsinfo");
  1395. detection_4ch_IP = readSetupByKey("DIRECTIONCAM_IP");
  1396. detection_4ch_RtspPort = readSetupByKey("DIRECTIONCAM_RTSP_PORT");
  1397. detection_4ch_HTTPPort = readSetupByKey("DIRECTIONCAM_HTTP_PORT");
  1398. detection_4ch_HTTPSPort = readSetupByKey("DIRECTIONCAM_HTTPS_PORT");
  1399. detection_4ch_BasePort = readSetupByKey("DIRECTIONCAM_BASE_PORT");
  1400. detection_4ch_ID = readSetupByKey("DIRECTIONCAM_ID");
  1401. detection_4ch_PW = readSetupByKey("DIRECTIONCAM_PW");
  1402. valid_check_detectioncam();
  1403. if(IS_SHOW_DETECTIONCAM())
  1404. {
  1405. ptz_det_getposition(__cb_obj_ptz_getposition);
  1406. var liveOrJpgShow = 0;
  1407. if (trnDetectionCamPlayerSupportWS == 1) {
  1408. trnDetectionCamPlayerTimerStart();
  1409. }
  1410. for (var i = 0; i < 4; i++)
  1411. {
  1412. trnDetectionCamPlayer[i] = VXGMP_GetPlayer(UseActiveX, browser, currentDetectionCamvalgo[i], 1);
  1413. if (trnDetectionCamPlayer[i] == PLAYER_ACTIVEX || trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) {
  1414. trnDetectionCamPlayerTimerPause = 1;
  1415. }
  1416. if (trnDetectionCamPlayer[i] == PLAYER_ACTIVEX) {
  1417. liveOrJpgShow = 1;
  1418. if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
  1419. contents = '<object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs4_' + i + '" width="320" height="180" codebase="/rel/webViewer.cab#Version=' + TVS_VERSION + '"></object>';
  1420. }
  1421. else {
  1422. contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
  1423. }
  1424. }
  1425. else if (trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) {
  1426. liveOrJpgShow = 1;
  1427. if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
  1428. contents = '<div id="dynamicallyPlayers_4_' + i + '"></div>';
  1429. }
  1430. else {
  1431. contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
  1432. }
  1433. }
  1434. else if (trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET) {
  1435. liveOrJpgShow = 1;
  1436. if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
  1437. contents = '<div id="dynamicallyPlayers_4_' + i + '"></div>';
  1438. }
  1439. else {
  1440. contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
  1441. }
  1442. }
  1443. else if (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP) {
  1444. contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
  1445. }
  1446. $("#viewobjectArray4_" + i).html(contents);
  1447. }
  1448. Show_Hide_ShowHideDirectionBtn(1);
  1449. $("[name=resizedivViewTable]").css("display", "");
  1450. if(parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED")) == 1) {
  1451. $("[name=LiveOrJPGBtn]").css("display","none");
  1452. }
  1453. else {
  1454. if(liveOrJpgShow) {
  1455. Show_Hide_LiveOrJPGBtn(1);
  1456. }
  1457. else {
  1458. Show_Hide_LiveOrJPGBtn(0);
  1459. }
  1460. }
  1461. }
  1462. Show_Hide_DetectionCamWarning(1);
  1463. }
  1464. function init_directioncam_browser()
  1465. {
  1466. if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
  1467. need_force_update = 0;
  1468. for (var i = 0; i < 4; i++) {
  1469. if(trnDetectionCamPlayer[i] == PLAYER_ACTIVEX){
  1470. if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
  1471. if (i == 0) { setTimeout(timerVXGMP_Create0,100); }
  1472. else if (i == 1) { setTimeout(timerVXGMP_Create1,200); }
  1473. else if (i == 2) { setTimeout(timerVXGMP_Create2,300); }
  1474. else if (i == 3) { setTimeout(timerVXGMP_Create3,400); }
  1475. if (i == 0) { setTimeout(timerTVS_Init0,1000); }
  1476. else if (i == 1) { setTimeout(timerTVS_Init1,2000); }
  1477. else if (i == 2) { setTimeout(timerTVS_Init2,3000); }
  1478. else if (i == 3) { setTimeout(timerTVS_Init3,4000); }
  1479. }
  1480. else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
  1481. var index = i;
  1482. var sJPGURL = getJPGURL(index , 1);
  1483. var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
  1484. var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
  1485. $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
  1486. " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
  1487. indexcount_detection_4ch[index]++;
  1488. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1489. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1490. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1491. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1492. }
  1493. }
  1494. else if(trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN){
  1495. if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
  1496. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1497. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1498. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1499. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1500. }
  1501. else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
  1502. var index = i;
  1503. var sJPGURL = getJPGURL(index , 1);
  1504. var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
  1505. var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
  1506. $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
  1507. " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
  1508. indexcount_detection_4ch[index]++;
  1509. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1510. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1511. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1512. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1513. }
  1514. }
  1515. else if(trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET){
  1516. if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
  1517. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1518. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1519. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1520. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1521. }
  1522. else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
  1523. var index = i;
  1524. var sJPGURL = getJPGURL(index , 1);
  1525. var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
  1526. var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
  1527. $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
  1528. " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
  1529. indexcount_detection_4ch[index]++;
  1530. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1531. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1532. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1533. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1534. }
  1535. }
  1536. else if(trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP){
  1537. var index = i;
  1538. var sJPGURL = getJPGURL(index , 1);
  1539. var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
  1540. var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
  1541. $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
  1542. " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
  1543. indexcount_detection_4ch[index]++;
  1544. if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
  1545. else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
  1546. else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
  1547. else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
  1548. }
  1549. else {
  1550. ;
  1551. }
  1552. }
  1553. $("[name=resizedivViewTable]").css("display", "");
  1554. }
  1555. }
  1556. function init_directioncam_gui(enable_btn)
  1557. {
  1558. if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
  1559. if(getCookie('truen_show_hide_directioncam') == ''){
  1560. show_hide_directioncam = SHOW_DETECTIONCAM;
  1561. setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
  1562. }
  1563. else{
  1564. show_hide_directioncam = parseInt(getCookie('truen_show_hide_directioncam'));
  1565. }
  1566. if(show_hide_directioncam) {
  1567. $("[name=ShowHideDirectionBtn]").text(GetLan(1067)); // Show Direction Cam
  1568. Show_Hide_LiveOrJPGBtn(0);
  1569. $("[name=resizedivViewTable]").css("display", "none");
  1570. }
  1571. else {
  1572. $("[name=ShowHideDirectionBtn]").text(GetLan(1068)); // Hide Direction Cam
  1573. Show_Hide_LiveOrJPGBtn(1);
  1574. $("[name=resizedivViewTable]").css("display", "");
  1575. }
  1576. if(getCookie('truen_live_jpg_directioncam') == ''){
  1577. live_jpg_directioncam = SHOW_IN_JPG_DETECTIONCAM;
  1578. setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
  1579. }
  1580. else{
  1581. live_jpg_directioncam = parseInt(getCookie('truen_live_jpg_directioncam'));
  1582. }
  1583. if(is_tta) {
  1584. $("[name=LiveOrJPGBtn]").css("display","none");
  1585. }
  1586. else {
  1587. if(live_jpg_directioncam) {
  1588. $("[name=LiveOrJPGBtn]").text(GetLan(1069)); // View in Live
  1589. }
  1590. else {
  1591. $("[name=LiveOrJPGBtn]").text(GetLan(1070)); // View in JPG
  1592. }
  1593. }
  1594. if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
  1595. document.getElementById('ShowHideDirectionBtn').disabled = true ;
  1596. document.getElementById('LiveOrJPGBtn').disabled = true ;
  1597. if(enable_btn) {
  1598. setTimeout(update_enable_btns, 10000);
  1599. }
  1600. }
  1601. if(enable_btn) {
  1602. intervalPTZDrawPositionId = setInterval(intervalPTZDrawPosition, 250);
  1603. }
  1604. }
  1605. else {
  1606. $("[name=resizedivViewTable]").css("display", "none");
  1607. $("[name=ShowHideDirectionBtn]").css("display", "none");
  1608. Show_Hide_ShowHideDirectionBtn(0);
  1609. Show_Hide_LiveOrJPGBtn(0);
  1610. }
  1611. }
  1612. var trnPlayerTimerId = undefined;
  1613. var trnPlayerTimerPause = 0;
  1614. function trnPlayerTimer()
  1615. {
  1616. if (trnPlayerTimerPause) {
  1617. return;
  1618. }
  1619. GetVideoAlgorithm($("[name=SYS_BOARDID]").val(), $("[name=SYS_MODE]").val(), is_secondary, 0, function(valgo) {
  1620. if (currentvalgo != parseInt(valgo)) {
  1621. currentvalgo = parseInt(valgo);
  1622. if (trnPlayer != VXGMP_GetPlayer(UseActiveX, browser, currentvalgo, 0)) {
  1623. trnPlayerTimerPause = 1;
  1624. trnPlayerChange();
  1625. }
  1626. }
  1627. });
  1628. }
  1629. function trnPlayerChange()
  1630. {
  1631. setTimeout(function() {
  1632. term();
  1633. init();
  1634. ZoomHome();
  1635. },3000);
  1636. }
  1637. function trnPlayerTimerStart()
  1638. {
  1639. currentvalgo = GetVideoAlgorithm($("[name=SYS_BOARDID]").val(), $("[name=SYS_MODE]").val(), is_secondary, 0, undefined);
  1640. trnPlayerTimerPause = 0;
  1641. if (trnPlayerTimerId == undefined) {
  1642. trnPlayerTimerId = setTimeout(function _trnPlayerTimer() {
  1643. trnPlayerTimer();
  1644. trnPlayerTimerId = setTimeout(_trnPlayerTimer, 1000);
  1645. },1000);
  1646. }
  1647. }
  1648. function vxgwsplayer_volume_mute()
  1649. {
  1650. if (trnPlayer == PLAYER_WEBSOCKET) {
  1651. var mute = VXGWSMP_VolumeMute('vxgwsplayer1'); // toggle
  1652. if (mute == false) {
  1653. document.getElementById('vxgwsplayer_vol').style.background = "url('/resources/img/vol_unmute.png') no-repeat 0 0";
  1654. document.getElementById('vxgwsplayer_vol').style.backgroundSize = "contain";
  1655. }
  1656. else { // mute == true
  1657. document.getElementById('vxgwsplayer_vol').style.background = "url('/resources/img/vol_mute.png') no-repeat 0 0";
  1658. document.getElementById('vxgwsplayer_vol').style.backgroundSize = "contain";
  1659. }
  1660. }
  1661. }
  1662. function init_id_speaker(en)
  1663. {
  1664. if (en) {
  1665. if(Alarm_state[7] == TN_ES_OFF){
  1666. $("#id_speaker").attr("src", "/resources/img/btn_r21_N.png");
  1667. } else {
  1668. $("#id_speaker").attr("src", "/resources/img/btn_r21_SN.png");
  1669. }
  1670. $("#id_speaker").bind();
  1671. } else {
  1672. $("#id_speaker").attr("src", "/resources/img/btn_r21_D.png");
  1673. $("#id_speaker").unbind();
  1674. }
  1675. }
  1676. function init_id_talk(en)
  1677. {
  1678. if (en) {
  1679. talk_disabled = 0;
  1680. $("#id_talk").attr("src", "/resources/img/btn_r12_N.gif");
  1681. $("#id_talk").bind();
  1682. } else {
  1683. talk_disabled = 1;
  1684. $("#id_talk").attr("src", "/resources/img/btn_r12_D.gif");
  1685. $("#id_talk").unbind();
  1686. }
  1687. }
  1688. function init_id_snapshot(en)
  1689. {
  1690. if (en) {
  1691. $("#id_snapshot").attr("src", "/resources/img/btn_r11_N.gif");
  1692. $("#id_snapshot").bind();
  1693. } else {
  1694. $("#id_snapshot").attr("src", "/resources/img/btn_r11_D.gif");
  1695. $("#id_snapshot").unbind();
  1696. }
  1697. }
  1698. function init_id_fullscreen(en)
  1699. {
  1700. if (en) {
  1701. $("#id_fullscreen").attr("src", "/resources/img/btn_r02_N.gif");
  1702. $("#id_fullscreen").bind();
  1703. } else {
  1704. $("#id_fullscreen").attr("src", "/resources/img/btn_r02_D.gif");
  1705. $("#id_fullscreen").unbind();
  1706. }
  1707. }
  1708. function init_id_buffering(en)
  1709. {
  1710. if (en) {
  1711. $("#id_buffering").css("display", "");
  1712. } else {
  1713. $("#id_buffering").css("display", "none");
  1714. }
  1715. }
  1716. function init()
  1717. {
  1718. var presetchannel = "PTZ";
  1719. var ptztitle;
  1720. Show_Hide_DetectionCamWarning(0);
  1721. contents = ajaxGet("/resources/oem/title.html");
  1722. if(contents){
  1723. // $("#page_title").text(contents);
  1724. document.title = contents;
  1725. }
  1726. else{
  1727. document.title = readSetupByKey("SYS_SYSTEMID");
  1728. if(document.title == ""){
  1729. document.title = "Video Surveillance";
  1730. }
  1731. }
  1732. contents = ajaxGet("/resources/oem/url.html");
  1733. if(!contents){
  1734. contents = ajaxGet("/bitmap/oem/logo.gif");
  1735. if(!contents){
  1736. contents = '<h1><img src="/resources/oem/logo.gif"/></h1>';
  1737. } else {
  1738. contents = '<h1><img src="/bitmap/oem/logo.gif"/></h1>';
  1739. }
  1740. }
  1741. if((readSetupByKey("SYS_IS_HATTLELAND_SPEC")) == 1){
  1742. contents3 = '<h2><img src="/resources/oem/logo2.gif"/></h2>';
  1743. document.getElementById('logoarea1').style.display = "";
  1744. $("#logoarea1").html(contents3);
  1745. ptztitle = '<span>Zoom Control</span>'
  1746. $("#panel_title").html(ptztitle);
  1747. } else if(readSetupByKey("SYS_IS_JMAV_SPECIFIC") == 1) {
  1748. model_name = readSetupByKey("SYS_MODELNAME");
  1749. contents3 = '<h2><span id=modelname></span></h2>';
  1750. document.getElementById('logoarea1').style.display = "";
  1751. $( "#logoarea1" ).html(contents3);
  1752. $( "#modelname" ).text(model_name);
  1753. } else {
  1754. document.getElementById('logoarea1').style.display = "none";
  1755. ptztitle = '<span class="LAN_255"></span>'
  1756. $("#panel_title").html(ptztitle);
  1757. }
  1758. if(readSetupByKey("SYS_IS_SYSPRO_SPECIFIC") == 1) {
  1759. document.getElementById('logoarea2').style.display = "";
  1760. $("#logoarea2").html(contents);
  1761. } else {
  1762. document.getElementById('logoarea2').style.display = "none";
  1763. $("#logoarea").html(contents);
  1764. }
  1765. boardid = parseInt(readSetupByKey("SYS_BOARDID"));
  1766. g_detection_4ch_support = NOT_SUPPORT_DETECTION_CAM_4CH ;
  1767. ft_ir4 = parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) ;
  1768. is_tta = parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED"));
  1769. var auth = readAuthInfo();
  1770. if (parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED")) == 1 || parseInt(readSetupByKey("SYS_IS_STEINSVIKSPECIFIC")) == 1) {
  1771. trnPlayerForceJpeg = 1;
  1772. }
  1773. else if(password_warning && readSetupByKey("SYS_IgnorePasswordWarning") == 0 && readSetupByKey("SYS_IsDefaultPassword") == 1 && auth["USR_LOGINID"] == "admin"){
  1774. trnPlayerForceJpeg = 1;
  1775. }
  1776. else {
  1777. trnPlayerSupportWS = parseInt(readSetupByKey("SYS_SUPPORT_WEBSOCKET"));
  1778. if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && (4 == ft_ir4)) {
  1779. trnDetectionCamPlayerSupportWS = parseInt(readSetupByKey("DIRECTIONCAM_SYS_SUPPORT_WEBSOCKET"));
  1780. }
  1781. }
  1782. if (trnPlayerSupportWS == 1 && trnPlayerForceJpeg != 1) {
  1783. trnPlayerTimerStart();
  1784. }
  1785. browser = VXGMP_GetBrowser();
  1786. trnPlayer = VXGMP_GetPlayer(UseActiveX, browser, currentvalgo, 0);
  1787. if (trnPlayer == PLAYER_ACTIVEX || trnPlayer == PLAYER_CHROMEPLUGIN) {
  1788. trnPlayerTimerPause = 1;
  1789. }
  1790. if(trnPlayer == PLAYER_ACTIVEX){
  1791. contents = '<object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs" width="720" height="405" codebase="/rel/webViewer.cab#Version=' + TVS_VERSION + '"></object>';
  1792. }
  1793. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  1794. contents = '<div id="dynamicallyPlayers"></div>';
  1795. }
  1796. else if(trnPlayer == PLAYER_WEBSOCKET){
  1797. contents = '<div id="dynamicallyPlayers"></div>';
  1798. }
  1799. else if(trnPlayer == PLAYER_JAVAAPP){
  1800. contents = '<object type="application/x-java-applet" name="Tvs" width=720 height=405 clsid="CAFEEFAC-0017-0000-FFFF-ABCDEFFEDCBA" codebase="http://java.sun.com/update/1.7.0/jinstall-7u51-windows-i586.cab#Version=1.7.0_51">'
  1801. + '<param name ="separate_jvm" value="true" />'
  1802. + '<param name="java_codebase" value="/resources/lib/" />'
  1803. + '<param name="code" value="TViewer" />'
  1804. + '<param name="archive" value="/resources/lib/TViewer.jar" />'
  1805. + '<param name="scriptable" value="true" />'
  1806. + '<param name="mayscript" value="true" />'
  1807. + '</object>';
  1808. }
  1809. else { // trnPlayer == PLAYER_JPEGSNAP
  1810. contents = '<div id="dynamicallyPlayers"><img style="height:405px;width:720px;"></img></div>';
  1811. }
  1812. $("#viewobject").html(contents);
  1813. if(0) { //if (trnPlayer == PLAYER_WEBSOCKET) {
  1814. if ((boardid & 0xFFFF) == 0xB001) {
  1815. $("#vxgwsplayer_audiocontroller").css("display", "none");
  1816. } else {
  1817. $("#vxgwsplayer_audiocontroller").css("display", "");
  1818. }
  1819. } else {
  1820. $("#vxgwsplayer_audiocontroller").css("display", "none");
  1821. }
  1822. contents = ajaxGet("/setup-item/presetlabel_sum.html");
  1823. $("#presetlabel").html(contents);
  1824. if(readSetupByKey("SYS_MODE") == 1){ // decoder system
  1825. numofsensor = 4;
  1826. numofalarm = 4;
  1827. $("[name=li_record]").css("display", "none");
  1828. $("[name=li_optionline]").css("display", "none");
  1829. }
  1830. else{
  1831. numofsensor = parseInt(readSetupByKey("SYS_NUMOFSENSOR"));
  1832. numofalarm = parseInt(readSetupByKey("SYS_NUMOFALARM"));
  1833. }
  1834. if(numofsensor < 5){
  1835. $("[name=li_sensor5]").css("display", "none");
  1836. }
  1837. if(numofsensor < 4){
  1838. $("[name=li_sensor4]").css("display", "none");
  1839. }
  1840. if(numofsensor < 3){
  1841. $("[name=li_sensor3]").css("display", "none");
  1842. }
  1843. if(numofsensor < 2){
  1844. $("[name=li_sensor2]").css("display", "none");
  1845. }
  1846. if(numofsensor < 1){
  1847. $("[name=li_sensor1]").css("display", "none");
  1848. $("[name=li_sensorline]").css("display", "none");
  1849. }
  1850. if(numofalarm < 4){
  1851. $("[name=li_alarm4]").css("display", "none");
  1852. }
  1853. if(numofalarm < 3){
  1854. $("[name=li_alarm3]").css("display", "none");
  1855. }
  1856. if(numofalarm < 2){
  1857. $("[name=li_alarm2]").css("display", "none");
  1858. }
  1859. if(numofalarm < 1){
  1860. $("[name=li_alarm1]").css("display", "none");
  1861. $("[name=li_alarmline]").css("display", "none");
  1862. }
  1863. if(readSetupByKey("SYS_MODE") == 1){ // decoder system
  1864. $("[name=li_videosel]").css("display", "none");
  1865. }
  1866. if(readSetupByKey("SYS_IS_CANON_ZOOM_SPECIFIC") != 1){
  1867. $("[name=group_canon]").css("display", "none");
  1868. }
  1869. //HUNS
  1870. if (readSetupByKey("SYS_BOARDID") == 0x3004) {
  1871. $("[name=li_record]").css("display", "none");
  1872. $("[name=li_optionline]").css("display", "none");
  1873. }
  1874. else if (readSetupByKey("SYS_BOARDID") == 0xB001) {
  1875. $("[name=li_record]").css("display", "none");
  1876. $("[name=li_optionline]").css("display", "none");
  1877. $("[name=li_talk]").css("display", "none");
  1878. $("[name=li_talkline]").css("display", "none");
  1879. }
  1880. minwidth = 454 + (36 * (numofsensor + numofalarm + 5));
  1881. // shock_exist = parseInt(readSetupByKey("SYS_SHOCK_SENSOR_EXIST"));
  1882. shock_exist = 0;
  1883. if(shock_exist == 1){ // SYS_SHOCK_SENSOR_EXIST
  1884. minwidth += 36;
  1885. }
  1886. else{
  1887. $("[name=li_shock]").css("display", "none");
  1888. }
  1889. airwiper = parseInt(readSetupByKey("SYS_FTCAMERA_IR4"));
  1890. if(airwiper == 3 || airwiper == 4){ // p7,p8
  1891. minwidth += 36;
  1892. }
  1893. else{
  1894. $("[name=li_wiper]").css("display", "none");
  1895. }
  1896. if (trnPlayer == PLAYER_WEBSOCKET) {
  1897. minwidth += 36;
  1898. $("[name=li_speaker]").css("display", "");
  1899. }
  1900. else{
  1901. $("[name=li_speaker]").css("display", "none");
  1902. }
  1903. T_LoadSetup("general");
  1904. T_LoadSetup("preset");
  1905. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
  1906. T_LoadSetup("preset1");
  1907. T_LoadSetup("preset2");
  1908. T_LoadSetup("preset3");
  1909. }
  1910. T_LoadSetup("system");
  1911. T_LoadSetup("video");
  1912. T_LoadSetup("extptz");
  1913. T_LoadSetup("curbcs");
  1914. T_LoadSetup("directioncam");
  1915. if((readSetupByKey("SYS_IS_STEINSVIKSPECIFIC") == 1) && ($("[name=SYS_BOARDID]").val() == 0x45005)) { // IMX-290 + IPM-900S
  1916. T_LoadSetup("pelletmode");
  1917. $("[name=li_pelletmode]").css("display", "");
  1918. }
  1919. else {
  1920. $("[name=li_pelletmode]").css("display", "none");
  1921. }
  1922. if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && (4 == ft_ir4)) {
  1923. if(trnPlayer == PLAYER_ACTIVEX){
  1924. g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
  1925. $("[name=ShowHideDirectionBtn]").css("display", "");
  1926. Show_Hide_LiveOrJPGBtn(1);
  1927. }
  1928. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  1929. g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
  1930. $("[name=ShowHideDirectionBtn]").css("display", "");
  1931. Show_Hide_LiveOrJPGBtn(1);
  1932. }
  1933. else if(trnPlayer == PLAYER_WEBSOCKET){
  1934. g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
  1935. $("[name=ShowHideDirectionBtn]").css("display", "");
  1936. Show_Hide_LiveOrJPGBtn(1);
  1937. }
  1938. else if(trnPlayer == PLAYER_JPEGSNAP){
  1939. g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
  1940. $("[name=ShowHideDirectionBtn]").css("display", "");
  1941. Show_Hide_LiveOrJPGBtn(0);
  1942. }
  1943. else {
  1944. ;
  1945. }
  1946. }
  1947. if (ft_ir4 == 4 || (boardid & 0xFFFF) == 0xB001) { // P8 or P8S(0xB001)
  1948. $("[name=li_camerasel]").css("display", "");
  1949. if (ft_ir4 == 4) {
  1950. document.getElementById("camerasel").selectedIndex = 0; // PTZ
  1951. }
  1952. else {
  1953. document.getElementById("camerasel").selectedIndex = 1; // Direction
  1954. }
  1955. }
  1956. initLanguage();
  1957. init_directioncam_gui(0);
  1958. if(readSetupByKey("SYS_LIVETOOLTIP") == 1) {
  1959. $("#id_view_smaller").attr('title',GetLan(1045)); // "View Size Smaller"
  1960. $("#id_view_larger").attr('title',GetLan(1046)); // "View Size Larger"
  1961. $("#id_view_resize").attr('title',GetLan(1047)); // "Resize View"
  1962. $("#id_fullscreen").attr('title',GetLan(684)); // "Fullscreen"
  1963. $("#id_motion").attr('title',GetLan(39)); // "Motion Detection"
  1964. $("#id_sensor1").attr('title',GetLan(154)+"1"); // "Sensor1"
  1965. $("#id_sensor2").attr('title',GetLan(154)+"2");
  1966. $("#id_sensor3").attr('title',GetLan(154)+"3");
  1967. $("#id_sensor4").attr('title',GetLan(154)+"4");
  1968. $("#id_sensor5").attr('title',GetLan(154)+"5");
  1969. $("#id_alarm1").attr('title',GetLan(162)+"1"); // "Alarm1"
  1970. $("#id_alarm2").attr('title',GetLan(162)+"2");
  1971. $("#id_alarm3").attr('title',GetLan(162)+"3");
  1972. $("#id_alarm4").attr('title',GetLan(162)+"4");
  1973. $("#id_snapshot").attr('title',GetLan(248)); // "Snapshot"
  1974. $("#id_talk").attr('title',GetLan(249)); // "Talk"
  1975. $("#id_record").attr('title',GetLan(321)); // "Record"
  1976. $("#id_shock").attr('title',GetLan(230)); // "Shock Detection" // shock_exist = 0; (always zero check in 2018-10-15)
  1977. $("#id_wiper").attr('title',GetLan(175)); // "Wiper"
  1978. $("#id_buffer_down").attr('title',GetLan(1048)); // "Player Buffer Size Down"
  1979. $("#id_buffer_up").attr('title',GetLan(1049)); // "Player Buffer Size Up"
  1980. $("#id_buffer_resize").attr('title',GetLan(1050)); // "Resize Player Buffer"
  1981. }
  1982. init_video_select(document.formView.videosel, readSetupByKey("VID_MAX_STREAM_OF_ONE_CHANNEL"));
  1983. if(getCookie('truenvideoselect') == ''){
  1984. if($("[name=SYS_BOARDID]").val() == 0xB001){
  1985. is_secondary = 8;
  1986. } else {
  1987. is_secondary = 0;
  1988. }
  1989. setCookie('truenvideoselect', is_secondary, 100);
  1990. }
  1991. else{
  1992. is_secondary = parseInt(getCookie('truenvideoselect'));
  1993. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007 || $("[name=SYS_BOARDID]").val() == 0xB001){
  1994. if(is_secondary == 1 || is_secondary == 5) ptzchannel = 2;
  1995. else if(is_secondary == 2 || is_secondary == 6) ptzchannel = 3;
  1996. else if(is_secondary == 3 || is_secondary == 7) ptzchannel = 4;
  1997. else ptzchannel = 1;
  1998. }
  1999. }
  2000. $("#videosel").val(is_secondary);
  2001. if((parseInt(readSetupByKey("SYS_NOT_SUPPORT_FUNCTION")) & parseInt(1<<PTZ_FUNCTION)) == parseInt(1<<PTZ_FUNCTION)){
  2002. $("[name=group_camera]").css("display", "none");
  2003. }
  2004. else{
  2005. $("#preset_select").empty();
  2006. str = '<option value="0" selected="true">' + GetLan(325) + '</option>';
  2007. $("#preset_select").append(str);
  2008. if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
  2009. if(is_secondary == 1 || is_secondary == 5) presetchannel = "PT1";
  2010. else if(is_secondary == 2 || is_secondary == 6) presetchannel = "PT2";
  2011. else if(is_secondary == 3 || is_secondary == 7) presetchannel = "PT3";
  2012. else presetchannel = "PTZ";
  2013. for(i = 1; i <= 9; i++) {
  2014. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET00" + i + "]").val() + '</option>';
  2015. $("#preset_select").append(str);
  2016. }
  2017. for(i = 10; i <= 99; i++) {
  2018. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET0" + i + "]").val() + '</option>';
  2019. $("#preset_select").append(str);
  2020. }
  2021. for(i = 100; i <= 128; i++) {
  2022. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET" + i + "]").val() + '</option>';
  2023. $("#preset_select").append(str);
  2024. }
  2025. }
  2026. else{
  2027. for(i = 1; i <= 9; i++) {
  2028. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET00" + i + "]").val() + '</option>';
  2029. $("#preset_select").append(str);
  2030. }
  2031. for(i = 10; i <= 99; i++) {
  2032. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET0" + i + "]").val() + '</option>';
  2033. $("#preset_select").append(str);
  2034. }
  2035. for(i = 100; i <= 500; i++) {
  2036. if((i >= 131 && i <= 134) || (i >= 141 && i <= 148) || (i >= 151 && i <= 158) || (i >= 161 && i <= 162) || (i == 167) || (i >= 174 && i <= 175) || (i >= 177 && i <= 179)){
  2037. }
  2038. else{
  2039. str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET" + i + "]").val() + '</option>';
  2040. $("#preset_select").append(str);
  2041. }
  2042. }
  2043. }
  2044. if(0){
  2045. $("#ptzbuttongroup_1").css("display", "");
  2046. }
  2047. else{
  2048. $("#ptzbuttongroup_1").css("display", "none");
  2049. }
  2050. if(0){
  2051. $("#ptzbuttongroup_2").css("display", "");
  2052. }
  2053. else{
  2054. $("#ptzbuttongroup_2").css("display", "none");
  2055. }
  2056. if(0){
  2057. $("#ptzbuttongroup_3").css("display", "");
  2058. }
  2059. else{
  2060. $("#ptzbuttongroup_3").css("display", "none");
  2061. }
  2062. if($("[name=SYS_MODULE_TYPE]").val() == LG_MODULE || $("[name=SYS_MODULE_TYPE]").val() == WONWOO_MODULE){
  2063. $("#ptzbuttongroup_4").css("display", "");
  2064. }
  2065. else{
  2066. $("#ptzbuttongroup_4").css("display", "none");
  2067. }
  2068. tracking = 1;
  2069. if (($("[name=SYS_MODULE_TYPE]").val() != PANASONIC_MODULE && readSetupByKey("SYS_USE_AUTO_PTZ") != 1) ||
  2070. (parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 4)){
  2071. tracking = 0;
  2072. }
  2073. acw = 1;
  2074. if($("[name=SYS_PTZ_TYPE]").val() != 7 || parseInt(readSetupByKey("SYS_INTELLIGENT_PTZ")) != 1) {
  2075. acw = 0;
  2076. }
  2077. // console.log(tracking);
  2078. if(tracking == 0 && acw == 0){
  2079. $("#trackingbuttonline").css("display", "none");
  2080. $("#trackingbuttongroup").css("display", "none");
  2081. }
  2082. else{
  2083. if(tracking == 0){
  2084. $("#TrackingButton").css("display", "none");
  2085. }
  2086. else{
  2087. if(parseInt(readSetupByKey("ETC_AutoPursuit_Enable")) == 0 &&
  2088. (parseInt(readSetupByKey("SYS_IS_OBJECT_DETECT")) == 1 && parseInt(readSetupByKey("ETC_OD_TRACKING_READY")) != 1)){
  2089. $.khjDisable("TrackingButton");
  2090. }
  2091. }
  2092. if(acw == 0){
  2093. $("#ACWButton").css("display", "none");
  2094. }
  2095. }
  2096. if(readSetupByKey("SER_PTZTYPE") != 9){
  2097. $("#autopanline").css("display", "none");
  2098. $("#autopanbuttongroup").css("display", "none");
  2099. }
  2100. if(parseInt(readSetupByKey("SYS_IS_SEMOCON_SPECIFIC")) == 1){
  2101. $("#presetbuttongroup_1").css("display", "none");
  2102. $("#presetbuttongroup_2").css("display", "");
  2103. $("#ptzbuttongroup_5").css("display", "");
  2104. $("#semocon_irmove_buttons").css("display", "");
  2105. $("#after_action_group").css("display", "");
  2106. if(parseInt(readSetupByKey("ETC_HOUSINGWASHERENABLE")) == 1){
  2107. $("[name=li_sensor1]").css("display", "none");
  2108. $("[name=li_alarm1]").css("display", "none");
  2109. }
  2110. isSemocon = 1;
  2111. }
  2112. else{
  2113. $("#presetbuttongroup_2").css("display", "none");
  2114. $("#ptzbuttongroup_5").css("display", "none");
  2115. $("#semocon_irmove_buttons").css("display", "none");
  2116. $("#after_action_group").css("display", "none");
  2117. isSemocon = 0;
  2118. }
  2119. if(parseInt(readSetupByKey("SYS_IS_HAPCHEON_SPECIFIC")) == 1){
  2120. document.getElementById('logout').style.display = "";
  2121. $("#ptzbuttongroup_8").css("display", "");
  2122. if( $("[name=SYS_MODULE_TYPE]").val() == SONY_MODULE ||
  2123. $("[name=SYS_MODULE_TYPE]").val() == PANASONIC_MODULE ||
  2124. $("[name=SYS_MODULE_TYPE]").val() == TECHWIN_MODULE ||
  2125. $("[name=SYS_MODULE_TYPE]").val() == WONWOO_MODULE ) {
  2126. $("[name=li_reset_zoom_module]").css("display", "");
  2127. } else {
  2128. $("[name=li_reset_zoom_module]").css("display", "none");
  2129. }
  2130. $("#div_ptz_panel_drag").css("display", "none");
  2131. $("#div_ptz_panel_button").css("display", "");
  2132. $("#panel_title_below").css("display", "none");
  2133. } else if(readSetupByKey("SYS_IS_HATTLELAND_SPEC") == 1){
  2134. $("[name=LAN_685]").css("display", "none");
  2135. $("[name=li_talk]").css("display", "none");
  2136. $("[name=li_talkline]").css("display", "none");
  2137. $("#div_ptz_panel_drag").css("display", "none");
  2138. $("#panel_title_below").css("display", "");
  2139. $(".preset").css("display", "none");
  2140. $(".freesetBtn").css("display", "none");
  2141. $("#presetbuttongroup_1").css("display", "none");
  2142. } else {
  2143. $("#ptzbuttongroup_8").css("display", "none");
  2144. $("#div_ptz_panel_drag").css("display", "");
  2145. $("#div_ptz_panel_button").css("display", "none");
  2146. $("#panel_title_below").css("display", "none");
  2147. }
  2148. if(parseInt(readSetupByKey("SYS_CYNIX_Wiper")) == 1){
  2149. $("#ptzbuttongroup_6").css("display", "");
  2150. }
  2151. else{
  2152. $("#ptzbuttongroup_6").css("display", "none");
  2153. }
  2154. if(parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 3 || parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 4){
  2155. $("#ptzbuttongroup_7").css("display", "");
  2156. }
  2157. else{
  2158. $("#ptzbuttongroup_7").css("display", "none");
  2159. }
  2160. }
  2161. if(readSetupByKey("SYS_IS_BNB_SPECIFIC") == 1) {
  2162. $("[name=li_sleepmode]").css("display", "");
  2163. } else {
  2164. $("[name=li_sleepmode]").css("display", "none");
  2165. }
  2166. if(readSetupByKey("SYS_BOARDID") == 0xB001) {
  2167. if (is_secondary == 8 || is_secondary == 9) {
  2168. $("[name=li_motion]").css("display", "none");
  2169. $("[name=li_motionline]").css("display", "none");
  2170. } else {
  2171. $("[name=li_motion]").css("display", "");
  2172. $("[name=li_motionline]").css("display", "");
  2173. }
  2174. }
  2175. init_id_talk(1);
  2176. init_id_speaker(0);
  2177. init_id_snapshot(1);
  2178. init_id_fullscreen(1);
  2179. init_id_buffering(1);
  2180. if(trnPlayer == PLAYER_ACTIVEX){
  2181. $("[name=group_digital]").css("display", "");
  2182. $("[name=group_file]").css("display", "");
  2183. $("[name=group_file2]").css("display", "none");
  2184. $("[name=group_file3]").css("display", "none");
  2185. tvs_init(location.hostname, readSetupByKey("NET_BASEPORT"), auth["USR_LOGINID"], auth["USR_LOGINPASS"], is_secondary);
  2186. }
  2187. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  2188. init_id_talk(0);
  2189. $("[name=group_digital]").css("display", "");
  2190. $("[name=group_file]").css("display", "none");
  2191. $("[name=group_file2]").css("display", "none");
  2192. $("[name=group_file3]").css("display", "none");
  2193. var sRTSPUrl = getRTSPURL(is_secondary , 0);
  2194. var sRTSPPort = readSetupByKey("NET_RTSPPORT");
  2195. var sAddress = 'rtsp://' + auth["USR_LOGINID"] + ':' + auth["USR_LOGINPASS"] + '@' + location.hostname + ':' + sRTSPPort + sRTSPUrl;
  2196. VXGMP_createPlayer('vxgplayer1', sAddress, 720, 405, 'dynamicallyPlayers');
  2197. vxgplayer('vxgplayer1').onStateChange(function(readyState){
  2198. if(readyState == 2){
  2199. currnetRes = parseInt(readSetupByKey(resolutionAPIString));
  2200. setviewsize(-1);
  2201. }
  2202. // console.log("NEW READY STATE: " + readyState);
  2203. });
  2204. vxgplayer('vxgplayer1').onRecord(function(player, status, file){
  2205. if(status == "RECORD_STARTED"){
  2206. document.formView.RecordInfo.value = " Recording...";
  2207. document.formView.RecordFname.value = file;
  2208. }
  2209. else if(status == "RECORD_STOPPED"){
  2210. document.formView.RecordFname.value = file;
  2211. if(Ccurrentrec == 1){
  2212. Ccurrentrec = 0;
  2213. document.formView.CRecButton.value = 'Record Start';
  2214. document.getElementById('recordinfo_msg').style.display = 'none';
  2215. }
  2216. }
  2217. else if(status == "RECORD_FULL"){
  2218. document.formView.RecordInfo.value = " No free space.";
  2219. document.formView.CRecButton.value = 'Record Start';
  2220. Ccurrentrec = -1;
  2221. $( "#dialog-warning" ).dialog( "open" );
  2222. }
  2223. // console.log("player RECORD: " + player + " " + status+' '+file);
  2224. });
  2225. }
  2226. else if(trnPlayer == PLAYER_WEBSOCKET){
  2227. init_id_buffering(1);
  2228. if (location.protocol == 'https:')
  2229. {
  2230. init_id_talk(1);
  2231. }
  2232. else // http:
  2233. {
  2234. $("#id_talk").attr('title',"only support HTTPS");
  2235. init_id_talk(0);
  2236. }
  2237. init_id_speaker(1);
  2238. $("[name=group_digital]").css("display", "");
  2239. $("[name=group_file]").css("display", "none");
  2240. $("[name=group_file2]").css("display", "none");
  2241. $("[name=group_file3]").css("display", "");
  2242. var sRTSPUrl = getRTSPURL(is_secondary , 0);
  2243. var sRTSPPort = readSetupByKey("NET_RTSPPORT");
  2244. var sAddress = 'rtsp://' + location.hostname + ':' + sRTSPPort + sRTSPUrl;
  2245. var sWSAddress = (location.protocol == 'https:' ? 'wss://' : 'ws://') + location.hostname + (location.port ? ':' + location.port : '') + '/rtsp_over_websocket';
  2246. var buf = 1;
  2247. if(getCookie('truendisplaybuffer') != ''){
  2248. buf = parseInt(getCookie('truendisplaybuffer'));
  2249. }
  2250. VXGWSMP_createPlayer('vxgwsplayer1', sAddress, sWSAddress, 720, 405, buf, 'dynamicallyPlayers', auth["USR_LOGINID"], auth["USR_LOGINPASS"]);
  2251. vxgwsplayer('vxgwsplayer1').onStateChange(function(state){
  2252. if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
  2253. VXGWSMP_ShowError('vxgwsplayer1', 'Too many connections');
  2254. }
  2255. else {
  2256. VXGWSMP_HideError('vxgwsplayer1');
  2257. }
  2258. currnetRes = parseInt(readSetupByKey(resolutionAPIString));
  2259. setviewsize(-1);
  2260. });
  2261. vxgwsplayer('vxgwsplayer1').onRecord = function(args){
  2262. if (args.isRecording == true && args.isRecStopping == false) // started
  2263. {
  2264. WSRecTimeTick = -1;
  2265. WSRecTimer();
  2266. WSRecTimerId = setInterval(WSRecTimer, 1000);
  2267. document.getElementById('WSRecTimeMsg').style.display = 'block';
  2268. document.formView.WSRecButton.value = 'Stop';
  2269. document.formView.WSRecButton.disabled = false;
  2270. }
  2271. else if (args.isRecording == false && args.isRecStopping == false) // stopped
  2272. {
  2273. if (Ccurrentrec) Ccurrentrec = 0;
  2274. clearInterval(WSRecTimerId);
  2275. WSRecTimerId = undefined;
  2276. document.getElementById('WSRecTimeMsg').style.display = 'none';
  2277. document.formView.WSRecButton.value = 'Start';
  2278. document.formView.WSRecButton.disabled = false;
  2279. }
  2280. else // args.isRecStopping == true // stopping
  2281. {
  2282. document.formView.WSRecMsg.value = ' Stopping...';
  2283. document.formView.WSRecButton.disabled = true;
  2284. }
  2285. };
  2286. }
  2287. else if(trnPlayer == PLAYER_JPEGSNAP){
  2288. var sAddress = getJPGURL(is_secondary, 0);
  2289. // alert("sAddress : " + sAddress); // ch1.jpg
  2290. init_id_buffering(0);
  2291. init_id_fullscreen(0);
  2292. init_id_snapshot(0);
  2293. init_id_talk(0);
  2294. talk_disabled = 1;
  2295. $("[name=group_digital]").css("display", "none");
  2296. $("[name=group_file]").css("display", "none");
  2297. $("[name=group_file2]").css("display", "none");
  2298. $("[name=group_file3]").css("display", "none");
  2299. if($("[name=SYS_MODE]").val() != 1) {
  2300. $("#dynamicallyPlayers").html("<div><img id=\"img_update\" name=\"img_update\" style=\"width:720px;height:405px\" src=\"/capturx/"+sAddress+"?index=" + indexcount + "\" /></div>");
  2301. indexcount++;
  2302. if (timerTickId == undefined) {
  2303. if((boardid & 0xF000) == 0xE000) {
  2304. timerTickId = setInterval(timerTick, 1000);
  2305. } else {
  2306. timerTickId = setInterval(timerTick, 500);
  2307. }
  2308. }
  2309. } else {
  2310. var contents2 = "<div style=\"width:720px; height:405px; text-align:center; display:table-cell; vertical-align:middle;\"><span>" + GetLan(1008) + "</span></div>";
  2311. $("#dynamicallyPlayers").html(contents2);
  2312. }
  2313. }
  2314. else{
  2315. init_id_fullscreen(0);
  2316. init_id_snapshot(0);
  2317. init_id_talk(0);
  2318. talk_disabled = 1;
  2319. $("[name=group_digital]").css("display", "none");
  2320. $("[name=group_file]").css("display", "none");
  2321. $("[name=group_file2]").css("display", "none");
  2322. $("[name=group_file3]").css("display", "none");
  2323. }
  2324. if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
  2325. init_directioncam();
  2326. init_directioncam_browser();
  2327. init_directioncam_gui(1);
  2328. if (timerTickDetection4ChId == undefined) {
  2329. timerTickDetection4ChId = setInterval(timerTickDetection4Ch, 3000);
  2330. }
  2331. }
  2332. if($("[name=SYS_ISIPCAM]").val() == 0){
  2333. $("[name=group_image]").css("display", "none");
  2334. }
  2335. else {
  2336. if ($("[name=SYS_BOARDID]").val() == 0xB001) {
  2337. $("[name=group_image]").css("display", "none");
  2338. }
  2339. else {
  2340. if (parseInt(readSetupByKey("SYS_IS_JIINTECH_SPECIFIC")) == 1)
  2341. {
  2342. $("#div_image1").css("display", "none");
  2343. $("#div_image2").css("display", "");
  2344. }
  2345. else
  2346. {
  2347. $("#div_image1").css("display", "");
  2348. $("#div_image2").css("display", "none");
  2349. }
  2350. }
  2351. }
  2352. document.formView.Directory.value = getCookie('truenrecordpath');
  2353. document.formView.FileName.value = getCookie('truenrecordfile');
  2354. document.formView.WSRecFileName.value = getCookie('truenrecordfile');
  2355. if(getCookie('truenfullscreenmode') == ''){
  2356. Full_Screen_Mode = 1;
  2357. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  2358. }
  2359. else{
  2360. Full_Screen_Mode = parseInt(getCookie('truenfullscreenmode'));
  2361. if(Full_Screen_Mode != 1 && Full_Screen_Mode != 2){
  2362. Full_Screen_Mode = 1;
  2363. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  2364. }
  2365. }
  2366. FSM_Once = 1;
  2367. if(getCookie('truenviewsize') == ''){
  2368. viewsizerate = 50;
  2369. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  2370. minwidth = 1400 ;
  2371. }
  2372. $(".viewSize").khjSlider(viewsizerate);
  2373. setviewsize(viewsizerate);
  2374. setCookie('truenviewsize', viewsizerate, 100);
  2375. }
  2376. else{
  2377. var val = parseInt(getCookie('truenviewsize'));
  2378. viewsizerate = val;
  2379. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  2380. minwidth = 1400 ;
  2381. }
  2382. $(".viewSize").khjSlider(val);
  2383. setviewsize(val);
  2384. }
  2385. if(getCookie('truendisplaybuffer') == ''){
  2386. displaybuffer = 1;
  2387. if(trnPlayer == PLAYER_ACTIVEX){
  2388. tvs_SetBuffer(1);
  2389. if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
  2390. tvs_SetBuffer_DirectionCam(1);
  2391. }
  2392. }
  2393. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  2394. VXGMP_SetBuffer('vxgplayer1', 1);
  2395. }
  2396. else if(trnPlayer == PLAYER_WEBSOCKET){
  2397. //See VXGWSMP_createPlayer()
  2398. //VXGWSMP_SetBuffer('vxgwsplayer1', 1);
  2399. }
  2400. setCookie('truendisplaybuffer', 1, 100);
  2401. $(".buffering").khjSlider(1);
  2402. }
  2403. else{
  2404. var buf = parseInt(getCookie('truendisplaybuffer'));
  2405. if(trnPlayer == PLAYER_ACTIVEX){
  2406. tvs_SetBuffer(buf);
  2407. if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
  2408. tvs_SetBuffer_DirectionCam(buf);
  2409. }
  2410. }
  2411. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  2412. VXGMP_SetBuffer('vxgplayer1', buf);
  2413. }
  2414. else if(trnPlayer == PLAYER_WEBSOCKET){
  2415. //See VXGWSMP_createPlayer()
  2416. //VXGWSMP_SetBuffer('vxgwsplayer1', buf);
  2417. }
  2418. $(".buffering").khjSlider(buf);
  2419. displaybuffer = buf;
  2420. }
  2421. if(getCookie('truenviewaccordion') == ''){
  2422. setCookie('truenviewaccordion', 0, 100);
  2423. viewaccordion = 0;
  2424. }
  2425. else{
  2426. viewaccordion = parseInt(getCookie('truenviewaccordion'));
  2427. if(viewaccordion & 0x01){
  2428. $("#digital_accordion_button").click();
  2429. }
  2430. if(viewaccordion & 0x02){
  2431. $("#ptz_accordion_button").click();
  2432. }
  2433. if(viewaccordion & 0x04){
  2434. $("#rec_accordion_button").click();
  2435. }
  2436. if(viewaccordion & 0x08){
  2437. $("#rec2_accordion_button").click();
  2438. }
  2439. if(viewaccordion & 0x10){
  2440. $("#image_accordion_button").click();
  2441. }
  2442. if(viewaccordion & 0x20){
  2443. $("#canon_accordion_button").click();
  2444. }
  2445. if(viewaccordion & 0x40){
  2446. $("#wsrec_accordion_button").click();
  2447. }
  2448. }
  2449. // $("[name=videosel]").customSelect();
  2450. // $("[name=list_select]").customSelect();
  2451. // $("[name=videosel]").trigger("update");
  2452. if(trnPlayer != PLAYER_ACTIVEX || parseInt(readSetupByKey("SYS_DISABLE_VSNM")) == 1){
  2453. timerEventId = setInterval(timerEvent, 1000);
  2454. }
  2455. else{
  2456. if(airwiper == 3 || airwiper == 4){
  2457. timerEvent2Id = setInterval(timerEvent2, 1000);
  2458. }
  2459. }
  2460. if(trnPlayer == PLAYER_ACTIVEX) {
  2461. }
  2462. else if(trnPlayer == PLAYER_CHROMEPLUGIN || trnPlayer == PLAYER_WEBSOCKET || trnPlayer == PLAYER_JPEGSNAP){
  2463. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))){
  2464. if (initcanvas == 0) {
  2465. canvasinit();
  2466. initcanvas = 1;
  2467. }
  2468. }
  2469. }
  2470. initDialog();
  2471. if(password_warning && readSetupByKey("SYS_IgnorePasswordWarning") == 0 && readSetupByKey("SYS_IsDefaultPassword") == 1 && auth["USR_LOGINID"] == "admin"){
  2472. $( "#dialog-warning2" ).dialog( "open" );
  2473. }
  2474. started = 1;
  2475. setviewsize(-1);
  2476. }
  2477. var paint;
  2478. var StartX;
  2479. var StartY;
  2480. var CurrentX;
  2481. var CurrentY;
  2482. function canvasinit(){
  2483. var canvasDiv = document.getElementById('canvasDiv');
  2484. canvas_ptz = document.createElement('canvas');
  2485. canvas_ptz.setAttribute('width', 640);
  2486. canvas_ptz.setAttribute('height', 360);
  2487. canvas_ptz.setAttribute('id', 'canvas_ptz_id');
  2488. canvas_ptz.setAttribute('style', 'opacity: 0.5');
  2489. canvasDiv.appendChild(canvas_ptz);
  2490. if(typeof G_vmlCanvasManager != 'undefined') {
  2491. canvas_ptz = G_vmlCanvasManager.initElement(canvas_ptz);
  2492. }
  2493. context_ptz = canvas_ptz.getContext("2d");
  2494. $('#canvas_ptz_id').mousedown(function(e){
  2495. if(e.button == 2){
  2496. ptz_preset_goto(ptzchannel, 8000000);
  2497. }
  2498. else if(e.button == 0){
  2499. var mouseX = e.offsetX - this.offsetLeft;
  2500. var mouseY = e.offsetY - this.offsetTop;
  2501. paint = true;
  2502. StartX = mouseX;
  2503. StartY = mouseY;
  2504. }
  2505. });
  2506. $('#canvas_ptz_id').mousemove(function(e){
  2507. if(paint){
  2508. var mouseX = e.offsetX - this.offsetLeft;
  2509. var mouseY = e.offsetY - this.offsetTop;
  2510. CurrentX = mouseX;
  2511. CurrentY = mouseY;
  2512. redraw();
  2513. }
  2514. });
  2515. $('#canvas_ptz_id').mouseup(function(e){
  2516. if(paint){
  2517. var mouseX = e.offsetX - this.offsetLeft;
  2518. var mouseY = e.offsetY - this.offsetTop;
  2519. CurrentX = mouseX;
  2520. CurrentY = mouseY;
  2521. a = Math.round(StartX*1000 / context_ptz.canvas.width);
  2522. b = Math.round(StartY*1000 / context_ptz.canvas.height);
  2523. c = Math.round(CurrentX*1000 / context_ptz.canvas.width);
  2524. d = Math.round(CurrentY*1000 / context_ptz.canvas.height);
  2525. if(a <= c){
  2526. if(b <= d) ptz_drag_zoom(a, b, c, d);
  2527. else ptz_drag_zoom(a, d, c, b);
  2528. }
  2529. else{
  2530. if(b <= d) ptz_drag_zoom(c, b, a, d);
  2531. else ptz_drag_zoom(c, d, a, b);
  2532. }
  2533. context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
  2534. paint = false;
  2535. }
  2536. });
  2537. $('#canvas_ptz_id').mouseleave(function(e){
  2538. context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
  2539. paint = false;
  2540. });
  2541. $('#canvas_ptz_id').dblclick(function(e){
  2542. var mouseX = e.offsetX - this.offsetLeft;
  2543. var mouseY = e.offsetY - this.offsetTop;
  2544. aa = Math.round(mouseX*1000 / context_ptz.canvas.width);
  2545. bb = Math.round(mouseY*1000 / context_ptz.canvas.height);
  2546. z = aa*1000 + bb + 4000000;
  2547. //alert('z='+z);
  2548. ptz_preset_goto(ptzchannel, z);
  2549. });
  2550. }
  2551. function redraw(){
  2552. context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
  2553. context_ptz.strokeStyle = "#ffffff";
  2554. context_ptz.lineJoin = "round";
  2555. context_ptz.lineWidth = 2;
  2556. context_ptz.beginPath();
  2557. context_ptz.rect(StartX, StartY, CurrentX - StartX, CurrentY - StartY);
  2558. context_ptz.closePath();
  2559. context_ptz.stroke();
  2560. }
  2561. var paint_4ch = [false,false,false,false];
  2562. var StartX_4ch = [0,0,0,0];
  2563. var StartY_4ch = [0,0,0,0];
  2564. var CurrentX_4ch = [0,0,0,0];
  2565. var CurrentY_4ch = [0,0,0,0];
  2566. function detection_4ch_mousedown(e , index, val)
  2567. {
  2568. if(e.button == 2){
  2569. // ptz_preset_goto(ptzchannel, 8000000);
  2570. }
  2571. else if(e.button == 0){
  2572. var mouseX = e.offsetX - val.offsetLeft;
  2573. var mouseY = e.offsetY - val.offsetTop;
  2574. // console.log("e.offsetX:"+e.offsetX + ",val.offsetLeft:"+ val.offsetLeft + ",e.offsetY:" + e.offsetY + ",val.offsetTop:" + val.offsetTop);
  2575. paint_4ch[index] = true;
  2576. StartX_4ch[index] = mouseX;
  2577. StartY_4ch[index] = mouseY;
  2578. }
  2579. }
  2580. function detection_4ch_mousemove(e, index, val)
  2581. {
  2582. if(paint_4ch[index]){
  2583. var mouseX = e.offsetX - val.offsetLeft;
  2584. var mouseY = e.offsetY - val.offsetTop;
  2585. CurrentX_4ch[index] = mouseX;
  2586. CurrentY_4ch[index] = mouseY;
  2587. redraw_detection_4ch(index);
  2588. }
  2589. }
  2590. function detection_4ch_mouseup(e, index, val)
  2591. {
  2592. if(paint_4ch[index]){
  2593. var mouseX = e.offsetX - val.offsetLeft;
  2594. var mouseY = e.offsetY - val.offsetTop;
  2595. // console.log("e.offsetX : "+ e.offsetX + " val.offsetLeft : " + val.offsetLeft + ", e.offsetY : "+ e.offsetY + " val.offsetTop : " + val.offsetTop);
  2596. CurrentX_4ch[index] = mouseX;
  2597. CurrentY_4ch[index] = mouseY;
  2598. a = Math.round(StartX_4ch[index]*1000 / context_detection_4ch[index].canvas.width);
  2599. b = Math.round(StartY_4ch[index]*1000 / context_detection_4ch[index].canvas.height);
  2600. c = Math.round(CurrentX_4ch[index]*1000 / context_detection_4ch[index].canvas.width);
  2601. d = Math.round(CurrentY_4ch[index]*1000 / context_detection_4ch[index].canvas.height);
  2602. if(a <= c){
  2603. if(b <= d) ptz_det_drag_zoom(index, a, b, c, d);
  2604. else ptz_det_drag_zoom(index, a, d, c, b);
  2605. }
  2606. else{
  2607. if(b <= d) ptz_det_drag_zoom(index, c, b, a, d);
  2608. else ptz_det_drag_zoom(index, c, d, a, b);
  2609. }
  2610. context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
  2611. paint_4ch[index] = false;
  2612. }
  2613. }
  2614. function detection_4ch_mouseleave(e, index, val)
  2615. {
  2616. context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
  2617. paint_4ch[index] = false;
  2618. }
  2619. function detection_4ch_dblclick(e, index, val)
  2620. {
  2621. var mouseX = e.offsetX - val.offsetLeft;
  2622. var mouseY = e.offsetY - val.offsetTop;
  2623. aa = Math.round(mouseX*1000 / context_detection_4ch[index].canvas.width);
  2624. bb = Math.round(mouseY*1000 / context_detection_4ch[index].canvas.height);
  2625. z = aa*1000 + bb + 4000000;
  2626. //alert('z='+z);
  2627. ptz_det_clicktocenter(index, aa, bb);
  2628. }
  2629. function canvasinit_getposition(index_param)
  2630. {
  2631. var firstCanvas = 0;
  2632. var index ;
  2633. for(index = 0; index < 4 ; ++ index) {
  2634. if(index_param == index ) {
  2635. if(0 == canvas_PTZ_position[index]) {
  2636. var canvasDiv ;
  2637. if(0 == index) {
  2638. canvasDiv = document.getElementById('canvasDiv_PTZPosCam0');
  2639. }
  2640. else if(1 == index) {
  2641. canvasDiv = document.getElementById('canvasDiv_PTZPosCam1');
  2642. }
  2643. else if(2 == index) {
  2644. canvasDiv = document.getElementById('canvasDiv_PTZPosCam2');
  2645. }
  2646. else {
  2647. canvasDiv = document.getElementById('canvasDiv_PTZPosCam3');
  2648. }
  2649. canvas_PTZ_position[index] = document.createElement('canvas');
  2650. canvas_PTZ_position[index].setAttribute('width', 320);
  2651. canvas_PTZ_position[index].setAttribute('height', 180);
  2652. if(0 == index) {
  2653. canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position0');
  2654. }
  2655. else if(1 == index) {
  2656. canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position1');
  2657. }
  2658. else if(2 == index) {
  2659. canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position2');
  2660. }
  2661. else {
  2662. canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position3');
  2663. }
  2664. canvas_PTZ_position[index].setAttribute('style', 'opacity: 0.5');
  2665. canvasDiv.appendChild(canvas_PTZ_position[index]);
  2666. if(typeof G_vmlCanvasManager != 'undefined') {
  2667. canvas_PTZ_position[index] = G_vmlCanvasManager.initElement(canvas_PTZ_position[index]);
  2668. }
  2669. context_PTZ_position[index] = canvas_PTZ_position[index].getContext("2d");
  2670. }
  2671. }
  2672. }
  2673. }
  2674. function canvasinit_detection_4ch(index_param){
  2675. var index ;
  2676. for(index = 0; index < 4 ; ++ index) {
  2677. if(index_param == index) {
  2678. if(0 == canvas_detection_4ch[index]) {
  2679. var canvasDiv ;
  2680. if(0 == index) {
  2681. canvasDiv = document.getElementById('canvasDiv_DetectionCam0');
  2682. }
  2683. else if(1 == index) {
  2684. canvasDiv = document.getElementById('canvasDiv_DetectionCam1');
  2685. }
  2686. else if(2 == index) {
  2687. canvasDiv = document.getElementById('canvasDiv_DetectionCam2');
  2688. }
  2689. else {
  2690. canvasDiv = document.getElementById('canvasDiv_DetectionCam3');
  2691. }
  2692. canvas_detection_4ch[index] = document.createElement('canvas');
  2693. canvas_detection_4ch[index].setAttribute('width', 320);
  2694. canvas_detection_4ch[index].setAttribute('height', 180);
  2695. if(0 == index) {
  2696. canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch0');
  2697. }
  2698. else if(1 == index) {
  2699. canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch1');
  2700. }
  2701. else if(2 == index) {
  2702. canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch2');
  2703. }
  2704. else {
  2705. canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch3');
  2706. }
  2707. canvas_detection_4ch[index].setAttribute('style', 'opacity: 0.5');
  2708. canvasDiv.appendChild(canvas_detection_4ch[index]);
  2709. if(typeof G_vmlCanvasManager != 'undefined') {
  2710. canvas_detection_4ch[index] = G_vmlCanvasManager.initElement(canvas_detection_4ch[index]);
  2711. }
  2712. context_detection_4ch[index] = canvas_detection_4ch[index].getContext("2d");
  2713. }
  2714. }
  2715. }
  2716. if(0 == index_param) {
  2717. // channel 0
  2718. $('#canvas_detection_4ch0').mousedown(function(e){
  2719. // console.log("e.offsetX:"+e.offsetX + ",this.offsetLeft:"+ this.offsetLeft + ",e.offsetY:" + e.offsetY + ",this.offsetTop:" + this.offsetTop);
  2720. detection_4ch_mousedown(e, 0, this);
  2721. });
  2722. $('#canvas_detection_4ch0').mousemove(function(e){
  2723. detection_4ch_mousemove(e, 0, this);
  2724. });
  2725. $('#canvas_detection_4ch0').mouseup(function(e){
  2726. detection_4ch_mouseup(e, 0, this);
  2727. });
  2728. $('#canvas_detection_4ch0').mouseleave(function(e){
  2729. detection_4ch_mouseleave(e, 0, this);
  2730. });
  2731. $('#canvas_detection_4ch0').dblclick(function(e){
  2732. detection_4ch_dblclick(e, 0, this);
  2733. });
  2734. }
  2735. else if(1 == index_param) {
  2736. // channel 1
  2737. $('#canvas_detection_4ch1').mousedown(function(e){
  2738. detection_4ch_mousedown(e, 1, this);
  2739. });
  2740. $('#canvas_detection_4ch1').mousemove(function(e){
  2741. detection_4ch_mousemove(e, 1, this);
  2742. });
  2743. $('#canvas_detection_4ch1').mouseup(function(e){
  2744. detection_4ch_mouseup(e, 1, this);
  2745. });
  2746. $('#canvas_detection_4ch1').mouseleave(function(e){
  2747. detection_4ch_mouseleave(e, 1, this);
  2748. });
  2749. $('#canvas_detection_4ch1').dblclick(function(e){
  2750. detection_4ch_dblclick(e, 1, this);
  2751. });
  2752. }
  2753. else if(2 == index_param) {
  2754. // channel 2
  2755. $('#canvas_detection_4ch2').mousedown(function(e){
  2756. detection_4ch_mousedown(e, 2, this);
  2757. });
  2758. $('#canvas_detection_4ch2').mousemove(function(e){
  2759. detection_4ch_mousemove(e, 2, this);
  2760. });
  2761. $('#canvas_detection_4ch2').mouseup(function(e){
  2762. detection_4ch_mouseup(e, 2, this);
  2763. });
  2764. $('#canvas_detection_4ch2').mouseleave(function(e){
  2765. detection_4ch_mouseleave(e, 2, this);
  2766. });
  2767. $('#canvas_detection_4ch2').dblclick(function(e){
  2768. detection_4ch_dblclick(e, 2, this);
  2769. });
  2770. }
  2771. else {
  2772. // channel 3
  2773. $('#canvas_detection_4ch3').mousedown(function(e){
  2774. detection_4ch_mousedown(e, 3, this);
  2775. });
  2776. $('#canvas_detection_4ch3').mousemove(function(e){
  2777. detection_4ch_mousemove(e, 3, this);
  2778. });
  2779. $('#canvas_detection_4ch3').mouseup(function(e){
  2780. detection_4ch_mouseup(e, 3, this);
  2781. });
  2782. $('#canvas_detection_4ch3').mouseleave(function(e){
  2783. detection_4ch_mouseleave(e, 3, this);
  2784. });
  2785. $('#canvas_detection_4ch3').dblclick(function(e){
  2786. detection_4ch_dblclick(e, 3, this);
  2787. });
  2788. }
  2789. }
  2790. function redraw_detection_4ch(index){
  2791. context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
  2792. context_detection_4ch[index].strokeStyle = "#ffffff";
  2793. context_detection_4ch[index].lineJoin = "round";
  2794. context_detection_4ch[index].lineWidth = 2;
  2795. context_detection_4ch[index].beginPath();
  2796. context_detection_4ch[index].rect(StartX_4ch[index], StartY_4ch[index], CurrentX_4ch[index] - StartX_4ch[index], CurrentY_4ch[index] - StartY_4ch[index]);
  2797. context_detection_4ch[index].closePath();
  2798. context_detection_4ch[index].stroke();
  2799. }
  2800. function update_enable_btns()
  2801. {
  2802. if(document.getElementById('ShowHideDirectionBtn').disabled) {
  2803. document.getElementById('ShowHideDirectionBtn').disabled = false ;
  2804. }
  2805. if(document.getElementById('LiveOrJPGBtn').disabled) {
  2806. document.getElementById('LiveOrJPGBtn').disabled = false ;
  2807. }
  2808. }
  2809. function on_show_hide_directioncam()
  2810. {
  2811. need_pause_ptzdrawpos = 1 ;
  2812. if(IS_SHOW_DETECTIONCAM()) { // Hide !
  2813. document.getElementById('ShowHideDirectionBtn').disabled = true ;
  2814. document.getElementById('LiveOrJPGBtn').disabled = true ;
  2815. setTimeout(update_enable_btns, 5000);
  2816. term_directioncam();
  2817. show_hide_directioncam = HIDE_DETECTIONCAM ;
  2818. init_directioncam();
  2819. init_directioncam_browser();
  2820. setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
  2821. $("[name=resizedivViewTable]").css("display", "none");
  2822. $("[name=ShowHideDirectionBtn]").text(GetLan(1067)); // Show Direction Cam
  2823. $("[name=LiveOrJPGBtn]").css("display","none");
  2824. }
  2825. else { // Show !
  2826. show_hide_directioncam = SHOW_DETECTIONCAM ;
  2827. $("[name=resizedivViewTable]").css("display", "");
  2828. document.getElementById('ShowHideDirectionBtn').disabled = true ;
  2829. document.getElementById('LiveOrJPGBtn').disabled = true ;
  2830. setTimeout(update_enable_btns, 10000);
  2831. init_directioncam();
  2832. init_directioncam_browser();
  2833. setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
  2834. $("[name=ShowHideDirectionBtn]").text(GetLan(1068)); // Hide Direction Cam
  2835. Show_Hide_LiveOrJPGBtn(1);
  2836. if(IS_SHOW_IN_LIVE_DETECTIONCAM() && (trnDetectionCamPlayer[0] == PLAYER_ACTIVEX)) {
  2837. var buf = parseInt(getCookie('truendisplaybuffer'));
  2838. tvs_SetBuffer_DirectionCam(buf);
  2839. }
  2840. }
  2841. }
  2842. function on_live_jpg_directioncam()
  2843. {
  2844. need_pause_ptzdrawpos = 1 ;
  2845. if(IS_SHOW_IN_LIVE_DETECTIONCAM()) { // JPG !
  2846. document.getElementById('LiveOrJPGBtn').disabled = true ;
  2847. document.getElementById('ShowHideDirectionBtn').disabled = true ;
  2848. setTimeout(update_enable_btns, 5000);
  2849. term_directioncam();
  2850. live_jpg_directioncam = SHOW_IN_JPG_DETECTIONCAM ;
  2851. init_directioncam();
  2852. init_directioncam_browser();
  2853. setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
  2854. $("[name=LiveOrJPGBtn]").text(GetLan(1069)); // View in Live
  2855. if(IS_SHOW_DETECTIONCAM()) {
  2856. $("[name=resizedivViewTable]").css("display", "");
  2857. }
  2858. }
  2859. else { // LIVE !
  2860. document.getElementById('LiveOrJPGBtn').disabled = true ;
  2861. document.getElementById('ShowHideDirectionBtn').disabled = true ;
  2862. setTimeout(update_enable_btns, 10000);
  2863. live_jpg_directioncam = SHOW_IN_LIVE_DETECTIONCAM ;
  2864. init_directioncam();
  2865. init_directioncam_browser();
  2866. setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
  2867. $("[name=LiveOrJPGBtn]").text(GetLan(1070)); // View in JPG
  2868. if(IS_SHOW_DETECTIONCAM()) {
  2869. $("[name=resizedivViewTable]").css("display", "");
  2870. }
  2871. if(IS_SHOW_IN_LIVE_DETECTIONCAM() && (trnDetectionCamPlayer[0] == PLAYER_ACTIVEX)) {
  2872. var buf = parseInt(getCookie('truendisplaybuffer'));
  2873. tvs_SetBuffer_DirectionCam(buf);
  2874. }
  2875. }
  2876. }
  2877. function term_directioncam()
  2878. {
  2879. if (trnDetectionCamPlayerTimerId != undefined) {
  2880. trnDetectionCamPlayerTimerPause = 1;
  2881. }
  2882. for (var i = 0; i < 4; i++) {
  2883. if(trnDetectionCamPlayer[i] == PLAYER_ACTIVEX) {
  2884. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  2885. if(IS_SHOW_DETECTIONCAM()) {
  2886. var index = i;
  2887. if(IS_SHOW_IN_LIVE_DETECTIONCAM()) {
  2888. if (player_init_completed[index]) {
  2889. tvs_discon_detection_4ch(index);
  2890. }
  2891. }
  2892. player_init_completed[index] = 0 ;
  2893. }
  2894. }
  2895. }
  2896. else if((trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) || (trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET) || (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP)) {
  2897. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  2898. if(IS_SHOW_DETECTIONCAM()) {
  2899. var index = i;
  2900. if (IS_SHOW_IN_LIVE_DETECTIONCAM())
  2901. {
  2902. if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN)
  2903. {
  2904. if (player_init_completed[index]) {
  2905. var vxgplayerID = 'vxgplayer_4_' + index ;
  2906. VXGMP_term(vxgplayerID);
  2907. }
  2908. }
  2909. else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET)
  2910. {
  2911. if (player_init_completed[index]) {
  2912. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  2913. VXGWSMP_term(vxgwsplayerID);
  2914. }
  2915. }
  2916. }
  2917. player_init_completed[index] = 0 ;
  2918. }
  2919. }
  2920. }
  2921. else {
  2922. ;
  2923. }
  2924. }
  2925. $("[name=resizedivViewTable]").css("display", "none");
  2926. }
  2927. function term()
  2928. {
  2929. if (timerTickId != undefined) {
  2930. clearInterval(timerTickId);
  2931. timerTickId = undefined;
  2932. }
  2933. if (intervalPTZDrawPositionId != undefined) {
  2934. clearInterval(intervalPTZDrawPositionId);
  2935. intervalPTZDrawPositionId = undefined;
  2936. intervalPTZDrawPositionUT = intervalPTZDrawPositionST = 0;
  2937. }
  2938. if (timerEventId != undefined) {
  2939. clearInterval(timerEventId);
  2940. timerEventId = undefined;
  2941. }
  2942. if (timerEvent2Id != undefined) {
  2943. clearInterval(timerEvent2Id);
  2944. timerEvent2Id = undefined;
  2945. }
  2946. if (trnPlayerTimerId != undefined) {
  2947. trnPlayerTimerPause = 1;
  2948. }
  2949. if(trnPlayer == PLAYER_ACTIVEX){
  2950. if(currentrec){
  2951. currentrec = 0;
  2952. tvs_recstop();
  2953. document.formView.RecordButton.value = 'Start';
  2954. document.getElementById('recordtime_msg').style.display = 'none';
  2955. }
  2956. if(tvs_get_keepaspectratio() == false){
  2957. Full_Screen_Mode = 2;
  2958. }
  2959. else{
  2960. Full_Screen_Mode = 1;
  2961. }
  2962. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  2963. tvs_clrvideolossosd();
  2964. tvs_term(0);
  2965. }
  2966. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  2967. if(Ccurrentrec == 1){
  2968. Ccurrentrec = 0;
  2969. VXGMP_RecStopPlayer('vxgplayer1');
  2970. document.formView.CRecButton.value = 'Record Start';
  2971. document.getElementById('recordinfo_msg').style.display = 'none';
  2972. }
  2973. VXGMP_term('vxgplayer1');
  2974. }
  2975. else if(trnPlayer == PLAYER_WEBSOCKET){
  2976. if(Ccurrentrec == 1){
  2977. Ccurrentrec = 0;
  2978. VXGWSMP_RecStopPlayer('vxgwsplayer1');
  2979. document.formView.WSRecButton.value = 'Start';
  2980. document.getElementById('WSRecTimeMsg').style.display = 'none';
  2981. }
  2982. VXGWSMP_term('vxgwsplayer1');
  2983. }
  2984. else{
  2985. }
  2986. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  2987. term_directioncam();
  2988. }
  2989. }
  2990. function changesize()
  2991. {
  2992. var rw = getwidth(currnetRes);
  2993. var rh = getheight(currnetRes);
  2994. var vw;
  2995. var vh;
  2996. if(viewsizerate < 10){
  2997. vw = rw * 5 / 100;
  2998. vh = rh * 5 / 100;
  2999. }
  3000. else{
  3001. vw = rw * viewsizerate / 100;
  3002. vh = rh * viewsizerate / 100;
  3003. }
  3004. // alert("viewsizerate :"+ viewsizerate);
  3005. if(vw > minwidth) $.changeWidth(vw);
  3006. else $.changeWidth(minwidth);
  3007. $("[name=resizediv]").css("width", vw);
  3008. $("[name=resizediv]").css("height", vh);
  3009. if(trnPlayer == PLAYER_ACTIVEX){
  3010. tvs_set_width(vw);
  3011. tvs_set_height(vh);
  3012. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  3013. if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
  3014. tvs_set_width_detection_4ch(320);
  3015. tvs_set_height_detection_4ch(180);
  3016. }
  3017. }
  3018. RedrawDzoom();
  3019. tvs_setnewosd($("[name=VID_INFODISPID]").val(), $("[name=VID_INFODISPTIME]").val(), $("[name=VID_INFODISPPOSITION]").val(), $("[name=SYS_SYSTEMID]").val(), tvs_get_width(), tvs_get_height());
  3020. }
  3021. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3022. VXGMP_resizePlayer('vxgplayer1', Math.round(vw), Math.round(vh));
  3023. if(started && initcanvas){
  3024. canvas_ptz.setAttribute('width', vw);
  3025. canvas_ptz.setAttribute('height', vh);
  3026. }
  3027. }
  3028. else if(trnPlayer == PLAYER_WEBSOCKET){
  3029. VXGWSMP_resizePlayer('vxgwsplayer1', Math.round(vw), Math.round(vh));
  3030. $('#vxgwsplayer_audiocontroller').css("width", vw);
  3031. if(started && initcanvas){
  3032. canvas_ptz.setAttribute('width', vw);
  3033. canvas_ptz.setAttribute('height', vh);
  3034. }
  3035. }
  3036. else if(trnPlayer == PLAYER_JPEGSNAP){
  3037. if($("[name=SYS_MODE]").val() != 1) {
  3038. $("[name=img_update]").css("width", vw);
  3039. $("[name=img_update]").css("height", vh);
  3040. if(started && initcanvas){
  3041. canvas_ptz.setAttribute('width', vw);
  3042. canvas_ptz.setAttribute('height', vh);
  3043. if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  3044. for(var index = 0 ; index < 4 ; ++ index) {
  3045. canvas_detection_4ch[index].setAttribute('width', 320);
  3046. canvas_detection_4ch[index].setAttribute('height', 180);
  3047. }
  3048. }
  3049. }
  3050. }
  3051. }
  3052. }
  3053. function setviewsize(val)
  3054. {
  3055. if(val != -1){
  3056. viewsizerate = val;
  3057. }
  3058. setCookie('truenviewsize', viewsizerate, 100);
  3059. changesize();
  3060. }
  3061. function viewsizedown()
  3062. {
  3063. if(viewsizerate != 0){
  3064. viewsizerate = parseInt(viewsizerate) - 10;
  3065. if(viewsizerate < 0){
  3066. viewsizerate = 0;
  3067. }
  3068. setCookie('truenviewsize', viewsizerate, 100);
  3069. $(".viewSize").khjSlider(viewsizerate);
  3070. changesize();
  3071. }
  3072. }
  3073. function viewsizeup()
  3074. {
  3075. if(viewsizerate != 100){
  3076. viewsizerate = parseInt(viewsizerate) + 10;
  3077. if(viewsizerate > 100){
  3078. viewsizerate = 100;
  3079. }
  3080. setCookie('truenviewsize', viewsizerate, 100);
  3081. $(".viewSize").khjSlider(viewsizerate);
  3082. changesize();
  3083. }
  3084. }
  3085. let SetBufferId = undefined;
  3086. let SetDetCamBufferId = [ undefined, undefined, undefined, undefined ];
  3087. function display_buff_change(val)
  3088. {
  3089. setCookie('truendisplaybuffer', val, 100);
  3090. if(trnPlayer == PLAYER_ACTIVEX){
  3091. tvs_SetBuffer(val);
  3092. }
  3093. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3094. VXGMP_SetBuffer('vxgplayer1', val);
  3095. }
  3096. else if(trnPlayer == PLAYER_WEBSOCKET){
  3097. if (SetBufferId != undefined) {
  3098. clearTimeout(SetBufferId);
  3099. }
  3100. SetBufferId = setTimeout(function() {
  3101. VXGWSMP_SetBuffer('vxgwsplayer1', val);
  3102. }, 300);
  3103. }
  3104. if (SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
  3105. for (var index = 0; index < 4; index++) {
  3106. if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
  3107. var vxgplayerID = 'vxgplayer_4_' + index ;
  3108. VXGMP_SetBuffer(vxgplayerID, val);
  3109. }
  3110. else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
  3111. if (SetDetCamBufferId[index] != undefined) {
  3112. clearTimeout(SetDetCamBufferId[index]);
  3113. }
  3114. SetDetCamBufferId[index] = setTimeout(function() {
  3115. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  3116. VXGWSMP_SetBuffer(vxgwsplayerID, val);
  3117. }, 300);
  3118. }
  3119. }
  3120. }
  3121. displaybuffer = val;
  3122. }
  3123. function bufferdown()
  3124. {
  3125. if(displaybuffer != 0){
  3126. displaybuffer = parseInt(displaybuffer) - 10;
  3127. if(displaybuffer < 0){
  3128. displaybuffer = 0;
  3129. }
  3130. setCookie('truendisplaybuffer', displaybuffer, 100);
  3131. $(".buffering").khjSlider(displaybuffer);
  3132. if(trnPlayer == PLAYER_ACTIVEX){
  3133. tvs_SetBuffer(displaybuffer);
  3134. }
  3135. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3136. VXGMP_SetBuffer('vxgplayer1', displaybuffer);
  3137. }
  3138. else if(trnPlayer == PLAYER_WEBSOCKET){
  3139. if (SetBufferId != undefined) {
  3140. clearTimeout(SetBufferId);
  3141. }
  3142. SetBufferId = setTimeout(function() {
  3143. VXGWSMP_SetBuffer('vxgwsplayer1', displaybuffer);
  3144. }, 300);
  3145. }
  3146. for (var index = 0; index < 4; index++) {
  3147. if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
  3148. var vxgplayerID = 'vxgplayer_4_' + index ;
  3149. VXGMP_SetBuffer(vxgplayerID, displaybuffer);
  3150. }
  3151. else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
  3152. if (SetDetCamBufferId[index] != undefined) {
  3153. clearTimeout(SetDetCamBufferId[index]);
  3154. }
  3155. SetDetCamBufferId[index] = setTimeout(function() {
  3156. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  3157. VXGWSMP_SetBuffer(vxgwsplayerID, displaybuffer);
  3158. }, 300);
  3159. }
  3160. }
  3161. }
  3162. }
  3163. function bufferup()
  3164. {
  3165. if(displaybuffer != 100){
  3166. displaybuffer = parseInt(displaybuffer) + 10;
  3167. if(displaybuffer > 100){
  3168. displaybuffer = 100;
  3169. }
  3170. setCookie('truendisplaybuffer', displaybuffer, 100);
  3171. $(".buffering").khjSlider(displaybuffer);
  3172. if(trnPlayer == PLAYER_ACTIVEX){
  3173. tvs_SetBuffer(displaybuffer);
  3174. }
  3175. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3176. VXGMP_SetBuffer('vxgplayer1', displaybuffer);
  3177. }
  3178. else if(trnPlayer == PLAYER_WEBSOCKET){
  3179. if (SetBufferId != undefined) {
  3180. clearTimeout(SetBufferId);
  3181. }
  3182. SetBufferId = setTimeout(function() {
  3183. VXGWSMP_SetBuffer('vxgwsplayer1', displaybuffer);
  3184. }, 300);
  3185. }
  3186. for (var index = 0; index < 4; index++) {
  3187. if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
  3188. var vxgplayerID = 'vxgplayer_4_' + index ;
  3189. VXGMP_SetBuffer(vxgplayerID, displaybuffer);
  3190. }
  3191. else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
  3192. if (SetDetCamBufferId[index] != undefined) {
  3193. clearTimeout(SetDetCamBufferId[index]);
  3194. }
  3195. SetDetCamBufferId[index] = setTimeout(function() {
  3196. var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
  3197. VXGWSMP_SetBuffer(vxgwsplayerID, displaybuffer);
  3198. }, 300);
  3199. }
  3200. }
  3201. }
  3202. }
  3203. function on_fullscreen()
  3204. {
  3205. if(FSM_Once == 0){
  3206. if(trnPlayer == PLAYER_ACTIVEX){
  3207. if(tvs_get_keepaspectratio() == false){
  3208. Full_Screen_Mode = 2;
  3209. }
  3210. else{
  3211. Full_Screen_Mode = 1;
  3212. }
  3213. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  3214. tvs_set_fullscreen(Full_Screen_Mode);
  3215. }
  3216. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3217. VXGMP_fullscreen('vxgplayer1', Full_Screen_Mode);
  3218. }
  3219. else if(trnPlayer == PLAYER_WEBSOCKET){
  3220. VXGWSMP_fullscreen('vxgwsplayer1', Full_Screen_Mode);
  3221. }
  3222. else{
  3223. }
  3224. }
  3225. else{
  3226. if(trnPlayer == PLAYER_ACTIVEX){
  3227. tvs_set_fullscreen(Full_Screen_Mode);
  3228. }
  3229. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3230. VXGMP_fullscreen('vxgplayer1', Full_Screen_Mode);
  3231. }
  3232. else if(trnPlayer == PLAYER_WEBSOCKET){
  3233. VXGWSMP_fullscreen('vxgwsplayer1', Full_Screen_Mode);
  3234. }
  3235. else{
  3236. }
  3237. }
  3238. ZoomHome();
  3239. FSM_Once = 0;
  3240. }
  3241. function on_snapshot()
  3242. {
  3243. if(trnPlayer == PLAYER_ACTIVEX){
  3244. var today = new Date();
  3245. var fileName = 'C:\\' + today.getFullYear();
  3246. var val = today.getMonth() + 1;
  3247. if (val >= 10)
  3248. {
  3249. fileName += val;
  3250. }
  3251. else
  3252. {
  3253. fileName += ('0' + val);
  3254. }
  3255. val = today.getDate();
  3256. if (val >= 10)
  3257. {
  3258. fileName += val;
  3259. }
  3260. else
  3261. {
  3262. fileName += ('0' + val);
  3263. }
  3264. val = today.getHours();
  3265. if (val >= 10)
  3266. {
  3267. fileName += val;
  3268. }
  3269. else
  3270. {
  3271. fileName += ('0' + val);
  3272. }
  3273. val = today.getMinutes();
  3274. if (val >= 10)
  3275. {
  3276. fileName += val;
  3277. }
  3278. else
  3279. {
  3280. fileName += ('0' + val);
  3281. }
  3282. val = today.getSeconds();
  3283. if (val >= 10)
  3284. {
  3285. fileName += val;
  3286. }
  3287. else
  3288. {
  3289. fileName += ('0' + val);
  3290. }
  3291. fileName += '.bmp';
  3292. tvs_snapshot(fileName);
  3293. }
  3294. else if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3295. VXGMP_Snapshot('vxgplayer1');
  3296. }
  3297. else if(trnPlayer == PLAYER_WEBSOCKET){
  3298. VXGWSMP_Snapshot('vxgwsplayer1');
  3299. }
  3300. }
  3301. var currentrec = 0;
  3302. function file_recstart()
  3303. {
  3304. if(currentrec){
  3305. currentrec = 0;
  3306. tvs_recstop();
  3307. document.formView.RecordButton.value = 'Start';
  3308. document.getElementById('recordtime_msg').style.display = 'none';
  3309. }
  3310. else{
  3311. var dateName = new Date();
  3312. var path = getCookie('truenrecordpath') + '\\' + getCookie('truenrecordfile') + '_' + location.hostname + '_' + dateName.getHours() + '_' + dateName.getMinutes() + '_' + dateName.getSeconds() + '.avi';
  3313. if(tvs_recstart(path) == -1){
  3314. return;
  3315. }
  3316. currentrec = 1;
  3317. document.formView.RecordButton.value = 'Stop';
  3318. document.getElementById('recordtime_msg').style.display = 'block';
  3319. }
  3320. }
  3321. function file_recstop()
  3322. {
  3323. tvs_recstop();
  3324. }
  3325. function file_location()
  3326. {
  3327. var pathtmp = tvs_get_location(document.formView.Directory.value);
  3328. if(pathtmp != ''){
  3329. document.formView.Directory.value = pathtmp;
  3330. setCookie('truenrecordpath', document.formView.Directory.value, 100);
  3331. }
  3332. }
  3333. function recordfileupdate()
  3334. {
  3335. if (trnPlayer == PLAYER_ACTIVEX) {
  3336. setCookie('truenrecordfile', document.formView.FileName.value, 100);
  3337. }
  3338. else if (trnPlayer == PLAYER_WEBSOCKET) {
  3339. setCookie('truenrecordfile', document.formView.WSRecFileName.value, 100);
  3340. }
  3341. }
  3342. function cfile_start()
  3343. {
  3344. if(Ccurrentrec == 1){
  3345. Ccurrentrec = 0;
  3346. VXGMP_RecStopPlayer('vxgplayer1');
  3347. document.formView.CRecButton.value = 'Record Start';
  3348. document.getElementById('recordinfo_msg').style.display = 'none';
  3349. }
  3350. else if(Ccurrentrec == 0){
  3351. VXGMP_RecStartPlayer('vxgplayer1');
  3352. Ccurrentrec = 1;
  3353. document.formView.CRecButton.value = 'Record Stop';
  3354. document.getElementById('recordinfo_msg').style.display = 'block';
  3355. document.getElementById('recordfname_msg').style.display = 'block';
  3356. }
  3357. else if(Ccurrentrec == -1){
  3358. $( "#dialog-warning" ).dialog( "open" );
  3359. }
  3360. }
  3361. function cfile_download()
  3362. {
  3363. if(Ccurrentrec != 1){
  3364. VXGMP_RecDownloadPlayer('vxgplayer1', document.formView.RecordFname.value);
  3365. }
  3366. }
  3367. function cfile_browse()
  3368. {
  3369. if(Ccurrentrec != 1){
  3370. VXGMP_RecBrowsePlayer('vxgplayer1');
  3371. }
  3372. }
  3373. var WSRecTimerId = undefined;
  3374. var WSRecTimeTick = -1;
  3375. function WSRecTimer()
  3376. {
  3377. var recStatus = VXGWSMP_RecGetStatus('vxgwsplayer1');
  3378. if (recStatus.recStopping != true)
  3379. {
  3380. var tmp = ++WSRecTimeTick;
  3381. if (WSRecTimeTick <= 0)
  3382. {
  3383. document.formView.WSRecSizeData.value = 0;
  3384. }
  3385. else
  3386. {
  3387. document.formView.WSRecSizeData.value = recStatus.recData264Len + recStatus.recData711Len;
  3388. }
  3389. var hour = Math.floor(tmp / 3600);
  3390. tmp %= 3600;
  3391. var min = Math.floor(tmp / 60);
  3392. var sec = tmp % 60;
  3393. var WSRecTime = "";
  3394. if (min < 10 && sec < 10) {
  3395. WSRecTime = hour + ':0' + min + ':0' + sec + ' ';
  3396. }
  3397. else if(min >= 10 && sec < 10){
  3398. WSRecTime = hour + ':' + min + ':0' + sec + ' ';
  3399. }
  3400. else if(min < 10 && sec >= 10){
  3401. WSRecTime = hour + ':0' + min + ':' + sec + ' ';
  3402. }
  3403. else{
  3404. WSRecTime = hour + ':' + min + ':' + sec + ' ';
  3405. }
  3406. var WSRecSize = "";
  3407. var recSizeData = parseInt(document.formView.WSRecSizeData.value);
  3408. if (recSizeData > 1000000) {
  3409. recSizeData = recSizeData/(1024*1024);
  3410. WSRecSize = recSizeData.toFixed(1) + 'MB';
  3411. }
  3412. else if (recSizeData > 1000) {
  3413. recSizeData = recSizeData/1024;
  3414. WSRecSize = recSizeData.toFixed(0) + 'KB';
  3415. }
  3416. else {
  3417. WSRecSize = recSizeData.toFixed(0) + 'B';
  3418. }
  3419. document.formView.WSRecMsg.value = WSRecTime + " " + WSRecSize;
  3420. }
  3421. }
  3422. function WSRec_Start()
  3423. {
  3424. if(Ccurrentrec == 1) {
  3425. Ccurrentrec = 0;
  3426. VXGWSMP_RecStopPlayer('vxgwsplayer1');
  3427. }
  3428. else if (Ccurrentrec == 0) {
  3429. var tDate = new Date();
  3430. var hh = tDate.getHours();
  3431. var mm = tDate.getMinutes();
  3432. var ss = tDate.getSeconds();
  3433. if (hh < 10) hh = "0" + hh;
  3434. if (mm < 10) mm = "0" + mm;
  3435. if (ss < 10) ss = "0" + ss;
  3436. var recfilename = document.formView.WSRecFileName.value + '_' + location.hostname + '_' + hh + '_' + mm + '_' + ss;
  3437. VXGWSMP_RecStartPlayer('vxgwsplayer1', recfilename);
  3438. Ccurrentrec = 1;
  3439. }
  3440. }
  3441. simgname = new Array(null, "img_sensor1", "img_sensor2", "img_sensor3", "img_sensor4", "img_sensor5", "img_motion", "img_record", "img_shock", "img_wiper");
  3442. simgsrc_sn = new Array(null, "/resources/img/btn_r03_SN.gif", "/resources/img/btn_r04_SN.gif", "/resources/img/btn_r05_SN.gif", "/resources/img/btn_r06_SN.gif", "/resources/img/btn_r18_SN.gif", "/resources/img/btn_r13_SN.gif", "/resources/img/btn_r14_SN.gif", "/resources/img/btn_r20_SN.gif", "/resources/img/btn_r19_SN.gif");
  3443. simgsrc_n = new Array(null, "/resources/img/btn_r03_N.gif", "/resources/img/btn_r04_N.gif", "/resources/img/btn_r05_N.gif", "/resources/img/btn_r06_N.gif", "/resources/img/btn_r18_N.gif", "/resources/img/btn_r13_N.gif", "/resources/img/btn_r14_N.gif", "/resources/img/btn_r20_N.gif", "/resources/img/btn_r19_N.gif");
  3444. aimgname = new Array(null, "img_alarm1", "img_alarm2", "img_alarm3", "img_alarm4", "img_capture", "img_talk", "img_speaker");
  3445. aimgsrc_sn = new Array(null, "/resources/img/btn_r07_SN.gif", "/resources/img/btn_r08_SN.gif", "/resources/img/btn_r09_SN.gif", "/resources/img/btn_r10_SN.gif", "/resources/img/btn_r11_SN.gif", "/resources/img/btn_r12_SN.gif", "/resources/img/btn_r21_SN.png");
  3446. aimgsrc_n = new Array(null, "/resources/img/btn_r07_N.gif", "/resources/img/btn_r08_N.gif", "/resources/img/btn_r09_N.gif", "/resources/img/btn_r10_N.gif", "/resources/img/btn_r11_N.gif", "/resources/img/btn_r12_N.gif", "/resources/img/btn_r21_N.png");
  3447. aimgsrc_so = new Array(null, "/resources/img/btn_r07_SO.gif", "/resources/img/btn_r08_SO.gif", "/resources/img/btn_r09_SO.gif", "/resources/img/btn_r10_SO.gif", "/resources/img/btn_r11_SO.gif", "/resources/img/btn_r12_SO.gif", "/resources/img/btn_r21_SO.png");
  3448. aimgsrc_o = new Array(null, "/resources/img/btn_r07_O.gif", "/resources/img/btn_r08_O.gif", "/resources/img/btn_r09_O.gif", "/resources/img/btn_r10_O.gif", "/resources/img/btn_r11_O.gif", "/resources/img/btn_r12_O.gif", "/resources/img/btn_r21_O.png");
  3449. aimgsrc_sp = new Array(null, "/resources/img/btn_r07_SP.gif", "/resources/img/btn_r08_SP.gif", "/resources/img/btn_r09_SP.gif", "/resources/img/btn_r10_SP.gif", "/resources/img/btn_r11_SP.gif", "/resources/img/btn_r12_SP.gif", "/resources/img/btn_r21_SP.png");
  3450. aimgsrc_p = new Array(null, "/resources/img/btn_r07_P.gif", "/resources/img/btn_r08_P.gif", "/resources/img/btn_r09_P.gif", "/resources/img/btn_r10_P.gif", "/resources/img/btn_r11_P.gif", "/resources/img/btn_r12_P.gif", "/resources/img/btn_r21_P.png");
  3451. Alarm_state = new Array(null, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF);
  3452. function on_mouseover(nIndex)
  3453. {
  3454. if(nIndex == 6 && talk_disabled == 1) return;
  3455. if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
  3456. if(Alarm_state[nIndex] != TN_ES_OFF){
  3457. document[aimgname[nIndex]].src = aimgsrc_so[nIndex];
  3458. }
  3459. else{
  3460. document[aimgname[nIndex]].src = aimgsrc_o[nIndex];
  3461. }
  3462. }
  3463. function on_mousedown(nIndex)
  3464. {
  3465. if(nIndex == 6 && talk_disabled == 1) return;
  3466. if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
  3467. if(Alarm_state[nIndex] != TN_ES_OFF) document[aimgname[nIndex]].src = aimgsrc_sp[nIndex];
  3468. else document[aimgname[nIndex]].src = aimgsrc_p[nIndex];
  3469. if(nIndex <= 4){
  3470. if(Alarm_state[nIndex] == TN_ES_OFF){
  3471. on_setdo(nIndex, 1);
  3472. // tvs_setDO(nIndex, 1);
  3473. }
  3474. else{
  3475. on_setdo(nIndex, 0);
  3476. // tvs_setDO(nIndex, 0);
  3477. }
  3478. }
  3479. else if(nIndex == 6){
  3480. if(Alarm_state[nIndex] == TN_ES_OFF){
  3481. Alarm_state[nIndex] = TN_ES_ON;
  3482. if(trnPlayer == PLAYER_ACTIVEX) tvs_enable_talk(true);
  3483. else if(trnPlayer == PLAYER_WEBSOCKET) VXGWSMP_StartBackwardAudio('vxgwsplayer1');
  3484. }
  3485. else{
  3486. Alarm_state[nIndex] = TN_ES_OFF;
  3487. if(trnPlayer == PLAYER_ACTIVEX) tvs_enable_talk(false);
  3488. else if(trnPlayer == PLAYER_WEBSOCKET) VXGWSMP_StopBackwardAudio('vxgwsplayer1');
  3489. }
  3490. }
  3491. else if(nIndex == 7){
  3492. if(Alarm_state[nIndex] == TN_ES_OFF){
  3493. Alarm_state[nIndex] = TN_ES_ON;
  3494. if (trnPlayer == PLAYER_WEBSOCKET) vxgwsplayer_volume_mute();
  3495. }
  3496. else{
  3497. Alarm_state[nIndex] = TN_ES_OFF;
  3498. if (trnPlayer == PLAYER_WEBSOCKET) vxgwsplayer_volume_mute();
  3499. }
  3500. }
  3501. }
  3502. function on_mouseleave(nIndex)
  3503. {
  3504. if(nIndex == 6 && talk_disabled == 1) return;
  3505. if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
  3506. if(Alarm_state[nIndex] != TN_ES_OFF) document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
  3507. else document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
  3508. }
  3509. function change_Accordion(index, val){
  3510. if(started){
  3511. if((viewaccordion & index) == 0){
  3512. viewaccordion += index;
  3513. }
  3514. else{
  3515. viewaccordion -= index;
  3516. }
  3517. setCookie('truenviewaccordion', viewaccordion, 100);
  3518. }
  3519. }
  3520. function clicktocenter(a,b,c,d)
  3521. {
  3522. var x;
  3523. var y;
  3524. var x2;
  3525. var y2;
  3526. var z;
  3527. var aa;
  3528. var bb;
  3529. var cc;
  3530. var dd;
  3531. if(b == 515){ // WM_LBUTTONDBLCLK
  3532. y = (d >> 16);
  3533. x = (d & 0xFFFF);
  3534. aa = Math.round(x*1000 / tvs_get_width());
  3535. bb = Math.round(y*1000 / tvs_get_height());
  3536. z = aa*1000 + bb + 4000000;
  3537. //alert('z='+z);
  3538. ptz_preset_goto(ptzchannel, z);
  3539. //alert('x='+x+' : y='+y+' : w='+tvs_get_width()+' : h='+tvs_get_height());
  3540. }
  3541. else if(b == 516){ // WM_RBUTTONDOWN
  3542. ptz_preset_goto(ptzchannel, 8000000);
  3543. }
  3544. else if(b == 1031){ // dragzoom
  3545. y = (c >> 16);
  3546. x = (c & 0xFFFF);
  3547. y2 = (d >> 16);
  3548. x2 = (d & 0xFFFF);
  3549. aa = Math.round(x*1000 / tvs_get_width());
  3550. bb = Math.round(y*1000 / tvs_get_height());
  3551. cc = Math.round(x2*1000 / tvs_get_width());
  3552. dd = Math.round(y2*1000 / tvs_get_height());
  3553. ptz_drag_zoom(aa, bb, cc, dd);
  3554. //alert('x='+x+' : y='+y+' : x2='+x2+' : y2='+y2);
  3555. }
  3556. }
  3557. function clicktocenter_directioncam_4_0(a,b,c,d)
  3558. {
  3559. var x , y , x2 , y2 , z , aa , bb , cc , dd;
  3560. if(b == 515){ // WM_LBUTTONDBLCLK
  3561. y = (d >> 16);
  3562. x = (d & 0xFFFF);
  3563. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3564. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3565. // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
  3566. // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
  3567. ptz_det_clicktocenter(0 , aa, bb);
  3568. }
  3569. else if(b == 516){ // WM_RBUTTONDOWN
  3570. //ptz_preset_goto(ptzchannel, 8000000);
  3571. }
  3572. else if(b == 1031){ // dragzoom
  3573. y = (c >> 16);
  3574. x = (c & 0xFFFF);
  3575. y2 = (d >> 16);
  3576. x2 = (d & 0xFFFF);
  3577. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3578. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3579. cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
  3580. dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
  3581. // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " cc(" + cc + ")" + " dd(" + dd + ")" + " tvs_x : " +
  3582. // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
  3583. ptz_det_drag_zoom(0,aa,bb,cc,dd);
  3584. }
  3585. }
  3586. function clicktocenter_directioncam_4_1(a,b,c,d)
  3587. {
  3588. var x , y , x2 , y2 , z , aa , bb , cc , dd;
  3589. if(b == 515){ // WM_LBUTTONDBLCLK
  3590. y = (d >> 16);
  3591. x = (d & 0xFFFF);
  3592. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3593. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3594. // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
  3595. // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
  3596. ptz_det_clicktocenter(1 , aa, bb);
  3597. }
  3598. else if(b == 516){ // WM_RBUTTONDOWN
  3599. //ptz_preset_goto(ptzchannel, 8000000);
  3600. }
  3601. else if(b == 1031){ // dragzoom
  3602. y = (c >> 16);
  3603. x = (c & 0xFFFF);
  3604. y2 = (d >> 16);
  3605. x2 = (d & 0xFFFF);
  3606. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3607. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3608. cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
  3609. dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
  3610. ptz_det_drag_zoom(1,aa,bb,cc,dd);
  3611. }
  3612. }
  3613. function clicktocenter_directioncam_4_2(a,b,c,d)
  3614. {
  3615. var x , y , x2 , y2 , z , aa , bb , cc , dd;
  3616. if(b == 515){ // WM_LBUTTONDBLCLK
  3617. y = (d >> 16);
  3618. x = (d & 0xFFFF);
  3619. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3620. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3621. // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
  3622. // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
  3623. ptz_det_clicktocenter(2 , aa, bb);
  3624. }
  3625. else if(b == 516){ // WM_RBUTTONDOWN
  3626. //ptz_preset_goto(ptzchannel, 8000000);
  3627. }
  3628. else if(b == 1031){ // dragzoom
  3629. y = (c >> 16);
  3630. x = (c & 0xFFFF);
  3631. y2 = (d >> 16);
  3632. x2 = (d & 0xFFFF);
  3633. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3634. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3635. cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
  3636. dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
  3637. ptz_det_drag_zoom(2,aa,bb,cc,dd);
  3638. }
  3639. }
  3640. function clicktocenter_directioncam_4_3(a,b,c,d)
  3641. {
  3642. var x , y , x2 , y2 , z , aa , bb , cc , dd;
  3643. if(b == 515){ // WM_LBUTTONDBLCLK
  3644. y = (d >> 16);
  3645. x = (d & 0xFFFF);
  3646. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3647. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3648. // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
  3649. // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
  3650. ptz_det_clicktocenter(3 , aa, bb);
  3651. }
  3652. else if(b == 516){ // WM_RBUTTONDOWN
  3653. //ptz_preset_goto(ptzchannel, 8000000);
  3654. }
  3655. else if(b == 1031){ // dragzoom
  3656. y = (c >> 16);
  3657. x = (c & 0xFFFF);
  3658. y2 = (d >> 16);
  3659. x2 = (d & 0xFFFF);
  3660. aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
  3661. bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
  3662. cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
  3663. dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
  3664. ptz_det_drag_zoom(3,aa,bb,cc,dd);
  3665. }
  3666. }
  3667. document.onkeydown = on_keydown;
  3668. document.onkeyup = on_keyup;
  3669. var Alt_pressed = false;
  3670. function on_keyup()
  3671. {
  3672. if (event.keyCode == 18) // Alt
  3673. {
  3674. Alt_pressed = false;
  3675. }
  3676. }
  3677. function on_keydown()
  3678. {
  3679. if (event.keyCode == 18) // Alt
  3680. {
  3681. Alt_pressed = true;
  3682. }
  3683. if (event.keyCode == 112) // F1
  3684. {
  3685. if(Alt_pressed == true){
  3686. if(trnPlayer == PLAYER_ACTIVEX) tvs_StatShowTrigger();
  3687. }
  3688. }
  3689. if(trnPlayer == PLAYER_CHROMEPLUGIN){
  3690. if (event.keyCode == 116) // F5
  3691. {
  3692. if(Alt_pressed == true){
  3693. if(Full_Screen_Mode == 1){
  3694. Full_Screen_Mode = 2;
  3695. }
  3696. else{
  3697. Full_Screen_Mode = 1;
  3698. }
  3699. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  3700. VXGMP_aspectRatioMode('vxgplayer1', Full_Screen_Mode);
  3701. }
  3702. }
  3703. }
  3704. else if(trnPlayer == PLAYER_WEBSOCKET){
  3705. if (event.keyCode == 116) // F5
  3706. {
  3707. if(Alt_pressed == true){
  3708. if(Full_Screen_Mode == 1){
  3709. Full_Screen_Mode = 2;
  3710. }
  3711. else{
  3712. Full_Screen_Mode = 1;
  3713. }
  3714. setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
  3715. VXGWSMP_aspectRatioMode('vxgwsplayer1', Full_Screen_Mode);
  3716. }
  3717. }
  3718. }
  3719. }
  3720. let timerEventId = undefined;
  3721. function __cb_timerEvent(rate)
  3722. {
  3723. for(nIndex = 1; nIndex <= 5; nIndex++){
  3724. if(rate["GIS_SENSOR" + nIndex] == 1){
  3725. if (document[simgname[nIndex]].src.indexOf(simgsrc_sn[nIndex]) == -1) {
  3726. document[simgname[nIndex]].src = simgsrc_sn[nIndex];
  3727. }
  3728. }
  3729. else{
  3730. if (document[simgname[nIndex]].src.indexOf(simgsrc_n[nIndex]) == -1) {
  3731. document[simgname[nIndex]].src = simgsrc_n[nIndex];
  3732. }
  3733. }
  3734. }
  3735. for(nIndex = 1; nIndex <= 4; nIndex++){
  3736. if(rate["GIS_ALARM" + nIndex] == 1){
  3737. if (document[aimgname[nIndex]].src.indexOf(aimgsrc_sn[nIndex]) == -1) {
  3738. document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
  3739. }
  3740. Alarm_state[nIndex] = 1;
  3741. }
  3742. else{
  3743. if (document[aimgname[nIndex]].src.indexOf(aimgsrc_n[nIndex]) == -1) {
  3744. document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
  3745. }
  3746. Alarm_state[nIndex] = 0;
  3747. }
  3748. }
  3749. nIndex = ptzchannel;
  3750. if(rate["GIS_MOTION" + nIndex] == 1){
  3751. if (document[simgname[6]].src.indexOf(simgsrc_sn[6]) == -1) {
  3752. document[simgname[6]].src = simgsrc_sn[6];
  3753. }
  3754. }
  3755. else{
  3756. if (document[simgname[6]].src.indexOf(simgsrc_n[6]) == -1) {
  3757. document[simgname[6]].src = simgsrc_n[6];
  3758. }
  3759. }
  3760. nIndex = ptzchannel;
  3761. if(rate["GIS_VIDEOLOSS" + nIndex] == 1){
  3762. }
  3763. else{
  3764. }
  3765. if(rate["GIS_RECORD1"] == 1){
  3766. if (document[simgname[7]].src.indexOf(simgsrc_sn[7]) == -1) {
  3767. document[simgname[7]].src = simgsrc_sn[7];
  3768. }
  3769. }
  3770. else if(rate["GIS_RECORD1"] == 0){
  3771. if (document[simgname[7]].src.indexOf(simgsrc_n[7]) == -1) {
  3772. document[simgname[7]].src = simgsrc_n[7];
  3773. }
  3774. }
  3775. else{
  3776. if (document[simgname[7]].src.indexOf("/resources/img/btn_r15_N.gif") == -1) {
  3777. document[simgname[7]].src = "/resources/img/btn_r15_N.gif";
  3778. }
  3779. }
  3780. if(airwiper == 3 || airwiper == 4){
  3781. if(rate["GIS_AIRWIPER"] == 0){
  3782. if (document[simgname[9]].src.indexOf(simgsrc_sn[9]) == -1) {
  3783. document[simgname[9]].src = simgsrc_sn[9];
  3784. }
  3785. }
  3786. else if(rate["GIS_AIRWIPER"] == 1){
  3787. if (document[simgname[9]].src.indexOf(simgsrc_n[9]) == -1) {
  3788. document[simgname[9]].src = simgsrc_n[9];
  3789. }
  3790. }
  3791. }
  3792. if(trnPlayer == PLAYER_JPEGSNAP){
  3793. cRes = parseInt(readSetupByKey(resolutionAPIString));
  3794. if(currnetRes != cRes){
  3795. currnetRes = cRes;
  3796. setviewsize(-1);
  3797. }
  3798. }
  3799. }
  3800. function timerEvent()
  3801. {
  3802. readInputStateAsync(__cb_timerEvent);
  3803. }
  3804. let timerEvent2Id = undefined;
  3805. function __cb_timerEvent2(rate)
  3806. {
  3807. if(airwiper == 3 || airwiper == 4){
  3808. if(rate["GIS_AIRWIPER"] == 0){
  3809. if (document[simgname[9]].src.indexOf(simgsrc_sn[9]) == -1) {
  3810. document[simgname[9]].src = simgsrc_sn[9];
  3811. }
  3812. }
  3813. else if(rate["GIS_AIRWIPER"] == 1){
  3814. if (document[simgname[9]].src.indexOf(simgsrc_n[9]) == -1) {
  3815. document[simgname[9]].src = simgsrc_n[9];
  3816. }
  3817. }
  3818. }
  3819. }
  3820. function timerEvent2()
  3821. {
  3822. readInputStateAsync(__cb_timerEvent2);
  3823. }
  3824. function ApplyDirect2(item)
  3825. {
  3826. value = $("[name=" + item + "]").val();
  3827. writeSetupAsync(item + "=" + value);
  3828. }
  3829. function BCScontrol(item, param)
  3830. {
  3831. var value;
  3832. var min;
  3833. var max;
  3834. var diff;
  3835. if(item == 0){
  3836. value = parseInt($("[name=SYS_CUR_BRIGHTNESS]").val());
  3837. min = parseInt($("[name=SYS_MIN_BRIGHTNESS]").val());
  3838. max = parseInt($("[name=SYS_MAX_BRIGHTNESS]").val());
  3839. }
  3840. else if(item == 1){
  3841. value = parseInt($("[name=SYS_CUR_SATURATION]").val());
  3842. min = parseInt($("[name=SYS_MIN_SATURATION]").val());
  3843. max = parseInt($("[name=SYS_MAX_SATURATION]").val());
  3844. }
  3845. else if(item == 2){
  3846. value = parseInt($("[name=SYS_CUR_SHARPNESS]").val());
  3847. min = parseInt($("[name=SYS_MIN_SHARPNESS]").val());
  3848. max = parseInt($("[name=SYS_MAX_SHARPNESS]").val());
  3849. }
  3850. diff = Math.round((max-min) / 25);
  3851. if(diff == 0){
  3852. diff = 1;
  3853. }
  3854. if(param == 0){
  3855. value = value - diff;
  3856. if(value < min) value = min;
  3857. }
  3858. else{
  3859. value = value + diff;
  3860. if(value > max) value = max;
  3861. }
  3862. if(item == 0){
  3863. $("[name=SYS_CUR_BRIGHTNESS]").val(value);
  3864. ApplyDirect2("SYS_CUR_BRIGHTNESS");
  3865. }
  3866. else if(item == 1){
  3867. $("[name=SYS_CUR_SATURATION]").val(value);
  3868. ApplyDirect2("SYS_CUR_SATURATION");
  3869. }
  3870. else if(item == 2){
  3871. $("[name=SYS_CUR_SHARPNESS]").val(value);
  3872. ApplyDirect2("SYS_CUR_SHARPNESS");
  3873. }
  3874. }
  3875. function BCScontrol_Default(item)
  3876. {
  3877. var value;
  3878. if (item == 0)
  3879. {
  3880. value = parseInt(readSetupByKey("SYS_DEFAULT_BRIGHTNESS"));
  3881. $("[name=SYS_CUR_BRIGHTNESS]").val(value);
  3882. ApplyDirect2("SYS_CUR_BRIGHTNESS");
  3883. }
  3884. }
  3885. function TDNControl(param)
  3886. {
  3887. var boardid = $("[name=SYS_BOARDID]").val();
  3888. var isipcam = $("[name=SYS_ISIPCAM]").val();
  3889. var module_type = $("[name=SYS_MODULE_TYPE]").val();
  3890. var schedule = parseInt(readSetupByKey("SYS_CUR_CAM_SCHEDULE"));
  3891. var imagegeneral = '';
  3892. var message = '';
  3893. var cam = '';
  3894. if (schedule == 1)
  3895. {
  3896. cam = 'CA1_';
  3897. }
  3898. else if (schedule == 2)
  3899. {
  3900. cam = 'CA2_';
  3901. }
  3902. else if (schedule == 3)
  3903. {
  3904. cam = 'CA3_';
  3905. }
  3906. else
  3907. {
  3908. cam = 'CAM_';
  3909. }
  3910. if (boardid == 0x1003 || boardid == 0x1007)
  3911. {
  3912. // TODO:
  3913. }
  3914. else if (boardid == 0xB001)
  3915. {
  3916. // TODO:
  3917. }
  3918. else
  3919. {
  3920. if (isipcam == 0)
  3921. {
  3922. // TODO:
  3923. }
  3924. else {
  3925. if (module_type == HI_ISP_MODULE)
  3926. {
  3927. imagegeneral = '_hi';
  3928. }
  3929. else if (module_type == HI3519_ISP_MODULE)
  3930. {
  3931. imagegeneral = '_hi';
  3932. }
  3933. else if (module_type == HI3519A_ISP_MODULE)
  3934. {
  3935. imagegeneral = '_hi';
  3936. }
  3937. else if (module_type == CV2_ISP_MODULE)
  3938. {
  3939. imagegeneral = '_cv2';
  3940. }
  3941. else
  3942. {
  3943. // TODO:
  3944. }
  3945. }
  3946. }
  3947. if (imagegeneral == '')
  3948. {
  3949. return;
  3950. }
  3951. else if (imagegeneral == '_hi' ||
  3952. imagegeneral == '_cv2')
  3953. {
  3954. var mode;
  3955. if (param == 'day') {
  3956. mode = 2;
  3957. }
  3958. else if (param == 'night') {
  3959. mode = 3;
  3960. }
  3961. else if (param == 'auto') {
  3962. mode = 0;
  3963. }
  3964. else {
  3965. return;
  3966. }
  3967. message = cam + 'HI_TDN_MODE=' + mode;
  3968. writeSetup(message);
  3969. }
  3970. }
  3971. function change_sleepmode(item)
  3972. {
  3973. value = $("#" + item.id).val();
  3974. writeSetupAsync(item.id + "=" + value);
  3975. on_videoselect_clicked(); // view init
  3976. }
  3977. function change_pelletmode(item)
  3978. {
  3979. value = $("#" + item.id).val();
  3980. writeSetupAsync(item.id + "=" + value);
  3981. if(value == 1){
  3982. writeSetupAsync("CAM_HI_DEFOG_MODE=1&CAM_HI_AE_MODE=2&CA1_HI_DEFOG_MODE=1&CA1_HI_AE_MODE=2&CA2_HI_DEFOG_MODE=1&CA2_HI_AE_MODE=2&CA3_HI_DEFOG_MODE=1&CA3_HI_AE_MODE=2&CAM_HI_DEFOG_AUTOSTRENGTH=255&CA1_HI_DEFOG_AUTOSTRENGTH=255&CA2_HI_DEFOG_AUTOSTRENGTH=255&CA3_HI_DEFOG_AUTOSTRENGTH=255");
  3983. }
  3984. else{
  3985. writeSetupAsync("CAM_HI_DEFOG_MODE=0&CA1_HI_DEFOG_MODE=0&CA2_HI_DEFOG_MODE=0&CA3_HI_DEFOG_MODE=0&CAM_HI_DEFOG_AUTOSTRENGTH=64&CA1_HI_DEFOG_AUTOSTRENGTH=64&CA2_HI_DEFOG_AUTOSTRENGTH=64&CA3_HI_DEFOG_AUTOSTRENGTH=64");
  3986. }
  3987. on_videoselect_clicked();
  3988. }
  3989. //-->
  3990. </script>
  3991. </head>
  3992. <body onload="init()" onunload="term()" ondragstart="return false;" onselectstart="return false;">
  3993. <script language="JavaScript" type="text/javascript">
  3994. function ServerEventAction(lChID, eEventType, nIndex, eEventStatus, vData) {
  3995. //alert("test : " + eEventType);
  3996. switch (eEventType)
  3997. {
  3998. case TN_ET_DI:
  3999. if (eEventStatus) document[simgname[nIndex]].src = simgsrc_sn[nIndex];
  4000. else document[simgname[nIndex]].src = simgsrc_n[nIndex];
  4001. break;
  4002. case TN_ET_DO:
  4003. if(nIndex > 0){
  4004. if (eEventStatus) document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
  4005. else document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
  4006. }
  4007. Alarm_state[nIndex] = eEventStatus;
  4008. break;
  4009. case TN_ET_MOTION:
  4010. if (eEventStatus) document[simgname[6]].src = simgsrc_sn[6];
  4011. else document[simgname[6]].src = simgsrc_n[6];
  4012. break;
  4013. case TN_ET_RECORD:
  4014. if (eEventStatus == 1) document[simgname[7]].src = simgsrc_sn[7];
  4015. else if (eEventStatus == 0) document[simgname[7]].src = simgsrc_n[7];
  4016. else document[simgname[7]].src = "/resources/img/btn_r15_N.gif";
  4017. // alert("eEventStatus = " + eEventStatus);
  4018. break;
  4019. case TN_ET_VIDEOLOSS:
  4020. if (eEventStatus)
  4021. {
  4022. tvs_clrvideolossosd();
  4023. }
  4024. else
  4025. {
  4026. var rcVL = new Array(tvs_get_width() / 2 - 60, tvs_get_height() / 2 - 30, tvs_get_width() / 2 + 80, tvs_get_height() / 2 + 30);
  4027. tvs_setvideolossosd(rcVL[0], rcVL[1], rcVL[2], rcVL[3]);
  4028. }
  4029. break;
  4030. case TN_ET_RESOLUTION:
  4031. currnetRes = vData;
  4032. setviewsize(-1);
  4033. break;
  4034. }
  4035. }
  4036. function OnServerEvent(lChID, eEventType, nIndex, eEventStatus, vData)
  4037. {
  4038. ServerEventAction(lChID, eEventType, nIndex, eEventStatus, vData);
  4039. }
  4040. function ChannelNotifyAction(a)
  4041. {
  4042. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))) {
  4043. if(a & 0x00000001){ // TN_CS_CONNECTED
  4044. tvs_set_motion_region_edit2(7, 9);
  4045. }
  4046. }
  4047. }
  4048. function ChannelNotifyAction_DetectionCam(channel, a)
  4049. {
  4050. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))) {
  4051. if(a & 0x00000001){ // TN_CS_CONNECTED
  4052. tvs_set_motion_region_edit2_detection_cam(channel , 7, 9);
  4053. }
  4054. }
  4055. }
  4056. function OnChannelNotify(a, b)
  4057. {
  4058. ChannelNotifyAction(b);
  4059. ChannelNotifyAction_DetectionCam(0,b);
  4060. ChannelNotifyAction_DetectionCam(1,b);
  4061. ChannelNotifyAction_DetectionCam(2,b);
  4062. ChannelNotifyAction_DetectionCam(3,b);
  4063. }
  4064. function FileRecordNotifyAction(time, size)
  4065. {
  4066. var hour = Math.floor(time/3600);
  4067. var min = Math.floor((time%3600)/60);
  4068. var sec = (time%60);
  4069. if(min < 10 && sec < 10){
  4070. document.formView.RecordTime.value = hour + ':0' + min + ':0' + sec + ' ';
  4071. }
  4072. else if(min >= 10 && sec < 10){
  4073. document.formView.RecordTime.value = hour + ':' + min + ':0' + sec + ' ';
  4074. }
  4075. else if(min < 10 && sec >= 10){
  4076. document.formView.RecordTime.value = hour + ':0' + min + ':' + sec + ' ';
  4077. }
  4078. else{
  4079. document.formView.RecordTime.value = hour + ':' + min + ':' + sec + ' ';
  4080. }
  4081. document.formView.RecordSizeData.value = size;
  4082. var sizek =parseInt(document.formView.RecordSizeData.value);
  4083. if(sizek > 1000000){
  4084. var calsize = sizek/(1024*1024);
  4085. document.formView.RecordSize.value = calsize.toFixed(1) + 'MB';
  4086. }
  4087. else if(sizek > 1000){
  4088. var calsize = sizek/1024;
  4089. document.formView.RecordSize.value = calsize.toFixed(0) + 'KB';
  4090. }
  4091. else{
  4092. document.formView.RecordSize.value =sizek + 'B';
  4093. }
  4094. }
  4095. function OnFileRecordNotify(a, b, c, d, e)
  4096. {
  4097. FileRecordNotifyAction(d, e);
  4098. }
  4099. function MouseEventAction(a, b, c, d)
  4100. {
  4101. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1')))
  4102. clicktocenter(a, b, c, d);
  4103. }
  4104. function OnMouseEvent(a, b, c, d)
  4105. {
  4106. MouseEventAction(a, b, c, d);
  4107. MouseEventAction_DetectionCam_4_0(a, b, c, d);
  4108. MouseEventAction_DetectionCam_4_1(a, b, c, d);
  4109. MouseEventAction_DetectionCam_4_2(a, b, c, d);
  4110. MouseEventAction_DetectionCam_4_3(a, b, c, d);
  4111. }
  4112. function MouseEventAction_DetectionCam_4_0(a, b, c, d)
  4113. {
  4114. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
  4115. clicktocenter_directioncam_4_0(a, b, c, d);
  4116. }
  4117. }
  4118. function MouseEventAction_DetectionCam_4_1(a, b, c, d)
  4119. {
  4120. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
  4121. clicktocenter_directioncam_4_1(a, b, c, d);
  4122. }
  4123. }
  4124. function MouseEventAction_DetectionCam_4_2(a, b, c, d)
  4125. {
  4126. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
  4127. clicktocenter_directioncam_4_2(a, b, c, d);
  4128. }
  4129. }
  4130. function MouseEventAction_DetectionCam_4_3(a, b, c, d)
  4131. {
  4132. if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
  4133. clicktocenter_directioncam_4_3(a, b, c, d);
  4134. }
  4135. }
  4136. </script>
  4137. <script for="Tvs" event="OnServerEvent()" language="JavaScript">
  4138. <!--
  4139. ServerEventAction(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
  4140. //-->
  4141. </script>
  4142. <script for="Tvs" event="OnFileRecordNotify()" language="JavaScript">
  4143. <!--
  4144. FileRecordNotifyAction(arguments[3], arguments[4]);
  4145. //-->
  4146. </script>
  4147. <script for="Tvs" event="OnChannelNotify()" language="JavaScript">
  4148. <!--
  4149. ChannelNotifyAction(arguments[1]);
  4150. //-->
  4151. </script>
  4152. <script for="Tvs4_0" event="OnChannelNotify()" language="JavaScript">
  4153. <!--
  4154. ChannelNotifyAction_DetectionCam(0,arguments[1]);
  4155. //-->
  4156. </script>
  4157. <script for="Tvs4_1" event="OnChannelNotify()" language="JavaScript">
  4158. <!--
  4159. ChannelNotifyAction_DetectionCam(1,arguments[1]);
  4160. //-->
  4161. </script>
  4162. <script for="Tvs4_2" event="OnChannelNotify()" language="JavaScript">
  4163. <!--
  4164. ChannelNotifyAction_DetectionCam(2,arguments[1]);
  4165. //-->
  4166. </script>
  4167. <script for="Tvs4_3" event="OnChannelNotify()" language="JavaScript">
  4168. <!--
  4169. ChannelNotifyAction_DetectionCam(3,arguments[1]);
  4170. //-->
  4171. </script>
  4172. <script for="Tvs" event="OnMouseEvent();" language="JavaScript">
  4173. <!--
  4174. MouseEventAction(arguments[0], arguments[1], arguments[2], arguments[3]);
  4175. //-->
  4176. </script>
  4177. <script for="Tvs4_0" event="OnMouseEvent();" language="JavaScript">
  4178. <!--
  4179. MouseEventAction_DetectionCam_4_0(arguments[0], arguments[1], arguments[2], arguments[3]);
  4180. //-->
  4181. </script>
  4182. <script for="Tvs4_1" event="OnMouseEvent();" language="JavaScript">
  4183. <!--
  4184. MouseEventAction_DetectionCam_4_1(arguments[0], arguments[1], arguments[2], arguments[3]);
  4185. //-->
  4186. </script>
  4187. <script for="Tvs4_2" event="OnMouseEvent();" language="JavaScript">
  4188. <!--
  4189. MouseEventAction_DetectionCam_4_2(arguments[0], arguments[1], arguments[2], arguments[3]);
  4190. //-->
  4191. </script>
  4192. <script for="Tvs4_3" event="OnMouseEvent();" language="JavaScript">
  4193. <!--
  4194. MouseEventAction_DetectionCam_4_3(arguments[0], arguments[1], arguments[2], arguments[3]);
  4195. //-->
  4196. </script>
  4197. <form id="formView" name="formView">
  4198. <div id="dialog-warning" style="display:none;" title="Warning">
  4199. <div class="txtWrap">
  4200. <div class="txtInner">
  4201. <div class="txt">
  4202. <div class="menubox">
  4203. <ul>
  4204. <li>
  4205. <span>No free space.</span>
  4206. </li>
  4207. <li>
  4208. <span>Visit 'chrome://settings/cookies#cont'</span>
  4209. </li>
  4210. <li>
  4211. <span>and remove 'File system' cache. </span>
  4212. </li>
  4213. </ul>
  4214. <span>
  4215. <button type="button" class="btn_pos" style="right: 6px;" onclick="on_dialog_close()"><span class="LAN_023"></span></button>
  4216. </span>
  4217. </div>
  4218. <div class="menuspace">
  4219. </div>
  4220. </div>
  4221. </div>
  4222. </div>
  4223. </div>
  4224. <div id="dialog-warning2" style="display:none;" title="Warning">
  4225. <div class="txtWrap">
  4226. <div class="txtInner">
  4227. <div class="txt">
  4228. <div class="menubox">
  4229. <ul>
  4230. <li>
  4231. <span class="LAN_1022"></span>
  4232. </li>
  4233. </ul>
  4234. <span>
  4235. <button type="button" class="btn_pos" style="width: 200px; right: 446px;" onclick="on_dialog2_move()"><span class="LAN_1023"></span></button>
  4236. <button type="button" class="btn_pos" style="width: 200px; right: 226px;" onclick="on_dialog2_later()"><span class="LAN_1024"></span></button>
  4237. <button type="button" class="btn_pos" style="width: 200px; right: 6px;" onclick="on_dialog2_never()"><span class="LAN_1025"></span></button>
  4238. </span>
  4239. </div>
  4240. <div class="menuspace">
  4241. </div>
  4242. </div>
  4243. </div>
  4244. </div>
  4245. </div>
  4246. <div id="wrap" class="wrapWidth">
  4247. <div class="header">
  4248. <div class="headerBox">
  4249. <div id="logoarea"></div>
  4250. <div id="logoarea1"></div>
  4251. <a href="/manager/videoinformation.html" class="pageLink">Setup</a>
  4252. <a href="/logout.html" class="logoutLink" id="logout" style="display:none;">Logout</a>
  4253. </div>
  4254. </div>
  4255. <div class="contentWrap">
  4256. <div class="content">
  4257. <div class="controller">
  4258. <ul>
  4259. <div id="logoarea2" style="display:none;">
  4260. </div>
  4261. <li class="group sleepmode" name = "li_sleepmode" style="display:none;">
  4262. <p class="head"><span>Sleep Mode</span></p>
  4263. <div class="body">
  4264. <select name="SYS_SLEEPMODE" id="SYS_SLEEPMODE" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="change_sleepmode(this);">
  4265. <option value=0>Wake-up</option>
  4266. <option value=1>Sleep</option>
  4267. </select>
  4268. </div>
  4269. </li>
  4270. <li class="group pelletmode" name = "li_pelletmode" style="display:none;">
  4271. <p class="head"><span>Pellet Enhancement</span></p>
  4272. <div class="body">
  4273. <select name="ETC_PELLETMODE" id="ETC_PELLETMODE" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="change_pelletmode(this);">
  4274. <option value=0>Disable</option>
  4275. <option value=1>Enable</option>
  4276. </select>
  4277. </div>
  4278. </li>
  4279. <li class="group camerasel" name = "li_camerasel" style="display:none;">
  4280. <p class="head"><span class="LAN_1094"></span></p>
  4281. <div class="body">
  4282. <select name="camerasel" id="camerasel" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="on_cameraselect_clicked();">
  4283. <option value=0>PTZ</option>
  4284. <option value=1>Direction</option>
  4285. </select>
  4286. </div>
  4287. </li>
  4288. <li class="group video" name = "li_videosel">
  4289. <p class="head"><span class="LAN_393"></span></p>
  4290. <div class="body">
  4291. <select name="videosel" id="videosel" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="on_videoselect_clicked();">
  4292. </select>
  4293. </div>
  4294. </li>
  4295. <li class="group image" name="group_image">
  4296. <p class="head" >
  4297. <span class="LAN_690"></span>
  4298. <img src="/resources/img/btn02_N.gif" id="image_accordion_button" onclick="change_Accordion(16, this);"/>
  4299. </p>
  4300. <div class="body">
  4301. <div id="div_image1">
  4302. <center>
  4303. <table cellpadding=0 cellspacing=0 border=0 width=150 height=110 >
  4304. <tr><td colspan=4 height=5></td></tr>
  4305. <tr>
  4306. <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(0, 0)"/></td>
  4307. <td width=65 height=30 align="center"><span class="LAN_057"></span></td>
  4308. <td width=25 height=30 align="center"><input name="SYS_CUR_BRIGHTNESS" type="text" class="no_outline" style="text-align:center;" readonly="true"></td>
  4309. <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(0, 1)"/></td>
  4310. </tr>
  4311. <tr><td colspan=4 height=5></td></tr>
  4312. <tr>
  4313. <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(1, 0)"/></td>
  4314. <td width=65 height=30 align="center"><span class="LAN_060"></span></td>
  4315. <td width=25 height=30 align="center"><input name="SYS_CUR_SATURATION" id="SYS_CUR_SATURATION" type="text" class="no_outline" style="text-align:center;" readonly="true"/></td>
  4316. <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(1, 1)"/></td>
  4317. </tr>
  4318. <tr><td colspan=4 height=5></td></tr>
  4319. <tr>
  4320. <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(2, 0)"/></td>
  4321. <td width=65 height=30 align="center"><span class="LAN_486"></span></td>
  4322. <td width=25 height=30 align="center"><input name="SYS_CUR_SHARPNESS" id="SYS_CUR_SHARPNESS" type="text" class="no_outline" style="text-align:center;" readonly="true"/></td>
  4323. <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(2, 1)"/></td>
  4324. </tr>
  4325. <tr><td colspan=4 height=5></td></tr>
  4326. </table>
  4327. </center>
  4328. </div>
  4329. <div id="div_image2" style="display:none;">
  4330. <center>
  4331. <table cellpadding=0 cellspacing=0 border=0 width=150 height=40 >
  4332. <tr><td colspan=3 height=5></td></tr>
  4333. <tr>
  4334. <td width=50 height=30><img src="/resources/img/btn104_N.png" class="btn" onMouseUp="TDNControl('day')"/></td>
  4335. <td width=50 height=30><img src="/resources/img/btn105_N.png" class="btn" onMouseUp="TDNControl('night')"/></td>
  4336. <td width=50 height=30><img src="/resources/img/btn103_N.png" class="btn" onMouseUp="TDNControl('auto')"/></td>
  4337. </tr>
  4338. <tr><td colspan=3 height=2></td></tr>
  4339. </table>
  4340. <img src="/resources/img/groupLine.gif"/>
  4341. <table cellpadding=0 cellspacing=0 border=0 width=150 height=40 >
  4342. <tr><td colspan=4 height=5></td></tr>
  4343. <tr>
  4344. <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(0, 0)"/></td>
  4345. <td width=65 height=30 align="center"><span>Gain</span></td>
  4346. <td width=25 height=30 align="center"><input name="SYS_CUR_BRIGHTNESS" type="text" class="no_outline" style="text-align:center; font-size:13px;" readonly="true"/></td>
  4347. <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(0, 1)"/></td>
  4348. </tr>
  4349. <tr><td colspan=4 height=5></td></tr>
  4350. <tr>
  4351. <td colspan=4 align="center">
  4352. <button type="button" class="btn_pos" onclick="BCScontrol_Default(0)"><span>Default</span></button>
  4353. </td>
  4354. </tr>
  4355. <tr><td colspan=4 height=5></td></tr>
  4356. </table>
  4357. </center>
  4358. </div>
  4359. </div>
  4360. </li>
  4361. <li class="group digital" name="group_digital">
  4362. <p class="head" >
  4363. <span class="LAN_254"></span>
  4364. <img src="/resources/img/btn02_N.gif" id="digital_accordion_button" onclick="change_Accordion(1, this);"/>
  4365. </p>
  4366. <div class="body">
  4367. <div>
  4368. <center>
  4369. <table cellpadding=0 cellspacing=0 border=0 width=150 height=130 >
  4370. <tr>
  4371. <td width=25 height=25 align="left"><img name="digitalzoom_leftup" class="btn" src="/resources/img/btn10_N.gif" onMouseUp="ButtonLeftUp()"/></td>
  4372. <td width=100 height=25 align="center"><img name="digitalzoom_up" class="btn" src="/resources/img/btn03_N.gif" onMouseUp="ButtonUp()"/></td>
  4373. <td width=25 height=25 align="right"><img name="digitalzoom_rightup" class="btn" src="/resources/img/btn04_N.gif" onMouseUp="ButtonRightUp()"/></td>
  4374. </tr>
  4375. <tr>
  4376. <td width=25 height=80 align="left"><img name="digitalzoom_left" class="btn" src="/resources/img/btn09_N.gif" onMouseUp="ButtonLeft()"/></td>
  4377. <td valign=top align=left width=100 height=80 onClick='clickTable();' background='/resources/img/digitalBg.jpg'>
  4378. <div style="position:relative;width:100px;height:80px;border:0px solid #000000;background-image: url(/resources/img/100_80.jpg);" id='remote'
  4379. onMouseOver='onLayerSet(true);' onMouseOut='onLayerSet(false);' onClick='clickLayer();'>
  4380. </div>
  4381. </td>
  4382. <td width=25 height=80 align="right"><img name="digitalzoom_right" class="btn" src="/resources/img/btn05_N.gif" onMouseUp="ButtonRight()"/></td>
  4383. </tr>
  4384. <tr>
  4385. <td width=25 height=25 align="left"><img name="digitalzoom_leftdown" class="btn" src="/resources/img/btn08_N.gif" onMouseUp="ButtonLeftDown()"/></td>
  4386. <td width=100 height=25 align="center"><img name="digitalzoom_down" class="btn" src="/resources/img/btn07_N.gif" onMouseUp="ButtonDown()"/></td>
  4387. <td width=25 height=25 align="right"><img name="digitalzoom_rightdown" class="btn" src="/resources/img/btn06_N.gif" onMouseUp="ButtonRightDown()"/></td>
  4388. </tr>
  4389. </table>
  4390. </center>
  4391. </div>
  4392. <ul class="btnWrap">
  4393. <li><img src="/resources/img/btn11_N.gif" class="btn" id="btn1" onMouseUp="ZoomIn()"/></li>
  4394. <li><img src="/resources/img/btn12_N.gif" class="btn" onMouseUp="ZoomOut()"/></li>
  4395. <li><img src="/resources/img/btn13_N.gif" class="btn" onMouseUp="ZoomHome()"/></li>
  4396. </ul>
  4397. </div>
  4398. </li>
  4399. <li class="group camera" name="group_camera">
  4400. <div class="head">
  4401. <div id="panel_title"></div>
  4402. <img src="/resources/img/btn02_N.gif" id="ptz_accordion_button" onclick="change_Accordion(2, this);"/>
  4403. </div>
  4404. <div class="body">
  4405. <center>
  4406. <div style="height:5px;" id="panel_title_below"></div>
  4407. <div style="width:150px;" id="div_ptz_panel_drag">
  4408. <div id="containment-wrapper" style="width:150px; height:150px; border-radius:75px; background-color:Black; background-image: url(/resources/img/cameraBg_02.jpg);">
  4409. <div id="draggable3" class="draggable ui-widget-content" style="width:18px; height:21px; background-color:Transparent; background-image: url(/resources/img/b_01.png); border: 0px; left:66px; top:66px;">
  4410. </div>
  4411. </div>
  4412. </div>
  4413. <div id="div_ptz_panel_button" style="width:150px; display:none;">
  4414. <table style="width:100%;">
  4415. <tr>
  4416. <td>
  4417. <img style="width:100%;" src="/resources/img/btn83_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4418. </td>
  4419. <td>
  4420. <img style="width:100%;" src="/resources/img/btn84_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4421. </td>
  4422. <td>
  4423. <img style="width:100%;" src="/resources/img/btn85_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4424. </td>
  4425. </tr>
  4426. <tr>
  4427. <td>
  4428. <img style="width:100%;" src="/resources/img/btn86_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4429. </td>
  4430. <td>
  4431. <img style="width:100%;" src="/resources/img/btn87_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4432. </td>
  4433. <td>
  4434. <img style="width:100%;" src="/resources/img/btn88_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4435. </td>
  4436. </tr>
  4437. <tr>
  4438. <td>
  4439. <img style="width:100%;" src="/resources/img/btn89_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4440. </td>
  4441. <td>
  4442. <img style="width:100%;" src="/resources/img/btn90_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4443. </td>
  4444. <td>
  4445. <img style="width:100%;" src="/resources/img/btn91_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
  4446. </td>
  4447. </tr>
  4448. </table>
  4449. </div>
  4450. </center>
  4451. <ul class="btnWrap2" id="ptzbuttongroup_0">
  4452. <li>
  4453. <img src="/resources/img/btn11_N.gif" class="btn" onMouseDown="ptz_begin_local('zoom_in')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
  4454. </li>
  4455. <li>
  4456. <img src="/resources/img/btn12_N.gif" class="btn" onMouseDown="ptz_begin_local('zoom_out')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
  4457. </li>
  4458. <li>
  4459. <img src="/resources/img/btn13_N.gif" class="btn" onMouseDown="ptz_zoomhome()"/>
  4460. </li>
  4461. <li>
  4462. <img src="/resources/img/btn15_N.gif" class="btn" onMouseDown="ptz_begin_local('focus_near')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
  4463. </li>
  4464. <li>
  4465. <img src="/resources/img/btn16_N.gif" class="btn" onMouseDown="ptz_begin_local('focus_far')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
  4466. </li>
  4467. <li>
  4468. <img src="/resources/img/btn17_N.gif" class="btn" onMouseDown="ptz_cmd_local('focus_auto')"/>
  4469. </li>
  4470. </ul>
  4471. <ul class="btnWrap oneBtn" id="ptzbuttongroup_1">
  4472. <li>
  4473. <img src="/resources/img/btn60_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_close')"/>
  4474. </li>
  4475. <li>
  4476. <img src="/resources/img/btn61_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_open')"/>
  4477. </li>
  4478. <li>
  4479. <img src="/resources/img/btn62_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_auto')"/>
  4480. </li>
  4481. </ul>
  4482. <ul class="btnWrap oneBtn" id="ptzbuttongroup_2">
  4483. <li>
  4484. <img src="/resources/img/btn63_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_on')"/>
  4485. </li>
  4486. <li>
  4487. <img src="/resources/img/btn64_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_enter')"/>
  4488. </li>
  4489. <li>
  4490. <img src="/resources/img/btn65_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_esc')"/>
  4491. </li>
  4492. </ul>
  4493. <ul class="btnWrap oneBtn" id="ptzbuttongroup_3">
  4494. <li>
  4495. <img src="/resources/img/btn59_N.gif" class="btn" onMouseDown="ptz_cmd_local('home')"/>
  4496. </li>
  4497. <li>
  4498. <img src="/resources/img/btn68_N.gif" class="btn" onMouseDown="ptz_cmd_local('none')"/>
  4499. </li>
  4500. <li>
  4501. <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_cmd_local('none')"/>
  4502. </li>
  4503. </ul>
  4504. <ul class="btnWrap oneBtn" id="ptzbuttongroup_4">
  4505. <li>
  4506. <img src="/resources/img/BTN_B_n.png"/>
  4507. </li>
  4508. <li>
  4509. <img src="/resources/img/btn67_N.gif" class="btn" onMouseDown="ptz_cmd_local('onepushwb')"/>
  4510. </li>
  4511. <li>
  4512. <img src="/resources/img/BTN_B_n.png"/>
  4513. </li>
  4514. </ul>
  4515. <ul class="btnWrap oneBtn" id="ptzbuttongroup_5" style="display:none;">
  4516. <li>
  4517. <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="on_wiper()"/>
  4518. </li>
  4519. <li>
  4520. <img src="/resources/img/btn72_N.png" class="btn" onMouseDown="on_defug()"/>
  4521. </li>
  4522. <li>
  4523. <img src="/resources/img/btn71_N.png" class="btn" onMouseDown="on_irpower()"/>
  4524. </li>
  4525. </ul>
  4526. <ul class="btnWrap oneBtn" id="ptzbuttongroup_6">
  4527. <li>
  4528. <img src="/resources/img/BTN_B_n.png"/>
  4529. </li>
  4530. <li>
  4531. <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_general_command(0x1A)" onMouseUp="ptz_general_command(0x1B)" onMouseOut="ptz_general_command(0x1B)"/>
  4532. </li>
  4533. <li>
  4534. <img src="/resources/img/BTN_B_n.png"/>
  4535. </li>
  4536. </ul>
  4537. <ul class="btnWrap oneBtn" id="ptzbuttongroup_7">
  4538. <li>
  4539. <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_p7_wiper(1)" onMouseUp="ptz_p7_wiper(0)" onMouseOut="ptz_p7_wiper(0)"/>
  4540. </li>
  4541. <li>
  4542. <div class="preset" style="padding: 0px 0px 3px 0px;">
  4543. <select name="WiperTime" id="WiperTime" style="width:102px; height: 20px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
  4544. <option value="0" selected="true">No duration</option>
  4545. <option value="1">1h duration</option>
  4546. <option value="2">2h duration</option>
  4547. <option value="3">3h duration</option>
  4548. </select>
  4549. </div>
  4550. </li>
  4551. </ul>
  4552. <ul class="btnWrap oneBtn" id="ptzbuttongroup_8" style="display:none;">
  4553. <li>
  4554. <img src="/resources/img/btn59_N.gif" class="btn" onMouseDown="ptz_preset_goto(1,1);"/>
  4555. </li>
  4556. <li>
  4557. <img src="/resources/img/btn81_N.png" class="btn" onMouseDown="on_reboot();" />
  4558. </li>
  4559. <li name="li_reset_zoom_module">
  4560. <img src="/resources/img/btn82_N.png" class="btn" onMouseDown="on_reset_zoom_module();" />
  4561. </li>
  4562. </ul>
  4563. <center><img src="/resources/img/groupLine.gif"/></center>
  4564. <ul class="btnWrap2" id="semocon_irmove_buttons" style="padding-top:7px; display:none;">
  4565. <li>
  4566. <img src="/resources/img/btn73_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('bright', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
  4567. </li>
  4568. <li style="padding-left:1px;">
  4569. <img src="/resources/img/btn74_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('dark', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
  4570. </li>
  4571. <li>
  4572. <img src="/resources/img/btn75_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('wide', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
  4573. </li>
  4574. <li style="padding-left:1px;">
  4575. <img src="/resources/img/btn76_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('narrow', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
  4576. </li>
  4577. </ul>
  4578. <div class="preset">
  4579. <select name="preset_select" id="preset_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
  4580. </select>
  4581. </div>
  4582. <div class="preset" id="after_action_group" style="padding: 0 0 7px 10px; display:none;">
  4583. <select name="after_action_select" id="after_action_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
  4584. <option value="0" selected="selected">Off</option>
  4585. <option value="1">Track</option>
  4586. <option value="2">Auto Run</option>
  4587. <option value="3">IR</option>
  4588. </select>
  4589. </div>
  4590. <ul class="btnWrap freesetBtn">
  4591. <li>
  4592. <img src="/resources/img/btn19_N.gif" class="btn" onMouseDown="on_preset_goto()"/>
  4593. </li>
  4594. <li>
  4595. <img src="/resources/img/btn20_N.gif" class="btn" onMouseDown="on_preset_set()"/>
  4596. </li>
  4597. <li>
  4598. <img src="/resources/img/btn21_N.gif" class="btn" onMouseDown="on_preset_clear()"/>
  4599. </li>
  4600. </ul>
  4601. <center><img src="/resources/img/groupLine.gif"/></center>
  4602. <div class="preset">
  4603. <select name="list_select" id="list_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
  4604. <option value="0" selected="true" class="LAN_326"></option>
  4605. <option value="1">List-1</option>
  4606. <option value="2">List-2</option>
  4607. <option value="3">List-3</option>
  4608. <option value="4">List-4</option>
  4609. <option value="5">List-5</option>
  4610. <option value="6">List-6</option>
  4611. <option value="7">List-7</option>
  4612. <option value="8">List-8</option>
  4613. </select>
  4614. </div>
  4615. <ul class="btnWrap itemBtn" id="presetbuttongroup_1">
  4616. <li>
  4617. <img src="/resources/img/btn22_N.gif" class="btn" name="PatternButton" onMouseDown="on_pattern_goto()"/>
  4618. </li>
  4619. <li>
  4620. <img src="/resources/img/btn23_N.gif" class="btn" name="SwingButton" onMouseDown="on_swing_goto()"/>
  4621. </li>
  4622. <li>
  4623. <img src="/resources/img/btn24_N.gif" class="btn" name="GroupButton" onMouseDown="on_group_goto()"/>
  4624. </li>
  4625. </ul>
  4626. <ul class="btnWrap itemBtn" id="presetbuttongroup_2" style="display:none;">
  4627. <li>
  4628. <img src="/resources/img/btn22_N.gif" class="btn" name="PatternButton" onMouseDown="on_pattern_goto()"/>
  4629. </li>
  4630. <li>
  4631. <img src="/resources/img/btn24_N.gif" class="btn" name="GroupButton" onMouseDown="on_group_goto()"/>
  4632. </li>
  4633. <li>
  4634. <img src="/resources/img/BTN_B_n.png"/>
  4635. </li>
  4636. </ul>
  4637. <div style="height:5px;" id="trackingbuttonline">
  4638. <center><img src="/resources/img/groupLine.gif"/></center>
  4639. </div>
  4640. <div class="btnWrap3" id="trackingbuttongroup">
  4641. <img src="/resources/img/btn77_N.png" class="btn" id="TrackingButton" onMouseDown="ptz_preset_goto(1,660);"/>
  4642. <img src="/resources/img/btn78_N.png" class="btn" id="ACWButton" onMouseDown="ptz_preset_goto(1,661);"/>
  4643. </div>
  4644. <div style="height:5px;" id="autopanline">
  4645. <center><img src="/resources/img/groupLine.gif"/></center>
  4646. </div>
  4647. <div class="btnWrap3" id="autopanbuttongroup">
  4648. <img src="/resources/img/btn79_N.png" class="btn" id="Autopan_Start" onMouseDown="ptz_general_command(0x13);"/>
  4649. <img src="/resources/img/btn80_N.png" class="btn" id="Autopan_Stop" onMouseDown="ptz_general_command(0x14);"/>
  4650. </div>
  4651. </div>
  4652. </li>
  4653. <li class="group file" name="group_file">
  4654. <p class="head">
  4655. <span class="LAN_501"></span>
  4656. <img src="/resources/img/btn02_N.gif" id="rec_accordion_button" onclick="change_Accordion(4, this);"/>
  4657. </p>
  4658. <div class="body">
  4659. <center>
  4660. <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
  4661. <tr style="height:5px;"><td colspan="3"></td></tr>
  4662. <tr>
  4663. <td><span class="LAN_646"></span></td>
  4664. <td><input name="Directory" type="text" value="" style="width:50px;" align="right" maxlength="60" readonly="true"/></td>
  4665. <td align="right"><input style="width:42px;font-size:12px;" type="button" name="LocationSet" value="Set" onclick="file_location()" /></td>
  4666. </tr>
  4667. <tr style="height:5px;"><td colspan="3"></td></tr>
  4668. <tr>
  4669. <td><span class="LAN_647"></span></td>
  4670. <td><input name="FileName" type="text" value="" style="width:50px;" align="right" maxlength="60" onChange="recordfileupdate()"/></td>
  4671. <td align="right"><input style="width:42px;font-size:12px;" type="button" name="RecordButton" value="Start" onclick="file_recstart()" /></td>
  4672. </tr>
  4673. <tr style="height:5px;"><td colspan="3"></td></tr>
  4674. </table>
  4675. <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
  4676. <tr id="recordtime_msg" style="display:none">
  4677. <td><input type="text" name="RecordTime" id="RecordTime" class="no_outline" style="width:60px;" readonly="true" />
  4678. <input type="hidden" name="RecordSizeData" id="RecordSizeData" class="no_outline" readonly="true" />
  4679. <input type="text" name="RecordSize" id="RecordSize" class="no_outline" style="width:60px;" align="right" readonly="true" /></td>
  4680. </tr>
  4681. <tr style="height:5px;"></tr>
  4682. </table>
  4683. </center>
  4684. </div>
  4685. </li>
  4686. <li class="group file" name="group_file2">
  4687. <p class="head">
  4688. <span class="LAN_501"></span>
  4689. <img src="/resources/img/btn02_N.gif" id="rec2_accordion_button" onclick="change_Accordion(8, this);"/>
  4690. </p>
  4691. <div class="body">
  4692. <center>
  4693. <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
  4694. <tr style="height:5px;"><td></td></tr>
  4695. <tr>
  4696. <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CRecButton" value="Record Start" onclick="cfile_start()" /></td>
  4697. </tr>
  4698. <tr style="height:5px;"><td></td></tr>
  4699. <tr id="recordinfo_msg" style="display:none">
  4700. <td align="center"><input type="text" style="color:Red;width:150px;font-size:10px;" name="RecordInfo" id="RecordInfo" class="no_outline" readonly="true" /></td>
  4701. </tr>
  4702. <tr id="recordfname_msg" style="display:none">
  4703. <td align="center"><input type="text" style="width:150px;font-size:10px;" name="RecordFname" id="RecordFname" class="no_outline" readonly="true" /></td>
  4704. </tr>
  4705. <tr style="height:5px;"><td></td></tr>
  4706. <tr>
  4707. <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CDownButton" value="Download" onclick="cfile_download()" /></td>
  4708. </tr>
  4709. <tr style="height:5px;"><td></td></tr>
  4710. <tr>
  4711. <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CBrowseButton" value="Browse" onclick="cfile_browse()" /></td>
  4712. </tr>
  4713. <tr style="height:5px;"></tr>
  4714. </table>
  4715. </center>
  4716. </div>
  4717. </li>
  4718. <li class="group file" name="group_file3">
  4719. <p class="head">
  4720. <span class="LAN_501"></span>
  4721. <img src="/resources/img/btn02_N.gif" id="wsrec_accordion_button" onclick="change_Accordion(64, this);"/>
  4722. </p>
  4723. <div class="body">
  4724. <center>
  4725. <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
  4726. <tr style="height:5px;"><td colspan="3"></td></tr>
  4727. <tr>
  4728. <td><span class="LAN_647"></span></td>
  4729. <td><input name="WSRecFileName" type="text" value="" style="width:50px;" align="right" maxlength="60" onChange="recordfileupdate()"/></td>
  4730. <td align="right"><input style="width:42px;font-size:12px;" type="button" name="WSRecButton" value="Start" onclick="WSRec_Start();" /></td>
  4731. </tr>
  4732. <tr style="height:5px;"><td colspan="3"></td></tr>
  4733. </table>
  4734. <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
  4735. <tr id="WSRecTimeMsg" style="display:none">
  4736. <td>
  4737. <input type="text" name="WSRecMsg" id="WSRecMsg" class="no_outline" style="width: 120px;" readonly="true"/>
  4738. <input type="hidden" name="WSRecSizeData" id="WSRecSizeData" class="no_outline" readonly="true" />
  4739. </td>
  4740. </tr>
  4741. <tr style="height:5px;"></tr>
  4742. </table>
  4743. </center>
  4744. </div>
  4745. </li>
  4746. <li class="group" name="group_canon">
  4747. <p class="head">
  4748. <span class="Canon_control">Canon Control</span>
  4749. <img src="/resources/img/btn02_N.gif" id="canon_accordion_button" onclick="change_Accordion(32, this);"/>
  4750. </p>
  4751. <div class="body">
  4752. <ul id="canonbuttongroup1" style="padding:5px 0 10px 4px; height:17px;">
  4753. <li style="float:left; padding:0 3px 3px 0;">
  4754. <img src="/resources/img/btn98_N.png" class="btn" onMouseDown="ptz_general_command(0x1D)"/>
  4755. </li>
  4756. <li style="float:right; padding:0 3px 3px 0;">
  4757. <img src="/resources/img/btn95_N.png" class="btn" onMouseDown="ptz_general_command(0x4B)"/>
  4758. </li>
  4759. </ul>
  4760. <ul id="canonbuttongroup2" style="height:17px; padding:0 0 0 4px;">
  4761. <center>
  4762. <li style="padding:3px 3px 3px 0;">
  4763. <img src="/resources/img/btn100_N.png" class="btn" onMouseDown="ptz_general_command(0x60)"/>
  4764. </li>
  4765. </center>
  4766. </ul>
  4767. <ul id="canonbottongroup3" style="height:10px; padding:10px 0 10px 4px;">
  4768. <li style="float:left; padding-right:3px;">
  4769. <img src="/resources/img/btn97_N.png" class="btn" onMouseDown="ptz_general_command(0x63)"/>
  4770. </li>
  4771. <li style="float:left; padding-right:3px;">
  4772. <img src="/resources/img/btn20_N.gif" class="btn" onMouseDown="ptz_general_command(0x1F)"/>
  4773. </li>
  4774. <li style="float:left; padding-right:3px;">
  4775. <img src="/resources/img/btn99_N.png" class="btn" onMouseDown="ptz_general_command(0x62)"/>
  4776. </li>
  4777. </ul>
  4778. <ul id="canonbottongroup4" style="height:17px; padding:0 0 20px 4px;">
  4779. <center>
  4780. <li style="padding:3px 3px 3px 0;">
  4781. <img src="/resources/img/btn96_N.png" class="btn" onMouseDown="ptz_general_command(0x61)"/>
  4782. </li>
  4783. </center>
  4784. </ul>
  4785. <ul id="canonbuttongroup5" style="height:20px; padding:0 0 4px 4px;">
  4786. <li style="float:left; padding-right:3px;">
  4787. <img src="/resources/img/btn92_N.png" class="btn" onMouseDown="ptz_general_command(0x4C)"/>
  4788. </li>
  4789. <li style="float:left; padding-right:3px;">
  4790. <img src="/resources/img/btn93_N.png" class="btn" onMouseDown="ptz_general_command(0x4D)"/>
  4791. </li>
  4792. <li style="float:left; padding-right:3px;">
  4793. <img src="/resources/img/btn94_N.png" class="btn" onMouseDown="ptz_general_command(0x4F)"/>
  4794. </li>
  4795. </ul>
  4796. </div>
  4797. </li>
  4798. </ul>
  4799. </div>
  4800. <div class="viewWrap viewWidth">
  4801. <div class="option viewWidth">
  4802. <div class="viewSize" name="LAN_683" title="" >
  4803. <span class="txt" id="viewSizeSlider">50</span>
  4804. <img src="/resources/img/btn_r00_N.gif" class="btn down" onMouseUp="viewsizedown()" title="" id="id_view_smaller"/>
  4805. <div class="slider">
  4806. <div class="sliderBg">
  4807. <div class="sliderFull">Slider Full</div>
  4808. <img src="/resources/img/sliderBall_N.png" class="ball" title="" id="id_view_resize" />
  4809. </div>
  4810. </div>
  4811. <img src="/resources/img/btn_r01_N.gif" class="btn up" onMouseUp="viewsizeup()" title="" id="id_view_larger"/>
  4812. </div>
  4813. <ul class="btnList">
  4814. <li><img src="/resources/img/btn_r02_N.gif" title="" id="id_fullscreen" name="LAN_684" title="" class="btn" onMouseDown="on_fullscreen()"/></li>
  4815. <li name="li_motionline"><img src="/resources/img/optionLine.gif"/></li>
  4816. <li name="li_motion"><div name="LAN_039" title="" ><img name="img_motion" src="/resources/img/btn_r13_N.gif" title="" id="id_motion"/></div></li>
  4817. <li name="li_sensorline"><img src="/resources/img/optionLine.gif"/></li>
  4818. <li name="li_sensor1"><div name="LAN_154" title="" ><img name="img_sensor1" src="/resources/img/btn_r03_N.gif" title="" id="id_sensor1"/></div></li>
  4819. <li name="li_sensor2"><div name="LAN_154" title="" ><img name="img_sensor2" src="/resources/img/btn_r04_N.gif" title="" id="id_sensor2"/></div></li>
  4820. <li name="li_sensor3"><div name="LAN_154" title="" ><img name="img_sensor3" src="/resources/img/btn_r05_N.gif" title="" id="id_sensor3"/></div></li>
  4821. <li name="li_sensor4"><div name="LAN_154" title="" ><img name="img_sensor4" src="/resources/img/btn_r06_N.gif" title="" id="id_sensor4"/></div></li>
  4822. <li name="li_sensor5"><div name="LAN_154" title="" ><img name="img_sensor5" src="/resources/img/btn_r18_N.gif" title="" id="id_sensor5"/></div></li>
  4823. <li name="li_alarmline"><img src="/resources/img/optionLine.gif"/></li>
  4824. <li name="li_alarm1"><div name="LAN_162" title="" ><img name="img_alarm1" src="/resources/img/btn_r07_N.gif" title="" id="id_alarm1" onMouseOver="on_mouseover(1)" onMouseDown="on_mousedown(1)" onMouseUp="on_mouseover(1)" onMouseLeave="on_mouseleave(1)"/></div></li>
  4825. <li name="li_alarm2"><div name="LAN_162" title="" ><img name="img_alarm2" src="/resources/img/btn_r08_N.gif" title="" id="id_alarm2" onMouseOver="on_mouseover(2)" onMouseDown="on_mousedown(2)" onMouseUp="on_mouseover(2)" onMouseLeave="on_mouseleave(2)"/></div></li>
  4826. <li name="li_alarm3"><div name="LAN_162" title="" ><img name="img_alarm3" src="/resources/img/btn_r09_N.gif" title="" id="id_alarm3" onMouseOver="on_mouseover(3)" onMouseDown="on_mousedown(3)" onMouseUp="on_mouseover(3)" onMouseLeave="on_mouseleave(3)"/></div></li>
  4827. <li name="li_alarm4"><div name="LAN_162" title="" ><img name="img_alarm4" src="/resources/img/btn_r10_N.gif" title="" id="id_alarm4" onMouseOver="on_mouseover(4)" onMouseDown="on_mousedown(4)" onMouseUp="on_mouseover(4)" onMouseLeave="on_mouseleave(4)"/></div></li>
  4828. <li><img src="/resources/img/optionLine.gif"/></li>
  4829. <li><div name="LAN_248" title="" ><img src="/resources/img/btn_r11_N.gif" id="id_snapshot" class="btn" onMouseDown="on_snapshot()" title=""/></div></li>
  4830. <li name="li_talkline"><img src="/resources/img/optionLine.gif"/></li>
  4831. <li name="li_talk"><div name="LAN_249" title="" ><img name="img_talk" src="/resources/img/btn_r12_N.gif" id="id_talk" class="btn" onMouseOver="on_mouseover(6)" onMouseDown="on_mousedown(6)" onMouseUp="on_mouseover(6)" onMouseLeave="on_mouseleave(6)" title=""/></div></li>
  4832. <li name="li_speaker"><div title=""><img name="img_speaker" src="/resources/img/btn_r21_N.png" id="id_speaker" class="btn" onMouseOver="on_mouseover(7)" onMouseDown="on_mousedown(7)" onMouseUp="on_mouseover(7)" onMouseLeave="on_mouseleave(7)" title=""/></div></li>
  4833. <li name="li_optionline"><img src="/resources/img/optionLine.gif"/></li>
  4834. <li name="li_record"><div name="LAN_321" title="" ><img name="img_record" src="/resources/img/btn_r14_N.gif" title="" id="id_record"/></div></li>
  4835. <li name="li_shock"><div name="LAN_321" title="" ><img name="img_shock" src="/resources/img/btn_r20_N.gif" title="" id="id_shock"/></div></li>
  4836. <li name="li_wiper"><div name="LAN_321" title="" ><img name="img_wiper" src="/resources/img/btn_r19_N.gif" title="" id="id_wiper"/></div></li>
  4837. </ul>
  4838. <div class="buffering" name="LAN_685" id="id_buffering" title="">
  4839. <span class="txt" id="bufferingSlider">50</span>
  4840. <img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="bufferdown()" title="" id="id_buffer_down"/>
  4841. <div class="slider">
  4842. <div class="sliderBg">
  4843. <div class="sliderFull">Slider Full</div>
  4844. <img src="/resources/img/sliderBall_N.png" class="ball" title="" id="id_buffer_resize"/>
  4845. </div>
  4846. </div>
  4847. <img src="/resources/img/btn_r17_N.gif" class="btn up" onMouseDown="bufferup()" title="" id="id_buffer_up"/>
  4848. </div>
  4849. </div>
  4850. <center>
  4851. <div style="position:relative" name="resizediv">
  4852. <div style="position:absolute" class="view" id="viewobject">
  4853. <!-- <object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs" width="720" height="405" codebase="/rel/webViewer.cab#Version=1,6,54,470"></object> //-->
  4854. </div>
  4855. <div style="position:relative; z-index: 1" id="canvasDiv" oncontextmenu="return false;"></div>
  4856. </div> <!-- resizediv -->
  4857. <div id="vxgwsplayer_audiocontroller" style="width: 960px; display: none;">
  4858. <div class="vxgwsplayer-controls" style="position: relative">
  4859. <div id="vxgwsplayer_vol" style="width: 21px; height: 21px; margin-top: 7px; margin-left: 10px; cursor: pointer; float: left; display: inline-block; background: url(/resources/img/vol_mute.png); background-size: contain;" onclick="vxgwsplayer_volume_mute();"></div>
  4860. </div>
  4861. </div>
  4862. </center>
  4863. <div class="viewWrap directionCam viewWidth" style="width:1400px; height:220px; margin-bottom:20px">
  4864. <div class="view_detection_table" style="position:relative; " name="resizedivViewTable">
  4865. <div id="detection_table">
  4866. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  4867. <tbody><tr>
  4868. <!-- <td id="detection_cam4_0" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_0"></div></td>
  4869. <td id="detection_cam4_1" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_1"></div></td>
  4870. <td id="detection_cam4_2" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_2"></div></td>
  4871. <td id="detection_cam4_3" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_3"></div></td> -->
  4872. <td id="detection_cam4_0" style="width:320px; height:180px;">
  4873. <div style="position:absolute;left:0px;top:15px; z-index: 0" class="view" id="viewobjectArray4_0"></div>
  4874. <div style="position:absolute;left:0px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam0" oncontextmenu="return false;"></div>
  4875. <div style="position:absolute;left:0px;top:15px; z-index: 2" id="canvasDiv_DetectionCam0" oncontextmenu="return false;"></div>
  4876. </td>
  4877. <td id="detection_cam4_1" style="width:320px; height:180px;">
  4878. <div style="position:absolute;left:330px;top:15px; z-index: 0" class="view" id="viewobjectArray4_1"></div>
  4879. <div style="position:absolute;left:330px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam1" oncontextmenu="return false;"></div>
  4880. <div style="position:absolute;left:330px;top:15px; z-index: 2" id="canvasDiv_DetectionCam1" oncontextmenu="return false;"></div>
  4881. </td>
  4882. <td id="detection_cam4_2" style="width:320px; height:180px;">
  4883. <div style="position:absolute;left:660px;top:15px; z-index: 0" class="view" id="viewobjectArray4_2"></div>
  4884. <div style="position:absolute;left:660px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam2" oncontextmenu="return false;"></div>
  4885. <div style="position:absolute;left:660px;top:15px; z-index: 2" id="canvasDiv_DetectionCam2" oncontextmenu="return false;"></div>
  4886. </td>
  4887. <td id="detection_cam4_3" style="width:320px; height:180px;">
  4888. <div style="position:absolute;left:990px;top:15px; z-index: 0" class="view" id="viewobjectArray4_3"></div>
  4889. <div style="position:absolute;left:990px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam3" oncontextmenu="return false;"></div>
  4890. <div style="position:absolute;left:990px;top:15px; z-index: 2" id="canvasDiv_DetectionCam3" oncontextmenu="return false;"></div>
  4891. </td>
  4892. </tr>
  4893. </tbody></table>
  4894. </div>
  4895. </div>
  4896. <div class="view_detection_table" style="position:relative; margin-top:20px" name="ShowHidBtns" id="ShowHidBtns">
  4897. <span >
  4898. <button type="button" name="ShowHideDirectionBtn" id="ShowHideDirectionBtn" class="btn_pos" style="width: 200px; right: 446px; display:none;" onclick="on_show_hide_directioncam()"><span class="LAN_1068"></span></button>
  4899. <button type="button" name="LiveOrJPGBtn" id="LiveOrJPGBtn" class="btn_pos" style="width: 200px; right: 446px; display:none;" onclick="on_live_jpg_directioncam()"><span class="LAN_1070"></span></button>
  4900. </span>
  4901. </div>
  4902. <div class="view_detection_table" style="position:relative; margin-top:20px; display:none " name="DetectionCamInit_Warning" id="DetectionCamInit_Warning">
  4903. <span class="underLine1 LAN_1071" style="color:Red; "></span>
  4904. <a id="GoDetectionCam" href="/manager/systemdirectioncamera.html">
  4905. <button type="button" name="BtnGoDetectionCam" id="BtnGoDetectionCam" class="btn_pos" style="width: 200px; right: 446px; display:none;" ><span class="LAN_1060"></span></button>
  4906. </a>
  4907. </div>
  4908. </div>
  4909. </div>
  4910. </div>
  4911. </div>
  4912. </div>
  4913. <div style="display:none">
  4914. <input type="text" name="SYS_MODE"></input>
  4915. <input type="text" name="SYS_BOARDID"></input>
  4916. <input type="text" name="SYS_ISIPCAM"></input>
  4917. <input type="text" name="CAM_SONY_PALFLAG"></input>
  4918. <input type="text" name="SYS_MODULE_DETAIL"></input>
  4919. <input type="text" name="SYS_MODULE_TYPE"></input>
  4920. <input type="text" name="SYS_PTZ_TYPE"></input>
  4921. <input type="text" name="VID_INFODISPID"></input>
  4922. <input type="text" name="VID_INFODISPTIME"></input>
  4923. <input type="text" name="VID_INFODISPPOSITION"></input>
  4924. <input type="text" name="SYS_SYSTEMID"></input>
  4925. <input type="text" name="PTZ_ExtPTZUse"></input>
  4926. <input type="text" name="PTZ_ExtPTZCentering"></input>
  4927. <input type="text" name="PTZ_ExtPTZDragandZoom"></input>
  4928. <input type="text" name="SYS_MIN_BRIGHTNESS"></input>
  4929. <input type="text" name="SYS_MAX_BRIGHTNESS"></input>
  4930. <input type="text" name="SYS_MIN_SHARPNESS"></input>
  4931. <input type="text" name="SYS_MAX_SHARPNESS"></input>
  4932. <input type="text" name="SYS_MIN_SATURATION"></input>
  4933. <input type="text" name="SYS_MAX_SATURATION"></input>
  4934. </div>
  4935. <div id="presetlabel" style="display:none">
  4936. </div>
  4937. </form>
  4938. </body>
  4939. </html>