// JavaScript Document
function resizeframe() 
{ 
try 
{ 
document.all.iframe.style.width=iframe.document.body.scrollWidth;
document.all.iframe.style.height=iframe.document.body.scrollHeight;
document.all.inbox.style.left=(document.body.offsetWidth-iframe.document.body.scrollWidth)/2;
document.all.inbox.style.top=(document.body.offsetHeight-iframe.document.body.scrollHeight)/2;
} 
catch(e){} 
} 
function   resizeimage(img)   
  {   
  var   w=img.width,h=img.height;   
  var   imgmax=160;//最大的高或宽度;   
  if   (h>=w   &&   h>imgmax)   
  {   
  img.height=imgmax;   
  img.width=(imgmax/h)*w;   
  }   
  else   if   (w>=h   &&   w>imgmax)   
  {   
  img.width=imgmax;   
  img.height=(imgmax/w)*h;   
  }   
  } 
function   resizeimage2(img)   
  {   
  var   w=img.width,h=img.height;   
  var   imgmax=90;//最大的高或宽度;   
  if   (h>=w   &&   h>imgmax)   
  {   
  img.height=imgmax;   
  img.width=(imgmax/h)*w;   
  }   
  else   if   (w>=h   &&   w>imgmax)   
  {   
  img.width=imgmax;   
  img.height=(imgmax/w)*h;   
  }   
  } 
function flush() 
{ 
var win = this.window; 
win.focus(); 
}
function box(){ 
 document.all.bg.style.display="block"; 
 document.all.bg.style.width=document.body.clientWidth; 
 document.all.bg.style.height=document.body.clientHeight; 
 document.all.inbox.style.display='block';
}
function xbox(){ 
 document.all.bg.style.display="none";
 document.all.inbox.style.display='none';
 //parent.location.reload(true);
}
//setTimeout("flush()",2000); //两秒种后自动聚焦窗口 