rem: top_opener = window;  do 
add: while(typeof(top_opener.top.opener) != 'undefined' && top_opener.top.opener != null && screen_x > 0) 
context: function optimize_window(){  w = window;  var x_ratio = 0.85;  var y_ratio = 0.90;  top_opener = window;  do  {    iterate = false;    if (top_opener.opener)    {      top_opener = top_opener.opener;      iterate = true;    }    else      if (top_opener.top && top_opener != top_opener.top)      {        top_opener = top_opener.top        iterate = true;      }  }  while (iterate)  if (is_ie)  {    openerWidth = top_opener.document.body.clientWidth;    openerHeight = top_opener.document.body.clientHeight;    openerLeft = top_opener.screenLeft;    openerTop = top_opener.screenTop;  }  else if(is_gecko || is_opera)  {    openerWidth = top_opener.innerWidth;    openerHeight = top_opener.innerHeight;    openerLeft = top_opener.screenX + top_opener.outerWidth - top_opener.innerWidth;    openerTop = top_opener.screenY + top_opener.outerHeight - top_opener.innerHeight;  }  else  {    openerWidth = top_opener.document.body.clientWidth;    openerHeight = top_opener.document.body.clientHeight;    openerLeft = top_opener.screenLeft;    openerTop = top_opener.screenTop;  }  if(window.WINDOW_WIDTH)    newWidth = window.WINDOW_WIDTH;  else    newWidth = openerWidth*x_ratio;  if(window.WINDOW_HEIGHT)    newHeight = window.WINDOW_HEIGHT;  else    newHeight = openerHeight*y_ratio;  newLeft = openerLeft + (openerWidth - newWidth)/2;  newTop = openerTop + (openerHeight - newHeight)/2;  w.moveTo(newLeft, newTop);  w.resizeTo(newWidth, newHeight);}
meta: 8196	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8196/e8049335b5e148206ee558bb1a18efadce258fd9/common.js/clean/php4/branches/trunk/shared/js/common.js