var win1, win2, win3, win4, win5;
var w1open=0;
var w2open=0;
var w3open=0;
var w4open=0;
var w5open=0;
	
function popUpImage(sImgPath, iImgW, iImgH) { 
var sHeader = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n<title></title>\n<script language=\"JavaScript\" type=\"text/JavaScript\"> window.focus(); </script></head>\n<body>\n\n";
var sFooter = "</body>\n</html>";

if  (!w1open || (typeof(win1) != "undefined" && win1.closed))  { 
win1 = window.open("", "w1", "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
win1.document.open();
win1.document.write(sHeader);
win1.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + ">\n");
win1.document.write("<P>");
win1.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close this window</a></div>");
win1.document.write(sFooter);
win1.document.close();
w1open=1;
}
else if  (!w2open || (typeof(win2) != "undefined" && win2.closed))  { 
win2 = window.open("", "w2", "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
win2.document.open();
win2.document.write(sHeader);
win2.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + ">\n");
win2.document.write("<P>");
win2.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close this window</a></div>");
win2.document.write(sFooter);
win2.document.close();
w2open=1;
}
else if (!w3open || (typeof(win3) != "undefined" && win3.closed)) { 
win3 = window.open("", "w3", "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
win3.document.open();
win3.document.write(sHeader);
win3.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + ">\n");
win3.document.write("<P>");
win3.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close this window</a></div>");
win3.document.write(sFooter);
win3.document.close();
w3open=1;
}
else if (!w4open || (typeof(win4) != "undefined" && win4.closed)) { 
win4 = window.open("", "w4", "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
win4.document.open();
win4.document.write(sHeader);
win4.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + ">\n");
win4.document.write("<P>");
win4.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close this window</a></div>");
win4.document.write(sFooter);
win4.document.close();
w4open=1;
}
else if (!w5open || (typeof(win5) != "undefined" && win5.closed)) { 
win5 = window.open("", "w5", "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
win5.document.open();
win5.document.write(sHeader);
win5.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + ">\n");
win5.document.write("<P>");
win5.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close this window</a></div>");
win5.document.write(sFooter);
win5.document.close();
w5open=1;
}
	
} // end function
 
function UnLoadWindows() {
/*
// test to see if window exists
if (typeof(win1) != "undefined") { }
// test to see if a window is still open
if (!(win1.closed)) { } */

if (typeof(win1) != "undefined" && !win1.closed) {  win1.window.close(); } 
if (typeof(win2) != "undefined" && !win2.closed) {  win2.window.close(); } 
if (typeof(win3) != "undefined" && !win3.closed) {  win3.window.close(); } 
if (typeof(win4) != "undefined" && !win4.closed) {  win4.window.close(); } 
if (typeof(win5) != "undefined" && !win5.closed) {  win5.window.close(); } 
}