// JavaScript Document
var newWindow, wH=420, wW=600, wX=0, wY=40;
screen.height
wX=(screen.width-wW)/2;
//wY=(screen.height-wH)/2;
function makeNewWindow(Var1) {
 myVar1=Var1;
    if (!newWindow || newWindow.closed) {
        newWindow = window.open("","","status,height="+wH+",width="+wW+",left="+wX+",top="+wY+"")
        if (!newWindow.opener) {
        newWindow.opener = window
        }
        // force small delay for IE to catch up
        setTimeout("writeToWindow(myVar1)", 50)
    } else {
        // window's already open; bring to front
        newWindow.focus()
    }
}
function writeToWindow(myVar1) {
    // assemble content for new window
    var newContent = '<HTML><HEAD><TITLE>Image Viewer</TITLE><style type="text/css"><!--body {	margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;}--></style></HEAD>'
    newContent += '<BODY>'
    newContent += '<img src="'+myVar1+'">'
    newContent += '</BODY></HTML>'
    // write HTML to new window document
    newWindow.document.write(newContent)
    newWindow.document.close() // close layout stream
	//example html <p><a href=javascript:makeNewWindow("images/img7_600x450.jpg");>xxxxxxxxx</a></p>

}