//////////////////////////////////////////////////////////////////////////////////////////////////////////////
																		//
var d = document;																//
																		//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////


var msg='';
	function fonload() {
		if(msg!=''){alert(msg);}
		if(d.getElementById('news_ind')) news();
	}
	window.onload=fonload;
	
	var tLeft=653;
	var tWidth=0;
	var numNews=1;
	function news() {
		if(d.getElementById('index').className=='rus'){
			if(tLeft){
				tLeft==653 ? tLeft=tLeft-3 : tLeft=tLeft-5;
				tWidth=tWidth+5
				d.getElementById('news_ind'+numNews).style.position='static';
				d.getElementById('news_ind'+numNews).style.marginLeft=tLeft+'px';
				d.getElementById('news_ind'+numNews).style.width=tWidth+'px';
				newsTO = window.setTimeout('news()', 50);
			} else {
				tLeft=653;
				tWidth=0;
				d.getElementById('news_ind'+numNews).style.position='absolute';
				newsTO2 = window.setTimeout('news2()', 5000);
			}
		}
	}
	
	function news2() {
	
				d.getElementById('news_ind'+numNews).style.marginLeft=tLeft+'px';
				d.getElementById('news_ind'+numNews).style.width='1px';
				numNews == 2 ? numNews=1 : numNews++;
				news();
	}
	
	var to;
	var tnum=0;
	
	function mmShow(num) {
			if(num!=tnum && tnum>0) {
				mmIHide(tnum);	
			}
			window.clearTimeout(to);		
		if(d.getElementById('mm'+num)) {
			
			ul=d.getElementById('mm'+num)
			li=d.getElementById('mmli'+num);
			a=d.getElementById('mml'+num);
			if(d.getElementById('mmf'+num)) iframe=d.getElementById('mmf'+num);
			
			tnum=num;
			
			ul.className='ul2';
			if(d.getElementById('mmf'+num)) iframe.className='';
			left=li.offsetLeft;
			if(num>1) {left+=26} else {left-=10};
			if( left>510 ) left = 510;
			ul.style.left=left+'px';
			if(d.getElementById('mmf'+num)) {
				iframe.style.left=left+'px';
				iframe.style.height=ul.offsetHeight+'px';
			}
			if (a.className=='') {
				a.className='sel2';
			}
			
		}
	}
	function mmIHide(num) {
		if(d.getElementById('mm'+num)) {
			d.getElementById('mm'+num)
			tnum=0;
			if(d.getElementById('mmf'+num)) iframe=d.getElementById('mmf'+num);
			a=d.getElementById('mml'+num);
			ul.className='ul2 dn';
			if(d.getElementById('mmf'+num)) iframe.className='dn';
			if (a.className=='sel2') {
				a.className='';
			}
			
		}
	}	
	function mmHide(num) {
		if(d.getElementById('mm'+num)) {
			to=window.setTimeout('mmIHide('+num+')',500);
		}
	}		
	function tnumS() {
		alert(tnum);
	}		
	
	function bgPosition(num, mode) {
		if(mode){
			d.getElementById('i'+num).className='item sel';
			d.getElementById('i'+num+'ul').className='';
		} else {
			d.getElementById('i'+num).className='item';
			d.getElementById('i'+num+'ul').className='dn';
		}	
	}		
	
	
	var tPh=1;
	function phg(num) {
		if(num!=tPh && d.getElementById('ph'+num)) {
			d.getElementById('ph'+tPh).className='dn';
			d.getElementById('ph'+num).className='';
			tPh=num;
		}
	}
	

