function openImage(img){
image= new Image();
image.src=(img);
openWindow(img);
}

function openWindow(img){
if((image.width!=0)&&(image.height!=0)){
viewImage(img);
}
else{
stuff="openWindow('"+img+"')";
stuff1=setTimeout(stuff,20);
}
}
function viewImage(img){
w=image.width+0;
h=image.height+0;
dims="width="+w+",height="+h;
result=window.open(img,"",dims);
}
