//va - имя файла картинки, к нему добявится "_b"
//va1 - имя директории с картинкой
//va2 - название модели
//например, для двери "712f роза" эти параметры будут: va=712r, va1=700, va2=700 F

// Скрип для открытия картинок дверей
function WO (va, va1, va2) {
var str="/img/"+va1+"/"+va+"_b.jpg";
document.door.src=str;
}

function nWO (va, va1, va2, va3, va4) {
var str="/img/"+va1+"/"+va+"_b.jpg";
var str2="/img/"+va1+"/"+va+"_bb.jpg";
document.door.src=str;

document.getElementById('toppiece').style.background="url('"+str2+"') "+va3;
document.getElementById('botpiece').style.background="url('"+str2+"') "+va4;
}
function WOoldschool (va, va1, va2) {

var str="/img/"+va1+"/"+va+"_b.jpg";

//document.door.src=str;

nwo = window.open('', 'door', 'resizable=no, scrollbars=no, width=412, height=500, na=va, di=va1');
nwo.document.open();
nwo.document.write("<html><head><title>Модель ");
nwo.document.write(va2);
nwo.document.write("</title><body name='door' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' height='500' src='/img/");
nwo.document.write(va1);
nwo.document.write("/");
nwo.document.write(va);
nwo.document.write("_b.jpg'><center></body></html>");
nwo.document.close();
}
function WOpost () {
nwo = window.open('/post/post_black.html', 'post', 'resizable=no, scrollbars=no, width=600, height=400');
}
function WOpost2 () {
nwo = window.open('/post/post_black2.html', 'post', 'resizable=no, scrollbars=no, width=600, height=400');
}



function showimagevar1(a, b, c){
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=300, height=350');

own.document.open();
own.document.write("<html><head><title></title><body name='img' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='");
own.document.write(b);
own.document.write("' height='");
own.document.write(c);
own.document.write("' src='/img/");
own.document.write(a);
own.document.write(".gif'><center></body></html>");
own.document.close();
}

function showimagevar2(a, b, c){
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=550, height=300');

own.document.open();
own.document.write("<html><head><title></title><body name='img' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='");
own.document.write(b);
own.document.write("' height='");
own.document.write(c);
own.document.write("' src='/img/");
own.document.write(a);
own.document.write(".gif'><center></body></html>");
own.document.close();
}

function showimagevar3(a, b, c){
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=175, height=400');

own.document.open();
own.document.write("<html><head><title></title><body name='img' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='");
own.document.write(b);
own.document.write("' height='");
own.document.write(c);
own.document.write("' src='/img/");
own.document.write(a);
own.document.write(".gif'><center></body></html>");
own.document.close();
}

function showimagevar4(a, b, c){
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=410, height=355');

own.document.open();
own.document.write("<html><head><title></title><body name='img' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='");
own.document.write(b);
own.document.write("' height='");
own.document.write(c);
own.document.write("' src='/img/");
own.document.write(a);
own.document.write(".gif'><center></body></html>");
own.document.close();
}

function showimagevar5(a, b, c){
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=345, height=401');

own.document.open();
own.document.write("<html><head><title></title><body name='img' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='");
own.document.write(b);
own.document.write("' height='");
own.document.write(c);
own.document.write("' src='/img/");
own.document.write(a);
own.document.write(".gif'><center></body></html>");
own.document.close();
}
function showimagevar6(a, b, c, d){
// a - имя файла, из корневой директории
// b - ширина картинки
// c - высота картинки
// d - подпись (заголовок) страницы
winW=b+20;
winH=c+60;
var str = "resizable=no, scrollbars=no, width="+winW+", height="+winH;
own = window.open('', 'img', str);
own.document.open();
own.document.write("<html><head><title>");
own.document.write(d);
own.document.write("</title><body name='adrs' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='window.resizeTo("+(winW+10)+","+(winH+20)+");focus()'><center><table border='0' width='100%'><tr><td valign='top' align='center'><b>");
own.document.write(d);
own.document.write("</b></td></tr><tr><td align='center' valign='middle' height='100%'><img src='/");
own.document.write(a);
own.document.write("' border='1' width='"+b+"' height='"+c+"'></td></tr></table></body></html>");
own.document.close();
}


//Скрипт для открытия в отдельном окне стекол 700-й серии
function showglasse (va, va1, va2) {
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=100, height=520, na=va, di=va1');
own.document.open();
own.document.write("<html><head><title>");
own.document.write(va2);
own.document.write("</title><body name='door' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='100' height='520' src='/img/");
own.document.write(va1);
own.document.write("/");
own.document.write(va);
own.document.write("_b.jpg'><center></body></html>");
own.document.close();
}

//Скрипт для открытия в отдельном окне стекол 800-й серии
function showglasse1 (va, va1, va2) {
own = window.open('', 'img', 'resizable=no, scrollbars=no, width=120, height=420, na=va, di=va1');
own.document.open();
own.document.write("<html><head><title>");
own.document.write(va2);
own.document.write("</title><body name='door' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><img border='0' width='120' height='420' src='/img/");
own.document.write(va1);
own.document.write("/");
own.document.write(va);
own.document.write("_b.jpg'><center></body></html>");
own.document.close();
}


function OpenBIG (pic,name){
own = window.open('', 'lam', 'resizable=no, scrollbars=no, width=220, height=180');
own.document.open();
own.document.write("<html><head><title>");
own.document.write("</title><body name='lam' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><table border='0' width='100%'><tr><td valign='top' align='center'><b>");
own.document.write(name);
own.document.write("</b></td></tr><tr><td align='center' valign='middle' height='100%'><img src='/img/");
own.document.write(pic);
own.document.write(".jpg' border='1' width='200' height='109'></td></tr></table></body></html>");
own.document.close();
}
function OpenBIG2 (pic,name,w,h,wp,hp){
var str = "resizable=no, scrollbars=no, width="+w+", height="+h;
own = window.open('', 'lam', str);
own.resizeTo(w+50,h+50);
own.document.open();
own.document.write("<html><head><title>");
own.document.write("</title><body name='lam' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><table border='0' width='100%'><tr><td valign='top' align='center'><b>");
own.document.write(name);
own.document.write("</b></td></tr><tr><td align='center' valign='middle' height='100%'><img src='/img/");
own.document.write(pic);
own.document.write(".jpg' border='1'");
if (wp!=''){
own.document.write(" width='");
own.document.write(wp);
own.document.write("'");
}
if (hp!=''){
own.document.write(" height='");
own.document.write(hp);
own.document.write("'");
}
own.document.write("></td></tr></table></body></html>");
own.document.close();
}
function OpenBIGadrs (pic,name){
own = window.open('', 'adrs', 'resizable=no, scrollbars=no, width=450, height=350');
own.document.open();
own.document.write("<html><head><title>");
own.document.write(name);
own.document.write("</title><body name='adrs' bgcolor='#FFFFFF' text='#000000' link='#0000FF' vlink='#800080' leftmargin='0' topmargin='0' onload='focus()'><center><table border='0' width='100%'><tr><td valign='top' align='center'><b>");
own.document.write(name);
own.document.write("</b></td></tr><tr><td align='center' valign='middle' height='100%'><img src='./pics/");
own.document.write(pic);
own.document.write(".jpg' border='1' width='400' height='300'></td></tr></table></body></html>");
own.document.close();
}
function post(){
nwo = window.open('/post/index.html', 'post', 'resizable=no, scrollbars=no, width=475, height=375');
}
