﻿// JScript File
function resize_iframe(){
	var height, width;
	
	if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    width = window.innerWidth;
    height = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    width = document.documentElement.clientWidth;
    height = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    width = document.body.clientWidth;
    height = document.body.clientHeight;
  }

	//resize the iframe according to the size of the window (all these should be on the same line)
	//var newheight=parseInt(height-document.getElementById("glu").offsetTop-8)+"px";
	//document.getElementById("glu").style.height=newheight;
	//height=600;
	var newheight; // : object = new string;
	if (document.getElementById("tblCellTab") == null)
	{
	//var tabsheight; // height of the tabs - if not visible make the size larger
	//tabsheight = parseInt(document.getElementById("ProductTabs").style.height);
	//25 is the tabs height;
	newheight=parseInt(height-document.getElementById("Iframe1").offsetTop-200 + 28)+"px";
	}
	else
	{
	newheight=parseInt(height-document.getElementById("Iframe1").offsetTop-200)+"px";
	}
	 document.getElementById("Iframe1").style.height=newheight;

}
// this will resize the iframe every
// time you change the size of the window.
window.onload=resize_iframe;
window.onresize=resize_iframe;
//window.onfocus=resize_iframe;

//Instead of using this you can use: 
//	<BODY onresize="resize_iframe()">


//-->
