function hideNews() {
	for (i = 0; i < 110; i ++) {
		news_id = 'news_item_' + i;
		if (document.getElementById(news_id)) {
			document.getElementById(news_id).style.display = 'none';
		}
	}
}

function showNewsItem(id) {
	hideNews();
	item_id = 'news_item_' + id;
	if (document.getElementById(item_id)) {
		document.getElementById(item_id).style.display = 'block';
	}
} 

function moveStrip(dir) {
	if (document.getElementById('filmstrip_content')) {
		var pos = document.getElementById('filmstrip_content').offsetLeft;
		if (dir == 'left' && pos > 0 - 2000) {
			var leftpos = pos - 200 + "px";
			document.getElementById('filmstrip_content').style.left = leftpos;
			if (pos <= 0) {
				document.getElementById('filmstrip_previous').src = "/images/photos/prev.gif";
				document.getElementById('filmstrip_previous').style.cursor = "pointer";
			} 
			if (pos <= 0 - 1800) {
				document.getElementById('filmstrip_next').src = "/images/photos/stop.gif";
				document.getElementById('filmstrip_next').style.cursor = "default";
			}
		} else if (dir == 'right' && pos != 0) {
			var leftpos = pos + 200 + "px";
			//alert(pos);
			document.getElementById('filmstrip_content').style.left = leftpos;
			if (pos >= 0 - 200) {
				document.getElementById('filmstrip_previous').src = "/images/photos/stop.gif";
				document.getElementById('filmstrip_previous').style.cursor = "default";
			}
			if (pos >= 0 - 2000) {
				document.getElementById('filmstrip_next').src = "/images/photos/next.gif";
				document.getElementById('filmstrip_next').style.cursor = "default";
			}
		}
	}
} 

function showModel(id) {
	item_id = 'display_model';
	title_id = 'ss_title';
	if (document.getElementById(item_id)) {
		document.getElementById(item_id).src = '/images/photos/model_' + id + '.jpg';
	}
	
	r = document.getElementById(title_id);
	if (!r) { return false; }
    if (typeof r.innerHTML == 'undefined') { return false; }
    
    // Update the text
    r.innerHTML = model_names[id];
} 

function showInfo(id) {
	document.getElementById('info_2').style.display = "block";
	//alert("NN");
	for (i = 0; i < 5; i ++) {
		info_id = "info_" + i;
		document.getElementById(info_id).style.display = "none";
	}
	info_id = "info_" + id;
	document.getElementById(info_id).style.display = "block";
}