/**
 * JS iframe provider for partner sites
 * Enter this script where the iframe should appear
 */
var s_location = window.location.toString();
var initial_hash = '#';
if (s_location.indexOf('#') != -1) {
  initial_hash = s_location.substring(s_location.indexOf('#'));
}
if (!initial_hash.length) {
  initial_hash = '#'; // if hash is left blank, it will reload the page
}

var is_url = 'http://rothausmd.infosurge.info/';
is_url = is_url + '?parent_location=' + escape(window.location);

var iframe_height = 500;
document.write('<iframe width="100%" frameborder="0" id="infosurge_iframe" name="infosurge_iframe" src="' + is_url + '" scrolling="no" height="500"></iframe>');

interval = setInterval("resizeInfoSurgeIframe(initial_hash)", 500);
function resizeInfoSurgeIframe(initial_hash) {
  if(window.location.hash) {
    s_location = window.location.toString();
    iframe_height = s_location.substring(s_location.indexOf('#isih')+5);
    if (iframe_height.length && iframe_height > 0) {
      document.getElementById("infosurge_iframe").height = iframe_height;
      window.location.hash = initial_hash;
    }
  }
}
