var eruk = 1.00;
var ereu = 1.17;
var erus = 1.61;
var cuk = (eruk*100).toString();
var ceu = (ereu*100).toString();
var cus = (erus*100).toString();

/* Show an item in a price table by name and prices. */
function show(name,price)
{
  var suk=(price*100).toString();
  var seu=(Math.round(price*ereu*100)).toString();
  var sus=(Math.round(price*erus*100)).toString();
  document.writeln("<TR>"
  +"<TD ALIGN='left' WIDTH='58%'>"+name+"</TD>"
  +"<TD ALIGN='RIGHT' WIDTH='14%'><TT>"+suk.substr(0,suk.length-2)+"."+suk.substring(suk.length-2)+"</TT></TD>"
  +"<TD ALIGN='RIGHT' WIDTH='14%'><TT>"+seu.substr(0,seu.length-2)+"."+seu.substring(seu.length-2)+"</TT></TD>"
  +"<TD ALIGN='RIGHT' WIDTH='14%'><TT>"+sus.substr(0,sus.length-2)+"."+sus.substring(sus.length-2)+"</TT></TD>"
  +"</TR>");
}

/* Start a price table */
function showstart()
{
  document.writeln('<CENTER>');
  document.writeln('<TABLE BORDER WIDTH="80%">');
  document.writeln('<TR BGCOLOR="#BBBBBB">');
  document.writeln('<TD align="left" WIDTH="58%"><FONT FACE="Arial">');
  document.writeln('US dollar and Euro prices will be calculated using the exchange');
  document.writeln('rate at the day of invoicing.');
  document.writeln('</FONT></TD>');
  document.writeln('<TD WIDTH="14%"><FONT FACE="Arial"><B>UK Pounds</B></FONT></TD>');
  document.writeln('<TD WIDTH="14%"><FONT FACE="Arial"><B>Euros</B></FONT></TD>');
  document.writeln('<TD WIDTH="14%"><FONT FACE="Arial"><B>US Dollars</B></FONT></TD>');
  document.writeln('</TR>');
  document.writeln('<script>show("Approximate Exchange Rate (GBP=1.00)",1.00);</script>');
}

/* Heavy bars in price table */
function showbar1(sometext)
{
  document.writeln('<TR><TD align="left" COLSPAN="4" BGCOLOR="#BBBBBB"><FONT FACE="Arial" SIZE="+2">');
  document.writeln(sometext);
  document.writeln('</FONT></TD></TR>');
}

/* Heavy bars in price table, also defines ID=idname */
function showbar1id(idname,sometext)
{
  document.writeln('<TR ID="'+idname+'">');
  document.writeln('<TD align="left" COLSPAN="4" BGCOLOR="#BBBBBB"><FONT FACE="Arial" SIZE="+2">');
  document.writeln(sometext);
  document.writeln('</FONT></TD></TR>');
}

/* Light bar in price table */
function showbar2(sometext)
{
  document.writeln('<TR><TD align="left" COLSPAN="4"><FONT FACE="Arial" SIZE="+1"><I>');
  document.writeln(sometext);
  document.writeln('</I></FONT></TD></TR>');
}

/* Small/Light bar in price table */
function showbar3(sometext)
{
  document.writeln('<TR><TD align="left" COLSPAN="4"><FONT FACE="Arial" SIZE="-1"><I>');
  document.writeln(sometext);
  document.writeln('</I></FONT></TD></TR>');
}

function showbartext(sometext)
{
  document.writeln('<TR><TD align="left" COLSPAN="4"><FONT FACE="Arial">');
  document.writeln(sometext);
  document.writeln('</FONT></TD></TR>');
}

/* End a price table */
function showend()
{
  document.writeln('</TABLE></CENTER>');
}

/* Begin siteLevel HTML Searchbox Code */
function showsearch()
{
  document.writeln('<form method="get" action="http://www.sitelevel.com//query.go" TARGET="_self">');
  document.writeln('<table border="0" cellspacing="0" cellpadding="0" bgcolor="#57626a">');
  document.writeln('  <tr>');
  document.writeln('   <td align="right">');
  document.writeln('     <table cellspacing="0" cellpadding="2" border="0">');
  document.writeln('       <tr>');
  document.writeln('         <td align="right" valign="middle" nowrap>');
  document.writeln('           <input type="hidden" NAME="crid" value="35f9849d0874bafe">');
  document.writeln('           <input type="text" NAME="query" SIZE="17" value="" MAXLENGTH="100">');
  document.writeln('         </td>');
  document.writeln('         <td valign="middle" align="right">');
  document.writeln('           <input type="submit" value="Search" name="B1">');
  document.writeln('         </td>');
  document.writeln('       </tr>');
  document.writeln('     </table>');
  document.writeln('   </td>');
  document.writeln('  </tr>');
  document.writeln('</table>');
  document.writeln('</form>');
  document.writeln('<img src="http://sitelevel.whatuseek.com/htmlbox.go?crid=35f9849d0874bafe" width="1" height="1">');
}
/* End siteLevel HTML Searchbox Code */

/* Other menu packages
Suckerfish http://www.htmldog.com/articles/suckerfish/dropdowns/
Superfish  http://users.tpg.com.au/j_birch/plugins/superfish/
*/

/* This is the MLDDM horizontal menu bar */
function hmenubar()
{
  document.writeln('<div style="background: #57626a; height: 24px; overflow: hidden;">');
  document.writeln('<ul class="mlddm" id="menu1" params="3,-3,500,fade,200,h">');
  document.writeln('<li><A HREF="index.htm">Home</A>');
  document.writeln('  <ul>');
  document.writeln('    <li><a href="ngr.htm">News, Gossip and Rumour</a></li>');
  document.writeln('  </ul>');
  document.writeln('</li>');
  document.writeln('<li><A HREF="info.htm">Services</A>');
  document.writeln('  <ul>');
  document.writeln('    <li><a href="services.htm">Consultancy</a></li>');
  document.writeln('    <li><a href="about.htm">About MPE</a></li>');
  document.writeln('    <li><a href="links.htm">Getting to MPE</a></li>');
  document.writeln('    <li><A HREF="http://www.multimap.com/map/browse.cgi?client=public&search_result=&cidr_client=none&lang=&db=GB&pc=SO155AF&cname=Great+Britain&addr2=&client=public&addr3=">Map</A></li>');
  document.writeln('  </ul>');
  document.writeln('</li>');
  document.writeln('<li><A HREF="software.htm">Software</A>');
  document.writeln('  <ul>');
  document.writeln('    <li><a href="#">VFX Forths for PCs</a>');
  document.writeln('      <ul>');
  document.writeln('        <li><a href="vfxwin.htm">VFX Forth for Windows</a>');
  document.writeln('        <li><a href="vfxmac.htm">VFX Forth for Mac OS X</a>');
  document.writeln('        <li><a href="vfxlinux.htm">VFX Forth for Linux</a>');
  document.writeln('        <li><a href="vfxdos.htm">VFX Forth for DOS</a>');
  document.writeln('      </ul>');
  document.writeln('    </li>');
  document.writeln('    <li><a href="xc7.htm">Cross Compilers</a>');
  document.writeln('      <ul>');
  document.writeln('        <li><a href="xc7.htm">Forth 7</a>');
  document.writeln('        <li><a href="powernet.htm">PowerNet</a>');
  document.writeln('        <li><a href="xc7.htm#f6targets">Forth 6 and Legacy</a>');
  document.writeln('      </ul>');
  document.writeln('    </li>');
  document.writeln('    <li><a href="cross32.htm">CROSS32 assembler</a></li>');
/*
  document.writeln('    <li><a href="xdasm.htm">XDASM disassembler</a></li>');
*/
  document.writeln('    <li><a href="rtx.htm">RTX2000/2010</a></li>');
  document.writeln('    <li><a href="fsk.htm">Legacy Mission CD</a>');
  document.writeln('  </ul>');
  document.writeln('</li>');
  document.writeln('<li><A HREF="hware.htm">Hardware</A>');
  document.writeln('  <ul>');
  document.writeln('    <li><a href="jtagwidget.htm">ARM JTAG Widget</a></li>');
  document.writeln('    <li><a href="usbstamp.htm">USB ARM Stamp</a></li>');
  document.writeln('    <li><a href="nmin2106.htm">NMIN 2106 USB</a></li>');
  document.writeln('    <li><a href="tiniarm.htm">TiniARM</a></li>');
  document.writeln('    <li><a href="ebox.htm">Small Fanless PCs</a></li>');
  document.writeln('  </ul>');
  document.writeln('</li>');
  document.writeln('<li><A HREF="devhware.htm">Tools</A>');
  document.writeln('  <ul>');
  document.writeln('    <li><a href="http://www.conitec.net/english/galep5.php">GALEP-5</a></li>');
  document.writeln('    <li><a href="http://www.hilo-europe.com/html/all_100.htm">Hi-Lo ALL-100</a></li>');
  document.writeln('    <li><a href="promice.htm">PromICE</a></li>');
  document.writeln('  </ul>');
  document.writeln('</li>');
  document.writeln('<li><A HREF="books.htm">Books</A></li>');
  document.writeln('<li><A HREF="arena.htm">Downloads</A></li>');
  document.writeln('<li><A HREF="pricelist.htm">Pricelist</A></li>');
  document.writeln('<li><A HREF="contact.htm">Contact</A></li>');
  document.writeln('</ul>');
  document.writeln('</div>');
}

/* Show time hrs:mins. Does not match surrounding font and line alignment. */
function showtime()
{
  document.writeln('<iframe ');
  document.writeln('  src="http://free.timeanddate.com/clock/i2tn2iul/n136/fn17/tc43c239/pc43c239/bas0/th1/ts1/ta1" ');
  document.writeln('  frameborder="0" width="78" height="19"> ');
  document.writeln('</iframe> ');
}

/* This is the horizontal banner and main menu */
function pagebanner(h1text)
{
  document.writeln('<div id="header">');
  document.writeln('<table border=0 cellspacing=0 cellpadding=0>');
  document.writeln('<tr>');
  document.writeln('  <td width="80%">');
  document.writeln('    <h1>'+h1text+'</h1>');
  document.writeln('    <h2>MPE - <i>More real, less time</i></h2>');
  document.writeln('    <h2>tel: +44 (0)23 8063 1441, from the U.S.A. 901-313-4312 rings in the U.K.');
  document.writeln('    </h2>');
  document.writeln('    <h2>');
  showtime();
  document.writeln('    </h2>');
  document.writeln('  </td>');
  document.writeln('  <td width="20%"><br>');
  showsearch();
  document.writeln('  </td>');
  document.writeln('</table>');
  document.writeln('</div>');
  hmenubar();
}

/* This is the vertical left-hand sidebar */
function vlsidebar()
{
  document.writeln('<div class="left" align="left">');
  document.writeln('<IMG BORDER=0 SRC="gmpelogo.gif" WIDTH=130>');
  document.writeln('<br><br><B><FONT SIZE=+1>');
  document.writeln('MicroProcessor Engineering Limited');
  document.writeln('</FONT>');
  document.writeln('<br/>');
  document.writeln('<I>More real, less time</I>');
  document.writeln('</B>');
  document.writeln('<h2>Sections</h2>');
  document.writeln('<ul>');
  document.writeln('<li><A HREF="index.htm">Main page &amp; What&#039;s new?</A></a></li>');
  document.writeln('<li><A HREF="ngr.htm">News, Gossip and Rumour</A></li>');
  document.writeln('<li><A HREF="info.htm">Information and Services</A></li>');
  document.writeln('<li><A HREF="software.htm">MPE Software</A></li>');
  document.writeln('<li><A HREF="hware.htm">MPE Hardware</A></li>');
  document.writeln('<li><A HREF="devhware.htm">Development Hardware</A></li>');
  document.writeln('<li><A HREF="books.htm">Forth Books</A></li>');
  document.writeln('<li><A HREF="arena.htm">Free Downloads</A></li>');
  document.writeln('<li><A HREF="pricelist.htm">Pricelist</A></li>');
  document.writeln('<li><A HREF="contact.htm">Contact Us or Place an Order</A></li>');
  document.writeln('</ul>');
  document.writeln('<h2>About</h2>');
  document.writeln('<ul>');
  document.writeln('<li><A HREF="about.htm">MPE</A></a></li>');
  document.writeln('<li><A HREF="forth.htm">Forth</A></li>');
  document.writeln('</ul>');
  document.writeln('<h2>Miscellaneous</h2>');
  document.writeln('<ul>');
  document.writeln('<li><A HREF="http://soton.mpeforth.com/flag/">FLAG - Forth Library Action Group</A></li>');
  document.writeln('<li><A HREF="solent.htm">Southampton Services</A></li>');
  document.writeln('<li><A HREF="links.htm#forth">Links</A></li>');
  document.writeln('</ul>');
  document.writeln('</div>');
}

/* Define a name */
function setname(nametext)
{
  document.writeln('<A NAME="' + nametext + '"></A>');
}

