function ChangeImage(bTrue,obj,i) { if(bTrue==true) { switch(i) { case 1: obj.style.backgroundImage="url('module_12.jpg')"; break; case 2: obj.style.backgroundImage="url('module_22.jpg')"; break; case 3: obj.style.backgroundImage="url('module_32.jpg')"; break; case 4: obj.style.backgroundImage="url('module_42.jpg')"; break; case 5: obj.style.backgroundImage="url('module_52.jpg')"; break; case 11: obj.style.backgroundImage="url('y11.jpg')"; break; case 12: obj.style.backgroundImage="url('y21.jpg')"; break; case 13: obj.style.backgroundImage="url('y31.jpg')"; break; case 14: obj.style.backgroundImage="url('y41.jpg')"; break; case 15: obj.style.backgroundImage="url('y51.jpg')"; break; case 21: obj.style.backgroundImage="url('PresetGo.jpg')"; break; case 22: obj.style.backgroundImage="url('PresetAdd.jpg')"; break; case 23: obj.style.backgroundImage="url('PresetDel.jpg')"; break; case 24: obj.style.backgroundImage="url('CruiseStart.jpg')"; break; case 25: obj.style.backgroundImage="url('CruiseStop.jpg')"; break; case 26: obj.style.backgroundImage="url('CruiseEdit.jpg')"; break; } } else { switch(i) { case 1: obj.style.backgroundImage="url('module_1.jpg')"; break; case 2: obj.style.backgroundImage="url('module_2.jpg')"; break; case 3: obj.style.backgroundImage="url('module_3.jpg')"; break; case 4: obj.style.backgroundImage="url('module_4.jpg')"; break; case 5: obj.style.backgroundImage="url('module_5.jpg')"; break; case 11: obj.style.backgroundImage="url('y1.jpg')"; break; case 12: obj.style.backgroundImage="url('y2.jpg')"; break; case 13: obj.style.backgroundImage="url('y3.jpg')"; break; case 14: obj.style.backgroundImage="url('y4.jpg')"; break; case 15: obj.style.backgroundImage="url('y5.jpg')"; break; case 21: obj.style.backgroundImage="url('PresetGo1.jpg')"; break; case 22: obj.style.backgroundImage="url('PresetAdd1.jpg')"; break; case 23: obj.style.backgroundImage="url('PresetDel1.jpg')"; break; case 24: obj.style.backgroundImage="url('CruiseStart1.jpg')"; break; case 25: obj.style.backgroundImage="url('CruiseStop1.jpg')"; break; case 26: obj.style.backgroundImage="url('CruiseEdit1.jpg')"; break; } } } function slidDisplay(bDisplay) { if(bDisplay) { $('ska').style.display='inline'; $('skb').style.display='inline'; $('skc').style.display='inline'; $('skd').style.display='inline'; } else { $('ska').style.display='none'; $('skb').style.display='none'; $('skc').style.display='none'; $('skd').style.display='none'; } } window.addEvent('domready',function(){ /*List*/ var channel = new Fx.Slide('CtrChannel'); var ptz = new Fx.Slide('CtrPtz'); var color = new Fx.Slide('CtrColor'); var other = new Fx.Slide('CtrOther'); channel.slideIn(); $('ListChannel').style.backgroundImage="url('m_list2.jpg')"; ptz.slideOut(); color.slideOut(); other.slideOut(); slidDisplay(false); $('ListChannel').addEvent('click', function(e){ $('ListChannel').style.backgroundImage="url('m_list2.jpg')"; $('ListPTZ').style.backgroundImage="url('m_list1.jpg')"; $('ListColor').style.backgroundImage="url('m_list1.jpg')"; $('ListOther').style.backgroundImage="url('m_list1.jpg')"; e = new Event(e); channel.slideIn(); ptz.slideOut(); color.slideOut(); other.slideOut(); slidDisplay(false); e.stop(); }); $('ListPTZ').addEvent('click', function(e){ $('ListChannel').style.backgroundImage="url('m_list1.jpg')"; $('ListPTZ').style.backgroundImage="url('m_list2.jpg')"; $('ListColor').style.backgroundImage="url('m_list1.jpg')"; $('ListOther').style.backgroundImage="url('m_list1.jpg')"; e = new Event(e); channel.slideOut(); color.slideOut(); other.slideOut(); ptz.slideIn(); slidDisplay(false); e.stop(); }); $('ListColor').addEvent('click', function(e){ $('ListChannel').style.backgroundImage="url('m_list1.jpg')"; $('ListPTZ').style.backgroundImage="url('m_list1.jpg')"; $('ListColor').style.backgroundImage="url('m_list2.jpg')"; $('ListOther').style.backgroundImage="url('m_list1.jpg')"; e = new Event(e); channel.slideOut(); ptz.slideOut(); other.slideOut(); color.slideIn(); slidDisplay(true); e.stop(); }); $('ListOther').addEvent('click', function(e){ $('ListChannel').style.backgroundImage="url('m_list1.jpg')"; $('ListPTZ').style.backgroundImage="url('m_list1.jpg')"; $('ListColor').style.backgroundImage="url('m_list1.jpg')"; $('ListOther').style.backgroundImage="url('m_list2.jpg')"; e = new Event(e); channel.slideOut(); ptz.slideOut(); color.slideOut(); other.slideIn(); slidDisplay(false); e.stop(); }); /*slid*/ gslda = new Slider($('saa'), $('ska'), { steps:128, onChange:function(step){setcolorsv(2,step);setcolors();} }); gsldb = new Slider($('sab'), $('skb'), { steps:128, onChange:function(step){setcolorsv(2,step);setcolors();} }); gsldc = new Slider($('sac'), $('skc'), { steps:128, onChange:function(step){setcolorsv(3,step);setcolors();} }); gsldd = new Slider($('sad'), $('skd'), { steps:128, onChange:function(step){setcolorsv(4,step);setcolors();} }); inilanguage(); getsetting(); $('ps').value=5; resize(); }); function resize(){ var h=0; h=document.documentElement.clientHeight; w=document.documentElement.clientWidth; if(h<=624) { h=624; } if(w<=804) { $('mDisplay').setStyle('width', 804); } //alert(h); mmDispH=h-61; mmH=mmDispH-71-36; mmW=mmH*64/51; //alert(mmW); mmDispW=mmW+3+3+181; //alert(mmDispW); $('mDisplay').setStyle('height', mmDispH); $('mDisplay').setStyle('width', mmDispW); $('mT').setStyle('width', mmDispW); $('mT2').setStyle('width', mmDispW-26); $('mM').setStyle('width', mmDispW); $('mM').setStyle('height', mmH); $('mM1').setStyle('height', mmH+2); $('mM2').setStyle('height', mmH+2); $('DisplayCtr').setStyle('height', mmH); $('DisplayCtr').setStyle('width', 180); $('DisplayView').setStyle('width', mmW-2); $('DisplayView').setStyle('height', mmH); $('mD').setStyle('width', mmDispW); $('mD2').setStyle('width', mmW-11-2); if(h<=563) { h=563 $('mDisplay').style.marginTop=0; } else { var topHight=h-mmDispH; $('mDisplay').style.marginTop=topHight/2; } } window.addEvent('resize',function() { resize(); }); /* * **********************************************************************gold value********************************************************* */ var g_channelNum=4; var g_bAudio=false; var gExitChannel=new Array(); var gExitSubType=new Array(); var gexiti; var gca=0; var gcb=0; var gcc=0; var gcd=0; var gAutoPlayAll=false; var gHashCookie = new Hash.Cookie('NetSuveillanceWebCookie',{duration: 30}); var settings = { username:'' } function savesetting() { gHashCookie.extend(settings); } var gAutoPlayAll=false; /* * ***************************************************************************login************************************************************ */ function getsetting(){ if (gHashCookie.get('username')) { settings['username'] = gHashCookie.get('username'); } else { settings['username'] = ''; } $('username').setProperty('value', settings['username']); } function tl(s){ var ret; ret=ocx.Translate(s); return ret; } function getcl(){ var t= new Array(); var ts=new Array(); var titles=new Array(); titles[0]=tl('Desktop.LocalRecord'); titles[1]=tl('Desktop.ExtStream'); titles[2]=tl('Desktop.MainStream'); titles[3]=tl('Desktop.StartTalk'); var shtml=""; var strsplita=String.fromCharCode(16); var strsplitb=String.fromCharCode(9); var sc; sc=ocx.GetChannelName(); if (sc !=""){ sc=sc.substr(0, sc.length-1); t=sc.split(strsplita); g_channelNum=t.length; for (var i =0; i" + ts[1] + "" // t[i]=ts; } $("cl").innerHTML=shtml; var ls = $$('#cl li'); } showExit(); showSelectNumb(); } function showSelectNumb() { switch(g_channelNum) { case 1: { $('v4').style.display="none" ; $('v9').style.display="none" ; $('v16').style.display="none" ; $('v25').style.display="none" ; $('v36').style.display="none" ; break; } case 4: { $('v9').style.display="none" ; $('v16').style.display="none" ; $('v25').style.display="none" ; $('v36').style.display="none" ; break; } case 8: { $('v16').style.display="none" ; $('v25').style.display="none" ; $('v36').style.display="none" ; break; } case 16: { $('v25').style.display="none" ; $('v36').style.display="none" ; break; } case 24: { $('v36').style.display="none" ; break; } case 32: { break; } default: break; } } function showExit() { for(var j=1;j