<!--

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;
var u=form.T5.value;
if(n==""||k==""||a==""||m==""||t==""||u==""){
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 ppic(name){
  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('http://gaksnpo.ru/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('http://gaksnpo.ru/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 regZak(form){
if (form.nm.value==1)
{
 val=form.elements['arr_kol[]'].value;
 if(val==""){
 alert("Введите количество!");
 return;}
 var ww=isNaN(val);
 if(ww==1){
 alert("Введите количество цифрами!");
 return;}
}
else{
 ln=form.elements['arr_kol[]'].length;
 for (i=0; i<ln; i++){
 val=form.elements['arr_kol[]'][i].value;
 if(val==""){
 alert("Введите количество!");
 return;}
 var ww=isNaN(val);
 if(ww==1){
 alert("Введите количество цифрами!");
 return;}
 }
}
form.submit();
}

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))
}
}

//окно alert
function FormAlert(al,name,j)
{
var width, height;
if (j<7)
{width=250; height=250;}
else
{width=250; height=350;}

  window.open('win_new.htm?text=<center><b>Пожалуйста, заполните поля:</b></center><br>'+al, name,'width='+width+', height='+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}


//проверка форм
function CheckFields(fname,form_num)
{
var form_name=eval('document.'+fname);
var li=(ie) ?'<li>':''
var br=(ie) ?'':'\n'
  var al='';
  var j='';
  var al_post='';
temp_f=eval('f'+form_num+'_Fld');
temp_a=eval('f'+form_num+'_Alrt');

for (i=0; i<temp_f.length; i++)
{
  var item = eval('document.'+fname+'.'+temp_f[i]);
  re1 = new RegExp("^ +$","g");
  if (item.value=='' || re1.test(item.value))
 {
    al_post=al;
    al+=li+temp_a[i]+br;
    j++;
  }
}

if (al != '')
{
 if (ie) {
  FormAlert(al, fname, j);
  }
  else {
  alert('Заполните следующие поля:\n\n' + al);
  }
  return false;
  exit;
}
var today = new Date();
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);

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 null;
        }

function DeleteCookie (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 SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
        }
form_name.submit();
return true;
};
function CheckFormSpec()
{
var it=document.form0;
var al='';

if (it.word.value.length<2){
    al='Слово для поиска должно содержать не менее 2-х символов';
}

if (al != '')
{
 if (ie) {
width=250;
height=150;
  window.open('/win_new.htm?text='+al, "form0",'width='+width+', height='+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
  }
  else {
  alert(al);
  }
  return false;
  exit;
}

it.submit();
return true;
};


//-->