//author: Emitt Mayson, Sonyjette Clarete
//History: 	11-12-01: EM: Created
//				04-17-02: SC: Modified the height and width values for NN and IE such that it is 70 % and added position attributes
function popWindow(url)
{
  var navInfo = navigator.userAgent.toLowerCase();
  var ie      = navInfo.indexOf('msie')!=-1?1:0;  // Browser is Internet Explorer
  var ns      = navInfo.indexOf('mozilla') != -1 && !ie ? 1:0; // Browser is Netscape
  var window_height = 0;
  var window_width = 0;
  var x = 300;
  var y = 300;
  // Attempt to get window coordinates.
  if (ie) // Check to see if the client browser is Internet Explorer
  {
    window_height = document.body.clientHeight;
    window_width = document.body.clientWidth;
    window_height = window_height * 0.85; 
	window_width = window_width * 0.73; 
	topPosition = document.body.clientHeight*1.10 - window_height;
	leftPosition = document.body.clientWidth - window_width;
	winfeatures = "height=" + window_height + ",width=" + window_width + ",top="+x+",left="+y+",directories,location,menubar,resizable,scrollbars,toolbar,status";
	x = 300;
	y = 80;
  }
  else // Assume it is Netscape Navigator or a compatible derivative
  {
    window_height = window.outerHeight;
    window_width = window.outerWidth;
    window_height = window_height * 0.5;
	window_width = window_width * 0.7 ;
	//x = window.outerWidth*0.96 - window_width;
	//y = window_height*1.5 -  window_height;	
  	winfeatures = "innerheight=" + window_height + ",innerwidth=" + window_width + ",Screenx="+x+",Screeny="+y+",directories,location,menubar,resizable,scrollbars,toolbar,status";  	
  }
  
  // Launch a new window and focus it if window.focus() is supported.
  var win  = null;
  win = window.open(url,'newwindow',winfeatures).focus();
  	// if win and win.open exist, move the window
  
}


function popFramelessWindow(url)
{
  var navInfo = navigator.userAgent.toLowerCase();
  var ie      = navInfo.indexOf('msie')!=-1?1:0;  // Browser is Internet Explorer
  var ns      = navInfo.indexOf('mozilla') != -1 && !ie ? 1:0; // Browser is Netscape
  var window_height = 0;
  var window_width = 0;
  var x = 200;
  var y = 200;
  var s;
  // Attempt to get window coordinates.
  if (ie) // Check to see if the client browser is Internet Explorer
  {
    window_height = document.body.clientHeight;
    window_width = document.body.clientWidth;
    window_height = window_height * 0.75; 
	window_width = window_width * 0.60; 
	topPosition = document.body.clientHeight*1.10 - window_height;
	leftPosition = document.body.clientWidth - window_width;
	winfeatures = "height=" + window_height + ",width=" + window_width + ",top="+x+",left="+y+",resizable,scrollbars, status";

	x = 200;
	y = 60;
  }
  else // Assume it is Netscape Navigator or a compatible derivative
  {
    window_height = window.outerHeight;
    window_width = window.outerWidth;
    window_height = window_height * 0.7;
	window_width = window_width * 0.55 ;
	//x = window.outerWidth*0.96 - window_width;
	//y = window_height*1.5 -  window_height;	
  	winfeatures = "innerheight=" + window_height + ",innerwidth=" + window_width + ",Screenx="+x+",Screeny="+y+",menubar,resizable,scrollbars, status";  	
  }
   // Launch a new window and focus it if window.focus() is supported.
  var win  = null;
  s = "width="+window_width +",height="+window_height;
  win = window.open(url,'popFrameless',winfeatures).focus();
  	// if win and win.open exist, move the window
  
}