// JavaScript Document
function win(img){
wind= open("", "displayWindow", 
    "width=600,height=550,status=yes,toolbar=yes,menubar=yes");

wind.document.write('<title>Страница</title>');
wind.document.write('<link href="style.css" rel="stylesheet" type="text/css" />');
wind.document.write('<div align=\"center\" id=\"tovar\">');
img='<img src="../phon/'+img+'" border="0"  align=\"center\"/>';
wind.document.write(img);
wind.document.write('<br>');
wind.document.write('<br>');
wind.document.write('<br>');
wind.document.write('<a href="javascript:document.close"  onclick="window.close()" align=\"center\">Закрыть</a>');
wind.document.write('</div>');
return false;
}

function win2(img){
wind= open("", "displayWindow", 
    "width=600,height=550,status=yes,toolbar=yes,menubar=yes");

wind.document.write('<title>Страница</title>');
wind.document.write('<link href="style.css" rel="stylesheet" type="text/css" />');
wind.document.write('<div align=\"center\" id=\"tovar\">');
img='<img src="phon/'+img+'" border="0"  align=\"center\"/>';
wind.document.write(img);
wind.document.write('<br>');
wind.document.write('<br>');
wind.document.write('<br>');
wind.document.write('<a href="javascript:document.close"  onclick="window.close()" align=\"center\">Закрыть</a>');
wind.document.write('</div>');
return false;
}

function checkform(){
        if (document.order.i.value==""){
        window.alert('Пожалуйста, заполните поле - Имя');
                return false;
        }

        if (document.order.email.value==""){
        window.alert('Пожалуйста, заполните поле - Email');
                return false;
        }
}

<!-- Функция увеличения количества товара на 1 при нажатии на плюсик-->
function inc(name)
{
    var qty = parseInt(document.order[name].value, 10);
    if (isNaN(qty)) { qty = 1; }
    else { qty++; }
    if (qty < 1) { qty = 1; }
    document.order[name].value = qty;
    return false;
}
<!-- Функция уменьшения количества товара на 1 при нажатии на минус-->
function dec(name)
{
    var qty = parseInt(document.order[name].value, 10);
    if (!isNaN(qty) && qty > 1) { qty--; } else { qty = ""; }
    if (qty < 1) { qty = ""; }
    document.order[name].value = qty;
    return false;
}

