
	var pixelsLeft = 450;
	var slideInnerBlocksInterval;
	
	function slideInnerOfBlock(Block,Direction,step){
		clearInterval(slideInnerBlocksInterval);
	
		pixelsLeft = step ? step : 450;
		
		switch(Direction){
			case 'right':
				slideInnerBlocksInterval = setInterval("moveInnerBlockRight('"+Block+"')",20);
			break;
			
			case 'left':
				slideInnerBlocksInterval = setInterval("moveInnerBlockLeft('"+Block+"')",20);
			break;
			
			case 'top':
				pixelsLeft = step ? step : 380;
				slideInnerBlocksInterval = setInterval("moveInnerBlockTop('"+Block+"')",20);
			break;
			
			case 'bottom':
				pixelsLeft = step ? step : 380;
				slideInnerBlocksInterval = setInterval("moveInnerBlockBottom('"+Block+"')",20);
			break;
		}
	}
	
	function moveInnerBlockLeft(BlockId){
		var pixelsStep = Math.round(pixelsLeft/8);
		if(pixelsStep < 1){
			pixelsStep = 1;
		}
		
		//obj(BlockId).scrollLeft+=pixelsStep;
		mvinner(BlockId,'left',pixelsStep);
		pixelsLeft -=pixelsStep;
		
		if(pixelsStep <= 1){
			clearInterval(slideInnerBlocksInterval);
			pixelsLeft = 100;
		}
	}
	
	function moveInnerBlockRight(BlockId){
		var pixelsStep = Math.round(pixelsLeft/8);
		if(pixelsStep < 1){
			pixelsStep = 1;
		}
		
		//obj(BlockId).scrollLeft-=pixelsStep;
		mvinner(BlockId,'right',pixelsStep);
		pixelsLeft -=pixelsStep;
		
		if(pixelsLeft <= 1){
			clearInterval(slideInnerBlocksInterval);
		}
	}
	
	function moveInnerBlockTop(BlockId){
		var pixelsStep = Math.round(pixelsLeft/8);
		if(pixelsStep < 1){
			pixelsStep = 1;
		}
		
		//obj(BlockId).scrollLeft-=pixelsStep;
		mvinner(BlockId,'top',pixelsStep);
		pixelsLeft -=pixelsStep;
		
		if(pixelsLeft <= 1){
			clearInterval(slideInnerBlocksInterval);
		}
	}
	
	function moveInnerBlockBottom(BlockId){
		var pixelsStep = Math.round(pixelsLeft/8);
		if(pixelsStep < 1){
			pixelsStep = 1;
		}
		
		//obj(BlockId).scrollLeft-=pixelsStep;
		mvinner(BlockId,'bottom',pixelsStep);
		pixelsLeft -=pixelsStep;
		
		if(pixelsLeft <= 1){
			clearInterval(slideInnerBlocksInterval);
		}
	}
	
	function srchActivate(id){
		execAP('/root/index/q.php',{o:'search_types',t:id},false,'srch_params',false,false,false);
		
		obj('srch_inet').className = '';
		obj('srch_img').className = '';
		obj('srch_video').className = '';
		obj('srch_board').className = '';
		obj('srch_etc').className = '';
		
		obj(id).className = 'active';
		
		obj('searchq').focus();	
	}
	
	function mixtabActivate(id,tn){
		var tabs = document.getElementsByName(tn);

		for(var i=0;i<tabs.length;i++){
			tabs[i].className = '';
		}
		
		obj(id).className = 'active';
	}
	
	function mixtabActByTAG(divid,tag,id){
		var divObj = document.getElementById(divid); 
		var tags = divObj.getElementsByTagName(tag); 
		for (var i = 0; i < tags.length; i++) { 
		   tags[i].className = '';
		}
		
		obj(id).className = 'active';
	}
	
	function oldIE(){
		if(navigator.appVersion.indexOf('MSIE 6') != -1){
			return true;
		}
		if(navigator.appVersion.indexOf('MSIE 7') != -1){
			return true;
		}
		
		return false;
	}
	
	function mvinner(id,direction,value){
		if(navigator.appName != 'Opera' && !oldIE()){
			switch(direction){
				case 'left':
					obj(id).parentNode.scrollLeft+=value;	
				break;
				
				case 'right':
					obj(id).parentNode.scrollLeft-=value;
				break;
				
				case 'top':
					obj(id).parentNode.scrollTop-=value;
				break;
				
				case 'bottom':
					obj(id).parentNode.scrollTop+=value;
				break;
			}
			
			return;
		}
	
		var mvObj = obj(id).style;
		
		
		switch(direction){
			case 'left':
				if(!mvObj.left){mvObj.left = '1px';}
				mvObj.left=(parseInt(mvObj.left)+(value*-1))+'px';
			break;
			
			case 'right':
				if(!mvObj.left){mvObj.left = '1px';}
				mvObj.left=(parseInt(mvObj.left)-(value*-1))+'px';
			break;
			
			case 'top':
				if(!mvObj.top){mvObj.top = '1px';}
				mvObj.top=(parseInt(mvObj.top)-(value*-1))+'px';
			break;
			
			case 'bottom':
				if(!mvObj.top){mvObj.top = '1px';}
				mvObj.top=(parseInt(mvObj.top)+(value*-1))+'px';
			break;
		}
	}
	
	function sfocs(){
		document.getElementById('searchq').focus();
	}
	
	function ncl(id,nid){
		mixtabActivate(id,'newsLine');
		
		execAP('/root/index/q.php',{o:'nload',i:nid},false,'mainNS',false,false,false);
	}