    //++++
    function TodaysDate(){
             
             CurDate = new Date();
             DayWeek = new Array("Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота");
             ToDay = CurDate.getDate();  if( ToDay < 10 ) ToDay = "0"+ToDay;
             Month = CurDate.getMonth() + 1; if( Month < 10 ) Month = "0"+Month;
    
             document.write(DayWeek[CurDate.getDay()]+" "+ToDay+"."+Month+"."+CurDate.getFullYear());
    }   
    
    function FormToEnter(){
    
             document.write('<Table CellPadding=3 CellSpacing=0 Border=0><form><Tr class=smalltext Height=35>');
             document.write('<Th>Логин:</Th><Th><input type="text" name="login" value="" size=10></Th>');
             document.write('<Th>Пароль:</Th><Th><input type="password" name="pwd" value="" size=10></Th>');
             document.write('<Th><input type="submit" name="submit" value="войти" style="background-color: #DDDDDD"></Th>');
             document.write('<Th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A Href="#"><font color=#990000>Регистрация</font></A></Th>');
             document.write('</Tr></form></Table>');
    }
    
    //++++
    function AreaMap(xCoord,IdLayer,ChekPage){
    
             document.write('<AREA SHAPE=CIRCLE COORDS="'+xCoord+',35,22"  HREF="?chek='+ChekPage+'" onMouseOver="ShowHideLayer('+IdLayer+')"; onMouseOut="ShowHideLayer(0)"; ALT="">');
    }
    
    function PageTitle(){
             
             xCoords = new Array(42,100,162,215);
             
             // Слои подсветки в TopMenu
             for( i = 1; i <=4; i++ ) write_layer(i); 
             
             document.write('<Table Align=center CellPadding=0 CellSpacing=0 Border=0 BackGround="images/bg_top.gif" Width="100%" Height=136>');
             document.write('<Tr VAlign=top>');
             document.write('<Td Width=92 RowSpan=3><Img Src="images/logo1.gif" Border=0 Width=92 Height=136 Alt="Магазин развивающих игрушек"></Td>');
             document.write('<Td Width=223 RowSpan=2><Img Src="images/logo2.gif" Border=0 Width=223 Height=96 Alt="Магазин развивающих игрушек"></Td>');
             document.write('<Td Width=265><Img Src="images/top_menu.gif" USEMAP="#topmenu_map" Border=0 Width=265 Height=68 Alt=""></Td>');
             document.write('<MAP NAME="topmenu_map">');  for( i = 1; i <=4; i++ ) AreaMap(xCoords[i-1],i); document.write('</MAP>');
             document.write('<Td BackGround="images/bg_top1.gif">&nbsp;</Td>');
             document.write('<Td Width=133 RowSpan=3><Img Src="images/baby_top.gif" Border=0 Width=133 Height=136 Alt="Розумник:-)"></Td>');
             document.write('</Tr>');
             document.write('<Tr Height=28>');
             document.write('<Td ColSpan = 2 class=smalltext1 Align=right style="color:#006600">');
             // Сегодняшняя дата
             TodaysDate();
             document.write('&nbsp;&nbsp;&nbsp;&nbsp;</Td>');
             document.write('</Tr>');
             document.write('<Tr Height=40>');   
             document.write('<Td ColSpan=3 VAlign=bottom>');
             // Форма авторизации пользователя
             FormToEnter(); 
             document.write('</Td>'); 
             document.write('</Tr>');
             document.write('</Table>');
    }
    
    function StartPage(){
             
             document.write('<Table Align=center CellPadding=0 CellSpacing=0 Border=0 BgColor=#FFFFFF Width="100%">');
             document.write('<Tr VAlign=top>');
             document.write('<Td Width=171 BackGround="images/bg_left_menu.gif">');
             left_menu();
             document.write('<P>&nbsp;</P>');
             document.write('</Td>');
             document.write('<Td Width=12 BgColor=#FFFFFF><Img Src="pixel.gif" Border=0 Width=12 Height=1></Td>'); 
             document.write('<Td>');
    }
    
    function EndPage(){
             
             document.write('</Td>');
             document.write('<Td Width=18 BackGround="images/right_bg.gif"><Img Src="pixel.gif" Border=0 Width=18 Height=1></Td>');
             document.write('</Tr>');
             document.write('<Tr Height=6>');
             document.write('<Td Align=left ColSpan=3 BackGround="images/bottom_bg.gif"><Img Src="images/cut34.gif" Border=0 Width=4 Height=6 Alt=""></Td>'); 
             document.write('<Td Align=right Width=18 BackGround="images/bottom_bg.gif"><Img Src="images/cut34.gif" Border=0 Width=4 Height=6 Alt=""></Td>');
             document.write('</Tr>');
             document.write('</Table>');
    }
    ///////////////////
    
    function one_href(txt){
             
             document.write('<Tr VAlign=top><Td>&nbsp;&nbsp;<Img Src="images/bullet_child0.gif" Border=0 VSpace=0 HSpace=5 Alt="" Width=7 Height=11></Td><Td>'+txt+'</Td></Tr>');
    }
    
    function LookChildMenu(id_cat){
             
             document.getElementById("chm"+id_cat).innerHTML=eval("masschm"+id_cat);
    }
    
    function one_href_menu(id_cat,childok,txt){
             
             document.write('<Tr VAlign=top><Td>&nbsp;&nbsp;'+
                            '<Img Src="images/bullet_child'+childok+'.gif" Border=0 VSpace=0 HSpace=5 Alt="" Width=7 Height=11></Td><Td>');
             if(!childok)
             document.write('<A href="?chek=listgoods&id_categories='+id_cat+'" class=lm>'+txt+'</A>');
             else 
             document.write('<A href="javascript://" onClick="LookChildMenu('+id_cat+')" class=lm>'+txt+'</A><span id="chm'+id_cat+'"></span>');
                            
             document.write('</Td></Tr>'+
                            '<Tr><Td ColSpan=2 Height=3></Td></Tr>');
    }
    
    function one_href0(txt){
             
             document.write('<Tr VAlign=top><Td>&nbsp;&nbsp;<Img Src="images/pixel.gif" Border=0 VSpace=0 HSpace=5 Alt="" Width=6 Height=11></Td><Td>'+txt+'</Td></Tr>');
    }
    
    function one_str_cut(typestr){
             
             if(typestr == "top") cut = new Array(1,2);
             else cut = new Array(4,3);
             bgimg = "images/bg1_"+typestr+".gif";
             
             document.write('<Tr Height=13>');
             document.write('<Td Width=13><Img Src="images/cut'+cut[0]+'.gif" Border=0 Width=13 Height=13 Alt=""></Td>'); 
             document.write('<Td Width=145 BackGround="'+bgimg+'"><Img Src="'+'+bgimg+'+'" Border=0 Width=5 Height=13 Alt=""></Td>');
             document.write('<Td Width=13><Img Src="images/cut'+cut[1]+'.gif" Border=0 Width=13 Height=13 Alt=""></Td>'); 
             document.write('</Tr>');
    }
    
    function title_left_menu_top(tit){
             
             document.write('<Table CellPadding=0 CellSpacing=0 Border=0 Width=171 class=smalltext>');
             document.write('<Tr><Th Width=171 Height=22 style="color:#CC0000" BackGround="images/bg_top_left_menu.gif">'+tit+'<br><Img Src="pixel.gif" Border=0 Width=171 Height=3 Alt=""></Th></Tr>'); 
             document.write('</Table>');
    }
             
    function left_menu_top(tit){
             
             document.write('<Table CellPadding=0 CellSpacing=0 Border=0 Width=171 class=smalltext>');
             document.write('<Tr Height=20><Th ColSpan=3 BackGround="images/bg1_title.gif" style="color:#003366">'+tit+'</Th></Tr>');
             one_str_cut("top");
             document.write('<Tr><Td Width=158 ColSpan=2 BackGround="images/bg1_left.gif"><Table CellPadding=0 CellSpacing=0 Border=0 class=smalltext>');
    }
    
    function left_menu_bottom(){
             
             document.write('</Table></Td><Td Width=13 BackGround="images/bg1_right.gif">&nbsp;</Td></Tr>');
             one_str_cut("bottom");
             document.write('</Table>');
    }
    
    function left_menu(){
     
             title_left_menu_top("Подберите игрушку");
     
             left_menu_top('по ключевому слову:');
             document.write('<form><Tr><Td>&nbsp;&nbsp;&nbsp;&nbsp;</Td><Th><input type="text" name="searche_text" value="" size=15 style="width: 120px;"></Th><Th>&nbsp;</Th><Th><input type="image" name="submit" src="images/go.gif" alt="go" border="0" width="21" height="21"></Th></Tr></form>');
             left_menu_bottom();
     
             left_menu_top('по категории:');
             one_href('аудиокассеты');
             one_href('видеокассеты');
             one_href('волшебные липучки');
             one_href('головоломки');
             one_href('домино');
             one_href('книги');
             one_href('конструкторы');
             one_href('куклы-перчатки');
             one_href('сказки');
             one_href('лото');
             one_href('материал для игр в воде');
             one_href('мозаика');
             one_href('наборы для творчества');
             one_href('настольные игры');
             one_href('паззлы');
             one_href('пособия для малышей');
             one_href('рамки и вкаладыши');
             one_href('<A Href="cords.html">шнуровки</A>');
             left_menu_bottom();
 
             left_menu_top('по возрасту:');
             one_href('до 1 года');
             one_href('до 3 лет');
             one_href('от 3 до 6');
             one_href('от 6 и старше');
             left_menu_bottom();
             
             document.write('<Img Src="images/end_left_menu.gif" Border=0 Width=171 Height=51 Alt=""><br><br>');
             
             //Рассылка новостей
             FormSubscribe();
             
             //Баннеры, счетчики
             BannersCounters();
    }
    /////////////////
    function FormSubscribe(){
             
             document.write('<Table Align=center Width=130 CellPadding=3 CellSpacing=0 Border=1 BorderColor=#99CC00 BgColor=#FFFFFF class=smalltext>');
             document.write('<form>');
             document.write('<Tr><Th BgColor=#99CC00 style="color:#FFFFFF">Рассылка новостей</Th></Tr>');
             document.write('<Tr><Td Align=center><Table class=smalltext>');
             document.write('<Tr><Td>возраст ребенка:</Td></Tr>'); 
             document.write('<Tr><Td><SELECT name="age">');
             document.write('<OPTION VALUE="<= 1">до 1 года');
             document.write('<OPTION VALUE="<= 3">до 3 лет');
             document.write('<OPTION VALUE=">= 6">от 6 и старше');
             document.write('<OPTION VALUE="">- не указывать');
             document.write('</SELECT></Td></Tr>');
             document.write('<Tr><Td><input type="text" name="email" value="e-mail" size=17></Td></Tr>');
             document.write('<Tr><Td><input type="submit" name="submit" value="подписаться" style="background-color: #DDDDDD"></Td></Tr>');  
             document.write('</Table></Td></Tr>');
             document.write('</form>');
             document.write('</Table><br>');
    }
    
    function BannersCounters(){
    
             //Баннер  100х100
             document.write('<Table Align=center Width=100 Height=100 CellPadding=0 CellSpacing=0 Border=1 BgColor=#FFFFFF class=smalltext>');
             document.write('<Tr><Th>Баннер<br> 100х100</Th></Tr>');
             document.write('</Table><br>');
             
             //Счетчики
             document.write('<Table Align=center CellPadding=0 CellSpacing=0 Border=0 BgColor=#FFFFFF class=smalltext>');
             document.write('<Tr><Th><Img Src="images/rambler.gif" Border=0 Alt=""></Th></Tr>');
             document.write('</Table>');
    }
    /////////////////
    
    //++++
    function write_layer(IdLayer){
             
             mass_alt = new Array("На домашнюю страницу","Обратная связь","Корзина","Как купить");

             document.write('<DIV ID="TopMenu'+IdLayer+'" STYLE="position: absolute; width: 120; height: 64; z-index: '+IdLayer+'; visibility: hidden;">');
             document.write('<Table Align=center CellPadding=0 CellSpacing=0 Border=0 BackGround="images/bg_layer.gif" Width=120 Height=64 class=smalltext style="color:#003366">');
             document.write('<Tr><Th><br>'+mass_alt[IdLayer - 1]+'</Th></Tr>');
             document.write('</Table>');
             document.write('</DIV>');
    }
    
    //++++
    function ShowHideLayer(IdLayer){
               
               N=window.navigator.appName.substring(0,8);
               if(N=="Microsof"){
                  x=window.event.x;
                  doc = "document.all";
                  sty = ".style";
               } else if(N=="Netscape"){
                  x=evnt.pageX;
                  doc = "document";
                  sty = "";
               }
               
               if(IdLayer > 0){
                  teklayer = eval(doc + '["TopMenu'+IdLayer+'"]' + sty);
                  teklayer.top = 60;
                  teklayer.left = x - 20;
                  teklayer.visibility = "visible";    
               }
               
               for( i = 1; i <=4; i++ ){
                    if(i != IdLayer) eval(doc + '["TopMenu'+i+'"]' + sty + '.visibility="hidden";');
               }
               
      }
      ////////////////////
      
      function BriefInfGoods(razdel,_id,type_img,_name,price,_status,components,val,comment,age,count){
               
               curhref= razdel+"-"+_id+".html";
               document.write('<Tr VAlign=top>');
               document.write('<Td Width=100><A Href="'+curhref+'"><Img Src="'+razdel+'/'+_id+'s.'+type_img+'" Border=0></A></Td>');
               document.write('<Td Width=180><b><A Href="'+curhref+'">'+_id+". "+_name+'</A></b><br><br> Цена: '+price+' грн.</Td>');
               document.write('<Td>'+components+'<br><A Href="'+curhref+'">Подробнее</A></Td>');
               document.write('<Td Align=center Width=120>');
               document.write('<A Href="#">Оценка клиента:</A><br>'); 
               document.write('<Img Src="images/val'+val+'.gif" Border=0 VSpace=5><br>');
               
               if(comment == 1 ) promstr =  "отзыв";
               if(comment == 0 ) promstr =  "отзывов";
               if(comment > 1 & comment < 5) promstr =  "отзыва";
               if(comment > 5 ) promstr =  "отзывов";
               document.write(comment+' '+promstr+'<br><br>');
               
               document.write('возраст '+age);
               document.write('</Td>');
               document.write('<Th>');
               document.write('<input type="text" name="count" value="'+count+'" size=3><br>');
               document.write('<input type="image" name="submit" src="images/add_cart.gif" alt="Добавить в корзину" border="0" width="37" height="28"></Th>');
               document.write('</Tr>');
               document.write('<Tr><Td ColSpan=5><hr></Td></Tr>');
     
      }
      
      function BriefInfGoodsLarge(_id,type_img,_name,opicanie,price,_status,components,val,comment,age,podrobno,count){
               
               document.write('<Tr VAlign=top>');
               document.write('<Td><Img Src="images/'+_id+'l.'+type_img+'" Border=0></Td>');
               document.write('<Td><font color=#990000 size=+1>'+_name+'</font><br><br><b>'+opicanie+'</b><br><br>');
               document.write('Цена: '+price+' грн.<br><br>');
               document.write('Оценка клиента: '); 
               document.write('<Img Src="images/val'+val+'.gif" Border=0 VSpace=0><br>');
               document.write('><A Href="#">См. отзывы клиентов:</A><br><br>'); 
               document.write('возраст '+age+'<br><br>');
               document.write('<Table><Tr class=smalltext1><Td>Количество:</Td><Td><input type="text" name="count" value="'+count+'" size=3></Td>');
               document.write('<Td><input type="image" name="submit" src="images/add_cart.gif" alt="Добавить в корзину" border="0" width="37" height="28"></Td></Tr></Table><br><br>');
               document.write(podrobno+'<hr>');
               document.write('><A Href="#">Оставьте Ваш отзыв</A><br><br>');  
               document.write('</Td><Td class=smalltext Width=120><P>&nbsp;</P><P>&nbsp;</P><Img Src="images/tell.gif" Border=0 Align=left><A Href="#"><font color=#000000>Сообщите другу<br> об этом товаре</font></A></Td></Tr>');
      }
      ////////////////////
      
      
      //++++
      function LookWin(put){
               ww = 750; hh = 550;
               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+"\')"); 
      }