      
      function LookWin(put,ww,hh){               
               left1 = (screen.availWidth - ww)/2
               top1 = (screen.availHeight - hh)/2             
               eval("window.open(\'"+put+"\',\'_blank',\'status=yes,top="+top1+",left="+left1+",toolbar=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,width="+ww+",height="+hh+"\')"); 
      }
      
      function isEmpty(str) {
                 
               for (var i = 0; i < str.length; i++)
                    if (" " != str.charAt(i))
                        return false;
                 
               return true;
      }
        
      function checkStrForm(nameform,nameinput,msg){
                 
               f = eval("document."+nameform+"."+nameinput); 
                 
               if (isEmpty(f.value)) { alert(msg); return false; }
                 
               return true;
      }
      
      /////////////////////////
      function goods_price(priceGoods,percentGoods,currencyGoods,baseUnitGoods){
               
               rezpriceGoods = '';
               priceGoods = Math.ceil(priceGoods);
               if(percentGoods > 0){
                  oldpriceGoods = priceGoods;
                  rezpriceGoods = '<nobr><font size=-1 color=#FF2F00>Скидка '+percentGoods+'% </font></nobr><br><font color=#FF2F00>'+priceGoods+'.00</font><br>';
                  priceGoods=priceGoods-(priceGoods/100)*percentGoods;
                  priceGoods = Math.ceil(priceGoods);
                  rezpriceGoods = '<nobr><font size=-1 color=#FF2F00>Скидка '+percentGoods+'% </font></nobr><br><font color=#FF2F00>'+priceGoods+'.00</font><br><font color=#999999>'+oldpriceGoods+".00</font>";
               } else {
                  rezpriceGoods = priceGoods+".00";
               }   
               
               promStr = ('<span class=tit3 style="color:#666666;font-size:18px">&nbsp;<b>'+rezpriceGoods+'<br>&nbsp;'+
                          '<span style="font-size:13px">'+currencyGoods+'/'+baseUnitGoods+'</b></span>'+
                          '</span>');
                          
               return promStr;           
      }
      
      var pLang = "ru";
      function form_add_cart(pagePar,addedCart,idGoods){
                    
                    if(pLang=="ru"){
                       if(addedCart > 0) alt2="добавлен в корзину";
                       else alt2="добавить в корзину";
                    } else {
                       if(addedCart > 0) alt2="is in cart";
                       else alt2="add cart";
                    }
                    
                    if(addedCart > 0){
                       document.write('<Table cellPadding=0 CellSpacing=0 Border=0><Tr><Td><Img Src="images/addedcart_'+pLang+'.gif" Width=100 Height=23 Border=0 Alt="'+alt2+'"></Td></Tr></Table>');
                    } else {
                       document.write('<Table cellPadding=0 CellSpacing=0 Border=0><form action="?'+pagePar+'" method="post" name="addcart'+idGoods+'"><Tr><Td>'+
                       ' <input type=hidden name=addcart value=1>'+
                       ' <input type=hidden name=id_goods value='+idGoods+'>'+
                       ' <input type=hidden name=count_goods value=1>'+
                       ' <input type=image Src="images/addcart_'+pLang+'.gif" Width=100 Height=23 Border=0 Alt="'+alt2+'">'+
                       ' </Td></Tr></form></Table>');
                    }            
           }
           
           function submitForm(nform,ww,hh){
     
	          left1 = (screen.availWidth - ww)/2;
              top1 = (screen.availHeight - hh)/2;
              
	          eval("window.open('about:blank', 'submit', 'top='+top1+',left='+left1+',toolbar=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,width="+ww+",height="+hh+"');");
	          nform.target = 'submit';
	          nform.method = 'post';
        }
        
           function AddFormSubscr(NameF,email,idsubscr){
                   promstr  = '<Table Border=0 class=maintext style="color:#ff2f00"><form action="subscribe.phtml" name="'+NameF+'">';
                   promstr += '<input type=hidden name=idsubscr value='+idsubscr+'>';
                   promstr += '<input type=hidden name=check value=add>';
                   promstr += '<Tr><Td ColSpan=2>Укажите Ваш email:</Td></Tr>';
                   promstr += '<Tr><Td><input type=text name="email" value="'+email+'" class=inputbox style="width:150px" size=15></Td><Td>';
                   promstr += '<input type=submit value=" ›› " onClick="submitForm(document.'+NameF+',350,200);" class=submitbox></Td></Tr>';
                   promstr += '</form></Table>';
                   
                   document.getElementById(NameF).innerHTML = promstr;
        }  
        function listForm(namelist,txtlist,curval,beginval,exitval){
                    
                    document.write("<select name=\""+namelist+"\">");
                    document.write("<option value=\"0\">"+txtlist+"</option>");
                    for(i=beginval; i < exitval; i++){
                        document.write("<option value=\""+(i+1)+"\"");
                        if(i==curval-1) document.write(" selected");
                        document.write(">");
                        if(i < 9) document.write("0");
                        document.write((i+1)+"</option>");
                    }    
                    document.write("</select>&nbsp;&nbsp;");
        }
        
        
      /////////////////////////