summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--map3.js101
1 files changed, 50 insertions, 51 deletions
diff --git a/map3.js b/map3.js
index a4b3aec..1c47b1a 100644
--- a/map3.js
+++ b/map3.js
@@ -431,64 +431,63 @@ function makeIcon(type) {
function toggleVisible(element) {
var elements = Object();
- if (element=='bad' || element=='middle' || element=='good'){
- document.visibleform.elements["2.4channel"].checked=false;
- document.visibleform.elements["channel1"].checked=false;
- document.visibleform.elements["channel2"].checked=false;
- document.visibleform.elements["channel3"].checked=false;
- document.visibleform.elements["channel4"].checked=false;
- document.visibleform.elements["channel5"].checked=false;
- document.visibleform.elements["channel6"].checked=false;
- document.visibleform.elements["channel7"].checked=false;
- document.visibleform.elements["channel8"].checked=false;
- document.visibleform.elements["channel9"].checked=false;
- document.visibleform.elements["channel10"].checked=false;
- document.visibleform.elements["channel11"].checked=false;
- document.visibleform.elements["channel12"].checked=false;
- document.visibleform.elements["channel13"].checked=false;
- document.visibleform.elements["5channel"].checked=false;
- document.visibleform.elements["undef"].checked=false;
- }
- if (element=='2.4channel'){
- document.visibleform.elements["channel1"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel2"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel3"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel4"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel5"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel6"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel7"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel8"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel9"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel10"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel11"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel12"].checked=document.visibleform.elements["2.4channel"].checked;
- document.visibleform.elements["channel13"].checked=document.visibleform.elements["2.4channel"].checked;
- }
+ // if (element=='bad' || element=='middle' || element=='good'){
+ // document.visibleform.elements["2.4channel"].checked=false;
+ // document.visibleform.elements["channel1"].checked=false;
+ // document.visibleform.elements["channel2"].checked=false;
+ // document.visibleform.elements["channel3"].checked=false;
+ // document.visibleform.elements["channel4"].checked=false;
+ // document.visibleform.elements["channel5"].checked=false;
+ // document.visibleform.elements["channel6"].checked=false;
+ // document.visibleform.elements["channel7"].checked=false;
+ // document.visibleform.elements["channel8"].checked=false;
+ // document.visibleform.elements["channel9"].checked=false;
+ // document.visibleform.elements["channel10"].checked=false;
+ // document.visibleform.elements["channel11"].checked=false;
+ // document.visibleform.elements["channel12"].checked=false;
+ // document.visibleform.elements["channel13"].checked=false;
+ // document.visibleform.elements["5channel"].checked=false;
+ // document.visibleform.elements["undef"].checked=false;
+ // }
+ // if (element=='2.4channel'){
+ // document.visibleform.elements["channel1"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel2"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel3"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel4"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel5"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel6"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel7"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel8"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel9"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel10"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel11"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel12"].checked=document.visibleform.elements["2.4channel"].checked;
+ // document.visibleform.elements["channel13"].checked=document.visibleform.elements["2.4channel"].checked;
+ // }
switch(element) {
- case 'defaultroute': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].defaultroute == '0');"); break;
+ // case 'defaultroute': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].defaultroute == '0');"); break;
case 'offline': elements.overlays = overlays["locations"]; elements.select = new Function("id", "return (locations[overlays['locations'][id].locid].state == 'offline');"); break;
case 'online': elements.overlays = overlays["locations"]; elements.select = new Function("id", "return (locations[overlays['locations'][id].locid].state != 'offline');"); break;
case 'bad': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 6);"); break;
case 'middle': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 3 && links[overlays['links'][id].linkid].value < 6);"); break;
case 'good': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 0 && links[overlays['links'][id].linkid].value < 3);"); break;
case 'tunnel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value == -1);"); break;
- case 'channel1': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '1');"); break;
- case 'channel2': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '2');"); break;
- case 'channel3': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '3');"); break;
- case 'channel4': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '4');"); break;
- case 'channel5': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '5');"); break;
- case 'channel6': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '6');"); break;
- case 'channel7': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '7');"); break;
- case 'channel8': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '8');"); break;
- case 'channel9': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '9');"); break;
- case 'channel10': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '10');"); break;
- case 'channel11': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '11');"); break;
- case 'channel12': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '12');"); break;
- case 'channel13': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '13');"); break;
- case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == 'undef');"); break;
- case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == '2.4');"); break;
- case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence !=='2.4' && links[overlays['links'][id].linkid].frequence !=='undef');"); break;
-
+ // case 'channel1': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '1');"); break;
+ // case 'channel2': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '2');"); break;
+ // case 'channel3': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '3');"); break;
+ // case 'channel4': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '4');"); break;
+ // case 'channel5': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '5');"); break;
+ // case 'channel6': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '6');"); break;
+ // case 'channel7': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '7');"); break;
+ // case 'channel8': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '8');"); break;
+ // case 'channel9': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '9');"); break;
+ // case 'channel10': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '10');"); break;
+ // case 'channel11': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '11');"); break;
+ // case 'channel12': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '12');"); break;
+ // case 'channel13': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '13');"); break;
+ // case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == 'undef');"); break;
+ // case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == '2.4');"); break;
+ // case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence !=='2.4' && links[overlays['links'][id].linkid].frequence !=='undef');"); break;
}
if(document.visibleform.elements[element].checked) {