function defineStyle()
{
var normal = 9;
medium = 9;
large = 10;
width = 180;
head = document.getElementsByTagName('head')[0],
style = document.createElement('style'),
rules = document.createTextNode("table.vwx_rates" + width + " { font-family:'Verdana'; font-size: " + normal + "pt; background-color: #F2F2F2; "
+ "color:black; border-width:medium; border-color:#F0F0F0; border-style:outset; padding:3px; } "
+ "th.vwx_rates" + width + " { font-size:" + large + "pt; padding-top:0.5ex; padding-bottom:0.5ex; } "
+ ".vwx_buy { background-color:#FFE0E0 } "
+ ".vwx_sell { background-color:#E0E0FF } "
+ ".vwx_best_buy { font-weight:bold; background-color:#FFA0A0 } "
+ ".vwx_best_sell { font-weight:bold; background-color:#A0A0FF } ");
style.type = 'text/css';
if(style.styleSheet)
style.styleSheet.cssText = rules.nodeValue;
else style.appendChild(rules);
head.appendChild(style);
}
function showHTML()
{
html = "
 |
| Current Rates: |
|---|
| Bid | Ask |
|---|
| EUR | 342.2 | 353.0 |
|---|
| USD | 276.0 | 290.0 |
|---|
| GBP | 442.0 | 450.0 |
|---|
| CHF | 268.0 | 272.9 |
|---|
|
";
document.writeln(html);
}
defineStyle();
showHTML();