position=0;
image_no=0;
function moving_thing(in_direction) {
	if (position==0 || position==-4190) {
		pixels=390;
	} else {
		pixels=440;
	}
	if (in_direction=='left') {
		move_pixels=pixels;
	} else {
		move_pixels=-1*pixels;
	}
	position=move_pixels+position;
	if (position>0) {
		position=0;
	}
	if (position<-4190) {
		position=-4190;
	}
	document.getElementById('scrolling_window').style.left=position+"px";
	if (position<0) {
		scrolling_left_style_display='';
	} else {
		scrolling_left_style_display='none';
	}
	if (position>-4190) {
		scrolling_right_style_display='';
	} else {
		scrolling_right_style_display='none';
	}
	document.getElementById('scrolling_left').style.display=scrolling_left_style_display;
	document.getElementById('scrolling_right').style.display=scrolling_right_style_display;
	return position;
}

function show_detail(img, issue) {
	var img_str='';
	var img_next_str='';
	var img_previous_str='';
	if (img<10) {
		img_str='0'+img;
	} else {
		img_str=img;
	}
	img_next=img+1;
	if (img_next<10) {
		img_next_str='0'+img_next;
	} else {
		img_next_str=img_next;
	}
	img_previous=img-1;
	if (img_previous<10) {
		img_previous_str='0'+img_previous;
	} else {
		img_previous_str=img_previous;
	}
	document.getElementById('detail_window').style.backgroundImage='url(\'img/issue_'+issue+'/kve__Page_'+img_str+'_293.jpg\')';
	document.getElementById('detail_window_previous').style.backgroundImage='url(\'img/issue_'+issue+'/kve__Page_'+img_previous_str+'_293.jpg\')';
	document.getElementById('detail_window_next').style.backgroundImage='url(\'img/issue_'+issue+'/kve__Page_'+img_next_str+'_293.jpg\')';
	if (img==1) {
		image_no=0;
		document.getElementById('detail_window').style.backgroundPosition='top right';
		document.getElementById('detail_left').style.display='none';
		document.getElementById('detail_right').style.display='';
		document.getElementById('detail_window_left').style.display='none';
		document.getElementById('detail_window_right').style.display='';
	} else if (img<43 && img>=2) {
		image_no=img;
		document.getElementById('detail_left').style.display='';
		document.getElementById('detail_right').style.display='';
		document.getElementById('detail_window_left').style.display='';
		document.getElementById('detail_window_right').style.display='';
	} else if (img>=43) {
		image_no=img;
		document.getElementById('detail_window').style.backgroundPosition='top left';
		document.getElementById('detail_left').style.display='';
		document.getElementById('detail_right').style.display='none';
		document.getElementById('detail_window_left').style.display='';
		document.getElementById('detail_window_right').style.display='none';
	}
}

function moving_detail(in_direction, issue) {
	o_img=1;
	switch (in_direction) {
		case 'left':
			image_no-=1;
			break;
		case 'right':
			if (image_no==0) {
				image_no+=2;
			} else {
				image_no+=1;
			};
			break;
		default:
			exit;
			break;
	}
	if (image_no>=2 && image_no<=43) {
		o_img=image_no;
	}
	show_detail(o_img, issue);
}

function cut_show_details(obj, detail_id) {
	obj_source=obj;
	obj_target=document.getElementById(detail_id);
	if (obj_target.style.display!='none') {
		obj_source.style.color='blue';
		obj_target.style.display='none';
	} else {
		obj_source.style.color='white';
		obj_target.style.display='';
	}
}

function cut_vote_color(obj) {
	return true;
}

function cut_vote(obj) {
	obj.style.color='';
	obj.style.fontWeight='normal';
}

function doOnLoad() {
//	setTimeout("setVideo("+playlist_arr[1][0]+")",1500);
//	if (document.getElementById('video_01')) {
//		alert(playlist_arr[1][0]);
//	}
	if (typeof setVideo == 'function') {
		setVideo("video_01");
	}
	if (typeof flashnews.initializeFn() == 'function') {
		flashnews.initializeFn();
	}
}