var screenH;
var screenW;
function windowWH() {
  //parent.window.moveTo(0,0);
	
  var bV=parseInt(navigator.appVersion);
  var bName = navigator.appName;
  var bType;

  if(bV == 4)
   {
   if(bName.indexOf("Netscape") != -1){ bType = "NS4"}
  }
if(bV > 4)
   {
   //if(bName.indexOf("Netscape") != -1){ bType = "NS4"}
  }	

  if (bType == "NS4") {
   //parent.window.resizeTo(self.screen.availWidth - (parent.window.outerWidth - parent.window. innerWidth), self.screen.availHeight - (parent.window.outerHeight - parent.window.innerHeight));
	screenW=(self.screen.availWidth - (parent.window.outerWidth - parent.window. innerWidth));
	//screenH=(self.screen.availHeight - (parent.window.outerHeight - parent.window.innerHeight))
	
	screenH = self.screen.availHeight-90;
	
	
  }
  else
  {
	
	//screenW=self.screen.availWidth;
	screenW=(self.screen.availWidth-10);
	screenH=self.screen.availHeight-50;
	
  }

}

function openWindow() {
  windowWH();
//  alert(screenW +', '+screenH);
  disp1600Window=window.open('','bipsWin1600','width='+screenW +',height='+screenH +',left=0,top=0,resizable=1,scrollbars=1,toolbar=0, directories=0,status=1,menubar=0');
}
function openWindowNew(windowName) {
  windowWH();
 // alert(screenW +', '+windowName);
  disp1600Window=window.open('',''+windowName+'','width='+screenW +',height='+screenH +',left=0,top=0,resizable=1,scrollbars=1,toolbar=0, directories=0,status=1,menubar=0');
}
function openWindowPrint(windowName){
  printSummaryWindow = window.open('', ''+windowName+'', 'width=1,height=1,screenX='+ window.screen.availWidth +',screenY='+ window.screen.availHeight +'');
  if(printSummaryWindow.print)
  {
      printSummaryWindow.resizeTo(1,1);
      printSummaryWindow.moveTo(window.screen.availWidth, window.screen.availHeight)
  }
}

function trim(strVar)
{
	while(strVar.charAt(strVar.length-1)==' ')
		strVar=strVar.substring(0,strVar.length-1);

	while(strVar.charAt(0)==' ')
		strVar=strVar.substring(1,strVar.length);

	return strVar;
}

