function resize() {
   var w_newWidth,w_newHeight;
   var w_minWidth=1010, w_minHeight=675;
   
	if (navigator.appName.indexOf("Microsoft") != -1) {
	   w_newWidth=document.body.clientWidth;
	   w_newHeight=document.body.clientHeight;
	}else{
	   w_newWidth=window.innerWidth;
	   w_newHeight=window.innerHeight;
	}	
   
	if(w_newWidth < w_minWidth) {
		//alert(w_newWidth + ' -- ' + w_minWidth)
		document.site.width = w_minWidth;
	}else {
		document.site.width = w_newWidth;
	}
	
	if(w_newHeight < w_minHeight) {
		document.site.height = w_minHeight;
	}else {
		document.site.height = w_newHeight;
	}
}
function startresize(){
	resize();
	resize();
}

function popopen(thePage,theName,wt,ht){
	leftPos= (screen.width-wt)/2;
	topPos = (screen.height-ht)/2;
	newWin1 = window.open(thePage,theName,'directories=0,menubar=0,location=0,toolbars=0,status=0,resizeable=0,scrollbars=0,left='+leftPos+',top='+topPos+',width='+wt+',height='+ht);
	
	//document.getTAG.target = theName;
	//document.getTAG.submit();
}

//window.onresize = resize;
//window.onload = startresize;


function openChromeless(main, w, h){
	var ww,hh;
	if (navigator.appName.indexOf("Microsoft") != -1) {
		ww=document.body.clientWidth/2;
		hh=document.body.clientHeight/2;
	}else{
		ww=window.innerWidth/2;
		hh=window.innerHeight/2;
	}	
	//alert(main+" * "+w+" * "+h);			
	wndw = window.open(main,'','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=' + w + ', height=' + h);
	
	if(!wndw && whichBrs() == "Safari") {
		alert('Please turn off your pop-up blocker to view this content. (Command + Shift + K) ');
	}
	//w.moveTo((ww-(w/2)),(hh-(h/2))); 
}			
