function pic2Window(title, picUrl1, wd1, ht1, picUrl2, wd2, ht2)
{
  
  var reduceByPercent = .99;
  var screenSize = screen.width;
  
  while( (wd1 + wd2) > (screenSize-50)){
   	     wd1 = wd1 * reduceByPercent;
         wd2 = wd2 * reduceByPercent;
         ht1 = ht1 * reduceByPercent;
         ht2 = ht2 * reduceByPercent;

   }
   
  if(ht1 < ht2)
     ht1 = ht2;
   
  var height=ht1 + 80; // space for title & close link
  var winheight= ht1 + 80; // adding more space
  var winwidth = wd1 + wd2 + 50;
  
  picWin = window.open("", 'pic','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height='+height+',width='+wd1); 
  picWin.focus();     		// open window on top of all other web pages
  picWin.moveTo(0,0); 
  picWin.resizeTo(winwidth,winheight);	
  picWin.document.write("<BODY STYLE=\"margin:0px;padding:0px;background-color:#003162\">");
  picWin.document.write("<CENTER><SPAN STYLE='color:#ffffff;font-family:arial;font-size:80%;font-weight: bold;'>"+title+"</SPAN><BR><IMG SRC="+picUrl1+" ALT='"+title+"' height="+ht1+" width="+wd1+"> &nbsp;&nbsp;&nbsp; <IMG SRC="+picUrl2+" ALT='"+title+"' height="+ht2+" width="+wd2+"><BR>");
  picWin.document.write("<A HREF='#' STYLE='color: #ffffff;font-family:arial;font-size: 80%' onClick=\"self.close()\">close this window</A></CENTER></BODY>");
  picWin.document.close();
  picWin.document.title=".:: ArchitectsWorkshop 2005 ::.";
}