//(C) www.cafegroove.com/, July 2007

Wmax=900;
Hmax=650;
Ireko="main";

wwindow = screen.availWidth;
hwindow = screen.availHeight;
//moveTo(0,0);
//resizeTo(wwindow,hwindow);

window.onload=Windowsc;

Check_Microsoft=false;
function checkBrowser()
{var uName = navigator.appName;
if (uName.indexOf("Microsoft") > -1) {Check_Microsoft=true;}}
checkBrowser();

window.onresize=Windowsc;

function Windowsc(){
  var a = document.getElementById(Ireko);
  if(Check_Microsoft){

if ( document.compatMode == 'CSS1Compat'){ 

		var w =document.documentElement.offsetWidth; 
  		var h =document.documentElement.offsetHeight;
		
}else{
	  	var w = document.body.offsetWidth;
  		var h = document.body.offsetHeight;
		}

  }else{
  var w = window.innerWidth
  var h = window.innerHeight;
  
  
  }
  var wt = Wmax;var ht = Hmax;
    if (w < wt){a.style.width = wt + "px"}else{a.style.width = "100%"};
    if (h < ht){a.style.height = ht + "px";}
	else if(h==ht){a.style.height = ht + "px";}
	else{if(Check_Microsoft){a.style.height = h-4+"px"}else{a.style.height ="100%";}
	}
}