﻿// JScript File

function resize_divs(){
	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; // : object = new string;
	if(document.getElementById("dvSite")){
	newheight=parseInt(height-document.getElementById("dvSite").offsetTop-183)+"px";
	//if ((document.getElementById("dvSite").style.height) < 350){  //minimum 
		document.getElementById("dvSite").style.height=newheight;
		//}
	}
	if(document.getElementById("dvGrayManual")){
	newheight=parseInt(height-document.getElementById("dvGrayManual").offsetTop-183)+"px";
	//if ((document.getElementById("dvGrayManual").style.height) < newheight){
		document.getElementById("dvGrayManual").style.height=newheight;
		//}
	}
	if(document.getElementById("SearchHelp")){
	newheight=parseInt(height-document.getElementById("SearchHelp").offsetTop-183)+"px";
	//if ((document.getElementById("SearchHelp").style.height) < newheight){
		document.getElementById("SearchHelp").style.height=newheight;
		}
	//}
}
// this will resize the iframe every time the size of the window is changed
window.onload=resize_divs;
window.onresize=resize_divs;
//-->
