
var host;
var root;

function loaded(sender, args)
{
  host = sender.getHost();
  root = sender;
  window.onresize = resize;
  resize();
}

function resize()
{
  var height;

  if (navigator.userAgent.indexOf("MSIE")==-1)
  {
    // need to set the control's height
    height =  document.body.clientHeight;
    document.wpfeControl1.height = height;
  }
  else
  {
    height = host.ActualHeight;
  }

  var width = host.ActualWidth;

  var scale = root.findName("root_scale");
  scale.ScaleX = width / 100;
  scale.ScaleY = height / 110;
}

function handleParseError(line, col, hr, string)
{
	alert(string + " at: " + line + ", " + col);
}