<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=utf-8'>
<meta name='robots' content='noindex,nofollow'>
<title>[<% ident(); %>] Soft-haus Web Wrapper Page</title>
<link rel='stylesheet' type='text/css' href='/tomato.css'>
<link rel='stylesheet' type='text/css' href='<% nv('web_css'); %>.css'>
<script type='text/javascript' src='tomato.js'></script>
<script type='text/javascript' src='/bwm-common.js'></script>
<style type='text/css'>
.controls {
 width: 90px;
 margin-top: 5px;
 margin-bottom: 10px;
}
</style>
</head>
<body>

<center><p>Soft-haus Tomato Wrapper</p></center><br>

<% iptparse(4,today,today,/jffs/BANDWIDTH,flags=morehostinfo); %>

<script type="text/javascript">

var MZ = (document.getElementById ? true : false);
var IE = (document.all ? true : false);
var winWidth  = IE ? document.body.clientWidth:window.innerWidth;
var winheight = IE ? document.body.clientHeight:window.innerHeight;
var tomatoUI  = IE ? document.all['url_frame'] : document.getElementById('url_frame');

function timedInitData()
{
    var tomatoUIPage = tomatoUI.document || tomatoUI.contentWindow.document;

	window.frames[0].updateSVG = updateSVG;
	window.frames[0].svgReady = 1;
	window.frames[0].initData();
}

function initData()
{
    setTimeout(timedInitData,1000);
}

function insertMenuItem()
{
  var tomatoUIPage = tomatoUI.document || tomatoUI.contentWindow.document;
  var tdNav = tomatoUIPage.getElementById('navi');

  if(typeof tdNav != 'undefined' && tdNav)
  {
      var hrefMenuLink = tdNav.firstChild;
      for(;hrefMenuLink;)
      {
         if(typeof hrefMenuLink.href != 'undefined')
         {
             //alert(hrefMenuLink.href);

             if(hrefMenuLink.href && hrefMenuLink.childNodes[0].data == 'Bandwidth')
             {
                //alert(hrefMenuLink.href);

                if(hrefMenuLink.nextSibling.childNodes[0].data != 'Per Client Usage')
                {
                    var a = document.createElement('a');
                    a.className = 'indent2';
                    a.href = '/ext/dailybandwidthlive.asp';

                    var tn = document.createTextNode('Per Client Usage');
                    a.appendChild(tn);

                    tdNav.insertBefore(a,hrefMenuLink.nextSibling);
                }
                else
                {
                    hrefMenuLink.nextSibling.href = '/ext/dailybandwidthlive.asp';
                }

                //break;
             }
             if(hrefMenuLink.childNodes[0].data != 'Per Client Usage')
             {
                var sHREF = hrefMenuLink.href;
                hrefMenuLink.href = sHREF.replace('/ext','');
             }
         }
         hrefMenuLink = hrefMenuLink.nextSibling;
      }
  }
}

if(IE)
{
  tomatoUI.height = winheight + "px";
  //alert("1" + winheight);
}
else if(MZ)
{
  tomatoUI.height = winheight + "px";
  //alert("2" + winheight + " - " + document.getElementById('url_frame').height);
}

</script>

</body>
</html>
