// JavaScript Document
function resizeFrame(id, offset) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  var f1 = document.getElementById(id);
  
  if( typeof( window.innerWidth ) == 'number' ) {
	  f1.style.height = "100%";
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	  f1.style.height = (myHeight - offset) + "px";
	  echo("height: " + (myHeight - offset) + "px");
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	  f1.style.height = (myHeight - offset) + "px";
  }
}

function init(page) {
		document.getElementById("detailFrameID").focus();	
		window.open(page, "detailFrame");
		resizeFrame("detailFrame", 20);
}

function detect(path)
{
	if (top.location.href.indexOf("index.html") == -1)
	{
		top.location.href = path;
	}
}
