// Глобальные переменные - id, nomer
function init()
{
	//-------  Обновление комментариев -------
	if (id==1)
		comment("NULL");
		
	//-------  Локальные переменные -------
	var f,temp,div,img;
	var full=document.getElementById('full');
	var content=document.getElementById('content');
	var picture_theater=document.getElementById('picture_theater');
	var picter_link=document.getElementById('picter_link');
	var left_menu=document.getElementById('left_menu');
	var blogger_alphabet=document.getElementById('blogger_alphabet');
	var logotype=document.getElementById('logotype');
	
	//-------  Картинка театра -------
	if (picture_theater)
		full.insertBefore(picture_theater,content); 
	
	//-------  Картинки-ссылки -------
	if (picter_link)
	{
		/*f=document.createDocumentFragment();
		while(picter_link.hasChildNodes())
		{
			div=document.createElement('div');
			div.className='shadow';
			//-----------------
			temp=picter_link.lastChild.firstChild.width;//223 
			//alert(temp);
			div.appendChild(picter_link.removeChild(picter_link.lastChild));
			div.style.width=(temp+10)+'px';//233
			//-----------------
				img=document.createElement('img');
				img.className='shadow_bottom_right';
				img.style.marginLeft=(-703+temp+10)+'px';//-470
				img.setAttribute('src',image_dir+'shadow_bottom.gif');
				img.setAttribute('width',703);
				img.setAttribute('height',9);
				img.setAttribute('alt','');
			div.appendChild(img); 
			//-----------------
				img=document.createElement('img');
				img.className='shadow_angle';
				img.style.left=(temp+2)+'px';//225
				img.setAttribute('src',image_dir+'shadow_angle.gif');
				img.setAttribute('width',8);
				img.setAttribute('height',14);
				img.setAttribute('alt','');
			div.appendChild(img);
			//-----------------
			f.appendChild(div);
		}*/
		full.insertBefore(picter_link,content); 
		//picter_link.appendChild(f);	
	}
	
	//-------  Алфавитный список -------
	div=document.createElement('div');
	div.setAttribute('id','shadow_blogger_alphabet');
	div.className='shadow';
	//-----------------
		img=document.createElement('img');
		img.setAttribute('src',image_dir+'shadow_bottom.gif');
		img.setAttribute('width',703);
		img.setAttribute('height',9);
		img.setAttribute('alt','');
	div.appendChild(img); 
	//-----------------
		img=document.createElement('img');
		img.className='shadow_angle';
		img.setAttribute('src',image_dir+'shadow_angle.gif');
		img.setAttribute('width',8);
		img.setAttribute('height',14);
		img.setAttribute('alt','');
	div.appendChild(img); 
	//-----------------
	div.insertBefore(blogger_alphabet,div.firstChild); 
	full.insertBefore(div,content);

	//-------  Основное содержимое -------
	if (id==0)
	{
		f=document.createDocumentFragment();
		while(content.hasChildNodes())
		{
			temp=content.removeChild(content.firstChild);
			if (temp.className!='list_blog')
			{
				f.appendChild(temp);
				continue;
			}
			
			//-----------------
			div=document.createElement('div');
			div.className='shadow';
			//-----------------
			div.appendChild(temp); 
			//-----------------
				img=document.createElement('img');
				img.setAttribute('src',image_dir+'shadow_bottom.gif');
				img.setAttribute('width',703);
				img.setAttribute('height',9);
				img.setAttribute('alt','');
			div.appendChild(img); 
			//-----------------
				img=document.createElement('img');
				img.className='shadow_angle';
				img.setAttribute('src',image_dir+'shadow_angle.gif');
				img.setAttribute('width',8);
				img.setAttribute('height',14);
				img.setAttribute('alt','');
			div.appendChild(img); 
			//-----------------
			f.appendChild(div);
		}
		content.style.width='703px';
		content.style.left='-17px';
		content.style.marginTop='0px';
		content.appendChild(f);	
	}
	else
	{
		div=document.createElement('div');
		div.setAttribute('id','shadow_content');
		div.className='shadow';
		//-----------------
			img=document.createElement('img');
			img.setAttribute('src',image_dir+'shadow_bottom.gif');
			img.setAttribute('width',703);
			img.setAttribute('height',9);
			img.setAttribute('alt','');
		div.appendChild(img); 
		//-----------------
			img=document.createElement('img');
			img.className='shadow_angle';
			img.setAttribute('src',image_dir+'shadow_angle.gif');
			img.setAttribute('width',8);
			img.setAttribute('height',14);
			img.setAttribute('alt','');
		div.appendChild(img); 
		//-----------------
		div.insertBefore(content,div.firstChild); 
		full.insertBefore(div,left_menu);
	}

	//-------  Левое меню -------
	div=document.createElement('div');
	div.setAttribute('id','shadow_left_menu');
	div.className='shadow';
	//-----------------------------------------
		img=document.createElement('img');
		img.className='shadow_bottom_right';
		img.setAttribute('src',image_dir+'shadow_bottom.gif');
		img.setAttribute('width',703);
		img.setAttribute('height',9);
		img.setAttribute('alt','');
	div.appendChild(img); 
	//-----------------------------------------
		img=document.createElement('img');
		img.className='shadow_angle';
		img.setAttribute('src',image_dir+'shadow_angle.gif');
		img.setAttribute('width',8);
		img.setAttribute('height',14);
		img.setAttribute('alt','');
	div.appendChild(img); 
	//-----------------------------------------
	div.insertBefore(left_menu,div.firstChild);
	//full.insertBefore(div,blogger_alphabet.parentNode);
	full.insertBefore(div,logotype.nextSibling);

	//-------  Баннеры -------
	var banner_top=document.getElementById('banner_top');
	var banner_centr=document.getElementById('banner_centr');
	//var body=document.getElementById('full').parentNode;
	
	if (banner_top)
		full.insertBefore(banner_top,full.firstChild);
	if (banner_centr)
		full.insertBefore(banner_centr,div.nextSibling);
		return;
		banner_top.className='view';
	if (banner_centr)
		banner_centr.className='view';
	//-----------------------------------------
	if (banner_top)
	{
		if (banner_centr)
			body.className='top_centr';
		else
			body.className='top';
	}
	else if (banner_centr)
		body.className='centr';

	//-----------------------------------------
	var banner_left=document.getElementById('banner_left');
	if (banner_left)
		banner_left.className='view';

	//document.body.onmouseout=left_menu;
 	//document.body.onmouseover=left_menu;
} 
