var origimg2;
function loadimgs2()
{
 if (!document.images) return;
 origimg2=new Image(); origimg2.src = "http://"+document.form2.img2.value;
  waitforcomplete2();
}
function waitforcomplete2()
{
 if (origimg2.complete)
 {
    document.form2.imgwidth2.value = origimg2.width;
  document.form2.imgheight2.value = origimg2.height;
 }
 else setTimeout ("waitforcomplete2();", 500);
}
function preview2()
{
 var imgwidth2 = (document.form2.imgwidth2.value.length<1 ? 400 : parseInt(document.form2.imgwidth2.value)+50);
 var imgheight2 = (document.form2.imgheight2.value.length<1 ? 200 : parseInt(document.form2.imgheight2.value)+50);
 prev = window.open('', '', 'width='+imgwidth2+',height='+imgheight2+',menubar=yes,resizable=yes');
 prev.focus();
 prev.document.open ("text/html");
 prev.document.writeln ("<html><body bgcolor=\"white\" text=\"black\"><center><table width=100% height=100% border=0><tr><td align=center valign=middle><img src=http://"+escape(document.form2.img2.value)+"></td></tr></table></body></html>");
 prev.document.close();
}