function popupImage(url, imageHeight, imageWidth) {
    var newImageHeight = (parseInt(imageHeight) + 40);
    var yPos = ((screen.height / 2) - (parseInt(newImageHeight) / 2));
    var xPos = ((screen.width / 2) - (parseInt(imageWidth) / 2));

    imageWindow = window.open(url,'popupImages','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=' + imageWidth + ',height=' + newImageHeight + ',screenY=' + yPos + ',screenX=' + xPos + ',top=' + yPos + ',left=' + xPos);

    imageWindow.moveTo(xPos, yPos);
    imageWindow.resizeTo(parseInt(imageWidth), parseInt(newImageHeight));

    if (window.focus) {
      imageWindow.focus();
    }
}

function popupWindow(url, height, width) {
    popupWindow = window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + width + ',height=' + height);
    if (popupWindow.focus) {
    	popupWindow.focus();
    }
}
