var cur_top_view=5; 	//текущий
var cnt_top_view=5; 	//всего
var tw_top_view =60;	//ширина маленького
var sw_top_view =650;	//ширина выделенного
function changeTopView(id) {
	if (id==cur_top_view) return;
	new Effect.Fade('top_view_row'+cur_top_view, { duration: 0.15 });
	for (var i = 1, length = cnt_top_view; i <= length; i++) {
		if (id!=i) {
			new Effect.Morph('top_view'+i, 		{ style: 'width:'+tw_top_view+'px;', duration: 0.30, transition: Effect.Transitions.linear });
			new Effect.Morph('top_view_img'+i, 	{ style: 'left:'+(-images_position[i])+'px', duration: 0.15, transition: Effect.Transitions.linear });
			new Effect.Morph('top_view_row'+i, 	{ style: 'left:'+(-images_position[i])+'px', duration: 0.15, transition: Effect.Transitions.linear });
		} else {
			new Effect.Morph('top_view'+id, 	{ style: 'width:'+sw_top_view+'px;', duration: 0.15, transition: Effect.Transitions.linear });
			new Effect.Morph('top_view_img'+i, 	{ style: 'left:0px', duration: 0.15, transition: Effect.Transitions.linear });
			new Effect.Morph('top_view_row'+i, 	{ style: 'left:1px', duration: 0.15, transition: Effect.Transitions.linear });
		}
	}	 
	cur_top_view=id;
	setTimeout("new Effect.Appear('top_view_row'+cur_top_view, { duration: 0.15 });",150);
}
function HoverTopView(id) {	
	if (id==cur_top_view) return;
	if (cur_top_view!=id && id!=cnt_top_view) {
		$('top_view'+id).style.width=(tw_top_view+10)+'px';
		id=id+1;
		if (cur_top_view!=id) {
			$('top_view'+id).style.width=(tw_top_view-10)+'px';	
			$('top_view_row'+id).style.left=(-images_position[id]-9)+'px';
			$('top_view_img'+id).style.left=(-images_position[id]-10)+'px';
		} else {
			$('top_view'+id).style.width=(sw_top_view-10)+'px';
			$('top_view_row'+id).style.left='-9px';
			$('top_view_img'+id).style.left='-10px';
		}
	} else {
		if (cur_top_view!=(id-1)) {
			$('top_view'+(id-1)).style.width=(tw_top_view-10)+'px';
			$('top_view'+id).style.width=(tw_top_view+10)+'px';		
		} else {
			$('top_view'+(id-1)).style.width=(sw_top_view-10)+'px';
			$('top_view'+id).style.width=(tw_top_view+10)+'px';	
		}
	}
}
function HideTopView(id) {
	if (id==cur_top_view) return;
	if (cur_top_view!=id) {
		for (var i = 1, length = cnt_top_view; i <= length; i++) {
			if (cur_top_view!=i) {
				$('top_view'+i).style.width=(tw_top_view)+'px';
				$('top_view_img'+i).style.left=-images_position[i]+'px';
				$('top_view_row'+i).style.left=-images_position[i]+'px';
			} else {
				$('top_view'+i).style.width=(sw_top_view)+'px';
				$('top_view_img'+i).style.left='0px';
				$('top_view_row'+i).style.left='1px';
			}
		}
	}
}
function hulo() {
	x = $('top_view').offsetWidth;
	sw_top_view = x-(tw_top_view*(cnt_top_view-1));
	for (var i = 1, length = cnt_top_view; i <= length; i++) {
		if (cur_top_view!=i) {
			$('top_view'+i).style.width=(tw_top_view)+'px';
			$('top_view_img'+i).style.left=-images_position[i]+'px';
			$('top_view_row'+i).style.left=-images_position[i]+'px';
		} else {
			$('top_view'+i).style.width=(sw_top_view)+1+'px';
			$('top_view_img'+i).style.left='0px';
			$('top_view_row'+i).style.left='1px';
		}
	}
}

function WorldMap() {
	Effect.Fade('main_list', {duration:0.2});
	setTimeout("Effect.Appear('main_map', {duration:0.2});",200);
	$('mt-e-l').className='main-title-h';
	$('mt-e-m').className='main-title-s';
}

function WorldList() {
	Effect.Fade('main_map', {duration:0.2});
	setTimeout("Effect.Appear('main_list', {duration:0.2});",200);
	$('mt-e-l').className='main-title-s';
	$('mt-e-m').className='main-title-h';
}