/* Image automatically sized to open window */
function imageShow(img){
  pix1= new Image();
  pix1.src=(img);
  imageControl(img);
}
function imageControl(img){
  if((pix1.width!=0)&&(pix1.height!=0)){
    imageView(img);
  }
  else{
    myFunction="imageControl('"+img+"')";
    myInterval=setTimeout(myFunction,20);
  }
}
function imageView(img){
  myWidth=pix1.width+20;
  myHeight=pix1.height+20;
  myString="width="+myWidth+",height="+myHeight;
  myWindow=window.open(img,"",myString);
}
