// (c)opyleft 2003 - miika mäkäräinen - twilo@swipnet.se
var fileName = '';
var description = '';
var height = '';
var width = '';
var properties = '';

function imgWindow(imgnme, w, h, d, t) {
    height = parseInt(h) + parseInt(t);
	var popw=640;
	var poph=480;
	if (document.all || document.layers) {
	   popw = screen.availWidth;
	   poph = screen.availHeight;
	}

	var leftPos = (popw-w)/2, topPos = (poph-height)/2;

    properties = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height=' + height + ',width='+ w + ',top=' + topPos + ',left=' + leftPos;
    lrgewin = window.open("","",properties)

    description=d;
    width = w;
    height = h;
    fileName = imgnme;
    setTimeout('update()',200)
}

function update() {

    var head = '<html>\n<head>\n<title>' + description + '</title>\n<link rel="stylesheet" href="popup.css" type="text/css">\n\n</head>\n<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" bgcolor="' + document.body.bgColor + '">';
    doc = lrgewin.document;
    doc.open('text/html');
    doc.write(head);
    doc.write('<img src="' + fileName + '" height="' + height + '" width=' + width + '" alt="' + description + '"><br>&nbsp;<font  face="verdana" size="1" class="text">');
    doc.write(description + '</font></body></html>');
    doc.close();
}
