var NewWind;
var NewWindB;
function makeImgWindow(imageFile,w,h)
  {    
	
	if (NewWind && !NewWind.closed) 
    {
        NewWind.close()
    }
	if (NewWindB && !NewWindB.closed) 
    {
        NewWindB.close()
    }

    params  = ""
    params += "resizable=1,"
    params += "width=" + w + ","
    params += "height=" + h
	//alert("About to open new window...width="+w+"  height="+h);
    NewWind = window.open("", "" , params);
	
	
	var anchorTagBegin = "<a href=\"#\" onclick='window.close();'>";
	var anchorTagEnd = "</a>";
	var imgTag = "<img src=\"" + imageFile + "\" border='0' />";

	
	var output = "<html><head><title>Click Image to Close Window</title>";
	output += "<style type='text/css'>\n";
	output += "<!-- \n";
	output += " body{margin-top: 0px; margin-left: 0px;}\n";
	output += " --> \n"
	output += "</style></head><body>"	
	output += anchorTagBegin + imgTag + anchorTagEnd;
	output += "</body></html>";
	
	

	NewWind.document.write(output);
	NewWind.document.close();
	return;
  }
