﻿function nwin(name,width,height) {
    wwidth = parseInt(width) + 42;
    wheight = parseInt(height) + 42;
    var left = parseInt((screen.availWidth/2) - (wwidth/2));
    var top = parseInt((screen.availHeight/2) - (wheight/2));
    var set = 'width=' + wwidth + ',height=' + wheight + ',left=' + left + ',top=' + top + ',screenX=' + left +',screenY=' + top;
    var content = "<html><head><title>Диамант</title><link rel='stylesheet' href='/js/photo.css' type='text/css'>";
    content += "<body><div id=image><a href=javascript:window.close(); title='Закрыть окно'>"
    content += "<img src=" + name +".jpg border=0 width=" + width +" height="+ height +" alt='Диамант'>"
    content += "</a></div></body>"
    newWindow = window.open("", "INTER", set);
    newWindow.document.write(content);
    newWindow.document.close();
    newWindow.focus();
}


function galery(d,width,height) {
    wwidth = parseInt(width) + 42;
    wheight = parseInt(height) + 42;
    var left = parseInt((screen.availWidth/2) - (wwidth/2));
    var top = parseInt((screen.availHeight/2) - (wheight/2));
    var set = 'width=' + wwidth + ',height=' + wheight + ',left=' + left + ',top=' + top + ',screenX=' + left +',screenY=' + top;
    var content = "1/zapis.php"
    newWindow = window.open("http://diamantdent.ru/treatment_gallery/", "INTER", set);
    newWindow.document.close();
    newWindow.focus();
}
