var minW = 1000;
var minH = 690;
var maxW = 1300;
var maxH = 850;
var winW = 0;
var winH = 0;
var screenH = 0;
var screenW = 0;
var realW = 0;
var realH = 0;
var winHString = "";
var isIE = false;



function getScreenHeightWidth(){
	
	screenW = screen.width;
	screenH = screen.height;
	
	screenH = screenH;
	screenW = screenW;
	
	realH = screenH;	
	realW = screenW;	
	
	//Don't allow winH and W be too small or too large
	if (screenW < minW) {
		screenW = minW;
	} else if (screenW > maxW) {
		screenW = maxW;
	}
	
	if (screenH < minH) {
		screenH = minH;
	} else if (screenH > maxH) {
		screenH = maxH;
	}
	
	//alert('	screenW:' + screenW + '     screenH:' + screenH);
	getWinHeightWidth();
}

function getWinHeightWidth(){
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		winW = window.innerWidth;
		winH = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		isIE = true;
		winW = document.documentElement.clientWidth;
		winH = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		isIE = true;
		winW = document.body.clientWidth;
		winH = document.body.clientHeight;
	}
	
	winW = winW - 1;
	winH = winH - 1;
	
	realH = winH;	
	realW = winW;	
	
	//Don't allow winH and W be too small or too large
	if (winW < minW) {
		winW = minW;
	} else if (winW > maxW) {
		winW = maxW;
	}
	
	if (winH < minH) {
		winH = minH;
	} else if (winH > maxH) {
		winH = maxH;
	}
	
	//Set string for flash movie
	winHString = winH.toString();
	winWString = winW.toString();
	
	//alert('	winW:' + winW + '     winH:' + winH);

}
	
function returnWindowSize(){
	var flash = (navigator.appName.indexOf("Microsoft") !=-1)?window["container"]:document["container"];
	flash.returnWindowSize(winWString, winHString, isIE);//realH,isIE);
}

getScreenHeightWidth();



/*newPopUp({
	name:"site",
	url:"site/index.html",
	width:1146, height:690, scroll:"no", resizable:"no"});*/

newPopUp({
	name:"order",
	url:"http://www.foxstore.com/listing.php?collection=bendersgame",
	width:1146, height:690, scroll:"yes", resizable:"yes"});

newPopUp({
	name:"register",
	url:"https://reg.foxhome.com/form.php?id=335",
	width:450, height:450, scroll:"no", resizable:"no"});

newPopUp({
	name:"widget",
	url:"http://www.ilovebender.com/widget/",
	width:304, height:254, scroll:"no", resizable:"no"});

newPopUp({
	name:"slotmachine",
	url:"http://www.ilovebender.com/slots/",/*"http://build.avatarlabs.com/futuramawgy/widget/index2.html",*/
	width:300, height:250, scroll:"no", resizable:"no"});
	
/*
//EXAMPLE to find days between now and release date (don't forget month is zero based)
var d1 = new Date(2008,5,1);
var d2 = new Date();

alert(daysDiff(d1,d2));	
*/