OpenCores
URL https://opencores.org/ocsvn/cpu8080/cpu8080/trunk

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [cpu8080_html/] [fit/] [leftnav.js] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 samiam9512
var noAppletOnClicked = 1;
2
var appletMsg = "";
3
var waitWin;
4
var oldIn =  oldOut = oldGbl = oldIsp = oldVcc = oldGnd = oldProhibit = oldUnuse = oldNc = 1;
5
var oldInfo = oldWarn = oldError = 1;
6
var verbose = 0;
7
var dispPage, mapLogPage, mapInPage, unLogPage, unInPage;
8
var javaPermission = 0;
9
var abelEqn = vhdlEqn = verEqn = "";
10
 
11
function IsNS() {
12
  return ((navigator.appName.indexOf("Netscape") >= 0) &&
13
          (parseFloat(navigator.appVersion) >= 4)) ? true : false;
14
}
15
 
16
function openWait() {
17
  waitWin = window.open("wait.htm", "wait",
18
                        "toolbar=no,location=no,"+
19
                        "directories=no,status=no,menubar=no,scrollbars=no,"+
20
                        "resizable=no,width=300,height=50" );
21
}
22
 
23
function closeWait() { if (waitWin) waitWin.close(); }
24
 
25
function popHTML(name, str) {
26
  document.options.htmlStr.value = str;
27
  if (name.indexOf(":") > -1)
28
    name = name.substring(0,name.indexOf(":")) + "_COLON_" +
29
           name.substring(name.indexOf(":")+1,name.length);
30
  if (name.indexOf(".") > -1)
31
    name = name.substring(0,name.indexOf(".")) + "_DOT_" +
32
           name.substring(name.indexOf(".")+1,name.length);
33
  var win = window.open("result.htm", "win_"+name,
34
                        "toolbar=no,location=no,"+
35
                        "directories=no,status=no,menubar=no,scrollbars=yes,"+
36
                        "resizable=yes,width=300,height=200" );
37
  win.focus();
38
}
39
 
40
function setAppletPermission() { appletPermission = 1; }
41
function getAppletPermission() { return( appletPermission); }
42
function getAppletMsg() { return(appletMsg); }
43
function setAppletMsg(msg) { appletMsg = msg; }
44
 
45
 
46
function showHTML(page, html) {
47
 
48
      dispPage = html;
49
      document.options.currPage.value = page;
50
      parent.content.location.href = html;
51
}
52
 
53
function showTop() { showHTML(document.options.currPage.value, dispPage); }
54
 
55
function setVerbose(value) { verbose = value; }
56
 
57
function showLegend(url, w, h) {
58
  if (verbose == 1) {
59
    url = url.substring(0,name.indexOf(".htm")) + "V.htm";
60
  }
61
  var win = window.open(url, 'win',
62
              'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h);
63
  win.focus();
64
}
65
 
66
function showSummary()    { showHTML("summary", "summary.htm"); }
67
function showOptions()    { showHTML("options", "options.htm"); }
68
function showFBSum()      { showHTML("fbs", "fbs.htm"); }
69
function showFB(fb)       { showHTML("fbs_FB", "fbs_"+fb+".htm"); }
70
function showPinOut()     { showHTML("pins", "pins.htm"); }
71
function showError()      { showHTML("errors", "errs.htm"); }
72
function showFailTable()  { showHTML("failtable", "failtable.htm"); }
73
 
74
function showEqnAll()     {
75
  openWait();
76
  parent.eqns.setOper(currEqnType);
77
  if (currEqnType == defEqnType) showHTML("equations", "defeqns.htm");
78
  else if (currEqnType == 0) {
79
    if (abelEqn == "") abelEqn = parent.eqns.getEqnList();
80
    document.options.htmlStr.value = abelEqn;
81
    showHTML("equations", "equations.htm");
82
  }
83
  else if (currEqnType == 1) {
84
      if (vhdlEqn == "") vhdlEqn = parent.eqns.getEqnList();
85
      document.options.htmlStr.value = vhdlEqn;
86
      showHTML("equations", "equations.htm");
87
  }
88
  else {
89
      if (verEqn == "") verEqn = parent.eqns.getEqnList();
90
      document.options.htmlStr.value = verEqn;
91
      showHTML("equations", "equations.htm");
92
  }
93
  closeWait();
94
}
95
 
96
function showEqn(sig)     {
97
  popHTML(sig, parent.eqns.getEqn(sig));
98
}
99
 
100
function showPterm(pterm, type) {
101
  popHTML(pterm, parent.eqns.getPterm(pterm, type));
102
}
103
 
104
function showAscii() { showHTML("ascii", "ascii.htm"); }
105
 
106
function showHelp() {
107
  var helpDoc = document.options.currPage.value + "doc.htm";
108
  popWin(helpDoc);
109
}
110
 
111
function getMapParam(type) {
112
  var paramStr = "";
113
  switch(type) {
114
    case 1: paramStr  += "10"; break;
115
    case 2: paramStr  += "01"; break;
116
    case 3: paramStr  += "11"; break;
117
    case 4: paramStr  += "02"; break;
118
    case 5: paramStr  += "12"; break;
119
    default: paramStr += "00";
120
  }
121
 
122
  return paramStr;
123
}
124
 
125
function showMappedLogics(type) {
126
  showHTML("maplogic", "maplogic_" + getMapParam(type) + ".htm");
127
}
128
 
129
function showMappedInputs(type) {
130
  showHTML("mapinput", "mapinput_" + getMapParam(type) + ".htm");
131
}
132
 
133
function showUnMappedLogics(type) {
134
  showHTML("unmaplogic", "unmaplogic_" + getMapParam(type) + ".htm");
135
}
136
 
137
function showLogicLeft()  { showHTML("logicleft", "logicleft.htm"); }
138
 
139
function showUnMappedInputs(type) {
140
  showHTML("unmapinput", "unmapinput_" + getMapParam(type) + ".htm");
141
}
142
 
143
function showInputLeft()  { showHTML("inputleft", "inputleft.htm"); }
144
 
145
function doEqnFormat() {
146
  var type = document.options.eqnType.options[document.options.eqnType.options.selectedIndex].value;
147
  currEqnType = type;
148
  parent.eqns.setOper(currEqnType);
149
  if (document.options.currPage.value == "equations") showEqnAll();
150
}
151
 
152
function showNoAppletAlert() {
153
  window.alert("No Applet supported for this session!!!");
154
}
155
 
156
function showAppletMC(mc) {
157
  if (parent.applets) parent.applets.showAppletGraphicMC(mc);
158
  else showNoAppletAlert();
159
}
160
 
161
function showAppletFB(fb) {
162
  if (parent.applets) parent.applets.showAppletGraphicFB(fb);
163
  else showNoAppletAlert();
164
}
165
 
166
function showAppletPin(pin)  {
167
  if (parent.applets) parent.applets.showAppletGraphicPin(pin);
168
  else showNoAppletAlert();
169
}
170
 
171
function printAppletPkg() {
172
  if (parent.applets) parent.applets.printAppletPkg();
173
  else showNoAppletAlert();
174
}
175
 
176
function popWin(url) {
177
  var win = window.open(url, 'win',
178
              'location=yes,directories=yes,menubar=yes,toolbar=yes,status=yes,scrollbars=yes,resizable=yes,width=800,height=600');
179
  win.focus();
180
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.