﻿// JScript File
function healthways()
{
  var pageheight = Math.max(document.body.offsetHeight, document.body.scrollHeight);
  //alert('creating frame');
  try
  {
  //this document.createElement call didn't work in Firefox
  //var frame = document.createElement('<iframe src="http://www.healthways.com/iframe/healthwaysIFrame.html?height=' + pageheight + '" id="inneriframe" width=10 height=10 frameborder=0 />');
  var frame = document.createElement('iframe');
  frame.setAttribute('src','http://www.healthways.com/iframe/healthwaysIFrame.html?height=' + pageheight);
  frame.setAttribute('id','inneriframe');
  frame.setAttribute('width','10');
  frame.setAttribute('height','10');
  frame.setAttribute('frameBorder','0');
  frame.setAttribute('border','0');
  frame.style.display = "none";
  //alert('done with frame');
  //Append to document didn't work in firefox - moved to body
  document.body.appendChild(frame);
  //alert('appended');
  }
  catch(err)
  {
    //alert('error creating');
  }
  
  
  //document.write('<iframe src="http://www.healthways.com/iframe/healthwaysIFrame.html?height=' + pageheight + '" id="inneriframe" width=10 height=10 frameborder=0 />');
}
function healthwaysRedirection()
{
  if (self == top) // outside of iframe, so redirect to the jobs page
	{ 
	//redirect user to actual page with job loaded, create the string
	//var newaddr = "http://www.healthways.com/investors/Default.aspx" + location.search;
	//location.href = newaddr;
	}
  else
    {
        window.onload=healthways;
    }
}

