var myWidth = 0, myHeight = 0;
var targetHeight = 0;
//782 436 .557545
//  1.7936
function showPage(page,scrollbars,width,height){
	getWid();
var load = window.open(page,'','scrollbars=' + scrollbars + ',menubar=no,height=' + (targetHeight-50) + ',width=' + myWidth + ',resizable=no,toolbar=no,location=no,status=no');
}


function getWid(){
  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;
	} else {
		myWidth = 782;
		myHeight = 436;
	}
	targetHeight = parseInt(myWidth * .557544757);
	//alert("Width was " + myWidth + " so targetHeight is " + targetHeight);
	if (targetHeight > myHeight){
		myWidth = parseInt(myHeight * 1.7936);
		//alert("Out of bounds,height is only " + myHeight + "  so width changed to " + myWidth);
	}
	if (targetHeight < myHeight){
		myHeight = targetHeight;
	}
	if (myWidth < 782 || targetHeight < 436){
		myWidth = 782;
		myHeight = 436;
		targetHeight = 436;
	}
	//myWidth = 782;
	//myHeight = 436;
	//targetHeight = 436;
}
