<!--
function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
preloadImages('http://zao-porshen.ru/i/1_mb.jpg', 'http://zao-porshen.ru/i/1_mt.jpg', 'http://zao-porshen.ru/i/1_t_m.jpg', 'http://zao-porshen.ru/i/l_r_b.jpg', 'http://zao-porshen.ru/i/logo.jpg', 'http://zao-porshen.ru/i/map.jpg', 'http://zao-porshen.ru/i/m_prod.jpg', 'http://zao-porshen.ru/i/m_r_b.jpg', 'http://zao-porshen.ru/i/m_r_t.jpg', 'http://zao-porshen.ru/i/tm_l.jpg', 'http://zao-porshen.ru/i/home.jpg', 'http://zao-porshen.ru/i/email.jpg');

function CheckSearch()
{
 alert("Проверка формы");
 return;
};



var loc;
var today = new Date();
var expiry = new Date(today.getTime() + 60 * 60 * 100000);
var expiryt = new Date(today.getTime() + 3650*24*60 * 60 * 100000);
var newsNames = new Array();
var indexNames = new Array();

function regz(form){

var m=form.T1.value;
var k=form.T6.value;
var a=form.T2.value;
var n=form.T3.value;
var t=form.T4.value;

if(n==""||k==""||a==""||m==""||t==""){
alert("Пожалуйста, заполните все поля формы для отправки заказа!");
return;}
 if (n.indexOf(".") == -1) {
 alert("Пожалуйста, введите правильный E-mail!");
return;}
 dog = n.indexOf("@");
 if (dog == -1) {
 alert("Пожалуйста, введите правильный E-mail!");
return;
 }
 if ((dog < 1) || (dog > n.length - 5)) {
 alert("Пожалуйста, введите правильный E-mail!");
return;
 }

 if ((n.charAt(dog - 1) == '.') || (n.charAt(dog + 1) == '.')) {
 alert("Пожалуйста, введите правильный E-mail!");
return;
 }
form.submit();
}
function count(form){
        var coun=GetCookie ('coun');
        var cou=parseInt(coun)+1;
        if (cou>100){alert('Извините, в одном заказе более 100 позиций не принимаются. Пожалуйста, отправьте данный заказ, затем можете внести новые позиции. Благодарим за сотрудничество!');
        window.close();
        window.open('zakaz.htm');}
        else{
         setcookie0('coun',cou, expiry);
        var q=form.q1.value;
        var quant=form.T1.value;
        var t='q' + cou;
        var qu='quant'+cou;
        var pref=GetCookie ('pref');
        if (pref!='0'){pref+=t+'='+q+'-->'+qu+'='+quant+'-->';}
        else{pref=t+'='+q+'-->'+qu+'='+quant+'-->';}


        setcookie0('pref',pref, expiry);
window.close();}

}
function order(name){
  window.open('zak.php?nm='+name,1,'width=500, height=250, resizable=0, scrollbars=0, menubar=0, status=0, left='+Math.max(0,(screen.width-500)/2)+', top='+Math.max(0,(screen.height-250)/2));
}

function orderz(name){
  window.open('../../zak.php?nm='+name,1,'width=500, height=250, resizable=0, scrollbars=0, menubar=0, status=0, left='+Math.max(0,(screen.width-500)/2)+', top='+Math.max(0,(screen.height-250)/2));
}

function bigFoto(url,width,height)
{
 width+=30;
 height+=158;
 window.open(url,'_blank','width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=1, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}
function ris(url_)
{
 url="img/"+url_+"_b.jpg"
 width=420;
 height=323;
 window.open(url,'_blank','width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=1, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}
function risv(url_)
{
 url="img/"+url_+"_b.jpg"
 width=323;
 height=420;
 window.open(url,'_blank','width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=1, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}

function recoun(num)
{
  var nm="kol["+num+"]";
  var vl=document.getElementById(nm).value;
  location='?act='+num+'&val='+vl;
}


  function doOutline() {
    var srcId, srcElement, targetElement;
    srcElement = window.event.srcElement;
    if (srcElement.className.toUpperCase() == "LEVEL1" || srcElement.className.toUpperCase() == "FAQ") {
                 srcID = srcElement.id.substr(0, srcElement.id.length-1);
                 targetElement = document.all(srcID + "s");
                 srcElement = document.all(srcID + "i");
          if (targetElement.style.display == "none") {
                                 targetElement.style.display = "";

             } else {
                                 targetElement.style.display = "none";
     }

     var z=0;
     var srcide, targetElemente, srcElemente;

     while (document.all("OUT"+z+"i")){
             srcide="OUT"+z;
         if (srcID!=srcide){
         targetElemente = document.all(srcide + "s");
                 srcElemente = document.all(srcide + "i");
                  if (targetElemente.style.display=="") targetElemente.style.display = "none";
      }
        z++;
        }
   }
  }



function ppic(name){
  showModalDialog('http://localhost/bhbheat/zak.php?nm='+name, window,"resizable: no; help: no; status: no; scroll: yes; dialogWidth:500px; dialogHeight:250px;");
  window.open('http://localhost/bhbheat/zak.php?nm='+name,1,'width=500, height=250, resizable=0, scrollbars=0, menubar=0, status=0, left='+Math.max(0,(screen.width-500)/2)+', top='+Math.max(0,(screen.height-250)/2));
  window.open('http://gaksnpo.ru/img/prod/big/'+name,1,'width=450, height=600, resizable=1, scrollbars=1, menubar=0, status=0, left='+Math.max(0,(screen.width-400)/2)+', top='+Math.max(0,(screen.height-500)/2));
}
function ppicb(name){
  window.open('http://gaksnpo.ru/img/prod/big/'+name,1,'width=700, height=600, resizable=1, scrollbars=1, menubar=0, status=0, left='+Math.max(0,(screen.width-400)/2)+', top='+Math.max(0,(screen.height-500)/2));
}
function ppics(name){
  window.open('img/sert/big/'+name+'.jpg',1,'width=500, height=600, resizable=1, scrollbars=1, menubar=0, status=0, left='+Math.max(0,(screen.width-400)/2)+', top='+Math.max(0,(screen.height-500)/2));
}
function ppicsb(name){
  window.open('img/sert/big/'+name+'.jpg',1,'width=600, height=500, resizable=1, scrollbars=1, menubar=0, status=0, left='+Math.max(0,(screen.width-400)/2)+', top='+Math.max(0,(screen.height-500)/2));
}
function ppicp(name){
  window.open('http://gaksnpo.ru/img/publ/big/'+name,1,'width=500, height=600, resizable=1, scrollbars=1, menubar=0, status=0, left='+Math.max(0,(screen.width-400)/2)+', top='+Math.max(0,(screen.height-500)/2));
}
function showtab(a){
        for(var d=0; d<a; d++){
                        var gg=d+1;
        document.write('<tr><td class="dlgc">'+gg+'</td>');
  document.write('<td class="dlgc">'+zArr[d][1]+'</td>');
   document.write('<td class="dlg"><a href="../names/'+zArr[d][6]+'.htm">'+zArr[d][2]+'</a></td>');
   document.write('<td class="dlgc">'+zArr[d][3]+'</td>');
     document.write('<td class="dlgc">'+zArr[d][4]+'</td>');
       document.write('<td class="dlgc">'+zArr[d][5]+'</td>');
         document.write('<td class="dlgc"><input size="5" type="text" name="qua'+d+'" value="'+zArr[d][7]+'"></td><td class="dlgc"><input type="checkbox" name="check'+d+'" value="1"></td></tr>');
        }
}
function showtabb(a){
        for(var d=0; d<a; d++){
                        var gg=d+1;
        document.write('<tr><td class="dlgc">'+gg+'</td>');
  document.write('<td class="dlgc">'+zArr[d][1]+'</td>');
   document.write('<td class="dlg">'+zArr[d][2]+'</td>');
   document.write('<td class="dlgc">'+zArr[d][3]+'</td>');
     document.write('<td class="dlgc">'+zArr[d][4]+'</td>');
       document.write('<td class="dlgc">'+zArr[d][5]+'</td>');
         document.write('<td class="dlgc">'+zArr[d][7]+'</td></tr>');
   msg+='<tr><td>'+zArr[d][1]+'</td><td>'+zArr[d][2]+'</td><td>';
                  msg+=zArr[d][4]+'</td><td>'+zArr[d][5]+'</td><td>'+zArr[d][7]+'</td></tr>';
        }
}
function showtabb_(a){
        for(var d=0; d<a; d++){
                        var gg=d+1;
        document.write('<tr><td class="dlgc">'+gg+'</td>');
  document.write('<td class="dlgc">'+zArr[d][1]+'</td>');
   document.write('<td class="dlg">'+zArr[d][2]+'</td>');
   document.write('<td class="dlgc">'+zArr[d][3]+'</td>');
     document.write('<td class="dlgc">'+zArr[d][4]+'</td>');
       document.write('<td class="dlgc">'+zArr[d][5]+'</td>');
         document.write('<td class="dlgc">'+zArr[d][7]+'</td></tr>');
        }
}
function delpos(form, a){

    var xz=new Array();
    var ff=0;
    for(var t=0; t<a; t++){
         if(!form.elements[t*2+1].checked){
                 xz[ff]=zArr[t];
                  ff++;  }
    }
   zArr=xz;
   setcookie0('coun',ff, expiry);
    ff--;
    var pref="";
    for(var yy=0; yy<=ff; yy++){
       dv=yy+1;
        pref+="q"+dv+"="+zArr[yy][0]+"-->quant"+dv+"="+zArr[yy][7]+"-->";
    }
    setcookie0('pref',pref, expiry);
    window.location=window.location;
}
function sfor(form, a){
    var pref="";
    for(var t=0; t<a; t++){
       var ss=eval("form.qua"+t);
         zArr[t][7]=ss.value;
        var yy=t+1;
        pref+="q"+yy+"="+zArr[t][0]+"-->quant"+yy+"="+zArr[t][7]+"-->";
    }
    setcookie0('pref',pref, expiry);
    newWindow("reg.htm", 1, 700, 370);
}
function prin_(){
window.location="przak.htm";
}
function clearzak(){
DCookie('pref');
DCookie('coun');
window.location=window.location;
}
function clearzakk(){
DCookie('pref');
DCookie('coun');
window.close();
window.opener.location=window.opener.location;

}
function getAttributes(wew) {

        var htmlStr = GetCookie(wew);
        var htmlArray = htmlStr.split('-->');
        for (var i = 0; i < htmlArray.length; i++) {
                var tagInfo = htmlArray[i].split('=');
                if (tagInfo[0] != "") {
                        if (tagInfo[0].indexOf('newsNames') == 0) {
                                newsNames[newsNames.length] = tagInfo[1];
                                }
                        else if (tagInfo[0].indexOf('indexNames') == 0) {
                                indexNames[indexNames.length] = tagInfo[1];
                                }
                        else { eval(tagInfo[0] + ' = "' + tagInfo[1] + '"'); }

                        }
                }
        }

function get(){getAttributes();}

function reg(form){

var m=form.T1.value;
if(m==""){
alert("Введите количество!");
return;}
var ww=isNaN(m);
if(ww==1){
alert("Введите количество цифрами!");
return;
}
form.submit();
}

function reggi(form){

var n=form.T1.value;
var k=form.T6.value;
var a=form.T2.value;
var m=form.T3.value;
var t=form.T4.value;
var u=form.T5.value;
var inni=form.T7.value;
if(n==""||k==""||a==""||m==""||t==""||u==""){
alert("Пожалуйста, заполните все поля формы для отправки заказа!");
return;}

var mail='na='+n+'-->ko='+k+'-->ad='+a+'-->ma='+m+'-->te='+t+'-->ud='+u+'-->inn='+inni+'-->';
        setcookie0('mail',mail, expiryt);
window.resizeTo(840, 700);
window.moveTo(0, 0);
window.location="zakall.htm";
}

function setcookie0(cook, value, expires){

        document.cookie = cook + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "");
}

function getCookieVal (offset) {
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1) { endstr = document.cookie.length; }
        return unescape(document.cookie.substring(offset, endstr));
        }

function GetCookie (name) {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen) {
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg) {
                        return getCookieVal (j);
                        }
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0) break;
                }
        return 0;
        }

function DCookie (name,path,domain) {
        if (GetCookie(name)) {
                document.cookie = name + "=" +
                ((path) ? "; path=" + path : "") +
                ((domain) ? "; domain=" + domain : "") +
                "; expires=Thu, 01-Jan-70 00:00:01 GMT";
                }
        }

function newWindow(url,q,width,height)
{
  window.open(url,q,'width = '+width+' , height = '+height+',resizable=0,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));

}
function newwind(url,width,height)
{
  window.open(url, 1, 'name="zak", width = '+width+' , height = '+height+',resizable=0,scrollbars=1,menubar=0,status=1');
}

function newWindow1(url,id,width,height)
{
if (loc!=id)
{
  zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=0,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
  loc=id;
}
else
{
  zoom.close();
  zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=0,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
}
}


function printt(name){
  window.open('printt.php?nm='+name,1,'width=500, height=250, resizable=0, scrollbars=0, menubar=0, status=0, left='+Math.max(0,(screen.width-500)/2)+', top='+Math.max(0,(screen.height-250)/2));
}

//-->