function ResizeToFit(dlg, picHeight, picWidth) {

 var imgWidth;
 var imgHeight;

 imgWidth = picWidth + 60; 
 imgHeight = picHeight + 110;
 dlg.resizeTo(imgWidth, imgHeight);
}

function mssDisplayImages(img, name, width, height){

 features = 
    "toolbar=no,location=no,directories=no,status=no,menubar=no," +
    "scrollbars=yes,resizable=yes,width=" + width + ",height=" + height;
 dlg = window.open ("","Details",features);
 dlg.document.write("<html><head><title>" + name + " Zoom</title><link href=\"http://site.cutelittleme.com/css/Cute_CSS.css\" rel=\"stylesheet\" type=\"text/css\"></head>");


 dlg.document.write("<body bgcolor=white onLoad=\"javascript:opener.ResizeToFit(self,  picImg.height, picImg.width);\"><center>");

 dlg.document.write("<table width=100% height=100%>");
 dlg.document.write("<tr><td class=\"productName\">" + name + "</td>");

 dlg.document.write("<td align=right class=\"featuredItemsLink\">");
 dlg.document.write("<a href=# onClick=window.close();>");
 dlg.document.write("close window</a>");
 dlg.document.write("</td></tr>");
 
 
 dlg.document.write("<tr><td colspan=\"2\" align=center valign=middle>");
 dlg.document.write("<img name=\"picImg\" src=" + img + ">");
 dlg.document.write("</td></tr>");
 dlg.document.write("</table></body></html>");

 dlg.document.close();
}

