<!--

function isEmail(email) {

if (email=='') return false;

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email)) return true;
return false

}

function checkForm() {

if ( document.postform.imia.value.length < 1 )
  {
    formErrors = "Введите Ваше имя";
    alert(formErrors);
    return false;
  }

  if (!isEmail(document.postform.email.value))  {
     formErrors = "Неверный формат email";
     alert(formErrors);
     return false;
  }

  if ( document.postform.telefon.value.length < 1)
  {
    formErrors = "Введите Ваш телефон";
    alert(formErrors);
    return false;
  }
  return true;
}

var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var browser=((n || ie) && parseInt(navigator.appVersion)>=4)

function display (item){
        if (browser) {
                which=eval(item);
                if (which.style.display == "none") {
                        which.style.display='block';
                        }
                else {
                        which.style.display='none';
                        }
                }
        }


function isQuery(query) {

if (query=='') return false;

}

function checkFormus() {

if ( document.postformus.query.value.length < 1 )
  {
    formErrors = "Введите запрос";
    alert(formErrors);
    return false;
  }

return true;
}


function calcqbp(id,price) {
var count;
count=Math.floor(Math.abs(eval("document.AddToCart.qty"+id+".value")));
if( count > 0 ) eval("document.AddToCart.total"+id+".value='$"+FormatDouble(count*price)+"';");
return true;
}
function calc(id,price) {
var count;
count=Math.floor(Math.abs(eval("document.AddToCart"+id+".qty"+id+".value")));
if( count > 0 ) eval("document.AddToCart"+id+".total"+id+".value='$"+FormatDouble(count*price)+"';");
return true;
}
function FormatDouble(d) {
d=Math.round(d*100)/100;
var res=new String(d);
var pos=res.indexOf(".");
if (pos==-1) {
res += ".00";
} else {
if (pos>=res.length-2) res += "0";
}
return res;
}

//-->