function winOp(pd, w, h, s) {
var p=' width='+w+', height='+h+', status=no, left=100, top=100, toolbar=no, scrollbars='+s; 
     cw=window.open(pd,'basket', p);  
     cw.focus();
}

function validform() {
var klient, eml, phone, eml_reg, dataright , city, focu,ph_reg;
dataright=true;
eml_reg=/([0-9a-zA-Z\.-_]+)@([0-9a-zA-Z\.-_]+)\.([a-zA-Z]){2,4}/;
ph_reg=/([0-9\(\)]?)[\s]?([0-9-])/;
klient=document.order_form.klient.value;
eml=document.order_form.eml.value;
city=document.order_form._city.value;
phone=document.order_form.phone.value;
dbody=document.order_form.comment.value;
if (klient.length == 0)  { 
   dataright = false;
   message = 'Назовите  свое имя';
   order_form.klient.focus();
 } else  {
 if (city.length == 0)  {
    dataright=false;
    message = 'Не указан город';
    order_form._city.focus();
 } else  {
 if (eml.match(eml_reg) == null)  {
    dataright=false;
    message = 'Неверный или пустой e-mail';
    order_form.eml.focus();
 } else  {
 if (phone.match(ph_reg) == null)  {
    dataright=false;
    message = 'Некорректный номер телефона';
    order_form.phone.focus(); 
 } else { 
 if (dbody.length == 0)  {
    dataright=false;
    message = 'Не заполнено поле комментария.';
    order_form.comment.focus();
  }}}}}
if (!dataright)  {
   alert(message); 
}
return  dataright;
}

function showForm(vp, byid)
{
	var sw;
	sw = document.body.clientWidth;
	sw = sw/2;
	report.style.pixelLeft = sw-300;
	if(!vp) {	
	document.getElementById(byid).style.display = 'block';
	return 1;
	} else {	
	document.getElementById(byid).style.display = 'none';
	return 0;
	}
}

function hideForm()
{
	document.getElementById('report').style.display = 'none';
	return false;
}


function showhide(xxx)
    {
    if (document.getElementById(xxx).style.display=="none") { document.getElementById(xxx).style.display="block"; }
    else { document.getElementById(xxx).style.display="none"; }
    }