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:
BidAsk
EUR342.2353.0
USD276.0290.0
GBP442.0450.0
CHF268.0272.9
"; document.writeln(html); } defineStyle(); showHTML();