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 myinits()
{
	var vf = false;
	var sw = document.body.clientWidth;
	var bTop;
	sw = sw/2;
	
	//alert(lTop + ' ' + lLeft);
	  im1 = new Image;
	  im1.src='/_i/mi.gif';
	  im2 = new Image;
	  im2.src='/_i/miv.gif';
	bTop = document.getElementById('cId').offsetTop;	  
	
	document.getElementById('counter').style.pixelTop = bTop-80;
	return sw;
}

function hF(byid)
{
	document.getElementById(byid).style.display = 'none';
	return false;
}
function sF(byid)
{
	document.getElementById(byid).style.display = 'block';
	return false;
}

function hide(block) {
   if (nd(block).style.display != 'block') {
      nd(block).style.display = 'block';
      nd('hide' + block).innerHTML = '[Скрыть]';
   } else {
      nd(block).style.display = 'none';
      nd('hide' + block).innerHTML = '[Показать]';
   }
}

