function getById(id) {
       return document.getElementById?document.getElementById(id):(document.all?document.all(id):null); }

var css = '<style type="text/css">' + 
'#pm_c {font-family:sans-serif !important; width:170px;height:130px; border:solid 1px #000; font-size:12px;color:#000000;background: #ffffff;}' +
'#pm_c .h1 {background-color:#b04e16; color:#fff;}' +
'#pm_c h1#hd { background-color:#b04e16; color:#fff; font-size:13px; padding:3px 0 3px 0px; margin-top:0; margin-bottom:0;}' +
'#pm_c h1#hd a { font-family:sans-serif !important; font-weight:bold; text-decoration: none;color:#fff; }' +
'#pm_c #nav img { border:0;right:5px; margin-top:10px;}' +
'#pm_c ul{display:inline !important; padding: 0; margin: 0 !important; }' +
'#pm_c #nav,#pm_c #nav ul { padding: 0; margin: 0; list-style: none; position:relative; float:right;}' +
'#pm_c #nav a {text-decoration:none; padding:30px 5px 30px 15px}' +
'#pm_c #nav li {list-style: none; display:inline; color:#ffffff; width:30px;}' +
'' +
'#pm_c #nav li ul { list-style: none; position: absolute; top:21px; background: #efefef;  width: 140px; left: -999em; }' +
'' +
'' +
'' +
'#pm_c #nav li:hover ul, #pm_c #nav li.over ul{background: #efefef; color:#000 ;left:-109px; padding-right:0px}' +
'#pm_c #nav li.sfhover ul { background: #efefef; left:-108px;}' +
'' +
'#pm_c #nav li ul li  {list-style: none;  list-style-image:none !important; width:140px; line-height:1.5em; border-bottom: solid 1px #ccc !important;  }' +
'#pm_c #nav li ul li  {  list-style-image:none !important; margin-left:0 !important; padding:0}' +
'#pm_c #nav ul li:hover, #pm_c #nav li ul li.over{   background: #b04e16; }' +
'#pm_c #nav li:hover ul li a{ text-decoration: none; padding:0; display:inline-block; width:140px!important; color:#000000!important;}' +
'#pm_c #nav li:hover ul li a:hover, #pm_c #nav li.over ul li a.over { background: #b04e16;  color:#ffffff !important;}' +
'#pm_c #nav li.sfhover ul li {background: #efefef;} ' +
'</style><!--[if gte IE 7]><style type="text/css">' +
'#pm_c #nav li ul li{ margin-left:-2px !important; padding-left:5px}' +
'#pm_c #nav li ul { top:15px; }' +
'#pm_c #nav li ul li a  { text-decoration: none;  padding:2px 5px;color:#000000;}' +
'#pm_c #nav li.sfhover ul { background: #efefef !important; left:-110px !important;} ' +
'</style><![endif]--><!--[if IE 6]><style type="text/css">' +
'#pm_c #nav li ul {top:18px; }' +
'#pm_c #nav li ul li{  margin-left:-2px !important;}' +
'#pm_c #nav li ul li a {padding:2px 5px;}' +
'</style><![endif]-->';

sfHover = function() {
  var sfEls = getById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover"; }; sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover"), " "); }; }; };
if (window.attachEvent) window.attachEvent("onload", sfHover);


function _pm_form(act){
  var f = '<div id="master" style="padding:5px; margin-top:0; padding-top:0;">'; f += '<form action="'+act+'#loan-calculator" method="post" target="_blank" style="margin-top:10px;">'; f += '<fieldset style="margin:0; padding:0; border:0;"><input type="text" id="amount" name="amount" size="6" value="10000" style="float:right;"/><label for="amount" id="amount_label">Amount (&pound;)</label><br style="clear:right;"/><input type="text" id="apr" name="apr" size="6" value="8" style="float:right;"/><label for="apr" id="apr_label">APR (%)</label><br style="clear:right;"/><input type="text" id="term" name="term" size="4" value="60" style="float:right;"/><label for="term" id="term_label">Term (months)</label><div style="clear:both; text-align:center;"><input type="submit" name="submit" value="Calculate" style="margin-top:10px; font-size:smaller;"/></div></fieldset></form>';f += '</div>'; return  f;};






