function creat_login() { var ST=1; var AppendStr=''; AppendStr+='
Login'; AppendStr+='
'; AppendStr+='Username'; AppendStr+=''; AppendStr+='Password'; AppendStr+=''; AppendStr+=''; AppendStr+='
'; AppendStr+='
'; AppendStr+='Large Installation ?'; AppendStr+='The Atlona management System (AMS) can assist:'; AppendStr+='•    Automatic Atlona device discovery'; AppendStr+='•    Multi device configuration and Management'; AppendStr+='•    Manage and automate firmware updates'; AppendStr+='•    Alerts and event logging'; AppendStr+='•    Free to download and use'; AppendStr+=''; AppendStr+=''; AppendStr+='
'; $('#All_body').html(AppendStr); $('#send').mouseover(function(){ $(this).css('background','#F68428'); }).mouseleave(function(){ if($(this).hasClass('othsave_down')) $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); }).mousedown(function(){ $(this).removeClass('othsave').addClass('othsave_down'); }).mouseup(function(){ $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); (($('#usr').val().length<=0)||($('#psw').val().length<=0))?login_ur=0:setRS232('check_login',$('#usr').val(),$('#psw').val()); }); $('#usr,#psw,#send').keyup(function(e){ if(e.keyCode==13) { $('#send').trigger("mouseup"); } }); } function creat_info() { var AppendStr=''; var top_leg=60; AppendStr+='
Info'; for(var i=0; iOutput '+(j+1)+' '+info_obj[i]+' :'; AppendStr+=''+info_val[i][j]+''; top_leg+=30; } } else { AppendStr+=''+info_obj[i]+' :'; AppendStr+=''+info_val[i]+''; top_leg+=30; } } AppendStr+='
'; $('#All_body').html(AppendStr); } function creat_rs232() { var param_obj=['Console']; var param_id=['CSpara']; var AppendStr=''; var top_leg=60; AppendStr+='
RS-232'; AppendStr+='RS-232 Parameter Setting'; for(var i=0; i'+param_obj[i]+''; top_leg+=30+(i*150); for(var j=0; j'+rs232_obj[j]+''; AppendStr+=''; top_leg+=30; } AppendStr+=''; top_leg=60; } AppendStr+='
'; $('#All_body').html(AppendStr); for(var i=0; i'+rs232_val[idx][i]+''; } return objStr; } for(var i=0; i'; } AppendStr+=''; AppendStr+='INT Edid settings'; AppendStr+=''; AppendStr+='Edid copy'; AppendStr+=''; AppendStr+=''; $('#All_body').html(AppendStr); $('#edid_lock').switchbutton({ checkedLabel:'Lock', uncheckedLabel:'Unlock' }).change(function(){ edid_lock=$(this).prop("checked")?1:0; if(!edid_lock_s) { setRS232(edid_lock_cmd[edid_lock]); } else { edid_lock_s=0; } check_lock(0,edid_lock); }); $('#EDIDSW').change(function(){ var IDStr=$(this).attr('id'); var emode=0; setRS232(IDStr,EDIDSW_send[$(this).val()]); emode = parseInt($(this).val(),10); if(emode){ $('#EDIDMSet').attr('disabled','disabled'); } else{ $('#EDIDMSet').removeAttr('disabled'); } }); $('#EDIDMSet').change(function(){ var IDStr=$(this).attr('id'); setRS232(IDStr,$(this).val()); }); $('#EDIDCopy').mouseover(function(){ $(this).css('background','#F68428'); }).mouseleave(function(){ if($(this).hasClass('othsave_down')) $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); }).mousedown(function(){ $(this).removeClass('othsave').addClass('othsave_down'); }).mouseup(function(){ var IDStr=$(this).attr('id'); $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); setRS232(IDStr); }); } function creat_conf() { var AppendStr=''; AppendStr+='
Configuration'; AppendStr+='
'; AppendStr+='Web & Telnet Login Settings'; AppendStr+='Old Username'; AppendStr+=''; else AppendStr+='">'; AppendStr+='Old Password'; AppendStr+=''; AppendStr+='New Username'; AppendStr+=''; else AppendStr+='">'; AppendStr+='New Password'; AppendStr+=''; AppendStr+='Confirm New Password'; AppendStr+=''; AppendStr+=''; if(login_ur==1) { AppendStr+='All User Login Settings'; AppendStr+='
'; AppendStr+=''; for(var i=0; i'+con_table_obj[i]+''; AppendStr+=''; AppendStr+=''; AppendStr+=''; AppendStr+='
'; } AppendStr+='
'; $('#All_body').html(AppendStr); if(login_ur==1) { for(var i=0; iPlease type Old Username!'); setTimeout('$("#smsg").fadeOut();',3000); return; } if(($('#ousr').val()=='root')&&(login_ur>1)) { $('#show_msg').html("
Old Username can't type 'root'!
"); setTimeout('$("#smsg").fadeOut();',3000); return; } if(($('#ousr').val()=='ROOT')&&(login_ur>1)) { $('#show_msg').html("
Old Username can't type 'ROOT'!
"); setTimeout('$("#smsg").fadeOut();',3000); return; } if($('#opsw').val()=='') { $('#show_msg').html('
Please type Old Password!
'); setTimeout('$("#smsg").fadeOut();',3000); return; } if($('#nusr').val()=='') { $('#show_msg').html('
Please type New Username!
'); setTimeout('$("#smsg").fadeOut();',3000); return; } if(($('#nusr').val().substr(0,4)=='root')&&(login_ur>1)) { $('#show_msg').html("
New Username can't type 'root'!
"); setTimeout('$("#smsg").fadeOut();',3000); return; } if(($('#nusr').val().substr(0,4)=='ROOT')&&(login_ur>1)) { $('#show_msg').html("
New Username can't type 'ROOT'!
"); setTimeout('$("#smsg").fadeOut();',3000); return; } if($('#npsw').val()=='') { $('#show_msg').html('
Please type New Password!
'); setTimeout('$("#smsg").fadeOut();',3000); return; } if($('#npsw').val()!=$('#cnpsw').val()) { $('#show_msg').html('
Please Check New Password or Confirm New Password!
'); setTimeout('$("#smsg").fadeOut();',3000); return; } setRS232('ChangeUP',$('#ousr').val(),$('#opsw').val(),$('#nusr').val(),$('#npsw').val()); }); function set_table(idx) { $('#addgo').append( $('').append( $('').html('
'+usr[idx]+'
'), $('').html('
'+pwd[idx]+'
'), $('').html( $('').attr("type","button") .attr("value",((usr[idx]=='')?'Add':'Edit')) .attr("id","edit"+idx) .css({"margin-left":"10px","width":"80px","height":"24px"}) .click(function(){ var IDStr=parseInt($(this).attr('id').slice($(this).attr('id').length-1,$(this).attr('id').length),10); creat_tabledialog(IDStr); }) ), $('').html( $('').attr("type","button") .attr("value","Remove") .attr("id","del"+idx) .attr('disabled',chk_FT[((usr[idx]=='')?0:1)]) .css({"margin-left":"10px","width":"80px","height":"24px"}) .click(function(){ var IDStr=parseInt($(this).attr('id').slice($(this).attr('id').length-1,$(this).attr('id').length),10); setRS232('IPDelUser',usr[IDStr]); }) ) ) ); } function creat_tabledialog(idx) { var Str=''; Str+='
'; Str+='
'; Str+='Username'; Str+=''; Str+='Password'; Str+=''; Str+='
'; $('#msg').html(Str); $('#table-dialog'+idx).dialog({ autoOpen: false, height:200, width:400, modal: true, buttons:{ 'Save Change':function(){ if($('#ausr').val()=='') { $('#diamsg').html('
Please type Username!
'); setTimeout('$("#diasmsg").fadeOut();',3000); return; } if($('#apsw').val()=='') { $('#diamsg').html('
Please type Password!
'); setTimeout('$("#diasmsg").fadeOut();',3000); return; } if(usr[idx]=='') { setRS232('IPAddUser',$('#ausr').val(),$('#apsw').val()); } else { setRS232('ChangeNUP',usr[idx],pwd[idx],$('#ausr').val(),$('#apsw').val()); } $(this).dialog("close"); }, Cancel: function(){ $(this).dialog("close"); } }, close: function(){ $('#table-dialog'+idx).remove(); } }); $('#table-dialog'+idx).dialog("open"); } } function creat_sys() { var AppendStr=''; AppendStr+='
Network'; AppendStr+='IP Mode:'; AppendStr+='
'; AppendStr+=''; AppendStr+='Netmask:'; AppendStr+=''; AppendStr+='Gateway:'; AppendStr+=''; AppendStr+='Telnet Port:'; AppendStr+=''; AppendStr+=''; AppendStr+='Telnet Login Mode'; AppendStr+='
'; AppendStr+=''; } AppendStr+=''; AppendStr+='Broadcast'; AppendStr+='
'; AppendStr+=''; } AppendStr+=''; AppendStr+='Reset to Default'; AppendStr+=''; AppendStr+='Firmware Update'; AppendStr+='
'; AppendStr+=''; AppendStr+='
'; AppendStr+='Valens Update'; AppendStr+='
'; AppendStr+=''; AppendStr+='
'; AppendStr+='
'; AppendStr+='
CEC'; AppendStr+='Power'; AppendStr+=''; AppendStr+=''; AppendStr+='
'; $('#All_body').html(AppendStr); if(ip_mode) { $('#ip,#sn,#gw').removeAttr('disabled'); } else { $('#ip,#sn,#gw').attr('disabled','disabled'); } $('#ipmode').switchbutton({ checkedLabel:'Static IP', uncheckedLabel:'DHCP' }).change(function(){ ip_mode=$(this).prop("checked")?1:0; if(ip_mode) { $('#ip,#sn,#gw').removeAttr('disabled'); } else { $('#ip,#sn,#gw').attr('disabled','disabled'); } }); $('#IPLogin').switchbutton({ checkedLabel:'ON', uncheckedLabel:'OFF' }).change(function(){ var IDStr=$(this).attr('id'); tel_log=$(this).prop("checked")?1:0; if(!tel_log_s) { setRS232(IDStr,chk_of[tel_log]); } else { tel_log_s=0; } }); $('#Broadcast').switchbutton({ checkedLabel:'ON', uncheckedLabel:'OFF' }).change(function(){ var IDStr=$(this).attr('id'); broad=$(this).prop("checked")?1:0; if(!broad_s) { setRS232(IDStr,chk_of[broad]); } else { broad_s=0; } }); $('#IPTimeout').change(function(){ var IDStr=$(this).attr('id'); setRS232(IDStr, $(this).val()); }); $('#PW').switchbutton({ checkedLabel:'ON', uncheckedLabel:'OFF' }).change(function(){ var IDStr=$(this).attr('id'); PW=$(this).prop("checked")?1:0; if(PW_s) { setRS232(IDStr+chk_Bof[PW]); } else { PW_s=0; } }); $('#Lock_obj').switchbutton({ checkedLabel:'Lock', uncheckedLabel:'Unlock' }).change(function(){ var set_obj=['Unlock','Lock']; Lock_obj=$(this).prop("checked")?1:0; if(!Lock_obj_s) { setRS232(set_obj[Lock_obj]); } else { Lock_obj_s=0; } check_lock(1,Lock_obj); }); $('#BCPW').change(function(){ var send_val=['local','cec','both']; var IDStr=$(this).attr('id'); setRS232(IDStr,send_val[$(this).val()]); }); $('#nwsave,#Mreset,#fwbutton,#vlbutton').mouseover(function(){ $(this).css('background','#F68428'); }).mouseleave(function(){ if($(this).hasClass('othsave_down')) $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); }).mousedown(function(){ $(this).removeClass('othsave').addClass('othsave_down'); }).mouseup(function(){ var IDStr=$(this).attr('id'); $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); if(IDStr=='nwsave') { if($('#tp').val()!=tp) { setRS232("IPPort",$('#tp').val()); } if(ip_mode) { //if(($('#ip').val()!=ip)||($('#sn').val()!=sn)||($('#gw').val()!=gw)) { if(confirm('Are you Sure you want to Change IP Setting?')) { clear_Interval(); show_wait('Setting Network Configuration,Please Wait!'); setRS232("IPStatic", $('#ip').val(), $('#sn').val(),$('#gw').val()); setTimeout('go_staticip("'+$('#ip').val()+'");',10000); } } } else { if(o_ip_mode!=ip_mode) { if(confirm('Are you Sure you want to Set Address Type to DHCP?')) { clear_Interval(); show_wait('Setting Network to DHCP,Please Type New IP On URL, After 10 Seconds!'); setRS232('IPDHCP', 'on'); } } } } else if(IDStr=='Mreset') { if(confirm('Are you Sure want to Reset Device to manufacture default?')) { clear_Interval(); show_wait('Please wait few Seconds,and Type New IP On URL!'); setRS232(IDStr); } } else if(IDStr=='fwbutton') { if(confirm('Are you Sure want to update Firmware?')) { clear_Interval(); show_wait('Updates,Please wait!'); $.ajaxFileUpload ({ url:'action.html', secureuri:false, fileElementId:'fwfile', dataType: 'text', success: function (data, status){ if(parseInt(data,10)) { setTimeout("setinterpage('check_up')",1000); } else { show_wait("Firmware Update Fail!Please check Firmware file!"); } }, error: function (data, status, e){} }) } } else if(IDStr=='vlbutton') { if(confirm('Are you Sure want to update Valens?')) { clear_Interval(); show_wait('Updates,Please wait!'); $.ajaxFileUpload ({ url:'action.html', secureuri:false, fileElementId:'vlfile', dataType: 'text', success: function (data, status){ if(parseInt(data,10)) { setRS232("VLUPGO"); setTimeout("setinterpage('check_up')",53000); } else { show_wait("Valens Update Fail!"); } }, error: function (data, status, e){} }) } } }); $('#TrigCEC_on,#TrigCEC_off').mouseover(function(){ $(this).css('background','#F68428'); }).mouseleave(function(){ if($(this).hasClass('othsave_down')) $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); }).mousedown(function(){ $(this).removeClass('othsave').addClass('othsave_down'); }).mouseup(function(){ var IDStr=$(this).attr('id').slice(8,$(this).attr('id').length); $(this).removeClass('othsave_down').addClass('othsave'); $(this).css('background',''); setRS232('TrigCEC',IDStr); }); }